From 28a5848fb8761d2b3cb3622c93e5a26526aa028e Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Wed, 27 Mar 2024 14:41:53 -0700 Subject: [PATCH] Remove shared overrides added for backcompat --- stripe/_balance_transaction.py | 4 - stripe/_event.py | 8 -- stripe/_invoice.py | 2 +- stripe/_invoice_line_item.py | 1 - stripe/_invoice_line_item_service.py | 1 - stripe/_invoice_service.py | 2 +- stripe/_payment_intent.py | 18 ---- stripe/_payment_intent_service.py | 18 ---- stripe/_payment_method_configuration.py | 120 ------------------------ stripe/_setup_intent.py | 2 +- stripe/_tax_rate.py | 3 - stripe/_tax_rate_service.py | 2 - stripe/_webhook_endpoint.py | 16 ---- stripe/_webhook_endpoint_service.py | 16 ---- stripe/climate/_supplier.py | 1 - stripe/reporting/_report_run.py | 1 - stripe/reporting/_report_run_service.py | 1 - 17 files changed, 3 insertions(+), 213 deletions(-) diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py index d75d48b4d..f4236ba5a 100644 --- a/stripe/_balance_transaction.py +++ b/stripe/_balance_transaction.py @@ -251,10 +251,6 @@ class RetrieveParams(RequestOptions): "transfer_cancel", "transfer_failure", "transfer_refund", - "obligation_inbound", - "obligation_payout", - "obligation_payout_failure", - "obligation_reversal_outbound", ] """ Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. diff --git a/stripe/_event.py b/stripe/_event.py index fc2c2d936..64a954e64 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -382,14 +382,6 @@ class RetrieveParams(RequestOptions): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoiceitem.updated", - "order.created", - "recipient.created", - "recipient.deleted", - "recipient.updated", - "sku.created", - "sku.deleted", - "sku.updated", ] """ Description of the event (for example, `invoice.created` or `charge.refunded`). diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 69434b0a2..8dd8bb49c 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -1085,7 +1085,7 @@ class CreateParams(RequestOptions): Configuration settings for the PaymentIntent that is generated when the invoice is finalized. """ pending_invoice_items_behavior: NotRequired[ - Literal["exclude", "include", "include_and_require"] + Literal["exclude", "include"] ] """ How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted. diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index 8e177a54d..b8003758f 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -289,7 +289,6 @@ class ModifyParamsTaxAmountTaxRateData(TypedDict): "rst", "sales_tax", "vat", - "service_tax", ] ] """ diff --git a/stripe/_invoice_line_item_service.py b/stripe/_invoice_line_item_service.py index fa0f3d35b..977545295 100644 --- a/stripe/_invoice_line_item_service.py +++ b/stripe/_invoice_line_item_service.py @@ -213,7 +213,6 @@ class UpdateParamsTaxAmountTaxRateData(TypedDict): "rst", "sales_tax", "vat", - "service_tax", ] ] """ diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index e64dd5ac3..b22b82385 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -124,7 +124,7 @@ class CreateParams(TypedDict): Configuration settings for the PaymentIntent that is generated when the invoice is finalized. """ pending_invoice_items_behavior: NotRequired[ - Literal["exclude", "include", "include_and_require"] + Literal["exclude", "include"] ] """ How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted. diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index c071514a7..e5063a388 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -3230,12 +3230,6 @@ class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - This field was released by mistake and will be removed in the next major version - """ class ConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ @@ -5371,12 +5365,6 @@ class CreateParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - This field was released by mistake and will be removed in the next major version - """ class CreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ @@ -7508,12 +7496,6 @@ class ModifyParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - This field was released by mistake and will be removed in the next major version - """ class ModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 525022225..50ff5a7f7 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -1419,12 +1419,6 @@ class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - This field was released by mistake and will be removed in the next major version - """ class ConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ @@ -3584,12 +3578,6 @@ class CreateParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - This field was released by mistake and will be removed in the next major version - """ class CreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ @@ -5773,12 +5761,6 @@ class UpdateParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - This field was released by mistake and will be removed in the next major version - """ class UpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): ares_trans_status: NotRequired[ diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index 89bbeceeb..33f3b90cb 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -785,116 +785,6 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} - class IdBankTransfer(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 Multibanco(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 Netbanking(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 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 Upi(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 CreateParams(RequestOptions): acss_debit: NotRequired[ "PaymentMethodConfiguration.CreateParamsAcssDebit" @@ -2325,11 +2215,6 @@ class RetrieveParams(RequestOptions): sofort: Optional[Sofort] us_bank_account: Optional[UsBankAccount] wechat_pay: Optional[WechatPay] - id_bank_transfer: Optional[IdBankTransfer] - multibanco: Optional[Multibanco] - netbanking: Optional[Netbanking] - pay_by_bank: Optional[PayByBank] - upi: Optional[Upi] @classmethod def create( @@ -2435,9 +2320,4 @@ def retrieve( "sofort": Sofort, "us_bank_account": UsBankAccount, "wechat_pay": WechatPay, - "id_bank_transfer": IdBankTransfer, - "multibanco": Multibanco, - "netbanking": Netbanking, - "pay_by_bank": PayByBank, - "upi": Upi, } diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 2b07dd8ff..28f23b2ab 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -520,7 +520,7 @@ class MandateOptions(StripeObject): Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. """ request_three_d_secure: Optional[ - Literal["any", "automatic", "challenge", "challenge_only"] + Literal["any", "automatic", "challenge"] ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. diff --git a/stripe/_tax_rate.py b/stripe/_tax_rate.py index 1d6389f46..4b2f91d45 100644 --- a/stripe/_tax_rate.py +++ b/stripe/_tax_rate.py @@ -78,7 +78,6 @@ class CreateParams(RequestOptions): "rst", "sales_tax", "vat", - "service_tax", ] ] """ @@ -180,7 +179,6 @@ class ModifyParams(RequestOptions): "rst", "sales_tax", "vat", - "service_tax", ] ] """ @@ -271,7 +269,6 @@ class RetrieveParams(RequestOptions): "rst", "sales_tax", "vat", - "service_tax", ] ] """ diff --git a/stripe/_tax_rate_service.py b/stripe/_tax_rate_service.py index e676afd05..bcb8d31ae 100644 --- a/stripe/_tax_rate_service.py +++ b/stripe/_tax_rate_service.py @@ -65,7 +65,6 @@ class CreateParams(TypedDict): "rst", "sales_tax", "vat", - "service_tax", ] ] """ @@ -173,7 +172,6 @@ class UpdateParams(TypedDict): "rst", "sales_tax", "vat", - "service_tax", ] ] """ diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index f7deee920..f412c32ef 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -374,14 +374,6 @@ class CreateParams(RequestOptions): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoiceitem.updated", - "order.created", - "recipient.created", - "recipient.deleted", - "recipient.updated", - "sku.created", - "sku.deleted", - "sku.updated", ] ] """ @@ -660,14 +652,6 @@ class ModifyParams(RequestOptions): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoiceitem.updated", - "order.created", - "recipient.created", - "recipient.deleted", - "recipient.updated", - "sku.created", - "sku.deleted", - "sku.updated", ] ] ] diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index a015b0c9f..e3cb82098 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -355,14 +355,6 @@ class CreateParams(TypedDict): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoiceitem.updated", - "order.created", - "recipient.created", - "recipient.deleted", - "recipient.updated", - "sku.created", - "sku.deleted", - "sku.updated", ] ] """ @@ -647,14 +639,6 @@ class UpdateParams(TypedDict): "treasury.received_credit.failed", "treasury.received_credit.succeeded", "treasury.received_debit.created", - "invoiceitem.updated", - "order.created", - "recipient.created", - "recipient.deleted", - "recipient.updated", - "sku.created", - "sku.deleted", - "sku.updated", ] ] ] diff --git a/stripe/climate/_supplier.py b/stripe/climate/_supplier.py index b64c569e0..5c98df947 100644 --- a/stripe/climate/_supplier.py +++ b/stripe/climate/_supplier.py @@ -89,7 +89,6 @@ class RetrieveParams(RequestOptions): "biomass_carbon_removal_and_storage", "direct_air_capture", "enhanced_weathering", - "various", ] """ The scientific pathway used for carbon removal. diff --git a/stripe/reporting/_report_run.py b/stripe/reporting/_report_run.py index b97af6367..e9efd5125 100644 --- a/stripe/reporting/_report_run.py +++ b/stripe/reporting/_report_run.py @@ -149,7 +149,6 @@ class CreateParamsParameters(TypedDict): "transfer", "transfer_reversal", "unreconciled_customer_funds", - "obligation", ] ] """ diff --git a/stripe/reporting/_report_run_service.py b/stripe/reporting/_report_run_service.py index d1c47f95c..a12a6fc47 100644 --- a/stripe/reporting/_report_run_service.py +++ b/stripe/reporting/_report_run_service.py @@ -88,7 +88,6 @@ class CreateParamsParameters(TypedDict): "transfer", "transfer_reversal", "unreconciled_customer_funds", - "obligation", ] ] """