From 782f8f0375742a0bad4a41a079ec8531acd61dd7 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 03:15:42 +0000 Subject: [PATCH 01/17] Update generated code for v1439 --- OPENAPI_VERSION | 2 +- stripe/terminal/_configuration.py | 52 +++++++++++++++++++++++ stripe/terminal/_configuration_service.py | 36 ++++++++++++++++ 3 files changed, 89 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 115863e95..1de7c5643 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1436 \ No newline at end of file +v1439 \ No newline at end of file diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index 9982e73d4..c04039e2b 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -177,6 +177,20 @@ class Hkd(StripeObject): Below this amount, fixed amounts will be displayed; above it, percentages will be displayed """ + class Jpy(StripeObject): + fixed_amounts: Optional[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: Optional[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: Optional[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + class Myr(StripeObject): fixed_amounts: Optional[List[int]] """ @@ -283,6 +297,7 @@ class Usd(StripeObject): eur: Optional[Eur] gbp: Optional[Gbp] hkd: Optional[Hkd] + jpy: Optional[Jpy] myr: Optional[Myr] nok: Optional[Nok] nzd: Optional[Nzd] @@ -299,6 +314,7 @@ class Usd(StripeObject): "eur": Eur, "gbp": Gbp, "hkd": Hkd, + "jpy": Jpy, "myr": Myr, "nok": Nok, "nzd": Nzd, @@ -409,6 +425,10 @@ class CreateParamsTipping(TypedDict): """ Tipping configuration for HKD """ + jpy: NotRequired["Configuration.CreateParamsTippingJpy"] + """ + Tipping configuration for JPY + """ myr: NotRequired["Configuration.CreateParamsTippingMyr"] """ Tipping configuration for MYR @@ -550,6 +570,20 @@ class CreateParamsTippingHkd(TypedDict): 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 CreateParamsTippingMyr(TypedDict): fixed_amounts: NotRequired[List[int]] """ @@ -782,6 +816,10 @@ class ModifyParamsTipping(TypedDict): """ Tipping configuration for HKD """ + jpy: NotRequired["Configuration.ModifyParamsTippingJpy"] + """ + Tipping configuration for JPY + """ myr: NotRequired["Configuration.ModifyParamsTippingMyr"] """ Tipping configuration for MYR @@ -923,6 +961,20 @@ class ModifyParamsTippingHkd(TypedDict): 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 ModifyParamsTippingMyr(TypedDict): fixed_amounts: NotRequired[List[int]] """ diff --git a/stripe/terminal/_configuration_service.py b/stripe/terminal/_configuration_service.py index ab58a57db..0966627c6 100644 --- a/stripe/terminal/_configuration_service.py +++ b/stripe/terminal/_configuration_service.py @@ -115,6 +115,10 @@ class CreateParamsTipping(TypedDict): """ Tipping configuration for HKD """ + jpy: NotRequired["ConfigurationService.CreateParamsTippingJpy"] + """ + Tipping configuration for JPY + """ myr: NotRequired["ConfigurationService.CreateParamsTippingMyr"] """ Tipping configuration for MYR @@ -256,6 +260,20 @@ class CreateParamsTippingHkd(TypedDict): 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 CreateParamsTippingMyr(TypedDict): fixed_amounts: NotRequired[List[int]] """ @@ -498,6 +516,10 @@ class UpdateParamsTipping(TypedDict): """ Tipping configuration for HKD """ + jpy: NotRequired["ConfigurationService.UpdateParamsTippingJpy"] + """ + Tipping configuration for JPY + """ myr: NotRequired["ConfigurationService.UpdateParamsTippingMyr"] """ Tipping configuration for MYR @@ -639,6 +661,20 @@ class UpdateParamsTippingHkd(TypedDict): 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 UpdateParamsTippingMyr(TypedDict): fixed_amounts: NotRequired[List[int]] """ From 0ef90fd19198efcffb2e60d418a37d27f5c41585 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 22:01:06 +0000 Subject: [PATCH 02/17] Update generated code for v1441 --- OPENAPI_VERSION | 2 +- stripe/_account_session.py | 112 +++++++++++++++++++++++++++-- stripe/_account_session_service.py | 8 +-- 3 files changed, 113 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1de7c5643..9aa5de967 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1439 \ No newline at end of file +v1441 \ No newline at end of file diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 384113c9c..220481b7b 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -131,6 +131,102 @@ class Features(StripeObject): features: Features _inner_class_types = {"features": Features} + class FinancialAccount(StripeObject): + class Features(StripeObject): + disable_stripe_user_authentication: bool + """ + Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. 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: bool + """ + Whether to allow external accounts to be linked for money transfer. + """ + send_money: bool + """ + Whether to allow sending money. + """ + transfer_balance: bool + """ + Whether to allow transferring balance. + """ + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + + class FinancialAccountTransactions(StripeObject): + class Features(StripeObject): + card_spend_dispute_management: bool + """ + Whether to allow card spend dispute management features. + """ + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + + class IssuingCard(StripeObject): + class Features(StripeObject): + card_management: bool + """ + Whether to allow card management features. + """ + card_spend_dispute_management: bool + """ + Whether to allow card spend dispute management features. + """ + cardholder_management: bool + """ + Whether to allow cardholder management features. + """ + spend_control_management: bool + """ + Whether to allow spend control management features. + """ + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + + class IssuingCardsList(StripeObject): + class Features(StripeObject): + card_management: bool + """ + Whether to allow card management features. + """ + card_spend_dispute_management: bool + """ + Whether to allow card spend dispute management features. + """ + cardholder_management: bool + """ + Whether to allow cardholder management features. + """ + disable_stripe_user_authentication: bool + """ + Disables Stripe user authentication for this embedded component. 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. + """ + spend_control_management: bool + """ + Whether to allow spend control management features. + """ + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + class NotificationBanner(StripeObject): class Features(StripeObject): disable_stripe_user_authentication: bool @@ -271,6 +367,10 @@ class Features(StripeObject): capital_financing_application: Optional[CapitalFinancingApplication] capital_financing_promotion: Optional[CapitalFinancingPromotion] documents: Documents + financial_account: FinancialAccount + financial_account_transactions: FinancialAccountTransactions + issuing_card: IssuingCard + issuing_cards_list: IssuingCardsList notification_banner: NotificationBanner payment_details: PaymentDetails payments: Payments @@ -286,6 +386,10 @@ class Features(StripeObject): "capital_financing_application": CapitalFinancingApplication, "capital_financing_promotion": CapitalFinancingPromotion, "documents": Documents, + "financial_account": FinancialAccount, + "financial_account_transactions": FinancialAccountTransactions, + "issuing_card": IssuingCard, + "issuing_cards_list": IssuingCardsList, "notification_banner": NotificationBanner, "payment_details": PaymentDetails, "payments": Payments, @@ -372,25 +476,25 @@ class CreateParamsComponents(TypedDict): "AccountSession.CreateParamsComponentsFinancialAccount" ] """ - Configuration for the financial account component. + Configuration for the financial account embedded component. """ financial_account_transactions: NotRequired[ "AccountSession.CreateParamsComponentsFinancialAccountTransactions" ] """ - Configuration for the financial account transactions component. + Configuration for the financial account transactions embedded component. """ issuing_card: NotRequired[ "AccountSession.CreateParamsComponentsIssuingCard" ] """ - Configuration for the issuing card component. + Configuration for the issuing card embedded component. """ issuing_cards_list: NotRequired[ "AccountSession.CreateParamsComponentsIssuingCardsList" ] """ - Configuration for the issuing cards list component. + Configuration for the issuing cards list embedded component. """ notification_banner: NotRequired[ "AccountSession.CreateParamsComponentsNotificationBanner" diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py index 6868f8318..49b77c6ee 100644 --- a/stripe/_account_session_service.py +++ b/stripe/_account_session_service.py @@ -87,25 +87,25 @@ class CreateParamsComponents(TypedDict): "AccountSessionService.CreateParamsComponentsFinancialAccount" ] """ - Configuration for the financial account component. + Configuration for the financial account embedded component. """ financial_account_transactions: NotRequired[ "AccountSessionService.CreateParamsComponentsFinancialAccountTransactions" ] """ - Configuration for the financial account transactions component. + Configuration for the financial account transactions embedded component. """ issuing_card: NotRequired[ "AccountSessionService.CreateParamsComponentsIssuingCard" ] """ - Configuration for the issuing card component. + Configuration for the issuing card embedded component. """ issuing_cards_list: NotRequired[ "AccountSessionService.CreateParamsComponentsIssuingCardsList" ] """ - Configuration for the issuing cards list component. + Configuration for the issuing cards list embedded component. """ notification_banner: NotRequired[ "AccountSessionService.CreateParamsComponentsNotificationBanner" From 39ce6f42b0e49662fd8e81eb5de8df745eb875c9 Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Mon, 13 Jan 2025 13:28:28 -0800 Subject: [PATCH 03/17] changed v2 ListObject data type from List[StripeObject] to List[T] (#1442) --- stripe/v2/_list_object.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stripe/v2/_list_object.py b/stripe/v2/_list_object.py index a9d73546c..a314650c6 100644 --- a/stripe/v2/_list_object.py +++ b/stripe/v2/_list_object.py @@ -17,7 +17,7 @@ class ListObject(StripeObject, Generic[T]): """ OBJECT_NAME = "list" - data: List[StripeObject] + data: List[T] next_page_url: Optional[str] def __getitem__(self, k): From cc1038fa1aeab74775ae041e36bde91688068acf Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 08:44:52 +0000 Subject: [PATCH 04/17] Update generated code for v1442 --- OPENAPI_VERSION | 2 +- stripe/_account_session.py | 21 +++++++++++++++++++++ stripe/_account_session_service.py | 21 +++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 9aa5de967..d618ca7df 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1441 \ No newline at end of file +v1442 \ No newline at end of file diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 220481b7b..4eeacd7e2 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -552,6 +552,12 @@ class CreateParamsComponents(TypedDict): """ Configuration for the tax settings embedded component. """ + tax_threshold_monitoring: NotRequired[ + "AccountSession.CreateParamsComponentsTaxThresholdMonitoring" + ] + """ + Configuration for the tax threshold monitoring embedded component. + """ class CreateParamsComponentsAccountManagement(TypedDict): enabled: bool @@ -1062,6 +1068,21 @@ class CreateParamsComponentsTaxSettings(TypedDict): class CreateParamsComponentsTaxSettingsFeatures(TypedDict): pass + class CreateParamsComponentsTaxThresholdMonitoring(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSession.CreateParamsComponentsTaxThresholdMonitoringFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + class CreateParamsComponentsTaxThresholdMonitoringFeatures(TypedDict): + pass + account: str """ The ID of the account the AccountSession was created for diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py index 49b77c6ee..94a392de4 100644 --- a/stripe/_account_session_service.py +++ b/stripe/_account_session_service.py @@ -167,6 +167,12 @@ class CreateParamsComponents(TypedDict): """ Configuration for the tax settings embedded component. """ + tax_threshold_monitoring: NotRequired[ + "AccountSessionService.CreateParamsComponentsTaxThresholdMonitoring" + ] + """ + Configuration for the tax threshold monitoring embedded component. + """ class CreateParamsComponentsAccountManagement(TypedDict): enabled: bool @@ -677,6 +683,21 @@ class CreateParamsComponentsTaxSettings(TypedDict): class CreateParamsComponentsTaxSettingsFeatures(TypedDict): pass + class CreateParamsComponentsTaxThresholdMonitoring(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionService.CreateParamsComponentsTaxThresholdMonitoringFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + class CreateParamsComponentsTaxThresholdMonitoringFeatures(TypedDict): + pass + def create( self, params: "AccountSessionService.CreateParams", From a2b3b2534ee81ed6eda04a1431eeb408ad1a8b9e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 10:53:51 +0000 Subject: [PATCH 05/17] Update generated code for v1443 --- OPENAPI_VERSION | 2 +- stripe/_account.py | 18 ++++++++++++++++++ stripe/_account_service.py | 24 ++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d618ca7df..023992bf5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1442 \ No newline at end of file +v1443 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 294092e25..ba0693306 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -342,6 +342,12 @@ class Capabilities(StripeObject): """ The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. """ + pay_by_bank_payments: Optional[ + Literal["active", "inactive", "pending"] + ] + """ + The status of the pay_by_bank payments capability of the account, or whether the account can directly process pay_by_bank charges. + """ payco_payments: Optional[Literal["active", "inactive", "pending"]] """ The status of the Payco capability of the account, or whether the account can directly process Payco payments. @@ -1926,6 +1932,12 @@ class CreateParamsCapabilities(TypedDict): """ The p24_payments capability. """ + pay_by_bank_payments: NotRequired[ + "Account.CreateParamsCapabilitiesPayByBankPayments" + ] + """ + The pay_by_bank_payments capability. + """ payco_payments: NotRequired[ "Account.CreateParamsCapabilitiesPaycoPayments" ] @@ -2319,6 +2331,12 @@ class CreateParamsCapabilitiesP24Payments(TypedDict): Passing true requests the capability for the account, if it is 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] """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index e0653f82c..49ea9d353 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -492,6 +492,12 @@ class CreateParamsCapabilities(TypedDict): """ The p24_payments capability. """ + pay_by_bank_payments: NotRequired[ + "AccountService.CreateParamsCapabilitiesPayByBankPayments" + ] + """ + The pay_by_bank_payments capability. + """ payco_payments: NotRequired[ "AccountService.CreateParamsCapabilitiesPaycoPayments" ] @@ -889,6 +895,12 @@ class CreateParamsCapabilitiesP24Payments(TypedDict): Passing true requests the capability for the account, if it is 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] """ @@ -2519,6 +2531,12 @@ class UpdateParamsCapabilities(TypedDict): """ The p24_payments capability. """ + pay_by_bank_payments: NotRequired[ + "AccountService.UpdateParamsCapabilitiesPayByBankPayments" + ] + """ + The pay_by_bank_payments capability. + """ payco_payments: NotRequired[ "AccountService.UpdateParamsCapabilitiesPaycoPayments" ] @@ -2916,6 +2934,12 @@ class UpdateParamsCapabilitiesP24Payments(TypedDict): Passing true requests the capability for the account, if it is 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] """ From 9f9fe80888e93f4695980643f5d53f3052dce178 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 16:10:36 +0000 Subject: [PATCH 06/17] Update generated code for v1444 --- OPENAPI_VERSION | 2 +- stripe/_payment_link.py | 3 +++ stripe/_payment_link_service.py | 2 ++ stripe/checkout/_session.py | 4 +++- stripe/checkout/_session_service.py | 1 + 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 023992bf5..53bf35301 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1443 \ No newline at end of file +v1444 \ No newline at end of file diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index eba9ec443..ffecef8e6 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -540,6 +540,7 @@ class ShippingAddressCollection(StripeObject): "SA", "SB", "SC", + "SD", "SE", "SG", "SH", @@ -1426,6 +1427,7 @@ class CreateParamsShippingAddressCollection(TypedDict): "SA", "SB", "SC", + "SD", "SE", "SG", "SH", @@ -2248,6 +2250,7 @@ class ModifyParamsShippingAddressCollection(TypedDict): "SA", "SB", "SC", + "SD", "SE", "SG", "SH", diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index 2b1f2a7b7..a58603aa0 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -779,6 +779,7 @@ class CreateParamsShippingAddressCollection(TypedDict): "SA", "SB", "SC", + "SD", "SE", "SG", "SH", @@ -1599,6 +1600,7 @@ class UpdateParamsShippingAddressCollection(TypedDict): "SA", "SB", "SC", + "SD", "SE", "SG", "SH", diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 56a9b5ad3..641de0aaa 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1799,6 +1799,7 @@ class ShippingAddressCollection(StripeObject): "SA", "SB", "SC", + "SD", "SE", "SG", "SH", @@ -1856,7 +1857,7 @@ class ShippingAddressCollection(StripeObject): ] """ An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SY, UM, VI`. """ class ShippingCost(StripeObject): @@ -4233,6 +4234,7 @@ class CreateParamsShippingAddressCollection(TypedDict): "SA", "SB", "SC", + "SD", "SE", "SG", "SH", diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index a63e5c885..8ddbe07db 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -2246,6 +2246,7 @@ class CreateParamsShippingAddressCollection(TypedDict): "SA", "SB", "SC", + "SD", "SE", "SG", "SH", From 7202fe12b19f135f08b8fb8ddcfeb6c6c165f242 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 20:49:03 +0000 Subject: [PATCH 07/17] Update generated code for v1446 --- OPENAPI_VERSION | 2 +- stripe/checkout/_session.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 53bf35301..0e6ebdfc2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1444 \ No newline at end of file +v1446 \ No newline at end of file diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 641de0aaa..d910ad86a 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -19,12 +19,14 @@ if TYPE_CHECKING: from stripe._account import Account + from stripe._coupon import Coupon from stripe._customer import Customer from stripe._discount import Discount as DiscountResource from stripe._invoice import Invoice from stripe._line_item import LineItem from stripe._payment_intent import PaymentIntent from stripe._payment_link import PaymentLink + from stripe._promotion_code import PromotionCode from stripe._setup_intent import SetupIntent from stripe._shipping_rate import ShippingRate from stripe._subscription import Subscription @@ -665,6 +667,16 @@ class TaxId(StripeObject): """ _inner_class_types = {"address": Address, "tax_ids": TaxId} + class Discount(StripeObject): + coupon: Optional[ExpandableField["Coupon"]] + """ + Coupon attached to the Checkout Session. + """ + promotion_code: Optional[ExpandableField["PromotionCode"]] + """ + Promotion code attached to the Checkout Session. + """ + class InvoiceCreation(StripeObject): class InvoiceData(StripeObject): class CustomField(StripeObject): @@ -4970,6 +4982,10 @@ class RetrieveParams(RequestOptions): on file. To access information about the customer once the payment flow is complete, use the `customer` attribute. """ + discounts: Optional[List[Discount]] + """ + List of coupons and promotion codes attached to the Checkout Session. + """ expires_at: int """ The timestamp at which the Checkout Session will expire. @@ -5536,6 +5552,7 @@ async def retrieve_async( "custom_fields": CustomField, "custom_text": CustomText, "customer_details": CustomerDetails, + "discounts": Discount, "invoice_creation": InvoiceCreation, "payment_method_configuration_details": PaymentMethodConfigurationDetails, "payment_method_options": PaymentMethodOptions, From bd73a3293523aa944d4c69121ced5b7a2c9854ef Mon Sep 17 00:00:00 2001 From: David Brownman <109395161+xavdid-stripe@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:21:09 -0800 Subject: [PATCH 08/17] add justfile, update readme, remove coveralls (#1440) * remove virtualenv * unremove virtualenv version * messy justfile, but maybe CI works? * remove quote * actually run tests with correct versions * fix comment * better logging, less mypy * skip tox, different pyright approach on older versions * break out test jobs * fix justfile * another CI run * install this package * remvove tox, makefile, update CI a bunch * fix mypy * fix pyright dep * final pass --- .github/workflows/ci.yml | 92 +++++++++---------- MANIFEST.in | 4 +- Makefile | 49 ---------- README.md | 32 ++++--- deps/build-requirements.txt | 4 + deps/dev-requirements.txt | 11 +++ .../test-requirements.txt | 6 +- justfile | 81 ++++++++++++++++ pyproject.toml | 13 ++- requirements.txt | 12 --- tox.ini | 56 ----------- 11 files changed, 172 insertions(+), 188 deletions(-) delete mode 100644 Makefile create mode 100644 deps/build-requirements.txt create mode 100644 deps/dev-requirements.txt rename test-requirements.txt => deps/test-requirements.txt (72%) create mode 100644 justfile delete mode 100644 requirements.txt delete mode 100644 tox.ini diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a59eb527..96cfa777a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,25 +19,37 @@ on: jobs: lint: - name: Lint & Mypy + name: Static Checks runs-on: ubuntu-latest steps: + - uses: extractions/setup-just@v2 - uses: actions/checkout@v3 - name: Set up Python 3 uses: actions/setup-python@v4 with: python-version: "3.10" - - name: mypy - run: make mypy - - name: lint - run: make lint - - name: fmtcheck - run: make fmtcheck + - name: check examples w/ mypy (against python@3.10) + run: just typecheck-examples + # skip deps on all these since mypy installed everything + - name: check linting + run: just --no-deps lint + - name: check formatting + run: just --no-deps format-check + # pyright depends on node, which it handles and installs for itself as needed + # we _could_ run setup-node to make it available for it if we're having reliability problems + - name: check types (all Python versions) + run: | + set -eox + + for minor in {6..12}; do + just --no-deps typecheck $minor + done build: name: Build runs-on: ubuntu-latest steps: + - uses: extractions/setup-just@v2 - uses: actions/checkout@v3 - name: Set up Python 3 @@ -45,15 +57,9 @@ jobs: with: python-version: "3.10" - - name: Install tools - run: make venv - - name: Build and check package run: | - set -x - source venv/bin/activate - python setup.py clean --all sdist bdist_wheel --universal - python -m twine check dist/* + just build - name: "Upload Artifact" uses: actions/upload-artifact@v3 @@ -69,45 +75,30 @@ jobs: strategy: fail-fast: false matrix: - python: - - { version: "3.6" , env: "py36" } - - { version: "3.7" , env: "py37" } - - { version: "3.8" , env: "py38" } - - { version: "3.9" , env: "py39" } - - { version: "3.10" , env: "py310" } - - { version: "3.11" , env: "py311" } - - { version: "3.12" , env: "py312" } - - { version: "pypy-3.7" , env: "py3.7" } - - { version: "pypy-3.8" , env: "py3.8" } - - { version: "pypy-3.9" , env: "py3.9" } - - { version: "pypy-3.10" , env: "py3.10" } - name: Test (${{ matrix.python.version }}) + python_version: + - "3.6" + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + - "pypy-3.7" + - "pypy-3.8" + - "pypy-3.9" + - "pypy-3.10" + name: Test (${{ matrix.python_version }}) steps: + - uses: extractions/setup-just@v2 - uses: actions/checkout@v3 - - - name: Set up Python ${{ matrix.python.version }} and 3.10 + - name: Set up Python ${{ matrix.python_version }} uses: actions/setup-python@v4 with: - python-version: | - ${{ matrix.python.version }} - 3.10 - + python-version: ${{ matrix.python_version }} - uses: stripe/openapi/actions/stripe-mock@master - - name: Typecheck with pyright - run: PYRIGHT_ARGS="-- --pythonversion ${{ matrix.python.version }}" make pyright - # Skip typecheking in pypy legs - if: ${{ !contains(matrix.python.version, 'pypy') }} - - - name: Test with pytest - run: TOX_ARGS="-e ${{ matrix.python.env }}" make ci-test - - - name: Calculate and publish coverage - run: make coveralls - if: env.COVERALLS_REPO_TOKEN && matrix.python.version == '3.10' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + - name: "run tests" + run: just test publish: name: Publish @@ -137,11 +128,12 @@ jobs: GPG_SIGNING_PRIVKEY: ${{ secrets.GPG_SIGNING_PRIVKEY }} GPG_SIGNING_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }} - name: Install tools - run: make venv - - name: Publish packages to PyPy + run: just install-build-deps + - name: Publish packages to PyPI + # could probably move this into a just recipe too? run: | set -ex - source venv/bin/activate + source .venv/bin/activate export VERSION=$(cat VERSION) gpg --detach-sign --local-user $GPG_SIGNING_KEYID --pinentry-mode loopback --passphrase $GPG_SIGNING_PASSPHRASE -a dist/stripe-$VERSION.tar.gz gpg --detach-sign --local-user $GPG_SIGNING_KEYID --pinentry-mode loopback --passphrase $GPG_SIGNING_PASSPHRASE -a dist/stripe-$VERSION-py2.py3-none-any.whl diff --git a/MANIFEST.in b/MANIFEST.in index ba34b83e6..ff12f246b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,5 @@ -include .coveragerc .flake8 CHANGELOG.md LICENSE LONG_DESCRIPTION.rst README.md VERSION pytest.ini tox.ini +# this file specifies what's included in a source distribution (https://packaging.python.org/en/latest/glossary/#term-Source-Distribution-or-sdist) +# see also: https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html +include .flake8 CHANGELOG.md LICENSE LONG_DESCRIPTION.rst README.md VERSION pytest.ini justfile recursive-include tests *.py recursive-include examples *.txt *.py diff --git a/Makefile b/Makefile deleted file mode 100644 index a85caa62a..000000000 --- a/Makefile +++ /dev/null @@ -1,49 +0,0 @@ -VENV_NAME?=venv -PIP?=pip -PYTHON?=python3.10 -DEFAULT_TEST_ENV?=py310 - -venv: $(VENV_NAME)/bin/activate - -$(VENV_NAME)/bin/activate: setup.py requirements.txt - @test -d $(VENV_NAME) || $(PYTHON) -m venv --clear $(VENV_NAME) - ${VENV_NAME}/bin/python -m pip install -r requirements.txt - @touch $(VENV_NAME)/bin/activate - -test: venv pyright lint mypy - @${VENV_NAME}/bin/tox -p auto -e $(DEFAULT_TEST_ENV) $(TOX_ARGS) - -test-nomock: venv - @${VENV_NAME}/bin/tox -p auto -- --nomock $(TOX_ARGS) - -ci-test: venv - @${VENV_NAME}/bin/tox $(TOX_ARGS) - -coveralls: venv - @${VENV_NAME}/bin/tox -e coveralls - -pyright: venv - @${VENV_NAME}/bin/tox -e pyright $(PYRIGHT_ARGS) - -mypy: venv - @${VENV_NAME}/bin/tox -e mypy $(MYPY_ARGS) - -fmt: venv - @${VENV_NAME}/bin/tox -e fmt - -fmtcheck: venv - @${VENV_NAME}/bin/tox -e fmt -- --check --verbose - -lint: venv - @${VENV_NAME}/bin/tox -e lint - -clean: - @rm -rf $(VENV_NAME) .coverage .coverage.* build/ dist/ htmlcov/ - -update-version: - @echo "$(VERSION)" > VERSION - @perl -pi -e 's|VERSION = "[.\d\w]+"|VERSION = "$(VERSION)"|' stripe/_version.py - -codegen-format: fmt - -.PHONY: ci-test clean codegen-format coveralls fmt fmtcheck lint test test-nomock test-travis update-version venv pyright mypy diff --git a/README.md b/README.md index 62f399fd0..35cfa9912 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![pypi](https://img.shields.io/pypi/v/stripe.svg)](https://pypi.python.org/pypi/stripe) [![Build Status](https://github.com/stripe/stripe-python/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-python/actions?query=branch%3Amaster) -[![Coverage Status](https://coveralls.io/repos/github/stripe/stripe-python/badge.svg?branch=master)](https://coveralls.io/github/stripe/stripe-python?branch=master) The Stripe Python library provides convenient access to the Stripe API from applications written in the Python language. It includes a pre-defined set of @@ -341,46 +340,48 @@ go install github.com/stripe/stripe-mock@latest stripe-mock ``` -Run the following command to set up the development virtualenv: +We use [just](https://github.com/casey/just) for conveniently running development tasks. You can use them directly, or copy the commands out of the `justfile`. To our help docs, run `just`. By default, all commands will use an virtualenv created by your default python version (whatever comes out of `python --version`). We recommend using [mise](https://mise.jdx.dev/lang/python.html) or [pyenv](https://github.com/pyenv/pyenv) to control that version. -```sh -make -``` - -Run all tests on all supported Python versions: +Run the following command to set up the development virtualenv: ```sh -make test +just venv +# or: python -m venv venv && venv/bin/python -I -m pip install -e . ``` -Run all tests for a specific Python version (modify `-e` according to your Python target): +Run all tests: ```sh -TOX_ARGS="-e py37" make test +just test +# or: venv/bin/pytest ``` Run all tests in a single file: ```sh -TOX_ARGS="-e py37 -- tests/api_resources/abstract/test_updateable_api_resource.py" make test +just test tests/api_resources/abstract/test_updateable_api_resource.py +# or: venv/bin/pytest tests/api_resources/abstract/test_updateable_api_resource.py ``` Run a single test suite: ```sh -TOX_ARGS="-e py37 -- tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource" make test +just test tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource +# or: venv/bin/pytest tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource ``` Run a single test: ```sh -TOX_ARGS="-e py37 -- tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource::test_save" make test +just test tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource::test_save +# or: venv/bin/pytest tests/api_resources/abstract/test_updateable_api_resource.py::TestUpdateableAPIResource::test_save ``` Run the linter with: ```sh -make lint +just lint +# or: venv/bin/python -m flake8 --show-source stripe tests setup.py ``` The library uses [Ruff][ruff] for code formatting. Code must be formatted @@ -388,7 +389,8 @@ with Black before PRs are submitted, otherwise CI will fail. Run the formatter with: ```sh -make fmt +just format +# or: venv/bin/ruff format . --quiet ``` [api-keys]: https://dashboard.stripe.com/account/apikeys diff --git a/deps/build-requirements.txt b/deps/build-requirements.txt new file mode 100644 index 000000000..ae45d54c1 --- /dev/null +++ b/deps/build-requirements.txt @@ -0,0 +1,4 @@ +# packages needed to package & release + +twine +setuptools diff --git a/deps/dev-requirements.txt b/deps/dev-requirements.txt new file mode 100644 index 000000000..cedd76e2b --- /dev/null +++ b/deps/dev-requirements.txt @@ -0,0 +1,11 @@ +# packages needed to run static analysis (lints, types, etc) +# version requirements: any modern python version (currently 3.10) + +# typechecking for all versions +pyright == 1.1.336 +# general typechecking +mypy == 1.7.0 +# formatting +ruff == 0.4.4 +# linting +flake8 diff --git a/test-requirements.txt b/deps/test-requirements.txt similarity index 72% rename from test-requirements.txt rename to deps/test-requirements.txt index f2e9a43ba..a04785b92 100644 --- a/test-requirements.txt +++ b/deps/test-requirements.txt @@ -1,4 +1,5 @@ -# These requirements must be installable on all our supported versions +# packages needed to run unit tests (including extra supported http libraries) +# version requirements: all supported versions (currently 3.6-3.12) # This is the last version of httpx compatible with Python 3.6 httpx == 0.22.0; python_version == "3.6" @@ -8,10 +9,7 @@ aiohttp == 3.8.6; python_version <= "3.7" aiohttp == 3.9.4; python_version > "3.7" anyio[trio] == 3.6.2 -pytest-cov >= 2.8.1, < 2.11.0 pytest-mock >= 2.0.0 mock >= 4.0; python_version < "3.8" pytest-xdist >= 1.31.0 pytest >= 6.0.0 -coverage >= 4.5.3, < 5 -coveralls diff --git a/justfile b/justfile new file mode 100644 index 000000000..4e8c0fec8 --- /dev/null +++ b/justfile @@ -0,0 +1,81 @@ +set quiet + +import? '../sdk-codegen/justfile' + +VENV_NAME := ".venv" + +export PATH := `pwd` / VENV_NAME / "bin:" + env('PATH') + +_default: + just --list --unsorted + +# ⭐ run all unit tests +test *args: install-test-deps + # configured in pyproject.toml + pytest {{ args }} + +# ⭐ check for potential mistakes +lint: install-dev-deps + python -m flake8 --show-source stripe tests setup.py + +# verify types. optional argument to test as of a specific minor python version (e.g. `8` to test `python 3.8`); otherwise uses current version +typecheck minor_py_version="": install-test-deps install-dev-deps + # suppress version update warnings + PYRIGHT_PYTHON_IGNORE_WARNINGS=1 pyright {{ if minor_py_version == "" { "" } else { "--pythonversion 3." + minor_py_version } }} + +# ⭐ format all code +format: install-dev-deps + ruff format . --quiet + +# verify formatting, but don't modify files +format-check: install-dev-deps + ruff format . --check --quiet + +# remove venv +clean: + # clear old files too + rm -rf {{ VENV_NAME }} venv .tox + +# blow away and reinstall virtual env +reset: clean && venv + +# build the package for upload +build: install-build-deps + # --universal is deprecated, so we'll probably need to look at this eventually + # given that we don't care about universal 2 and 3 packages, we probably don't need it? + python -I setup.py clean --all sdist bdist_wheel --universal + python -m twine check dist/* + +# typecheck some examples w/ mypy +typecheck-examples: _install-all + # configured in pyproject.toml + mypy + +# install the tools for local development & static checks +install-dev-deps: (install "dev") + +# install everything for unit tests +install-test-deps: (install "test") + +# install dependencies to build the package +install-build-deps: (install "build") + +_install-all: install-dev-deps install-test-deps install-build-deps + +# installs files out of a {group}-requirements.txt into the local venv; mostly used by other recipes +install group: venv + python -I -m pip install -r deps/{{ group }}-requirements.txt --disable-pip-version-check {{ if is_dependency() == "true" {"--quiet"} else {""} }} + +# create a virtualenv if it doesn't exist; always installs the local package +[private] +venv: + [ -d {{ VENV_NAME }} ] || ( \ + python -m venv {{ VENV_NAME }} && \ + {{ VENV_NAME }}/bin/python -I -m pip install -e . --quiet --disable-pip-version-check \ + ) + +# called by tooling +[private] +update-version version: + @echo "{{ version }}" > VERSION + @perl -pi -e 's|VERSION = "[.\d\w]+"|VERSION = "{{ version }}"|' stripe/_version.py diff --git a/pyproject.toml b/pyproject.toml index 7ed6ba63c..dae143954 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,4 +33,15 @@ warn_unused_ignores = true no_implicit_reexport = true [tool.pytest.ini_options] -filterwarnings = "ignore::DeprecationWarning" +# use as many threads as available for tests +addopts = "-n auto" +# already the default, but will speed up searching a little, since this is the only place tests live +testpaths = "tests" +# these are warnings we show to users; we don't need them in our test logs +filterwarnings = [ + # single quotes so we don't have to re-backslack our backslashes + 'ignore:[\S\s]*stripe-python:DeprecationWarning', + 'ignore:[\S\s]*stripe\..* package:DeprecationWarning', + 'ignore:[\S\s]*RecipientTransfer:DeprecationWarning', + 'ignore:[\S\s]*`save` method is deprecated:DeprecationWarning', +] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index cfe397d29..000000000 --- a/requirements.txt +++ /dev/null @@ -1,12 +0,0 @@ -# These requirements must be installable only on py3.10 + -twine -# 4.5.0 is the last version that works with virtualenv<20.22.0 -tox == 4.5.0 -#Virtualenv 20.22.0 dropped support for all Python versions smaller or equal to Python 3.6. -virtualenv<20.22.0 -pyright == 1.1.336 -ruff == 0.4.4 -flake8 -mypy == 1.7.0 - --r test-requirements.txt diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 23ee4816e..000000000 --- a/tox.ini +++ /dev/null @@ -1,56 +0,0 @@ -# Tox (http://tox.testrun.org/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. - -[tox] -envlist = - fmt - lint - pyright - mypy - py{312,311,310,39,38,37,36,py3} -ignore_base_python_conflict = false - -[tool:pytest] -testpaths = tests -addopts = - --cov-report=term-missing - -[testenv] -description = run the unit tests under {basepython} -setenv = - COVERAGE_FILE = {toxworkdir}/.coverage.{envname} -deps = - -r test-requirements.txt - -# ignore stripe directory as all tests are inside ./tests -commands = pytest --cov {posargs:-n auto} --ignore stripe -# compilation flags can be useful when prebuilt wheels cannot be used, e.g. -# PyPy 2 needs to compile the `cryptography` module. On macOS this can be done -# by passing the following flags: -# LDFLAGS="-L$(brew --prefix openssl@1.1)/lib" -# CFLAGS="-I$(brew --prefix openssl@1.1)/include" -passenv = LDFLAGS,CFLAGS - -[testenv:{lint,fmt,pyright,mypy}] -basepython = python3.10 -skip_install = true -commands = - pyright: pyright {posargs} - lint: python -m flake8 --show-source stripe tests setup.py - fmt: ruff format . {posargs} - mypy: mypy {posargs} -deps = - -r requirements.txt - -[testenv:coveralls] -description = upload coverage to coveralls.io -skip_install = true -setenv = - COVERAGE_FILE = {toxworkdir}/.coverage -passenv = GITHUB_* -commands = - coverage combine - coveralls --service=github -depends = py{312,311,310,39,38,37,36,py3} From 3dec4a37e242957537f677f2cc645093a9d42e38 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 19:13:09 +0000 Subject: [PATCH 09/17] Update generated code for v1448 --- OPENAPI_VERSION | 2 +- stripe/_charge.py | 5 ++ stripe/_confirmation_token.py | 16 +++++ stripe/_customer.py | 1 + stripe/_customer_payment_method_service.py | 1 + stripe/_payment_intent.py | 62 ++++++++++++++++++ stripe/_payment_intent_service.py | 57 +++++++++++++++++ stripe/_payment_link.py | 4 +- stripe/_payment_link_service.py | 3 +- stripe/_payment_method.py | 22 +++++++ stripe/_payment_method_configuration.py | 64 +++++++++++++++++++ .../_payment_method_configuration_service.py | 40 ++++++++++++ stripe/_payment_method_service.py | 16 +++++ stripe/_setup_intent.py | 30 +++++++++ stripe/_setup_intent_service.py | 30 +++++++++ stripe/checkout/_session.py | 10 +++ stripe/checkout/_session_service.py | 10 +++ .../_confirmation_token_service.py | 10 +++ 18 files changed, 380 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 64b9aed4f..41237ba54 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1447 \ No newline at end of file +v1448 \ No newline at end of file diff --git a/stripe/_charge.py b/stripe/_charge.py index 1e53caa0d..f5ae40ca4 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -1591,6 +1591,9 @@ class P24(StripeObject): Przelewy24 rarely provides this information so the attribute is usually empty. """ + class PayByBank(StripeObject): + pass + class Payco(StripeObject): buyer_id: Optional[str] """ @@ -1995,6 +1998,7 @@ class Zip(StripeObject): naver_pay: Optional[NaverPay] oxxo: Optional[Oxxo] p24: Optional[P24] + pay_by_bank: Optional[PayByBank] payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] @@ -2059,6 +2063,7 @@ class Zip(StripeObject): "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "pay_by_bank": PayByBank, "payco": Payco, "paynow": Paynow, "paypal": Paypal, diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 5cb67c80c..37884ac05 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -1167,6 +1167,9 @@ class P24(StripeObject): The customer's bank, if provided. """ + class PayByBank(StripeObject): + pass + class Payco(StripeObject): pass @@ -1439,6 +1442,7 @@ class Zip(StripeObject): naver_pay: Optional[NaverPay] oxxo: Optional[Oxxo] p24: Optional[P24] + pay_by_bank: Optional[PayByBank] payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] @@ -1489,6 +1493,7 @@ class Zip(StripeObject): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -1550,6 +1555,7 @@ class Zip(StripeObject): "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "pay_by_bank": PayByBank, "payco": Payco, "paynow": Paynow, "paypal": Paypal, @@ -1841,6 +1847,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ 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" ] @@ -1967,6 +1979,7 @@ class CreateParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -2319,6 +2332,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayByBank(TypedDict): + pass + class CreateParamsPaymentMethodDataPayco(TypedDict): pass diff --git a/stripe/_customer.py b/stripe/_customer.py index fa1491432..788d6d786 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -925,6 +925,7 @@ class ListPaymentMethodsParams(RequestOptions): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", diff --git a/stripe/_customer_payment_method_service.py b/stripe/_customer_payment_method_service.py index 6c115b6be..c6a9051cc 100644 --- a/stripe/_customer_payment_method_service.py +++ b/stripe/_customer_payment_method_service.py @@ -67,6 +67,7 @@ class ListParams(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index adeb4f03f..567c9eac5 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -2459,6 +2459,9 @@ class P24(StripeObject): When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication). """ + class PayByBank(StripeObject): + pass + class Payco(StripeObject): capture_method: Optional[Literal["manual"]] """ @@ -2932,6 +2935,7 @@ class Zip(StripeObject): naver_pay: Optional[NaverPay] oxxo: Optional[Oxxo] p24: Optional[P24] + pay_by_bank: Optional[PayByBank] payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] @@ -2985,6 +2989,7 @@ class Zip(StripeObject): "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "pay_by_bank": PayByBank, "payco": Payco, "paynow": Paynow, "paypal": Paypal, @@ -4863,6 +4868,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ 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. @@ -4979,6 +4990,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -5331,6 +5343,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayByBank(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPayco(TypedDict): pass @@ -5649,6 +5664,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ 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" ] @@ -6830,6 +6851,9 @@ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class ConfirmParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsPayco(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -8531,6 +8555,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ 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. @@ -8647,6 +8677,7 @@ class CreateParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -8999,6 +9030,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayByBank(TypedDict): + pass + class CreateParamsPaymentMethodDataPayco(TypedDict): pass @@ -9317,6 +9351,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ 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" ] @@ -10498,6 +10538,9 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + class CreateParamsPaymentMethodOptionsPayco(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -12331,6 +12374,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ 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. @@ -12447,6 +12496,7 @@ class ModifyParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -12799,6 +12849,9 @@ class ModifyParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ModifyParamsPaymentMethodDataPayByBank(TypedDict): + pass + class ModifyParamsPaymentMethodDataPayco(TypedDict): pass @@ -13117,6 +13170,12 @@ class ModifyParamsPaymentMethodOptions(TypedDict): """ 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" ] @@ -14298,6 +14357,9 @@ class ModifyParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class ModifyParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + class ModifyParamsPaymentMethodOptionsPayco(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 538b80b43..4914d3470 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -1833,6 +1833,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ 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" ] @@ -1961,6 +1967,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -2315,6 +2322,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayByBank(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPayco(TypedDict): pass @@ -2633,6 +2643,12 @@ class ConfirmParamsPaymentMethodOptions(TypedDict): """ 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" ] @@ -3814,6 +3830,9 @@ class ConfirmParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class ConfirmParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + class ConfirmParamsPaymentMethodOptionsPayco(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -5555,6 +5574,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ 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" ] @@ -5683,6 +5708,7 @@ class CreateParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -6037,6 +6063,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayByBank(TypedDict): + pass + class CreateParamsPaymentMethodDataPayco(TypedDict): pass @@ -6355,6 +6384,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ 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" ] @@ -7536,6 +7571,9 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + class CreateParamsPaymentMethodOptionsPayco(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ @@ -9461,6 +9499,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ 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" ] @@ -9589,6 +9633,7 @@ class UpdateParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -9943,6 +9988,9 @@ class UpdateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class UpdateParamsPaymentMethodDataPayByBank(TypedDict): + pass + class UpdateParamsPaymentMethodDataPayco(TypedDict): pass @@ -10261,6 +10309,12 @@ class UpdateParamsPaymentMethodOptions(TypedDict): """ 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" ] @@ -11442,6 +11496,9 @@ class UpdateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class UpdateParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + class UpdateParamsPaymentMethodOptionsPayco(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index ffecef8e6..450e2081d 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -798,6 +798,7 @@ class CreateParams(RequestOptions): "multibanco", "oxxo", "p24", + "pay_by_bank", "paynow", "paypal", "payto", @@ -1691,7 +1692,7 @@ class ModifyParams(RequestOptions): 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', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'sepa_debit', 'shopeepay', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', '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). @@ -2492,6 +2493,7 @@ class RetrieveParams(RequestOptions): "multibanco", "oxxo", "p24", + "pay_by_bank", "paynow", "paypal", "payto", diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index a58603aa0..a8968eeb8 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -138,6 +138,7 @@ class CreateParams(TypedDict): "multibanco", "oxxo", "p24", + "pay_by_bank", "paynow", "paypal", "payto", @@ -1033,7 +1034,7 @@ class UpdateParams(TypedDict): 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', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'sepa_debit', 'shopeepay', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', '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). diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 2443b4e3c..3dbf76516 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -1122,6 +1122,9 @@ class P24(StripeObject): The customer's bank, if provided. """ + class PayByBank(StripeObject): + pass + class Payco(StripeObject): pass @@ -1532,6 +1535,10 @@ class CreateParams(RequestOptions): """ 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. @@ -1634,6 +1641,7 @@ class CreateParams(RequestOptions): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -2015,6 +2023,9 @@ class CreateParamsP24(TypedDict): The customer's bank. """ + class CreateParamsPayByBank(TypedDict): + pass + class CreateParamsPayco(TypedDict): pass @@ -2189,6 +2200,7 @@ class ListParams(RequestOptions): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -2246,6 +2258,10 @@ class ModifyParams(RequestOptions): """ If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. """ + pay_by_bank: NotRequired["PaymentMethod.ModifyParamsPayByBank"] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ payto: NotRequired["PaymentMethod.ModifyParamsPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -2332,6 +2348,9 @@ class ModifyParamsNaverPay(TypedDict): Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ + class ModifyParamsPayByBank(TypedDict): + pass + class ModifyParamsPayto(TypedDict): account_number: NotRequired[str] """ @@ -2425,6 +2444,7 @@ class RetrieveParams(RequestOptions): """ oxxo: Optional[Oxxo] p24: Optional[P24] + pay_by_bank: Optional[PayByBank] payco: Optional[Payco] paynow: Optional[Paynow] paypal: Optional[Paypal] @@ -2479,6 +2499,7 @@ class RetrieveParams(RequestOptions): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -2997,6 +3018,7 @@ async def retrieve_async( "naver_pay": NaverPay, "oxxo": Oxxo, "p24": P24, + "pay_by_bank": PayByBank, "payco": Payco, "paynow": Paynow, "paypal": Paypal, diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index 1ecc32bb1..0cd7e6950 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -741,6 +741,28 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} + class PayByBank(StripeObject): + class DisplayPreference(StripeObject): + overridable: Optional[bool] + """ + For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + """ + preference: Literal["none", "off", "on"] + """ + The account's display preference. + """ + value: Literal["off", "on"] + """ + The effective display preference value. + """ + + available: bool + """ + Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + """ + display_preference: DisplayPreference + _inner_class_types = {"display_preference": DisplayPreference} + class Paynow(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -1222,6 +1244,12 @@ class CreateParams(RequestOptions): """ 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. + """ 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. @@ -1753,6 +1781,20 @@ class CreateParamsP24DisplayPreference(TypedDict): 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 CreateParamsPaynow(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsPaynowDisplayPreference" @@ -2144,6 +2186,12 @@ class ModifyParams(RequestOptions): """ 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. + """ 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. @@ -2675,6 +2723,20 @@ class ModifyParamsP24DisplayPreference(TypedDict): 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 ModifyParamsPaynow(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsPaynowDisplayPreference" @@ -2941,6 +3003,7 @@ class RetrieveParams(RequestOptions): """ For child configs, the configuration's parent configuration. """ + pay_by_bank: Optional[PayByBank] paynow: Optional[Paynow] paypal: Optional[Paypal] payto: Optional[Payto] @@ -3125,6 +3188,7 @@ async def retrieve_async( "multibanco": Multibanco, "oxxo": Oxxo, "p24": P24, + "pay_by_bank": PayByBank, "paynow": Paynow, "paypal": Paypal, "payto": Payto, diff --git a/stripe/_payment_method_configuration_service.py b/stripe/_payment_method_configuration_service.py index 7083ea7b3..cb1d9c597 100644 --- a/stripe/_payment_method_configuration_service.py +++ b/stripe/_payment_method_configuration_service.py @@ -203,6 +203,12 @@ class CreateParams(TypedDict): """ 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. + """ paynow: NotRequired[ "PaymentMethodConfigurationService.CreateParamsPaynow" ] @@ -746,6 +752,20 @@ class CreateParamsP24DisplayPreference(TypedDict): 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 CreateParamsPaynow(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.CreateParamsPaynowDisplayPreference" @@ -1163,6 +1183,12 @@ class UpdateParams(TypedDict): """ 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. + """ paynow: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsPaynow" ] @@ -1706,6 +1732,20 @@ class UpdateParamsP24DisplayPreference(TypedDict): 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 UpdateParamsPaynow(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsPaynowDisplayPreference" diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py index 77ad49d58..234cff6fc 100644 --- a/stripe/_payment_method_service.py +++ b/stripe/_payment_method_service.py @@ -187,6 +187,10 @@ class CreateParams(TypedDict): """ 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. @@ -291,6 +295,7 @@ class CreateParams(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -674,6 +679,9 @@ class CreateParamsP24(TypedDict): The customer's bank. """ + class CreateParamsPayByBank(TypedDict): + pass + class CreateParamsPayco(TypedDict): pass @@ -848,6 +856,7 @@ class ListParams(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -911,6 +920,10 @@ class UpdateParams(TypedDict): """ If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. """ + pay_by_bank: NotRequired["PaymentMethodService.UpdateParamsPayByBank"] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ payto: NotRequired["PaymentMethodService.UpdateParamsPayto"] """ If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. @@ -999,6 +1012,9 @@ class UpdateParamsNaverPay(TypedDict): Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ + class UpdateParamsPayByBank(TypedDict): + pass + class UpdateParamsPayto(TypedDict): account_number: NotRequired[str] """ diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 6d7064134..b2057084e 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -1034,6 +1034,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ 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. @@ -1144,6 +1150,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -1494,6 +1501,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayByBank(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPayco(TypedDict): pass @@ -2426,6 +2436,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ 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. @@ -2536,6 +2552,7 @@ class CreateParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -2886,6 +2903,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayByBank(TypedDict): + pass + class CreateParamsPaymentMethodDataPayco(TypedDict): pass @@ -3783,6 +3803,12 @@ class ModifyParamsPaymentMethodData(TypedDict): """ 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. @@ -3893,6 +3919,7 @@ class ModifyParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -4243,6 +4270,9 @@ class ModifyParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ModifyParamsPaymentMethodDataPayByBank(TypedDict): + pass + class ModifyParamsPaymentMethodDataPayco(TypedDict): pass diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index df568aadf..d5023fb19 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -316,6 +316,12 @@ class ConfirmParamsPaymentMethodData(TypedDict): """ 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" ] @@ -444,6 +450,7 @@ class ConfirmParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -798,6 +805,9 @@ class ConfirmParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class ConfirmParamsPaymentMethodDataPayByBank(TypedDict): + pass + class ConfirmParamsPaymentMethodDataPayco(TypedDict): pass @@ -1758,6 +1768,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ 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" ] @@ -1884,6 +1900,7 @@ class CreateParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -2236,6 +2253,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayByBank(TypedDict): + pass + class CreateParamsPaymentMethodDataPayco(TypedDict): pass @@ -3173,6 +3193,12 @@ class UpdateParamsPaymentMethodData(TypedDict): """ 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" ] @@ -3299,6 +3325,7 @@ class UpdateParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -3651,6 +3678,9 @@ class UpdateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class UpdateParamsPaymentMethodDataPayByBank(TypedDict): + pass + class UpdateParamsPaymentMethodDataPayco(TypedDict): pass diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index d910ad86a..ad062d952 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -2311,6 +2311,7 @@ class CreateParams(RequestOptions): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -3125,6 +3126,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ 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. @@ -3707,6 +3714,9 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + class CreateParamsPaymentMethodOptionsPayco(TypedDict): capture_method: NotRequired[Literal["manual"]] """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 8ddbe07db..181143ada 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -259,6 +259,7 @@ class CreateParams(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -1113,6 +1114,12 @@ class CreateParamsPaymentMethodOptions(TypedDict): """ 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" ] @@ -1707,6 +1714,9 @@ class CreateParamsPaymentMethodOptionsP24(TypedDict): Confirm that the payer has accepted the P24 terms and conditions. """ + class CreateParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + class CreateParamsPaymentMethodOptionsPayco(TypedDict): capture_method: NotRequired[Literal["manual"]] """ diff --git a/stripe/test_helpers/_confirmation_token_service.py b/stripe/test_helpers/_confirmation_token_service.py index 23e005ba6..856927f68 100644 --- a/stripe/test_helpers/_confirmation_token_service.py +++ b/stripe/test_helpers/_confirmation_token_service.py @@ -247,6 +247,12 @@ class CreateParamsPaymentMethodData(TypedDict): """ 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" ] @@ -375,6 +381,7 @@ class CreateParamsPaymentMethodData(TypedDict): "naver_pay", "oxxo", "p24", + "pay_by_bank", "payco", "paynow", "paypal", @@ -729,6 +736,9 @@ class CreateParamsPaymentMethodDataP24(TypedDict): The customer's bank. """ + class CreateParamsPaymentMethodDataPayByBank(TypedDict): + pass + class CreateParamsPaymentMethodDataPayco(TypedDict): pass From 00f085249074d1824157f5eade81c0402003572d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 21:02:35 +0000 Subject: [PATCH 10/17] Update generated code for v1449 --- OPENAPI_VERSION | 2 +- stripe/_account.py | 20 +++++++++++++++++++ stripe/_account_service.py | 40 ++++++++++++++++++++++++++++++++++++++ stripe/_token.py | 20 +++++++++++++++++++ stripe/_token_service.py | 20 +++++++++++++++++++ 5 files changed, 101 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 41237ba54..1b66f41fd 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1448 \ No newline at end of file +v1449 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index ba0693306..27c55d0b2 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -2529,6 +2529,12 @@ class CreateParamsCompany(TypedDict): """ 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://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://stripe.com/api/persons) for accounts with a `relationship.executive` requirement. @@ -2683,6 +2689,20 @@ class CreateParamsCompanyAddressKanji(TypedDict): 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] """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index 49ea9d353..af32ad1b8 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -1097,6 +1097,12 @@ class CreateParamsCompany(TypedDict): """ 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://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://stripe.com/api/persons) for accounts with a `relationship.executive` requirement. @@ -1253,6 +1259,20 @@ class CreateParamsCompanyAddressKanji(TypedDict): 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] """ @@ -3136,6 +3156,12 @@ class UpdateParamsCompany(TypedDict): """ 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://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://stripe.com/api/persons) for accounts with a `relationship.executive` requirement. @@ -3292,6 +3318,20 @@ class UpdateParamsCompanyAddressKanji(TypedDict): 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] """ diff --git a/stripe/_token.py b/stripe/_token.py index 4aa174208..b537576cf 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -117,6 +117,12 @@ class CreateParamsAccountCompany(TypedDict): """ 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://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://stripe.com/api/persons) for accounts with a `relationship.executive` requirement. @@ -277,6 +283,20 @@ class CreateParamsAccountCompanyAddressKanji(TypedDict): 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] """ diff --git a/stripe/_token_service.py b/stripe/_token_service.py index 603f857af..444e77605 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -84,6 +84,12 @@ class CreateParamsAccountCompany(TypedDict): """ 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://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://stripe.com/api/persons) for accounts with a `relationship.executive` requirement. @@ -244,6 +250,20 @@ class CreateParamsAccountCompanyAddressKanji(TypedDict): 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] """ From dec80d04919be0a0719db7785e6717c05673b04c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:24:57 +0000 Subject: [PATCH 11/17] Update generated code for v1450 --- OPENAPI_VERSION | 2 +- stripe/_account.py | 12 ++++++++++++ stripe/_account_service.py | 24 ++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1b66f41fd..fc039b0b5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1449 \ No newline at end of file +v1450 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 27c55d0b2..1300508dd 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -2844,6 +2844,12 @@ class CreateParamsDocuments(TypedDict): """ 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]] @@ -2887,6 +2893,12 @@ class CreateParamsDocumentsProofOfRegistration(TypedDict): 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"] """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index af32ad1b8..9d1da320e 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -1418,6 +1418,12 @@ class CreateParamsDocuments(TypedDict): """ 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]] @@ -1461,6 +1467,12 @@ class CreateParamsDocumentsProofOfRegistration(TypedDict): 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"] """ @@ -3407,6 +3419,12 @@ class UpdateParamsDocuments(TypedDict): """ 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]] @@ -3450,6 +3468,12 @@ class UpdateParamsDocumentsProofOfRegistration(TypedDict): 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"] """ From 7ea2fe4947677f6869560b4fafc2f3949c264fb8 Mon Sep 17 00:00:00 2001 From: David Brownman <109395161+xavdid-stripe@users.noreply.github.com> Date: Thu, 16 Jan 2025 12:03:59 -0800 Subject: [PATCH 12/17] minor justfile fixes & pin CI version (#1445) * minor justfile fixes * pin most of CI to ubuntu 24 --- .github/workflows/ci.yml | 6 +-- justfile | 6 +-- tests/test_generated_examples.py | 86 ++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96cfa777a..6b02f17e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ on: jobs: lint: name: Static Checks - runs-on: ubuntu-latest + runs-on: "ubuntu-24.04" steps: - uses: extractions/setup-just@v2 - uses: actions/checkout@v3 @@ -47,7 +47,7 @@ jobs: build: name: Build - runs-on: ubuntu-latest + runs-on: "ubuntu-24.04" steps: - uses: extractions/setup-just@v2 - uses: actions/checkout@v3 @@ -107,7 +107,7 @@ jobs: startsWith(github.ref, 'refs/tags/v') && endsWith(github.actor, '-stripe') needs: [build, test, lint] - runs-on: ubuntu-latest + runs-on: "ubuntu-24.04" steps: - uses: actions/checkout@v3 - name: Download all workflow run artifacts diff --git a/justfile b/justfile index 4e8c0fec8..011c346d6 100644 --- a/justfile +++ b/justfile @@ -1,6 +1,6 @@ set quiet -import? '../sdk-codegen/justfile' +import? '../sdk-codegen/utils.just' VENV_NAME := ".venv" @@ -77,5 +77,5 @@ venv: # called by tooling [private] update-version version: - @echo "{{ version }}" > VERSION - @perl -pi -e 's|VERSION = "[.\d\w]+"|VERSION = "{{ version }}"|' stripe/_version.py + echo "{{ version }}" > VERSION + perl -pi -e 's|VERSION = "[.\d\w]+"|VERSION = "{{ version }}"|' stripe/_version.py diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 3676af8ab..48a1ff85e 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -25865,6 +25865,92 @@ async def test_terminal_readers_process_payment_intent_post_service_async( post_data="payment_intent=pi_xxxxxxxxxxxxx", ) + def test_terminal_readers_process_setup_intent_post( + self, http_client_mock: HTTPClientMock + ) -> None: + stripe.terminal.Reader.process_setup_intent( + "tmr_xxxxxxxxxxxxx", + setup_intent="seti_xxxxxxxxxxxxx", + allow_redisplay="always", + ) + http_client_mock.assert_requested( + "post", + path="/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", + query_string="", + post_data="setup_intent=seti_xxxxxxxxxxxxx&allow_redisplay=always", + ) + + def test_terminal_readers_process_setup_intent_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.terminal.readers.process_setup_intent( + "tmr_xxxxxxxxxxxxx", + { + "setup_intent": "seti_xxxxxxxxxxxxx", + "allow_redisplay": "always", + }, + ) + http_client_mock.assert_requested( + "post", + path="/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", + query_string="", + api_base="https://api.stripe.com", + post_data="setup_intent=seti_xxxxxxxxxxxxx&allow_redisplay=always", + ) + + @pytest.mark.anyio + async def test_terminal_readers_process_setup_intent_post_async( + self, http_client_mock: HTTPClientMock + ) -> None: + await stripe.terminal.Reader.process_setup_intent_async( + "tmr_xxxxxxxxxxxxx", + setup_intent="seti_xxxxxxxxxxxxx", + allow_redisplay="always", + ) + http_client_mock.assert_requested( + "post", + path="/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", + query_string="", + post_data="setup_intent=seti_xxxxxxxxxxxxx&allow_redisplay=always", + ) + + @pytest.mark.anyio + async def test_terminal_readers_process_setup_intent_post_service_async( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + await client.terminal.readers.process_setup_intent_async( + "tmr_xxxxxxxxxxxxx", + { + "setup_intent": "seti_xxxxxxxxxxxxx", + "allow_redisplay": "always", + }, + ) + http_client_mock.assert_requested( + "post", + path="/v1/terminal/readers/tmr_xxxxxxxxxxxxx/process_setup_intent", + query_string="", + api_base="https://api.stripe.com", + post_data="setup_intent=seti_xxxxxxxxxxxxx&allow_redisplay=always", + ) + def test_test_helpers_customers_fund_cash_balance_post( self, http_client_mock: HTTPClientMock ) -> None: From 3682a9fd783de9151324d7cb9cf70b7511629dcf Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Thu, 16 Jan 2025 17:19:54 -0800 Subject: [PATCH 13/17] Added CONTRIBUTING.md file (#1444) --- CONTRIBUTING.md | 25 +++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..1615afa65 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,25 @@ + +# Contributing + +We welcome bug reports, feature requests, and code contributions in a pull request. + +For most pull requests, we request that you identify or create an associated issue that has the necessary context. We use these issues to reach agreement on an approach and save the PR author from having to redo work. Fixing typos or documentation issues likely do not need an issue; for any issue that introduces substantial code changes, changes the public interface, or if you aren't sure, please find or [create an issue](https://www.github.com/stripe/stripe-python/issues/new/choose). + +## Contributor License Agreement + +All contributors must sign the Contributor License Agreement (CLA) before we can accept their contribution. If you have not yet signed the agreement, you will be given an option to do so when you open a pull request. You can then sign by clicking on the badge in the comment from @CLAassistant. + +## Generated code + +This project has a combination of manually maintained code and code generated from our private code generator. If your contribution involves changes to generated code, please call this out in the issue or pull request as we will likely need to make a change to our code generator before accepting the contribution. + +To identify files with purely generated code, look for the comment `File generated from our OpenAPI spec.` at the start of the file. Generated blocks of code within hand-written files will be between comments that say `The beginning of the section generated from our OpenAPI spec` and `The end of the section generated from our OpenAPI spec`. + +## Compatibility with supported language and runtime versions + +This project supports [many different langauge and runtime versions](README.md#requirements) and we are unable to accept any contribution that does not work on _all_ supported versions. If, after discussing the approach in the associated issue, your change must use an API / feature that isn't available in all supported versions, please call this out explicitly in the issue or pull request so we can help figure out the best way forward. + +## Set up your dev environment + +Please refer to this project's [README.md](README.md#development) for instructions on how to set up your development environment. + diff --git a/README.md b/README.md index 35cfa9912..aa4f0d2cd 100644 --- a/README.md +++ b/README.md @@ -331,6 +331,8 @@ New features and bug fixes are released on the latest major version of the Strip ## Development +[Contribution guidelines for this project](CONTRIBUTING.md) + The test suite depends on [stripe-mock], so make sure to fetch and run it from a background terminal ([stripe-mock's README][stripe-mock] also contains instructions for installing via Homebrew and other methods): From 95631af86171ca61b4384bcd460dc6ecbcfaaaf7 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 14:45:43 +0000 Subject: [PATCH 14/17] Update generated code for v1452 --- OPENAPI_VERSION | 2 +- stripe/financial_connections/_transaction.py | 2 +- stripe/financial_connections/_transaction_service.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6bffec762..b8e108d5a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1451 \ No newline at end of file +v1452 \ No newline at end of file diff --git a/stripe/financial_connections/_transaction.py b/stripe/financial_connections/_transaction.py index 1874a2b52..47188a1cb 100644 --- a/stripe/financial_connections/_transaction.py +++ b/stripe/financial_connections/_transaction.py @@ -30,7 +30,7 @@ class StatusTransitions(StripeObject): class ListParams(RequestOptions): account: str """ - The ID of the Stripe account whose transactions will be retrieved. + The ID of the Financial Connections Account whose transactions will be retrieved. """ ending_before: NotRequired[str] """ diff --git a/stripe/financial_connections/_transaction_service.py b/stripe/financial_connections/_transaction_service.py index 66683ae29..7835aa09f 100644 --- a/stripe/financial_connections/_transaction_service.py +++ b/stripe/financial_connections/_transaction_service.py @@ -13,7 +13,7 @@ class TransactionService(StripeService): class ListParams(TypedDict): account: str """ - The ID of the Stripe account whose transactions will be retrieved. + The ID of the Financial Connections Account whose transactions will be retrieved. """ ending_before: NotRequired[str] """ From 4ff9da04cf23b2dc90548171054896c6dd58eeef Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 18:16:49 +0000 Subject: [PATCH 15/17] Update generated code for v1453 --- OPENAPI_VERSION | 2 +- stripe/billing_portal/_configuration.py | 16 +++++++++++----- stripe/billing_portal/_configuration_service.py | 12 ++++++++---- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b8e108d5a..59bdaaed2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1452 \ No newline at end of file +v1453 \ No newline at end of file diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index 96e795e51..42beb6605 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -106,7 +106,9 @@ class CancellationReason(StripeObject): """ Whether to cancel subscriptions immediately or at the end of the billing period. """ - proration_behavior: Literal["create_prorations", "none"] + proration_behavior: Literal[ + "always_invoice", "create_prorations", "none" + ] """ Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. """ @@ -302,9 +304,11 @@ class CreateParamsFeaturesSubscriptionCancel(TypedDict): """ Whether to cancel subscriptions immediately or at the end of the billing period. """ - proration_behavior: NotRequired[Literal["create_prorations", "none"]] + 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`. No prorations are generated when canceling a subscription at the end of its natural billing period. + 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): @@ -538,9 +542,11 @@ class ModifyParamsFeaturesSubscriptionCancel(TypedDict): """ Whether to cancel subscriptions immediately or at the end of the billing period. """ - proration_behavior: NotRequired[Literal["create_prorations", "none"]] + 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`. No prorations are generated when canceling a subscription at the end of its natural billing period. + 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): diff --git a/stripe/billing_portal/_configuration_service.py b/stripe/billing_portal/_configuration_service.py index 6cde474ff..2bf54fa64 100644 --- a/stripe/billing_portal/_configuration_service.py +++ b/stripe/billing_portal/_configuration_service.py @@ -123,9 +123,11 @@ class CreateParamsFeaturesSubscriptionCancel(TypedDict): """ Whether to cancel subscriptions immediately or at the end of the billing period. """ - proration_behavior: NotRequired[Literal["create_prorations", "none"]] + 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`. No prorations are generated when canceling a subscription at the end of its natural billing period. + 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): @@ -365,9 +367,11 @@ class UpdateParamsFeaturesSubscriptionCancel(TypedDict): """ Whether to cancel subscriptions immediately or at the end of the billing period. """ - proration_behavior: NotRequired[Literal["create_prorations", "none"]] + 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`. No prorations are generated when canceling a subscription at the end of its natural billing period. + 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): From 4ae0b977b4c081c1a40bb5b358da493c4a3fa025 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 17 Jan 2025 22:30:34 +0000 Subject: [PATCH 16/17] Update generated code for v1454 --- OPENAPI_VERSION | 2 +- stripe/_api_version.py | 2 +- stripe/_webhook_endpoint.py | 1 + stripe/_webhook_endpoint_service.py | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 59bdaaed2..4624c15fb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1453 \ No newline at end of file +v1454 \ No newline at end of file diff --git a/stripe/_api_version.py b/stripe/_api_version.py index 7d2801e63..62acc96e0 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2024-12-18.acacia" + CURRENT = "2025-01-27.acacia" diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index 0a491e3a8..4cb0aa65c 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -138,6 +138,7 @@ class CreateParams(RequestOptions): "2024-10-28.acacia", "2024-11-20.acacia", "2024-12-18.acacia", + "2025-01-27.acacia", ] ] """ diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index 384c133f8..bfe523571 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -119,6 +119,7 @@ class CreateParams(TypedDict): "2024-10-28.acacia", "2024-11-20.acacia", "2024-12-18.acacia", + "2025-01-27.acacia", ] ] """ From 6546a7022104e94d6de4b190adbae7c1636ee56f Mon Sep 17 00:00:00 2001 From: Jesse Rosalia Date: Fri, 17 Jan 2025 16:15:55 -0800 Subject: [PATCH 17/17] added CONTRIBUTING.md --- CONTRIBUTING.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..1615afa65 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,25 @@ + +# Contributing + +We welcome bug reports, feature requests, and code contributions in a pull request. + +For most pull requests, we request that you identify or create an associated issue that has the necessary context. We use these issues to reach agreement on an approach and save the PR author from having to redo work. Fixing typos or documentation issues likely do not need an issue; for any issue that introduces substantial code changes, changes the public interface, or if you aren't sure, please find or [create an issue](https://www.github.com/stripe/stripe-python/issues/new/choose). + +## Contributor License Agreement + +All contributors must sign the Contributor License Agreement (CLA) before we can accept their contribution. If you have not yet signed the agreement, you will be given an option to do so when you open a pull request. You can then sign by clicking on the badge in the comment from @CLAassistant. + +## Generated code + +This project has a combination of manually maintained code and code generated from our private code generator. If your contribution involves changes to generated code, please call this out in the issue or pull request as we will likely need to make a change to our code generator before accepting the contribution. + +To identify files with purely generated code, look for the comment `File generated from our OpenAPI spec.` at the start of the file. Generated blocks of code within hand-written files will be between comments that say `The beginning of the section generated from our OpenAPI spec` and `The end of the section generated from our OpenAPI spec`. + +## Compatibility with supported language and runtime versions + +This project supports [many different langauge and runtime versions](README.md#requirements) and we are unable to accept any contribution that does not work on _all_ supported versions. If, after discussing the approach in the associated issue, your change must use an API / feature that isn't available in all supported versions, please call this out explicitly in the issue or pull request so we can help figure out the best way forward. + +## Set up your dev environment + +Please refer to this project's [README.md](README.md#development) for instructions on how to set up your development environment. +