diff --git a/API_VERSION b/API_VERSION index dffa3a76a..e0ecaaa28 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -6d15a7f20cb77c2c22091a30e499cb89d7e3248c \ No newline at end of file +f587035a62fe3323ed42077a0526158e57a8260b \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dfd2783f1..559abffe4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2111 \ No newline at end of file +v2121 \ No newline at end of file diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 570f6144d..cfb1babef 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2025-10-29.clover" + CURRENT = "2025-11-17.clover" CURRENT_MAJOR = "clover" diff --git a/stripe/_bank_account.py b/stripe/_bank_account.py index 068e8cccd..3f6dd73c8 100644 --- a/stripe/_bank_account.py +++ b/stripe/_bank_account.py @@ -376,9 +376,9 @@ class Error(StripeObject): """ status: str """ - For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. + For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, `tokenized_account_number_deactivated` or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn't enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If the status is `tokenized_account_number_deactivated`, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. - For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. + For external accounts, possible values are `new`, `errored`, `verification_failed`, and `tokenized_account_number_deactivated`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. """ @classmethod diff --git a/stripe/_charge.py b/stripe/_charge.py index bda833c4e..da3ce8661 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -1219,6 +1219,7 @@ class Ideal(StripeObject): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", @@ -1235,7 +1236,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -1244,6 +1245,7 @@ class Ideal(StripeObject): "BITSNL2A", "BUNQNL2A", "BUUTNL2A", + "FNOMNL22", "FVLBNL22", "HANDNL2A", "INGBNL2A", @@ -1274,6 +1276,10 @@ class Ideal(StripeObject): """ Last four characters of the IBAN. """ + transaction_id: Optional[str] + """ + Unique transaction ID generated by iDEAL. + """ verified_name: Optional[str] """ Owner's verified full name. Values are verified or provided by iDEAL directly diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 78c93fd3a..f4b62a6af 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -944,6 +944,7 @@ class Ideal(StripeObject): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", @@ -960,7 +961,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -969,6 +970,7 @@ class Ideal(StripeObject): "BITSNL2A", "BUNQNL2A", "BUUTNL2A", + "FNOMNL22", "FVLBNL22", "HANDNL2A", "INGBNL2A", @@ -1350,6 +1352,7 @@ class Blocked(StripeObject): "bank_account_restricted", "bank_account_unusable", "debit_not_authorized", + "tokenized_account_number_deactivated", ] ] """ diff --git a/stripe/_event.py b/stripe/_event.py index 3ba4cbdf1..c876e32b3 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -165,6 +165,7 @@ class Request(StripeObject): "customer_cash_balance_transaction.created", "entitlements.active_entitlement_summary.updated", "file.created", + "financial_connections.account.account_numbers_updated", "financial_connections.account.created", "financial_connections.account.deactivated", "financial_connections.account.disconnected", @@ -172,6 +173,7 @@ class Request(StripeObject): "financial_connections.account.refreshed_balance", "financial_connections.account.refreshed_ownership", "financial_connections.account.refreshed_transactions", + "financial_connections.account.upcoming_account_number_expiry", "identity.verification_session.canceled", "identity.verification_session.created", "identity.verification_session.processing", diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index a6b062dd1..5b3e63507 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -232,6 +232,7 @@ "stripe._subscription_schedule", "SubscriptionSchedule", ), + "tax.association": ("stripe.tax._association", "Association"), "tax.calculation": ("stripe.tax._calculation", "Calculation"), "tax.calculation_line_item": ( "stripe.tax._calculation_line_item", @@ -260,6 +261,10 @@ "ConnectionToken", ), "terminal.location": ("stripe.terminal._location", "Location"), + "terminal.onboarding_link": ( + "stripe.terminal._onboarding_link", + "OnboardingLink", + ), "terminal.reader": ("stripe.terminal._reader", "Reader"), "test_helpers.test_clock": ( "stripe.test_helpers._test_clock", diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index c323e3294..bc1bef3eb 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -915,6 +915,7 @@ class Ideal(StripeObject): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", @@ -931,7 +932,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -940,6 +941,7 @@ class Ideal(StripeObject): "BITSNL2A", "BUNQNL2A", "BUUTNL2A", + "FNOMNL22", "FVLBNL22", "HANDNL2A", "INGBNL2A", @@ -970,6 +972,10 @@ class Ideal(StripeObject): """ Last four characters of the IBAN. """ + transaction_id: Optional[str] + """ + Unique transaction ID generated by iDEAL. + """ verified_name: Optional[str] """ Owner's verified full name. Values are verified or provided by iDEAL directly @@ -1579,7 +1585,13 @@ class Twint(StripeObject): class UsBankAccount(StripeObject): account_holder_type: Optional[Literal["company", "individual"]] + """ + The type of entity that holds the account. This can be either 'individual' or 'company'. + """ account_type: Optional[Literal["checking", "savings"]] + """ + The type of the bank account. This can be either 'checking' or 'savings'. + """ bank_name: Optional[str] """ Name of the bank associated with the bank account. @@ -1598,11 +1610,11 @@ class UsBankAccount(StripeObject): """ payment_reference: Optional[str] """ - Reference number to locate ACH payments with customer's bank. + The ACH payment reference for this transaction. """ routing_number: Optional[str] """ - Routing number of the bank account. + The routing number for the bank account. """ class Wechat(StripeObject): @@ -1705,9 +1717,6 @@ class Zip(StripeObject): It contains information specific to the payment method. """ us_bank_account: Optional[UsBankAccount] - """ - Details of the US Bank Account used for this payment attempt. - """ wechat: Optional[Wechat] wechat_pay: Optional[WechatPay] zip: Optional[Zip] diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 1fcf76a04..c10b4193a 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -155,6 +155,20 @@ class AutomaticPaymentMethods(StripeObject): Automatically calculates compatible payment methods """ + class Hooks(StripeObject): + class Inputs(StripeObject): + class Tax(StripeObject): + calculation: str + """ + The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + """ + + tax: Optional[Tax] + _inner_class_types = {"tax": Tax} + + inputs: Optional[Inputs] + _inner_class_types = {"inputs": Inputs} + class LastPaymentError(StripeObject): advice_code: Optional[str] """ @@ -2828,6 +2842,7 @@ class TransferData(StripeObject): """ The list of payment method types to exclude from use with this payment. """ + hooks: Optional[Hooks] id: str """ Unique identifier for the object. @@ -4350,6 +4365,7 @@ async def list_amount_details_line_items_async( _inner_class_types = { "amount_details": AmountDetails, "automatic_payment_methods": AutomaticPaymentMethods, + "hooks": Hooks, "last_payment_error": LastPaymentError, "next_action": NextAction, "payment_details": PaymentDetails, diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 274aaa39d..aa950badf 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -913,6 +913,7 @@ class Ideal(StripeObject): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", @@ -929,7 +930,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -938,6 +939,7 @@ class Ideal(StripeObject): "BITSNL2A", "BUNQNL2A", "BUUTNL2A", + "FNOMNL22", "FVLBNL22", "HANDNL2A", "INGBNL2A", @@ -1325,6 +1327,7 @@ class Blocked(StripeObject): "bank_account_restricted", "bank_account_unusable", "debit_not_authorized", + "tokenized_account_number_deactivated", ] ] """ diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 4ac97c651..572685bb4 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -931,6 +931,7 @@ class Ideal(StripeObject): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", @@ -947,7 +948,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -956,6 +957,7 @@ class Ideal(StripeObject): "BITSNL2A", "BUNQNL2A", "BUUTNL2A", + "FNOMNL22", "FVLBNL22", "HANDNL2A", "INGBNL2A", @@ -986,6 +988,10 @@ class Ideal(StripeObject): """ Last four characters of the IBAN. """ + transaction_id: Optional[str] + """ + Unique transaction ID generated by iDEAL. + """ verified_name: Optional[str] """ Owner's verified full name. Values are verified or provided by iDEAL directly @@ -1595,7 +1601,13 @@ class Twint(StripeObject): class UsBankAccount(StripeObject): account_holder_type: Optional[Literal["company", "individual"]] + """ + The type of entity that holds the account. This can be either 'individual' or 'company'. + """ account_type: Optional[Literal["checking", "savings"]] + """ + The type of the bank account. This can be either 'checking' or 'savings'. + """ bank_name: Optional[str] """ Name of the bank associated with the bank account. @@ -1614,11 +1626,11 @@ class UsBankAccount(StripeObject): """ payment_reference: Optional[str] """ - Reference number to locate ACH payments with customer's bank. + The ACH payment reference for this transaction. """ routing_number: Optional[str] """ - Routing number of the bank account. + The routing number for the bank account. """ class Wechat(StripeObject): @@ -1721,9 +1733,6 @@ class Zip(StripeObject): It contains information specific to the payment method. """ us_bank_account: Optional[UsBankAccount] - """ - Details of the US Bank Account used for this payment attempt. - """ wechat: Optional[Wechat] wechat_pay: Optional[WechatPay] zip: Optional[Zip] diff --git a/stripe/_refund.py b/stripe/_refund.py index a1103b797..2fae712bd 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -154,6 +154,16 @@ class JpBankTransfer(StripeObject): class Klarna(StripeObject): pass + class MbWay(StripeObject): + reference: Optional[str] + """ + The reference assigned to the refund. + """ + reference_status: Optional[str] + """ + Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + """ + class Multibanco(StripeObject): reference: Optional[str] """ @@ -229,6 +239,9 @@ class ThBankTransfer(StripeObject): Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. """ + class Twint(StripeObject): + pass + class UsBankTransfer(StripeObject): reference: Optional[str] """ @@ -264,6 +277,7 @@ class Zip(StripeObject): grabpay: Optional[Grabpay] jp_bank_transfer: Optional[JpBankTransfer] klarna: Optional[Klarna] + mb_way: Optional[MbWay] multibanco: Optional[Multibanco] mx_bank_transfer: Optional[MxBankTransfer] nz_bank_transfer: Optional[NzBankTransfer] @@ -275,6 +289,7 @@ class Zip(StripeObject): sofort: Optional[Sofort] swish: Optional[Swish] th_bank_transfer: Optional[ThBankTransfer] + twint: Optional[Twint] type: str """ The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction. @@ -302,6 +317,7 @@ class Zip(StripeObject): "grabpay": Grabpay, "jp_bank_transfer": JpBankTransfer, "klarna": Klarna, + "mb_way": MbWay, "multibanco": Multibanco, "mx_bank_transfer": MxBankTransfer, "nz_bank_transfer": NzBankTransfer, @@ -313,6 +329,7 @@ class Zip(StripeObject): "sofort": Sofort, "swish": Swish, "th_bank_transfer": ThBankTransfer, + "twint": Twint, "us_bank_transfer": UsBankTransfer, "wechat_pay": WechatPay, "zip": Zip, diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index b2d0ff3c7..39e2a09ce 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -264,6 +264,7 @@ class Ideal(StripeObject): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", @@ -280,7 +281,7 @@ class Ideal(StripeObject): ] ] """ - The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `finom`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. """ bic: Optional[ Literal[ @@ -289,6 +290,7 @@ class Ideal(StripeObject): "BITSNL2A", "BUNQNL2A", "BUUTNL2A", + "FNOMNL22", "FVLBNL22", "HANDNL2A", "INGBNL2A", diff --git a/stripe/_tax_service.py b/stripe/_tax_service.py index 57c291594..1bd53e474 100644 --- a/stripe/_tax_service.py +++ b/stripe/_tax_service.py @@ -5,12 +5,14 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe.tax._association_service import AssociationService from stripe.tax._calculation_service import CalculationService from stripe.tax._registration_service import RegistrationService from stripe.tax._settings_service import SettingsService from stripe.tax._transaction_service import TransactionService _subservices = { + "associations": ["stripe.tax._association_service", "AssociationService"], "calculations": ["stripe.tax._calculation_service", "CalculationService"], "registrations": [ "stripe.tax._registration_service", @@ -22,6 +24,7 @@ class TaxService(StripeService): + associations: "AssociationService" calculations: "CalculationService" registrations: "RegistrationService" settings: "SettingsService" diff --git a/stripe/_terminal_service.py b/stripe/_terminal_service.py index 33415c116..5570164ae 100644 --- a/stripe/_terminal_service.py +++ b/stripe/_terminal_service.py @@ -10,6 +10,7 @@ ConnectionTokenService, ) from stripe.terminal._location_service import LocationService + from stripe.terminal._onboarding_link_service import OnboardingLinkService from stripe.terminal._reader_service import ReaderService _subservices = { @@ -22,6 +23,10 @@ "ConnectionTokenService", ], "locations": ["stripe.terminal._location_service", "LocationService"], + "onboarding_links": [ + "stripe.terminal._onboarding_link_service", + "OnboardingLinkService", + ], "readers": ["stripe.terminal._reader_service", "ReaderService"], } @@ -30,6 +35,7 @@ class TerminalService(StripeService): configurations: "ConfigurationService" connection_tokens: "ConnectionTokenService" locations: "LocationService" + onboarding_links: "OnboardingLinkService" readers: "ReaderService" def __init__(self, requestor): diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index 7006d6042..451dca049 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -79,6 +79,10 @@ class PaymentMethodUpdate(StripeObject): """ Whether the feature is enabled. """ + payment_method_configuration: Optional[str] + """ + The [Payment Method Configuration](https://docs.stripe.com/api/payment_method_configurations) to use for this portal session. When specified, customers will be able to update their payment method to one of the options specified by the payment method configuration. If not set, the default payment method configuration is used. + """ class SubscriptionCancel(StripeObject): class CancellationReason(StripeObject): diff --git a/stripe/financial_connections/_account.py b/stripe/financial_connections/_account.py index c3cb71fb6..ba13ca94c 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -61,6 +61,24 @@ class AccountHolder(StripeObject): Type of account holder that this account belongs to. """ + class AccountNumber(StripeObject): + expected_expiry_date: Optional[int] + """ + When the account number is expected to expire, if applicable. + """ + identifier_type: Literal["account_number", "tokenized_account_number"] + """ + The type of account number associated with the account. + """ + status: Literal["deactivated", "transactable"] + """ + Whether the account number is currently active and usable for transactions. + """ + supported_networks: List[Literal["ach"]] + """ + The payment networks that the account number can be used for. + """ + class Balance(StripeObject): class Cash(StripeObject): available: Optional[Dict[str, int]] @@ -152,6 +170,10 @@ class TransactionRefresh(StripeObject): """ The account holder that this account belongs to. """ + account_numbers: Optional[List[AccountNumber]] + """ + Details about the account numbers. + """ balance: Optional[Balance] """ The most recent information about the account's balance. @@ -863,6 +885,7 @@ async def unsubscribe_async( # pyright: ignore[reportGeneralTypeIssues] _inner_class_types = { "account_holder": AccountHolder, + "account_numbers": AccountNumber, "balance": Balance, "balance_refresh": BalanceRefresh, "ownership_refresh": OwnershipRefresh, diff --git a/stripe/financial_connections/_session.py b/stripe/financial_connections/_session.py index bbd15a827..ca069370c 100644 --- a/stripe/financial_connections/_session.py +++ b/stripe/financial_connections/_session.py @@ -72,7 +72,7 @@ class Filters(StripeObject): """ The accounts that were collected as part of this Session. """ - client_secret: str + client_secret: Optional[str] """ A value that will be passed to the client to launch the authentication flow. """ diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index ebce1fe2b..bd805f845 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -42,6 +42,23 @@ class Card( OBJECT_NAME: ClassVar[Literal["issuing.card"]] = "issuing.card" + class LatestFraudWarning(StripeObject): + started_at: Optional[int] + """ + Timestamp of the most recent fraud warning. + """ + type: Optional[ + Literal[ + "card_testing_exposure", + "fraud_dispute_filed", + "third_party_reported", + "user_indicated_fraud", + ] + ] + """ + The type of fraud warning that most recently took place on this card. This field updates with every new fraud warning, so the value changes over time. If populated, cancel and reissue the card. + """ + class Shipping(StripeObject): class Address(StripeObject): city: Optional[str] @@ -1226,6 +1243,10 @@ class GooglePay(StripeObject): """ The last 4 digits of the card number. """ + latest_fraud_warning: Optional[LatestFraudWarning] + """ + Stripe's assessment of whether this card's details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk. + """ livemode: bool """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -1958,6 +1979,7 @@ def test_helpers(self): return self.TestHelpers(self) _inner_class_types = { + "latest_fraud_warning": LatestFraudWarning, "shipping": Shipping, "spending_controls": SpendingControls, "wallets": Wallets, diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index a35054a7f..774da99ba 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -766,6 +766,7 @@ ) from stripe.params._customer_balance_transaction_list_params import ( CustomerBalanceTransactionListParams as CustomerBalanceTransactionListParams, + CustomerBalanceTransactionListParamsCreated as CustomerBalanceTransactionListParamsCreated, ) from stripe.params._customer_balance_transaction_retrieve_params import ( CustomerBalanceTransactionRetrieveParams as CustomerBalanceTransactionRetrieveParams, @@ -835,6 +836,7 @@ ) from stripe.params._customer_list_balance_transactions_params import ( CustomerListBalanceTransactionsParams as CustomerListBalanceTransactionsParams, + CustomerListBalanceTransactionsParamsCreated as CustomerListBalanceTransactionsParamsCreated, ) from stripe.params._customer_list_cash_balance_transactions_params import ( CustomerListCashBalanceTransactionsParams as CustomerListCashBalanceTransactionsParams, @@ -1241,6 +1243,7 @@ ) from stripe.params._invoice_payment_list_params import ( InvoicePaymentListParams as InvoicePaymentListParams, + InvoicePaymentListParamsCreated as InvoicePaymentListParamsCreated, InvoicePaymentListParamsPayment as InvoicePaymentListParamsPayment, ) from stripe.params._invoice_payment_retrieve_params import ( @@ -1351,6 +1354,9 @@ PaymentIntentCaptureParamsAmountDetailsLineItemTax as PaymentIntentCaptureParamsAmountDetailsLineItemTax, PaymentIntentCaptureParamsAmountDetailsShipping as PaymentIntentCaptureParamsAmountDetailsShipping, PaymentIntentCaptureParamsAmountDetailsTax as PaymentIntentCaptureParamsAmountDetailsTax, + PaymentIntentCaptureParamsHooks as PaymentIntentCaptureParamsHooks, + PaymentIntentCaptureParamsHooksInputs as PaymentIntentCaptureParamsHooksInputs, + PaymentIntentCaptureParamsHooksInputsTax as PaymentIntentCaptureParamsHooksInputsTax, PaymentIntentCaptureParamsPaymentDetails as PaymentIntentCaptureParamsPaymentDetails, PaymentIntentCaptureParamsTransferData as PaymentIntentCaptureParamsTransferData, ) @@ -1366,6 +1372,9 @@ PaymentIntentConfirmParamsAmountDetailsLineItemTax as PaymentIntentConfirmParamsAmountDetailsLineItemTax, PaymentIntentConfirmParamsAmountDetailsShipping as PaymentIntentConfirmParamsAmountDetailsShipping, PaymentIntentConfirmParamsAmountDetailsTax as PaymentIntentConfirmParamsAmountDetailsTax, + PaymentIntentConfirmParamsHooks as PaymentIntentConfirmParamsHooks, + PaymentIntentConfirmParamsHooksInputs as PaymentIntentConfirmParamsHooksInputs, + PaymentIntentConfirmParamsHooksInputsTax as PaymentIntentConfirmParamsHooksInputsTax, PaymentIntentConfirmParamsMandateData as PaymentIntentConfirmParamsMandateData, PaymentIntentConfirmParamsMandateDataCustomerAcceptance as PaymentIntentConfirmParamsMandateDataCustomerAcceptance, PaymentIntentConfirmParamsMandateDataCustomerAcceptanceOffline as PaymentIntentConfirmParamsMandateDataCustomerAcceptanceOffline, @@ -1513,6 +1522,9 @@ PaymentIntentCreateParamsAmountDetailsShipping as PaymentIntentCreateParamsAmountDetailsShipping, PaymentIntentCreateParamsAmountDetailsTax as PaymentIntentCreateParamsAmountDetailsTax, PaymentIntentCreateParamsAutomaticPaymentMethods as PaymentIntentCreateParamsAutomaticPaymentMethods, + PaymentIntentCreateParamsHooks as PaymentIntentCreateParamsHooks, + PaymentIntentCreateParamsHooksInputs as PaymentIntentCreateParamsHooksInputs, + PaymentIntentCreateParamsHooksInputsTax as PaymentIntentCreateParamsHooksInputsTax, PaymentIntentCreateParamsMandateData as PaymentIntentCreateParamsMandateData, PaymentIntentCreateParamsMandateDataCustomerAcceptance as PaymentIntentCreateParamsMandateDataCustomerAcceptance, PaymentIntentCreateParamsMandateDataCustomerAcceptanceOffline as PaymentIntentCreateParamsMandateDataCustomerAcceptanceOffline, @@ -1660,6 +1672,9 @@ PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemTax as PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemTax, PaymentIntentIncrementAuthorizationParamsAmountDetailsShipping as PaymentIntentIncrementAuthorizationParamsAmountDetailsShipping, PaymentIntentIncrementAuthorizationParamsAmountDetailsTax as PaymentIntentIncrementAuthorizationParamsAmountDetailsTax, + PaymentIntentIncrementAuthorizationParamsHooks as PaymentIntentIncrementAuthorizationParamsHooks, + PaymentIntentIncrementAuthorizationParamsHooksInputs as PaymentIntentIncrementAuthorizationParamsHooksInputs, + PaymentIntentIncrementAuthorizationParamsHooksInputsTax as PaymentIntentIncrementAuthorizationParamsHooksInputsTax, PaymentIntentIncrementAuthorizationParamsPaymentDetails as PaymentIntentIncrementAuthorizationParamsPaymentDetails, PaymentIntentIncrementAuthorizationParamsTransferData as PaymentIntentIncrementAuthorizationParamsTransferData, ) @@ -1682,6 +1697,9 @@ PaymentIntentModifyParamsAmountDetailsLineItemTax as PaymentIntentModifyParamsAmountDetailsLineItemTax, PaymentIntentModifyParamsAmountDetailsShipping as PaymentIntentModifyParamsAmountDetailsShipping, PaymentIntentModifyParamsAmountDetailsTax as PaymentIntentModifyParamsAmountDetailsTax, + PaymentIntentModifyParamsHooks as PaymentIntentModifyParamsHooks, + PaymentIntentModifyParamsHooksInputs as PaymentIntentModifyParamsHooksInputs, + PaymentIntentModifyParamsHooksInputsTax as PaymentIntentModifyParamsHooksInputsTax, PaymentIntentModifyParamsPaymentDetails as PaymentIntentModifyParamsPaymentDetails, PaymentIntentModifyParamsPaymentMethodData as PaymentIntentModifyParamsPaymentMethodData, PaymentIntentModifyParamsPaymentMethodDataAcssDebit as PaymentIntentModifyParamsPaymentMethodDataAcssDebit, @@ -1830,6 +1848,9 @@ PaymentIntentUpdateParamsAmountDetailsLineItemTax as PaymentIntentUpdateParamsAmountDetailsLineItemTax, PaymentIntentUpdateParamsAmountDetailsShipping as PaymentIntentUpdateParamsAmountDetailsShipping, PaymentIntentUpdateParamsAmountDetailsTax as PaymentIntentUpdateParamsAmountDetailsTax, + PaymentIntentUpdateParamsHooks as PaymentIntentUpdateParamsHooks, + PaymentIntentUpdateParamsHooksInputs as PaymentIntentUpdateParamsHooksInputs, + PaymentIntentUpdateParamsHooksInputsTax as PaymentIntentUpdateParamsHooksInputsTax, PaymentIntentUpdateParamsPaymentDetails as PaymentIntentUpdateParamsPaymentDetails, PaymentIntentUpdateParamsPaymentMethodData as PaymentIntentUpdateParamsPaymentMethodData, PaymentIntentUpdateParamsPaymentMethodDataAcssDebit as PaymentIntentUpdateParamsPaymentMethodDataAcssDebit, @@ -5931,6 +5952,10 @@ "stripe.params._customer_balance_transaction_list_params", False, ), + "CustomerBalanceTransactionListParamsCreated": ( + "stripe.params._customer_balance_transaction_list_params", + False, + ), "CustomerBalanceTransactionRetrieveParams": ( "stripe.params._customer_balance_transaction_retrieve_params", False, @@ -6057,6 +6082,10 @@ "stripe.params._customer_list_balance_transactions_params", False, ), + "CustomerListBalanceTransactionsParamsCreated": ( + "stripe.params._customer_list_balance_transactions_params", + False, + ), "CustomerListCashBalanceTransactionsParams": ( "stripe.params._customer_list_cash_balance_transactions_params", False, @@ -7037,6 +7066,10 @@ "stripe.params._invoice_payment_list_params", False, ), + "InvoicePaymentListParamsCreated": ( + "stripe.params._invoice_payment_list_params", + False, + ), "InvoicePaymentListParamsPayment": ( "stripe.params._invoice_payment_list_params", False, @@ -7313,6 +7346,18 @@ "stripe.params._payment_intent_capture_params", False, ), + "PaymentIntentCaptureParamsHooks": ( + "stripe.params._payment_intent_capture_params", + False, + ), + "PaymentIntentCaptureParamsHooksInputs": ( + "stripe.params._payment_intent_capture_params", + False, + ), + "PaymentIntentCaptureParamsHooksInputsTax": ( + "stripe.params._payment_intent_capture_params", + False, + ), "PaymentIntentCaptureParamsPaymentDetails": ( "stripe.params._payment_intent_capture_params", False, @@ -7365,6 +7410,18 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsHooks": ( + "stripe.params._payment_intent_confirm_params", + False, + ), + "PaymentIntentConfirmParamsHooksInputs": ( + "stripe.params._payment_intent_confirm_params", + False, + ), + "PaymentIntentConfirmParamsHooksInputsTax": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsMandateData": ( "stripe.params._payment_intent_confirm_params", False, @@ -7945,6 +8002,18 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsHooks": ( + "stripe.params._payment_intent_create_params", + False, + ), + "PaymentIntentCreateParamsHooksInputs": ( + "stripe.params._payment_intent_create_params", + False, + ), + "PaymentIntentCreateParamsHooksInputsTax": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsMandateData": ( "stripe.params._payment_intent_create_params", False, @@ -8525,6 +8594,18 @@ "stripe.params._payment_intent_increment_authorization_params", False, ), + "PaymentIntentIncrementAuthorizationParamsHooks": ( + "stripe.params._payment_intent_increment_authorization_params", + False, + ), + "PaymentIntentIncrementAuthorizationParamsHooksInputs": ( + "stripe.params._payment_intent_increment_authorization_params", + False, + ), + "PaymentIntentIncrementAuthorizationParamsHooksInputsTax": ( + "stripe.params._payment_intent_increment_authorization_params", + False, + ), "PaymentIntentIncrementAuthorizationParamsPaymentDetails": ( "stripe.params._payment_intent_increment_authorization_params", False, @@ -8589,6 +8670,18 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsHooks": ( + "stripe.params._payment_intent_modify_params", + False, + ), + "PaymentIntentModifyParamsHooksInputs": ( + "stripe.params._payment_intent_modify_params", + False, + ), + "PaymentIntentModifyParamsHooksInputsTax": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentDetails": ( "stripe.params._payment_intent_modify_params", False, @@ -9157,6 +9250,18 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsHooks": ( + "stripe.params._payment_intent_update_params", + False, + ), + "PaymentIntentUpdateParamsHooksInputs": ( + "stripe.params._payment_intent_update_params", + False, + ), + "PaymentIntentUpdateParamsHooksInputsTax": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentDetails": ( "stripe.params._payment_intent_update_params", False, diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py index 3c7244096..270e21021 100644 --- a/stripe/params/_confirmation_token_create_params.py +++ b/stripe/params/_confirmation_token_create_params.py @@ -597,6 +597,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataIdeal(TypedDict): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", diff --git a/stripe/params/_customer_balance_transaction_list_params.py b/stripe/params/_customer_balance_transaction_list_params.py index 6ef239a18..826403276 100644 --- a/stripe/params/_customer_balance_transaction_list_params.py +++ b/stripe/params/_customer_balance_transaction_list_params.py @@ -5,6 +5,10 @@ class CustomerBalanceTransactionListParams(TypedDict): + created: NotRequired["CustomerBalanceTransactionListParamsCreated|int"] + """ + Only return customer balance 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. @@ -21,3 +25,22 @@ class CustomerBalanceTransactionListParams(TypedDict): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 CustomerBalanceTransactionListParamsCreated(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_balance_transactions_params.py b/stripe/params/_customer_list_balance_transactions_params.py index 258153525..9175024be 100644 --- a/stripe/params/_customer_list_balance_transactions_params.py +++ b/stripe/params/_customer_list_balance_transactions_params.py @@ -2,10 +2,14 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from typing import List -from typing_extensions import NotRequired +from typing_extensions import NotRequired, TypedDict class CustomerListBalanceTransactionsParams(RequestOptions): + created: NotRequired["CustomerListBalanceTransactionsParamsCreated|int"] + """ + Only return customer balance 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. @@ -22,3 +26,22 @@ class CustomerListBalanceTransactionsParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 CustomerListBalanceTransactionsParamsCreated(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_payment_list_params.py b/stripe/params/_invoice_payment_list_params.py index cf5327031..80bc1acf4 100644 --- a/stripe/params/_invoice_payment_list_params.py +++ b/stripe/params/_invoice_payment_list_params.py @@ -6,6 +6,10 @@ class InvoicePaymentListParams(RequestOptions): + created: NotRequired["InvoicePaymentListParamsCreated|int"] + """ + Only return invoice payments 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. @@ -36,6 +40,25 @@ class InvoicePaymentListParams(RequestOptions): """ +class InvoicePaymentListParamsCreated(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 InvoicePaymentListParamsPayment(TypedDict): payment_intent: NotRequired[str] """ diff --git a/stripe/params/_payment_intent_capture_params.py b/stripe/params/_payment_intent_capture_params.py index df36d72b9..2bb89fe0b 100644 --- a/stripe/params/_payment_intent_capture_params.py +++ b/stripe/params/_payment_intent_capture_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -26,6 +26,10 @@ class PaymentIntentCaptureParams(RequestOptions): """ 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`. @@ -239,6 +243,27 @@ class PaymentIntentCaptureParamsAmountDetailsTax(TypedDict): """ +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): customer_reference: NotRequired["Literal['']|str"] """ diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index b172c01ee..7ed7f8018 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -38,6 +38,10 @@ class PaymentIntentConfirmParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + hooks: NotRequired["PaymentIntentConfirmParamsHooks"] + """ + Automations to be run during the PaymentIntent lifecycle + """ mandate: NotRequired[str] """ ID of the mandate that's used for this payment. @@ -302,6 +306,27 @@ class PaymentIntentConfirmParamsAmountDetailsTax(TypedDict): """ +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" @@ -911,6 +936,7 @@ class PaymentIntentConfirmParamsPaymentMethodDataIdeal(TypedDict): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index c54c2a398..625ed10de 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -125,6 +125,10 @@ class PaymentIntentCreateParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + 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). @@ -431,6 +435,27 @@ class PaymentIntentCreateParamsAutomaticPaymentMethods(TypedDict): """ +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" @@ -1036,6 +1061,7 @@ class PaymentIntentCreateParamsPaymentMethodDataIdeal(TypedDict): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", diff --git a/stripe/params/_payment_intent_increment_authorization_params.py b/stripe/params/_payment_intent_increment_authorization_params.py index 3108707c8..7a5157d6a 100644 --- a/stripe/params/_payment_intent_increment_authorization_params.py +++ b/stripe/params/_payment_intent_increment_authorization_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -28,6 +28,10 @@ class PaymentIntentIncrementAuthorizationParams(RequestOptions): """ 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`. @@ -247,6 +251,27 @@ class PaymentIntentIncrementAuthorizationParamsAmountDetailsTax(TypedDict): """ +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"] """ diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index 21b3581bd..fa3f2fa98 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -52,6 +52,10 @@ class PaymentIntentModifyParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ + hooks: NotRequired["PaymentIntentModifyParamsHooks"] + """ + 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`. @@ -316,6 +320,27 @@ class PaymentIntentModifyParamsAmountDetailsTax(TypedDict): """ +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 PaymentIntentModifyParamsPaymentDetails(TypedDict): customer_reference: NotRequired["Literal['']|str"] """ @@ -874,6 +899,7 @@ class PaymentIntentModifyParamsPaymentMethodDataIdeal(TypedDict): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index fcb152100..6109a20f8 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -51,6 +51,10 @@ class PaymentIntentUpdateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ + hooks: NotRequired["PaymentIntentUpdateParamsHooks"] + """ + 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`. @@ -315,6 +319,27 @@ class PaymentIntentUpdateParamsAmountDetailsTax(TypedDict): """ +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 PaymentIntentUpdateParamsPaymentDetails(TypedDict): customer_reference: NotRequired["Literal['']|str"] """ @@ -873,6 +898,7 @@ class PaymentIntentUpdateParamsPaymentMethodDataIdeal(TypedDict): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index 243c04156..775472253 100644 --- a/stripe/params/_payment_method_create_params.py +++ b/stripe/params/_payment_method_create_params.py @@ -565,6 +565,7 @@ class PaymentMethodCreateParamsIdeal(TypedDict): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index bb3a5b025..d812f3e2f 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -632,6 +632,7 @@ class SetupIntentConfirmParamsPaymentMethodDataIdeal(TypedDict): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 5ea3189f7..ca4bfd430 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -751,6 +751,7 @@ class SetupIntentCreateParamsPaymentMethodDataIdeal(TypedDict): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index 06f7a78c2..d5460ba42 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -600,6 +600,7 @@ class SetupIntentModifyParamsPaymentMethodDataIdeal(TypedDict): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index d64ac8abe..a3c539ba4 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -599,6 +599,7 @@ class SetupIntentUpdateParamsPaymentMethodDataIdeal(TypedDict): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py index b5cd7b978..a5a2d51a6 100644 --- a/stripe/params/_webhook_endpoint_create_params.py +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -125,6 +125,7 @@ class WebhookEndpointCreateParams(RequestOptions): "2025-08-27.basil", "2025-09-30.clover", "2025-10-29.clover", + "2025-11-17.clover", ] ] """ @@ -212,6 +213,7 @@ class WebhookEndpointCreateParams(RequestOptions): "customer_cash_balance_transaction.created", "entitlements.active_entitlement_summary.updated", "file.created", + "financial_connections.account.account_numbers_updated", "financial_connections.account.created", "financial_connections.account.deactivated", "financial_connections.account.disconnected", @@ -219,6 +221,7 @@ class WebhookEndpointCreateParams(RequestOptions): "financial_connections.account.refreshed_balance", "financial_connections.account.refreshed_ownership", "financial_connections.account.refreshed_transactions", + "financial_connections.account.upcoming_account_number_expiry", "identity.verification_session.canceled", "identity.verification_session.created", "identity.verification_session.processing", diff --git a/stripe/params/_webhook_endpoint_modify_params.py b/stripe/params/_webhook_endpoint_modify_params.py index 93a0041fa..7562179e3 100644 --- a/stripe/params/_webhook_endpoint_modify_params.py +++ b/stripe/params/_webhook_endpoint_modify_params.py @@ -89,6 +89,7 @@ class WebhookEndpointModifyParams(RequestOptions): "customer_cash_balance_transaction.created", "entitlements.active_entitlement_summary.updated", "file.created", + "financial_connections.account.account_numbers_updated", "financial_connections.account.created", "financial_connections.account.deactivated", "financial_connections.account.disconnected", @@ -96,6 +97,7 @@ class WebhookEndpointModifyParams(RequestOptions): "financial_connections.account.refreshed_balance", "financial_connections.account.refreshed_ownership", "financial_connections.account.refreshed_transactions", + "financial_connections.account.upcoming_account_number_expiry", "identity.verification_session.canceled", "identity.verification_session.created", "identity.verification_session.processing", diff --git a/stripe/params/_webhook_endpoint_update_params.py b/stripe/params/_webhook_endpoint_update_params.py index 48ab06043..a784019ea 100644 --- a/stripe/params/_webhook_endpoint_update_params.py +++ b/stripe/params/_webhook_endpoint_update_params.py @@ -88,6 +88,7 @@ class WebhookEndpointUpdateParams(TypedDict): "customer_cash_balance_transaction.created", "entitlements.active_entitlement_summary.updated", "file.created", + "financial_connections.account.account_numbers_updated", "financial_connections.account.created", "financial_connections.account.deactivated", "financial_connections.account.disconnected", @@ -95,6 +96,7 @@ class WebhookEndpointUpdateParams(TypedDict): "financial_connections.account.refreshed_balance", "financial_connections.account.refreshed_ownership", "financial_connections.account.refreshed_transactions", + "financial_connections.account.upcoming_account_number_expiry", "identity.verification_session.canceled", "identity.verification_session.created", "identity.verification_session.processing", diff --git a/stripe/params/issuing/__init__.py b/stripe/params/issuing/__init__.py index 4532dea57..6598454d6 100644 --- a/stripe/params/issuing/__init__.py +++ b/stripe/params/issuing/__init__.py @@ -36,6 +36,7 @@ AuthorizationCreateParamsNetworkData as AuthorizationCreateParamsNetworkData, AuthorizationCreateParamsRiskAssessment as AuthorizationCreateParamsRiskAssessment, AuthorizationCreateParamsRiskAssessmentCardTestingRisk as AuthorizationCreateParamsRiskAssessmentCardTestingRisk, + AuthorizationCreateParamsRiskAssessmentFraudRisk as AuthorizationCreateParamsRiskAssessmentFraudRisk, AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk as AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk, AuthorizationCreateParamsVerificationData as AuthorizationCreateParamsVerificationData, AuthorizationCreateParamsVerificationDataAuthenticationExemption as AuthorizationCreateParamsVerificationDataAuthenticationExemption, @@ -437,6 +438,10 @@ "stripe.params.issuing._authorization_create_params", False, ), + "AuthorizationCreateParamsRiskAssessmentFraudRisk": ( + "stripe.params.issuing._authorization_create_params", + False, + ), "AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk": ( "stripe.params.issuing._authorization_create_params", False, diff --git a/stripe/params/issuing/_authorization_create_params.py b/stripe/params/issuing/_authorization_create_params.py index c5831f78c..606a10552 100644 --- a/stripe/params/issuing/_authorization_create_params.py +++ b/stripe/params/issuing/_authorization_create_params.py @@ -577,6 +577,10 @@ class AuthorizationCreateParamsRiskAssessment(TypedDict): """ Stripe's assessment of this authorization's likelihood of being card testing activity. """ + fraud_risk: NotRequired["AuthorizationCreateParamsRiskAssessmentFraudRisk"] + """ + Stripe's assessment of this authorization's likelihood to be fraudulent. + """ merchant_dispute_risk: NotRequired[ "AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk" ] @@ -602,6 +606,19 @@ class AuthorizationCreateParamsRiskAssessmentCardTestingRisk(TypedDict): """ +class AuthorizationCreateParamsRiskAssessmentFraudRisk(TypedDict): + level: Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ] + """ + Stripe's assessment of the likelihood of fraud on an authorization. + """ + score: NotRequired[float] + """ + Stripe's numerical model score assessing the likelihood of fraudulent activity. A higher score means a higher likelihood of fraudulent activity, and anything above 25 is considered high risk. + """ + + class AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk(TypedDict): dispute_rate: NotRequired[int] """ diff --git a/stripe/params/tax/__init__.py b/stripe/params/tax/__init__.py index 96b4f9f2f..116e07891 100644 --- a/stripe/params/tax/__init__.py +++ b/stripe/params/tax/__init__.py @@ -4,6 +4,9 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.tax._association_find_params import ( + AssociationFindParams as AssociationFindParams, + ) from stripe.params.tax._calculation_create_params import ( CalculationCreateParams as CalculationCreateParams, CalculationCreateParamsCustomerDetails as CalculationCreateParamsCustomerDetails, @@ -236,6 +239,10 @@ # name -> (import_target, is_submodule) _import_map = { + "AssociationFindParams": ( + "stripe.params.tax._association_find_params", + False, + ), "CalculationCreateParams": ( "stripe.params.tax._calculation_create_params", False, 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/_registration_create_params.py b/stripe/params/tax/_registration_create_params.py index cca7d5c29..01e660e14 100644 --- a/stripe/params/tax/_registration_create_params.py +++ b/stripe/params/tax/_registration_create_params.py @@ -1784,7 +1784,7 @@ class RegistrationCreateParamsCountryOptionsUs(TypedDict): 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). + A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `02154` (Arlington Heights), `06613` (Bloomington), `10906` (Campton Hills), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `48892` (Midlothian), `64343` (River Grove), and `68081` (Schiller Park). """ diff --git a/stripe/params/terminal/__init__.py b/stripe/params/terminal/__init__.py index 45d471980..80dd3f91f 100644 --- a/stripe/params/terminal/__init__.py +++ b/stripe/params/terminal/__init__.py @@ -151,6 +151,11 @@ LocationUpdateParamsAddressKana as LocationUpdateParamsAddressKana, LocationUpdateParamsAddressKanji as LocationUpdateParamsAddressKanji, ) + from stripe.params.terminal._onboarding_link_create_params import ( + OnboardingLinkCreateParams as OnboardingLinkCreateParams, + OnboardingLinkCreateParamsLinkOptions as OnboardingLinkCreateParamsLinkOptions, + OnboardingLinkCreateParamsLinkOptionsAppleTermsAndConditions as OnboardingLinkCreateParamsLinkOptionsAppleTermsAndConditions, + ) from stripe.params.terminal._reader_cancel_action_params import ( ReaderCancelActionParams as ReaderCancelActionParams, ) @@ -706,6 +711,18 @@ "stripe.params.terminal._location_update_params", False, ), + "OnboardingLinkCreateParams": ( + "stripe.params.terminal._onboarding_link_create_params", + False, + ), + "OnboardingLinkCreateParamsLinkOptions": ( + "stripe.params.terminal._onboarding_link_create_params", + False, + ), + "OnboardingLinkCreateParamsLinkOptionsAppleTermsAndConditions": ( + "stripe.params.terminal._onboarding_link_create_params", + False, + ), "ReaderCancelActionParams": ( "stripe.params.terminal._reader_cancel_action_params", False, 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/test_helpers/_confirmation_token_create_params.py b/stripe/params/test_helpers/_confirmation_token_create_params.py index b3069075c..d0a32b6a8 100644 --- a/stripe/params/test_helpers/_confirmation_token_create_params.py +++ b/stripe/params/test_helpers/_confirmation_token_create_params.py @@ -596,6 +596,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataIdeal(TypedDict): "asn_bank", "bunq", "buut", + "finom", "handelsbanken", "ing", "knab", diff --git a/stripe/params/test_helpers/issuing/__init__.py b/stripe/params/test_helpers/issuing/__init__.py index 2fb6b3522..2c5e6d2d3 100644 --- a/stripe/params/test_helpers/issuing/__init__.py +++ b/stripe/params/test_helpers/issuing/__init__.py @@ -33,6 +33,7 @@ AuthorizationCreateParamsNetworkData as AuthorizationCreateParamsNetworkData, AuthorizationCreateParamsRiskAssessment as AuthorizationCreateParamsRiskAssessment, AuthorizationCreateParamsRiskAssessmentCardTestingRisk as AuthorizationCreateParamsRiskAssessmentCardTestingRisk, + AuthorizationCreateParamsRiskAssessmentFraudRisk as AuthorizationCreateParamsRiskAssessmentFraudRisk, AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk as AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk, AuthorizationCreateParamsVerificationData as AuthorizationCreateParamsVerificationData, AuthorizationCreateParamsVerificationDataAuthenticationExemption as AuthorizationCreateParamsVerificationDataAuthenticationExemption, @@ -227,6 +228,10 @@ "stripe.params.test_helpers.issuing._authorization_create_params", False, ), + "AuthorizationCreateParamsRiskAssessmentFraudRisk": ( + "stripe.params.test_helpers.issuing._authorization_create_params", + False, + ), "AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk": ( "stripe.params.test_helpers.issuing._authorization_create_params", False, diff --git a/stripe/params/test_helpers/issuing/_authorization_create_params.py b/stripe/params/test_helpers/issuing/_authorization_create_params.py index 42e6321a2..af7c512c9 100644 --- a/stripe/params/test_helpers/issuing/_authorization_create_params.py +++ b/stripe/params/test_helpers/issuing/_authorization_create_params.py @@ -576,6 +576,10 @@ class AuthorizationCreateParamsRiskAssessment(TypedDict): """ Stripe's assessment of this authorization's likelihood of being card testing activity. """ + fraud_risk: NotRequired["AuthorizationCreateParamsRiskAssessmentFraudRisk"] + """ + Stripe's assessment of this authorization's likelihood to be fraudulent. + """ merchant_dispute_risk: NotRequired[ "AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk" ] @@ -601,6 +605,19 @@ class AuthorizationCreateParamsRiskAssessmentCardTestingRisk(TypedDict): """ +class AuthorizationCreateParamsRiskAssessmentFraudRisk(TypedDict): + level: Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ] + """ + Stripe's assessment of the likelihood of fraud on an authorization. + """ + score: NotRequired[float] + """ + Stripe's numerical model score assessing the likelihood of fraudulent activity. A higher score means a higher likelihood of fraudulent activity, and anything above 25 is considered high risk. + """ + + class AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk(TypedDict): dispute_rate: NotRequired[int] """ diff --git a/stripe/tax/__init__.py b/stripe/tax/__init__.py index c0ca8e21b..958da52fc 100644 --- a/stripe/tax/__init__.py +++ b/stripe/tax/__init__.py @@ -4,6 +4,10 @@ from typing_extensions import TYPE_CHECKING if TYPE_CHECKING: + from stripe.tax._association import Association as Association + from stripe.tax._association_service import ( + AssociationService as AssociationService, + ) from stripe.tax._calculation import Calculation as Calculation from stripe.tax._calculation_line_item import ( CalculationLineItem as CalculationLineItem, @@ -33,6 +37,8 @@ # name -> (import_target, is_submodule) _import_map = { + "Association": ("stripe.tax._association", False), + "AssociationService": ("stripe.tax._association_service", False), "Calculation": ("stripe.tax._calculation", False), "CalculationLineItem": ("stripe.tax._calculation_line_item", False), "CalculationLineItemService": ( diff --git a/stripe/tax/_association.py b/stripe/tax/_association.py new file mode 100644 index 000000000..5f3ef6bcc --- /dev/null +++ b/stripe/tax/_association.py @@ -0,0 +1,103 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._api_resource import APIResource +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.tax._association_find_params import ( + AssociationFindParams, + ) + + +class Association(APIResource["Association"]): + """ + A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf based on the PaymentIntent input + """ + + OBJECT_NAME: ClassVar[Literal["tax.association"]] = "tax.association" + + class TaxTransactionAttempt(StripeObject): + class Committed(StripeObject): + transaction: str + """ + The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) + """ + + class Errored(StripeObject): + reason: Literal[ + "another_payment_associated_with_calculation", + "calculation_expired", + "currency_mismatch", + "original_transaction_voided", + "unique_reference_violation", + ] + """ + Details on why we couldn't commit the tax transaction. + """ + + committed: Optional[Committed] + errored: Optional[Errored] + source: str + """ + The source of the tax transaction attempt. This is either a refund or a payment intent. + """ + status: str + """ + The status of the transaction attempt. This can be `errored` or `committed`. + """ + _inner_class_types = {"committed": Committed, "errored": Errored} + + calculation: str + """ + The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. + """ + id: str + """ + Unique identifier for the object. + """ + object: Literal["tax.association"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + payment_intent: str + """ + The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. + """ + tax_transaction_attempts: Optional[List[TaxTransactionAttempt]] + """ + Information about the tax transactions linked to this payment intent + """ + + @classmethod + def find(cls, **params: Unpack["AssociationFindParams"]) -> "Association": + """ + Finds a tax association object by PaymentIntent id. + """ + return cast( + "Association", + cls._static_request( + "get", + "/v1/tax/associations/find", + params=params, + ), + ) + + @classmethod + async def find_async( + cls, **params: Unpack["AssociationFindParams"] + ) -> "Association": + """ + Finds a tax association object by PaymentIntent id. + """ + return cast( + "Association", + await cls._static_request_async( + "get", + "/v1/tax/associations/find", + params=params, + ), + ) + + _inner_class_types = {"tax_transaction_attempts": TaxTransactionAttempt} diff --git a/stripe/tax/_association_service.py b/stripe/tax/_association_service.py new file mode 100644 index 000000000..f863f88d2 --- /dev/null +++ b/stripe/tax/_association_service.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.tax._association_find_params import ( + AssociationFindParams, + ) + from stripe.tax._association import Association + + +class AssociationService(StripeService): + def find( + self, + params: "AssociationFindParams", + options: Optional["RequestOptions"] = None, + ) -> "Association": + """ + Finds a tax association object by PaymentIntent id. + """ + return cast( + "Association", + self._request( + "get", + "/v1/tax/associations/find", + base_address="api", + params=params, + options=options, + ), + ) + + async def find_async( + self, + params: "AssociationFindParams", + options: Optional["RequestOptions"] = None, + ) -> "Association": + """ + Finds a tax association object by PaymentIntent id. + """ + return cast( + "Association", + await self._request_async( + "get", + "/v1/tax/associations/find", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/terminal/__init__.py b/stripe/terminal/__init__.py index 67fe3eb7e..ff00e303e 100644 --- a/stripe/terminal/__init__.py +++ b/stripe/terminal/__init__.py @@ -18,6 +18,12 @@ from stripe.terminal._location_service import ( LocationService as LocationService, ) + from stripe.terminal._onboarding_link import ( + OnboardingLink as OnboardingLink, + ) + from stripe.terminal._onboarding_link_service import ( + OnboardingLinkService as OnboardingLinkService, + ) from stripe.terminal._reader import Reader as Reader from stripe.terminal._reader_service import ReaderService as ReaderService @@ -32,6 +38,11 @@ ), "Location": ("stripe.terminal._location", False), "LocationService": ("stripe.terminal._location_service", False), + "OnboardingLink": ("stripe.terminal._onboarding_link", False), + "OnboardingLinkService": ( + "stripe.terminal._onboarding_link_service", + False, + ), "Reader": ("stripe.terminal._reader", False), "ReaderService": ("stripe.terminal._reader_service", False), } diff --git a/stripe/terminal/_onboarding_link.py b/stripe/terminal/_onboarding_link.py new file mode 100644 index 000000000..64cc092e9 --- /dev/null +++ b/stripe/terminal/_onboarding_link.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._createable_api_resource import CreateableAPIResource +from stripe._stripe_object import StripeObject +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"]): + """ + Returns redirect links used for onboarding onto Tap to Pay on iPhone. + """ + + OBJECT_NAME: ClassVar[Literal["terminal.onboarding_link"]] = ( + "terminal.onboarding_link" + ) + + class LinkOptions(StripeObject): + class AppleTermsAndConditions(StripeObject): + allow_relinking: Optional[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. + """ + + apple_terms_and_conditions: Optional[AppleTermsAndConditions] + """ + The options associated with the Apple Terms and Conditions link type. + """ + _inner_class_types = { + "apple_terms_and_conditions": AppleTermsAndConditions, + } + + link_options: LinkOptions + """ + Link type options associated with the current onboarding link object. + """ + link_type: Literal["apple_terms_and_conditions"] + """ + The type of link being generated. + """ + object: Literal["terminal.onboarding_link"] + on_behalf_of: Optional[str] + """ + Stripe account ID to generate the link for. + """ + redirect_url: str + """ + The link passed back to the user for their onboarding. + """ + + @classmethod + def create( + cls, **params: Unpack["OnboardingLinkCreateParams"] + ) -> "OnboardingLink": + """ + Creates a new OnboardingLink object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone. + """ + return cast( + "OnboardingLink", + cls._static_request( + "post", + cls.class_url(), + params=params, + ), + ) + + @classmethod + async def create_async( + cls, **params: Unpack["OnboardingLinkCreateParams"] + ) -> "OnboardingLink": + """ + Creates a new OnboardingLink object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone. + """ + return cast( + "OnboardingLink", + await cls._static_request_async( + "post", + cls.class_url(), + params=params, + ), + ) + + _inner_class_types = {"link_options": LinkOptions} diff --git a/stripe/terminal/_onboarding_link_service.py b/stripe/terminal/_onboarding_link_service.py new file mode 100644 index 000000000..fcc7a3566 --- /dev/null +++ b/stripe/terminal/_onboarding_link_service.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._request_options import RequestOptions + from stripe.params.terminal._onboarding_link_create_params import ( + OnboardingLinkCreateParams, + ) + from stripe.terminal._onboarding_link import OnboardingLink + + +class OnboardingLinkService(StripeService): + def create( + self, + params: "OnboardingLinkCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "OnboardingLink": + """ + Creates a new OnboardingLink object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone. + """ + return cast( + "OnboardingLink", + self._request( + "post", + "/v1/terminal/onboarding_links", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "OnboardingLinkCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "OnboardingLink": + """ + Creates a new OnboardingLink object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone. + """ + return cast( + "OnboardingLink", + await self._request_async( + "post", + "/v1/terminal/onboarding_links", + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/core/_event.py b/stripe/v2/core/_event.py index 415a2879e..cb7ad021b 100644 --- a/stripe/v2/core/_event.py +++ b/stripe/v2/core/_event.py @@ -42,6 +42,10 @@ class Request(StripeObject): """ _inner_class_types = {"request": Request} + changes: Optional[Dict[str, "Any"]] + """ + Before and after changes for the primary related object. + """ context: Optional[str] """ Authentication context needed to fetch the event or related object.