From c42857cc5b518f10a5d0ed1a2ded2759f612ddae Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 16 Jul 2026 18:29:54 +0000 Subject: [PATCH 1/2] Update generated code for v2344 and b7168aabb0ad2d376d2f6d2e5ec34e5e55d1f702 --- CODEGEN_VERSION | 2 +- stripe/_account.py | 145 +- stripe/_account_notice.py | 33 +- stripe/_account_signals.py | 102 +- stripe/_application_fee.py | 4 +- stripe/_balance_settings.py | 32 +- stripe/_balance_transaction.py | 17 +- stripe/_capability.py | 58 +- stripe/_card.py | 8 +- stripe/_charge.py | 221 ++- stripe/_confirmation_token.py | 400 ++-- stripe/_coupon.py | 10 +- stripe/_credit_note.py | 90 +- stripe/_credit_note_line_item.py | 41 +- stripe/_customer.py | 27 +- stripe/_customer_balance_transaction.py | 31 +- stripe/_customer_cash_balance_transaction.py | 44 +- stripe/_customer_session.py | 44 +- stripe/_dispute.py | 80 +- stripe/_event.py | 4 +- stripe/_file.py | 49 +- stripe/_funding_instructions.py | 32 +- stripe/_fx_quote.py | 8 +- stripe/_gift_card_operation.py | 49 +- stripe/_invoice.py | 310 +-- stripe/_invoice_item.py | 28 +- stripe/_invoice_line_item.py | 71 +- stripe/_line_item.py | 37 +- stripe/_mandate.py | 102 +- stripe/_order.py | 249 ++- stripe/_payment_attempt_record.py | 277 ++- stripe/_payment_intent.py | 816 ++++---- ...payment_intent_amount_details_line_item.py | 6 +- stripe/_payment_link.py | 627 ++++--- stripe/_payment_location.py | 14 +- stripe/_payment_location_capability.py | 25 +- stripe/_payment_method.py | 384 ++-- stripe/_payment_method_configuration.py | 254 +-- stripe/_payment_method_domain.py | 14 +- stripe/_payment_record.py | 276 ++- stripe/_payout.py | 6 +- stripe/_person.py | 76 +- stripe/_plan.py | 8 +- stripe/_price.py | 16 +- stripe/_product.py | 8 +- stripe/_quote.py | 223 ++- stripe/_quote_line.py | 145 +- stripe/_quote_preview_invoice.py | 312 +-- .../_quote_preview_subscription_schedule.py | 80 +- stripe/_refund.py | 21 +- stripe/_setup_attempt.py | 49 +- stripe/_setup_intent.py | 262 +-- stripe/_shipping_rate.py | 10 +- stripe/_source.py | 8 +- stripe/_subscription.py | 297 +-- stripe/_subscription_item.py | 4 +- stripe/_subscription_schedule.py | 78 +- stripe/_tax_code.py | 6 +- stripe/_tax_id.py | 4 +- stripe/_tax_rate.py | 4 +- stripe/_token.py | 4 +- stripe/apps/_secret.py | 4 +- stripe/billing/_alert.py | 21 +- stripe/billing/_alert_triggered.py | 6 +- stripe/billing/_credit_balance_summary.py | 6 +- stripe/billing/_credit_balance_transaction.py | 18 +- stripe/billing/_credit_grant.py | 6 +- stripe/billing/_meter.py | 8 +- stripe/billing/_meter_event_adjustment.py | 4 +- stripe/billing_portal/_configuration.py | 50 +- stripe/billing_portal/_session.py | 119 +- stripe/capital/_financing_offer.py | 40 +- stripe/capital/_financing_summary.py | 4 +- stripe/capital/_financing_transaction.py | 25 +- stripe/checkout/_session.py | 935 ++++----- stripe/climate/_order.py | 11 +- stripe/climate/_supplier.py | 15 +- stripe/crypto/_customer.py | 94 +- stripe/crypto/_customer_consumer_wallet.py | 27 +- stripe/crypto/_customer_payment_token.py | 8 +- stripe/crypto/_onramp_session.py | 67 +- stripe/delegated_checkout/_order_event.py | 40 +- .../delegated_checkout/_requested_session.py | 36 +- ...als_including_delinquency_created_event.py | 56 +- ...ling_meter_error_report_triggered_event.py | 27 +- .../_v1_billing_meter_no_meter_found_event.py | 27 +- ...creator_capability_status_updated_event.py | 33 +- ...erchant_capability_status_updated_event.py | 99 +- ...manager_capability_status_updated_event.py | 59 +- ...cipient_capability_status_updated_event.py | 45 +- .../_v2_core_account_link_returned_event.py | 15 +- ..._signals_fraudulent_website_ready_event.py | 14 +- .../_v2_core_health_api_error_firing_event.py | 4 +- ...v2_core_health_api_error_resolved_event.py | 4 +- ...v2_core_health_api_latency_firing_event.py | 4 +- ..._core_health_api_latency_resolved_event.py | 4 +- ...th_authorization_rate_drop_firing_event.py | 147 +- ..._authorization_rate_drop_resolved_event.py | 147 +- ...core_health_elements_error_firing_event.py | 6 +- ...re_health_elements_error_resolved_event.py | 6 +- ..._core_health_fraud_rate_increased_event.py | 4 +- ...ealth_payment_method_error_firing_event.py | 145 +- ...lth_payment_method_error_resolved_event.py | 145 +- ..._signal_fraudulent_merchant_ready_event.py | 54 +- stripe/financial_connections/_account.py | 84 +- .../financial_connections/_authorization.py | 10 +- stripe/financial_connections/_institution.py | 4 +- stripe/financial_connections/_session.py | 46 +- stripe/financial_connections/_transaction.py | 4 +- stripe/forwarding/_request.py | 17 +- stripe/identity/_verification_report.py | 83 +- stripe/identity/_verification_session.py | 73 +- stripe/issuing/_authorization.py | 1218 ++++++------ stripe/issuing/_card.py | 109 +- stripe/issuing/_cardholder.py | 65 +- stripe/issuing/_credit_underwriting_record.py | 475 ++--- stripe/issuing/_dispute.py | 115 +- stripe/issuing/_dispute_settlement_detail.py | 6 +- stripe/issuing/_personalization_design.py | 44 +- stripe/issuing/_physical_bundle.py | 14 +- stripe/issuing/_settlement.py | 4 +- stripe/issuing/_token.py | 469 ++--- stripe/issuing/_transaction.py | 29 +- stripe/params/_account_create_params.py | 46 +- .../params/_account_create_person_params.py | 76 +- stripe/params/_account_link_create_params.py | 15 +- .../params/_account_modify_person_params.py | 76 +- .../params/_account_person_create_params.py | 76 +- .../params/_account_person_update_params.py | 76 +- stripe/params/_account_update_params.py | 36 +- .../params/_balance_settings_modify_params.py | 17 +- .../params/_balance_settings_update_params.py | 17 +- .../params/_balance_transfer_create_params.py | 8 +- stripe/params/_charge_capture_params.py | 329 +--- stripe/params/_charge_modify_params.py | 327 +--- stripe/params/_charge_update_params.py | 327 +--- .../_confirmation_token_create_params.py | 180 +- stripe/params/_coupon_create_params.py | 6 +- stripe/params/_credit_note_create_params.py | 8 +- .../_credit_note_preview_lines_list_params.py | 8 +- .../_credit_note_preview_lines_params.py | 8 +- stripe/params/_credit_note_preview_params.py | 8 +- ...omer_create_funding_instructions_params.py | 19 +- stripe/params/_customer_create_params.py | 2 +- ...omer_funding_instructions_create_params.py | 19 +- .../_customer_list_payment_methods_params.py | 71 +- stripe/params/_customer_modify_params.py | 4 +- .../_customer_payment_method_list_params.py | 71 +- .../params/_customer_session_create_params.py | 30 +- stripe/params/_customer_update_params.py | 4 +- stripe/params/_dispute_modify_params.py | 4 +- stripe/params/_dispute_update_params.py | 4 +- stripe/params/_file_create_params.py | 37 +- stripe/params/_fx_quote_create_params.py | 6 +- stripe/params/_invoice_add_lines_params.py | 26 +- stripe/params/_invoice_create_params.py | 64 +- .../params/_invoice_create_preview_params.py | 204 +- stripe/params/_invoice_item_create_params.py | 6 +- stripe/params/_invoice_item_modify_params.py | 6 +- stripe/params/_invoice_item_update_params.py | 6 +- .../_invoice_line_item_update_params.py | 26 +- stripe/params/_invoice_list_params.py | 2 +- stripe/params/_invoice_modify_params.py | 60 +- stripe/params/_invoice_payment_list_params.py | 6 +- stripe/params/_invoice_remove_lines_params.py | 4 +- stripe/params/_invoice_update_lines_params.py | 26 +- stripe/params/_invoice_update_params.py | 60 +- stripe/params/_mandate_list_params.py | 4 +- stripe/params/_order_create_params.py | 280 +-- stripe/params/_order_modify_params.py | 280 +-- stripe/params/_order_update_params.py | 280 +-- ...ecord_report_early_fraud_warning_params.py | 15 +- ...ent_attempt_record_report_failed_params.py | 13 +- ...attempt_record_report_guaranteed_params.py | 8 +- ...ent_attempt_record_report_refund_params.py | 14 +- .../params/_payment_intent_capture_params.py | 425 ++--- .../params/_payment_intent_confirm_params.py | 1157 +++++------- .../params/_payment_intent_create_params.py | 1290 +++++-------- ...t_intent_decrement_authorization_params.py | 98 +- ...t_intent_increment_authorization_params.py | 100 +- .../params/_payment_intent_modify_params.py | 1157 +++++------- ...t_intent_simulate_crypto_deposit_params.py | 6 +- .../_payment_intent_trigger_action_params.py | 6 +- ...ent_update_crypto_refund_address_params.py | 6 +- .../params/_payment_intent_update_params.py | 1157 +++++------- stripe/params/_payment_link_create_params.py | 631 ++++--- stripe/params/_payment_link_modify_params.py | 513 ++--- stripe/params/_payment_link_update_params.py | 513 ++--- ...ment_method_configuration_create_params.py | 130 +- ...ment_method_configuration_modify_params.py | 130 +- ...ment_method_configuration_update_params.py | 130 +- .../params/_payment_method_create_params.py | 118 +- stripe/params/_payment_method_list_params.py | 71 +- .../params/_payment_method_modify_params.py | 10 +- .../params/_payment_method_update_params.py | 10 +- .../params/_payment_record_create_params.py | 18 +- ...rd_report_payment_attempt_failed_params.py | 13 +- ...eport_payment_attempt_guaranteed_params.py | 8 +- ...nt_record_report_payment_attempt_params.py | 17 +- .../_payment_record_report_payment_params.py | 19 +- .../_payment_record_report_refund_params.py | 14 +- stripe/params/_plan_create_params.py | 4 +- stripe/params/_price_create_params.py | 4 +- stripe/params/_quote_create_params.py | 243 ++- stripe/params/_quote_list_params.py | 2 +- stripe/params/_quote_modify_params.py | 241 ++- stripe/params/_quote_update_params.py | 241 ++- stripe/params/_setup_intent_confirm_params.py | 293 ++- stripe/params/_setup_intent_create_params.py | 430 ++--- stripe/params/_setup_intent_modify_params.py | 299 ++- stripe/params/_setup_intent_update_params.py | 299 ++- stripe/params/_shipping_rate_create_params.py | 6 +- stripe/params/_subscription_cancel_params.py | 2 +- stripe/params/_subscription_create_params.py | 102 +- .../_subscription_item_create_params.py | 16 +- .../_subscription_item_delete_params.py | 2 +- .../_subscription_item_modify_params.py | 14 +- .../_subscription_item_update_params.py | 14 +- stripe/params/_subscription_list_params.py | 13 +- stripe/params/_subscription_modify_params.py | 100 +- stripe/params/_subscription_pause_params.py | 4 +- stripe/params/_subscription_resume_params.py | 4 +- .../_subscription_schedule_amend_params.py | 122 +- .../_subscription_schedule_create_params.py | 68 +- .../_subscription_schedule_modify_params.py | 68 +- .../_subscription_schedule_update_params.py | 68 +- stripe/params/_subscription_update_params.py | 100 +- stripe/params/_tax_id_create_params.py | 4 +- stripe/params/_tax_id_list_params.py | 4 +- stripe/params/_token_create_params.py | 88 +- .../params/_webhook_endpoint_create_params.py | 617 +++--- .../params/_webhook_endpoint_modify_params.py | 617 +++--- .../params/_webhook_endpoint_update_params.py | 617 +++--- stripe/params/apps/_secret_create_params.py | 4 +- .../apps/_secret_delete_where_params.py | 4 +- stripe/params/apps/_secret_find_params.py | 4 +- stripe/params/apps/_secret_list_params.py | 4 +- stripe/params/billing/_alert_create_params.py | 17 +- stripe/params/billing/_alert_list_params.py | 4 +- ..._credit_balance_summary_retrieve_params.py | 4 +- .../billing/_credit_grant_create_params.py | 6 +- stripe/params/billing/_meter_create_params.py | 6 +- .../_meter_event_summary_list_params.py | 2 +- .../_meter_list_event_summaries_params.py | 2 +- stripe/params/billing/_meter_list_params.py | 2 +- .../_configuration_create_params.py | 33 +- .../_configuration_modify_params.py | 16 +- .../_configuration_update_params.py | 16 +- .../billing_portal/_session_create_params.py | 69 +- .../params/checkout/_session_create_params.py | 1030 +++++----- .../params/checkout/_session_modify_params.py | 14 +- .../params/checkout/_session_update_params.py | 14 +- .../crypto/_onramp_session_create_params.py | 50 +- .../crypto/_onramp_session_list_params.py | 22 +- ...ramp_transaction_limits_retrieve_params.py | 12 +- .../_requested_session_confirm_params.py | 6 +- .../_requested_session_create_params.py | 10 +- .../_requested_session_modify_params.py | 8 +- .../_requested_session_update_params.py | 8 +- .../_account_refresh_account_params.py | 9 +- .../_account_refresh_params.py | 9 +- .../_account_subscribe_params.py | 6 +- .../_account_unsubscribe_params.py | 6 +- .../_session_create_params.py | 29 +- .../forwarding/_request_create_params.py | 17 +- .../_verification_report_list_params.py | 2 +- .../_verification_session_create_params.py | 6 +- .../_verification_session_list_params.py | 2 +- .../_verification_session_modify_params.py | 6 +- .../_verification_session_update_params.py | 6 +- .../issuing/_authorization_create_params.py | 55 +- .../issuing/_authorization_list_params.py | 4 +- stripe/params/issuing/_card_create_params.py | 29 +- stripe/params/issuing/_card_list_params.py | 4 +- stripe/params/issuing/_card_modify_params.py | 27 +- stripe/params/issuing/_card_update_params.py | 27 +- .../issuing/_cardholder_create_params.py | 22 +- .../params/issuing/_cardholder_list_params.py | 4 +- .../issuing/_cardholder_modify_params.py | 20 +- .../issuing/_cardholder_update_params.py | 20 +- ...edit_underwriting_record_correct_params.py | 471 ++--- ...g_record_create_from_application_params.py | 8 +- ...ord_create_from_proactive_review_params.py | 328 ++-- ...erwriting_record_report_decision_params.py | 165 +- .../params/issuing/_dispute_close_params.py | 4 +- .../params/issuing/_dispute_create_params.py | 27 +- stripe/params/issuing/_dispute_list_params.py | 2 +- .../params/issuing/_dispute_modify_params.py | 27 +- .../params/issuing/_dispute_update_params.py | 27 +- .../_personalization_design_list_params.py | 4 +- .../_personalization_design_reject_params.py | 42 +- .../issuing/_physical_bundle_list_params.py | 4 +- stripe/params/issuing/_token_list_params.py | 4 +- stripe/params/issuing/_token_modify_params.py | 4 +- stripe/params/issuing/_token_update_params.py | 4 +- .../issuing/_transaction_list_params.py | 2 +- .../privacy/_redaction_job_create_params.py | 2 +- .../privacy/_redaction_job_list_params.py | 11 +- .../privacy/_redaction_job_modify_params.py | 2 +- .../privacy/_redaction_job_update_params.py | 2 +- .../_trial_offer_create_params.py | 4 +- ..._authorization_evaluation_create_params.py | 53 +- .../_payment_evaluation_create_params.py | 4 +- stripe/params/reserve/_hold_list_params.py | 2 +- .../_granted_token_create_params.py | 2 +- .../_issued_token_create_params.py | 2 +- .../params/tax/_calculation_create_params.py | 8 +- stripe/params/tax/_form_list_params.py | 11 +- .../params/tax/_registration_create_params.py | 293 +-- .../params/tax/_registration_list_params.py | 2 +- .../_transaction_create_reversal_params.py | 4 +- .../terminal/_configuration_create_params.py | 7 +- .../terminal/_configuration_modify_params.py | 7 +- .../terminal/_configuration_update_params.py | 7 +- .../terminal/_reader_collect_inputs_params.py | 11 +- .../_reader_collect_payment_method_params.py | 4 +- stripe/params/terminal/_reader_list_params.py | 24 +- .../_reader_present_payment_method_params.py | 2 +- .../_reader_process_payment_intent_params.py | 4 +- .../_reader_process_setup_intent_params.py | 4 +- ..._reader_succeed_input_collection_params.py | 2 +- .../_confirmation_token_create_params.py | 180 +- ...t_intent_simulate_crypto_deposit_params.py | 6 +- .../issuing/_authorization_create_params.py | 55 +- .../issuing/_dispute_close_params.py | 4 +- .../_personalization_design_reject_params.py | 42 +- .../_granted_token_create_params.py | 2 +- .../_reader_present_payment_method_params.py | 2 +- ..._reader_succeed_input_collection_params.py | 2 +- .../treasury/_inbound_transfer_fail_params.py | 16 +- ..._payment_return_outbound_payment_params.py | 13 +- .../_outbound_payment_update_params.py | 4 +- ...ransfer_return_outbound_transfer_params.py | 13 +- .../_outbound_transfer_update_params.py | 4 +- .../_received_credit_create_params.py | 4 +- .../treasury/_credit_reversal_list_params.py | 2 +- .../treasury/_debit_reversal_list_params.py | 4 +- .../_financial_account_close_params.py | 4 +- .../_financial_account_create_params.py | 6 +- ...inancial_account_features_update_params.py | 2 +- .../_financial_account_list_params.py | 2 +- .../_financial_account_modify_params.py | 10 +- ...inancial_account_update_features_params.py | 2 +- .../_financial_account_update_params.py | 10 +- .../treasury/_inbound_transfer_fail_params.py | 16 +- .../treasury/_inbound_transfer_list_params.py | 2 +- .../_outbound_payment_create_params.py | 10 +- .../treasury/_outbound_payment_list_params.py | 2 +- ..._payment_return_outbound_payment_params.py | 13 +- .../_outbound_payment_update_params.py | 4 +- .../_outbound_transfer_create_params.py | 2 +- .../_outbound_transfer_list_params.py | 2 +- ...ransfer_return_outbound_transfer_params.py | 13 +- .../_outbound_transfer_update_params.py | 4 +- .../_received_credit_create_params.py | 4 +- .../treasury/_received_credit_list_params.py | 19 +- .../treasury/_received_debit_list_params.py | 2 +- .../_transaction_entry_list_params.py | 2 +- .../treasury/_transaction_list_params.py | 4 +- .../v2/billing/_bill_setting_create_params.py | 3 +- .../v2/billing/_bill_setting_update_params.py | 3 +- .../v2/billing/_cadence_cancel_params.py | 4 +- .../v2/billing/_cadence_create_params.py | 6 +- .../params/v2/billing/_cadence_list_params.py | 4 +- .../v2/billing/_cadence_retrieve_params.py | 4 +- .../v2/billing/_cadence_update_params.py | 4 +- .../_collection_setting_create_params.py | 39 +- .../_collection_setting_update_params.py | 39 +- .../v2/billing/_contract_activate_params.py | 11 +- .../v2/billing/_contract_cancel_params.py | 15 +- .../v2/billing/_contract_create_params.py | 13 +- .../v2/billing/_contract_list_params.py | 11 +- .../v2/billing/_contract_retrieve_params.py | 11 +- .../v2/billing/_contract_update_params.py | 19 +- .../v2/billing/_intent_create_params.py | 79 +- .../_pricing_plan_subscription_list_params.py | 9 +- ...an_subscription_remove_discounts_params.py | 9 +- ...icing_plan_subscription_retrieve_params.py | 9 +- .../params/v2/billing/_profile_list_params.py | 2 +- .../billing/_service_action_create_params.py | 8 +- .../product_catalog/_import_create_params.py | 8 +- .../product_catalog/_import_list_params.py | 2 +- .../params/v2/core/_account_create_params.py | 761 ++++---- .../v2/core/_account_link_create_params.py | 45 +- .../v2/core/_account_token_create_params.py | 522 +++--- .../params/v2/core/_account_update_params.py | 761 ++++---- .../core/_event_destination_create_params.py | 14 +- .../v2/core/accounts/_person_create_params.py | 205 +- .../accounts/_person_token_create_params.py | 205 +- .../v2/core/accounts/_person_update_params.py | 205 +- .../v2/core/health/_alert_list_params.py | 41 +- .../analytics/_metric_query_create_params.py | 4 +- .../params/v2/extend/_workflow_list_params.py | 4 +- .../v2/extend/_workflow_run_list_params.py | 6 +- .../v2/iam/_activity_log_list_params.py | 27 +- .../params/v2/iam/_api_key_create_params.py | 4 +- .../_debit_dispute_create_params.py | 4 +- .../_debit_dispute_list_params.py | 2 +- .../_financial_account_create_params.py | 2 +- .../_financial_account_list_params.py | 17 +- .../_financial_address_create_params.py | 41 +- .../_financial_address_list_params.py | 15 +- .../_financial_address_retrieve_params.py | 15 +- .../_outbound_payment_create_params.py | 37 +- .../_outbound_payment_quote_create_params.py | 6 +- .../_outbound_setup_intent_create_params.py | 37 +- .../_outbound_setup_intent_update_params.py | 14 +- .../_outbound_transfer_create_params.py | 29 +- .../_payout_intent_create_params.py | 29 +- .../_payout_intent_update_params.py | 29 +- .../_off_session_payment_create_params.py | 8 +- ...ettlement_allocation_intent_list_params.py | 4 +- .../_split_create_params.py | 4 +- .../_split_list_params.py | 2 +- .../v2/signals/_account_signal_list_params.py | 6 +- .../_financial_address_credit_params.py | 14 +- stripe/privacy/_redaction_job.py | 25 +- .../_redaction_job_validation_error.py | 17 +- stripe/product_catalog/_trial_offer.py | 4 +- stripe/radar/_customer_evaluation.py | 38 +- .../_issuing_authorization_evaluation.py | 114 +- stripe/radar/_payment_evaluation.py | 163 +- stripe/radar/_value_list.py | 31 +- stripe/radar/_value_list_item.py | 4 +- stripe/reserve/_hold.py | 8 +- stripe/reserve/_plan.py | 8 +- stripe/reserve/_release.py | 19 +- stripe/shared_payment/_granted_token.py | 348 ++-- stripe/shared_payment/_issued_token.py | 14 +- stripe/tax/_association.py | 17 +- stripe/tax/_calculation.py | 89 +- stripe/tax/_calculation_line_item.py | 43 +- stripe/tax/_form.py | 29 +- stripe/tax/_registration.py | 267 ++- stripe/tax/_settings.py | 10 +- stripe/tax/_transaction.py | 52 +- stripe/tax/_transaction_line_item.py | 6 +- stripe/terminal/_configuration.py | 9 +- stripe/terminal/_reader.py | 86 +- stripe/test_helpers/_test_clock.py | 4 +- stripe/treasury/_credit_reversal.py | 6 +- stripe/treasury/_debit_reversal.py | 6 +- stripe/treasury/_financial_account.py | 102 +- .../treasury/_financial_account_features.py | 354 ++-- stripe/treasury/_inbound_transfer.py | 43 +- stripe/treasury/_outbound_payment.py | 43 +- stripe/treasury/_outbound_transfer.py | 43 +- stripe/treasury/_received_credit.py | 64 +- stripe/treasury/_received_debit.py | 51 +- stripe/treasury/_transaction.py | 50 +- stripe/treasury/_transaction_entry.py | 93 +- stripe/v2/billing/_bill_setting.py | 4 +- stripe/v2/billing/_bill_setting_version.py | 4 +- stripe/v2/billing/_cadence.py | 69 +- stripe/v2/billing/_collection_setting.py | 60 +- .../v2/billing/_collection_setting_version.py | 60 +- stripe/v2/billing/_contract.py | 6 +- stripe/v2/billing/_intent.py | 4 +- stripe/v2/billing/_intent_action.py | 111 +- stripe/v2/billing/_meter_event_adjustment.py | 4 +- .../v2/billing/_pricing_plan_subscription.py | 35 +- stripe/v2/billing/_profile.py | 4 +- stripe/v2/billing/_service_action.py | 8 +- stripe/v2/commerce/_product_catalog_import.py | 15 +- stripe/v2/core/_account.py | 1666 +++++++++-------- stripe/v2/core/_account_link.py | 77 +- stripe/v2/core/_account_person.py | 205 +- stripe/v2/core/_approval_request.py | 68 +- stripe/v2/core/_event.py | 4 +- stripe/v2/core/_event_destination.py | 22 +- stripe/v2/core/_fee_batch.py | 19 +- stripe/v2/core/_fee_entry.py | 25 +- stripe/v2/core/health/_alert.py | 354 ++-- stripe/v2/core/health/_alert_history_entry.py | 350 ++-- stripe/v2/core/vault/_gb_bank_account.py | 4 +- stripe/v2/core/vault/_us_bank_account.py | 4 +- stripe/v2/data/reporting/_query_run.py | 6 +- stripe/v2/extend/_workflow.py | 6 +- stripe/v2/extend/_workflow_run.py | 6 +- stripe/v2/iam/_activity_log.py | 27 +- stripe/v2/iam/_api_key.py | 6 +- stripe/v2/money_management/_debit_dispute.py | 8 +- .../v2/money_management/_financial_account.py | 6 +- .../v2/money_management/_financial_address.py | 42 +- .../v2/money_management/_inbound_transfer.py | 49 +- .../v2/money_management/_outbound_payment.py | 105 +- .../_outbound_payment_quote.py | 33 +- .../v2/money_management/_outbound_transfer.py | 83 +- stripe/v2/money_management/_payout_intent.py | 95 +- stripe/v2/money_management/_payout_method.py | 40 +- .../v2/money_management/_received_credit.py | 111 +- stripe/v2/money_management/_received_debit.py | 34 +- stripe/v2/money_management/_transaction.py | 188 +- .../v2/money_management/_transaction_entry.py | 168 +- stripe/v2/payments/_off_session_payment.py | 55 +- .../payments/_settlement_allocation_intent.py | 9 +- .../_settlement_allocation_intent_split.py | 13 +- stripe/v2/reporting/_report_run.py | 4 +- stripe/v2/signals/_account_signal.py | 9 +- stripe/v2/signals/_account_signal_service.py | 4 +- stripe/v2/tax/_manual_rule.py | 4 +- 501 files changed, 20793 insertions(+), 20811 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 1fb31fc54..00cedf976 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -6b7b921f3428ff63f4b59c7c972b22790e56cb35 \ No newline at end of file +b7168aabb0ad2d376d2f6d2e5ec34e5e55d1f702 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index daaf7f232..5f1a008e6 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -169,12 +169,15 @@ class SupportAddress(StripeObject): """ minority_owned_business_designation: Optional[ List[ - Literal[ - "lgbtqi_owned_business", - "minority_owned_business", - "none_of_these_apply", - "prefer_not_to_answer", - "women_owned_business", + Union[ + Literal[ + "lgbtqi_owned_business", + "minority_owned_business", + "none_of_these_apply", + "prefer_not_to_answer", + "women_owned_business", + ], + str, ] ] ] @@ -852,9 +855,12 @@ class Document(StripeObject): This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. """ ownership_exemption_reason: Optional[ - Literal[ - "qualified_entity_exceeds_ownership_threshold", - "qualifies_as_financial_institution", + Union[ + Literal[ + "qualified_entity_exceeds_ownership_threshold", + "qualifies_as_financial_institution", + ], + str, ] ] """ @@ -871,30 +877,33 @@ class Document(StripeObject): This hash is used to attest that the representative is authorized to act as the representative of their legal entity. """ structure: Optional[ - Literal[ - "free_zone_establishment", - "free_zone_llc", - "government_instrumentality", - "governmental_unit", - "incorporated_non_profit", - "incorporated_partnership", - "limited_liability_partnership", - "llc", - "multi_member_llc", - "private_company", - "private_corporation", - "private_partnership", - "public_company", - "public_corporation", - "public_partnership", - "registered_charity", - "single_member_llc", - "sole_establishment", - "sole_proprietorship", - "tax_exempt_government_instrumentality", - "unincorporated_association", - "unincorporated_non_profit", - "unincorporated_partnership", + Union[ + Literal[ + "free_zone_establishment", + "free_zone_llc", + "government_instrumentality", + "governmental_unit", + "incorporated_non_profit", + "incorporated_partnership", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_partnership", + "registered_charity", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "unincorporated_association", + "unincorporated_non_profit", + "unincorporated_partnership", + ], + str, ] ] """ @@ -951,25 +960,28 @@ class Dashboard(StripeObject): """ class Fees(StripeObject): - payer: Literal[ - "account", - "application", - "application_custom", - "application_express", - "application_unified_accounts_beta", + payer: Union[ + Literal[ + "account", + "application", + "application_custom", + "application_express", + "application_unified_accounts_beta", + ], + str, ] """ A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). """ class Losses(StripeObject): - payments: Literal["application", "stripe"] + payments: Union[Literal["application", "stripe"], str] """ A value indicating who is liable when this account can't pay back negative balances from payments. """ class StripeDashboard(StripeObject): - type: Literal["express", "full", "none"] + type: Union[Literal["express", "full", "none"], str] """ A value indicating the Stripe dashboard this account has access to independent of the Connect application. """ @@ -982,7 +994,9 @@ class StripeDashboard(StripeObject): `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://docs.stripe.com/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. """ losses: Optional[Losses] - requirement_collection: Optional[Literal["application", "stripe"]] + requirement_collection: Optional[ + Union[Literal["application", "stripe"], str] + ] """ A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. """ @@ -1373,15 +1387,18 @@ class Payouts(StripeObject): charges: Charges payouts: Payouts rejected_reason: Optional[ - Literal[ - "credit", - "fraud", - "fraud_no_intent_to_fulfill", - "fraud_other", - "fraud_payment_method_casher", - "fraud_payment_method_tester", - "other", - "terms_of_service", + Union[ + Literal[ + "credit", + "fraud", + "fraud_no_intent_to_fulfill", + "fraud_other", + "fraud_payment_method_casher", + "fraud_payment_method_tester", + "other", + "terms_of_service", + ], + str, ] ] """ @@ -1544,12 +1561,15 @@ class Schedule(StripeObject): """ weekly_payout_days: Optional[ List[ - Literal[ - "friday", - "monday", - "thursday", - "tuesday", - "wednesday", + Union[ + Literal[ + "friday", + "monday", + "thursday", + "tuesday", + "wednesday", + ], + str, ] ] ] @@ -1713,7 +1733,12 @@ class TosAcceptance(StripeObject): Business information about the account. """ business_type: Optional[ - Literal["company", "government_entity", "individual", "non_profit"] + Union[ + Literal[ + "company", "government_entity", "individual", "non_profit" + ], + str, + ] ] """ The business type. @@ -1793,7 +1818,9 @@ class TosAcceptance(StripeObject): Options for customizing how the account functions within Stripe. """ tos_acceptance: Optional[TosAcceptance] - type: Optional[Literal["custom", "express", "none", "standard"]] + type: Optional[ + Union[Literal["custom", "express", "none", "standard"], str] + ] """ The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. """ diff --git a/stripe/_account_notice.py b/stripe/_account_notice.py index 423ede265..c434f4d67 100644 --- a/stripe/_account_notice.py +++ b/stripe/_account_notice.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -92,20 +92,23 @@ class LinkedObjects(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - reason: Literal[ - "issuing.account_closed_for_inactivity", - "issuing.account_closed_for_not_providing_business_model_clarification", - "issuing.account_closed_for_not_providing_url_clarification", - "issuing.account_closed_for_not_providing_use_case_clarification", - "issuing.account_closed_for_terms_of_service_violation", - "issuing.application_rejected_for_failure_to_verify", - "issuing.credit_application_rejected", - "issuing.credit_increase_application_rejected", - "issuing.credit_limit_decreased", - "issuing.credit_line_closed", - "issuing.dispute_lost", - "issuing.dispute_submitted", - "issuing.dispute_won", + reason: Union[ + Literal[ + "issuing.account_closed_for_inactivity", + "issuing.account_closed_for_not_providing_business_model_clarification", + "issuing.account_closed_for_not_providing_url_clarification", + "issuing.account_closed_for_not_providing_use_case_clarification", + "issuing.account_closed_for_terms_of_service_violation", + "issuing.application_rejected_for_failure_to_verify", + "issuing.credit_application_rejected", + "issuing.credit_increase_application_rejected", + "issuing.credit_limit_decreased", + "issuing.credit_line_closed", + "issuing.dispute_lost", + "issuing.dispute_submitted", + "issuing.dispute_won", + ], + str, ] """ Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://docs.stripe.com/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason. diff --git a/stripe/_account_signals.py b/stripe/_account_signals.py index c8bf784bd..dcb2a55fc 100644 --- a/stripe/_account_signals.py +++ b/stripe/_account_signals.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -18,29 +18,35 @@ class Indicator(StripeObject): """ A brief explanation of how this indicator contributed to the delinquency probability. """ - impact: Literal[ - "decrease", "neutral", "slight_increase", "strong_increase" + impact: Union[ + Literal[ + "decrease", "neutral", "slight_increase", "strong_increase" + ], + str, ] """ The effect this indicator had on the overall risk level. """ - indicator: Literal[ - "account_balance", - "aov", - "charge_concentration", - "dispute_window", - "disputes", - "duplicates", - "exposure", - "firmographic", - "lifetime_metrics", - "payment_processing", - "payment_volume", - "payouts", - "refunds", - "related_accounts", - "tenure", - "transfers", + indicator: Union[ + Literal[ + "account_balance", + "aov", + "charge_concentration", + "dispute_window", + "disputes", + "duplicates", + "exposure", + "firmographic", + "lifetime_metrics", + "payment_processing", + "payment_volume", + "payouts", + "refunds", + "related_accounts", + "tenure", + "transfers", + ], + str, ] """ The name of the specific indicator used in the risk assessment. @@ -58,8 +64,16 @@ class Indicator(StripeObject): """ The probability of delinquency. Can be between 0.00 and 100.00 """ - risk_level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" + risk_level: Union[ + Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ], + str, ] """ Categorical assessment of the delinquency risk based on probability. @@ -76,23 +90,29 @@ class Indicator(StripeObject): """ A brief explanation of how this indicator contributed to the delinquency probability. """ - impact: Literal[ - "decrease", "neutral", "slight_increase", "strong_increase" + impact: Union[ + Literal[ + "decrease", "neutral", "slight_increase", "strong_increase" + ], + str, ] """ The effect this indicator had on the overall risk level. """ - indicator: Literal[ - "bank_account", - "business_information_and_account_activity", - "disputes", - "failures", - "geo_location", - "other", - "other_related_accounts", - "other_transaction_activity", - "owner_email", - "web_presence", + indicator: Union[ + Literal[ + "bank_account", + "business_information_and_account_activity", + "disputes", + "failures", + "geo_location", + "other", + "other_related_accounts", + "other_transaction_activity", + "owner_email", + "web_presence", + ], + str, ] """ The name of the specific indicator used in the risk assessment. @@ -110,8 +130,16 @@ class Indicator(StripeObject): """ The probability of fraud intent. Can be between 0.00 and 100.00 """ - risk_level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" + risk_level: Union[ + Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ], + str, ] """ Categorical assessment of the fraud intent risk based on probability. diff --git a/stripe/_application_fee.py b/stripe/_application_fee.py index d76f35ba9..b31f391aa 100644 --- a/stripe/_application_fee.py +++ b/stripe/_application_fee.py @@ -6,7 +6,7 @@ from stripe._nested_resource_class_methods import nested_resource_class_methods from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -59,7 +59,7 @@ class FeeSource(StripeObject): """ Transfer ID that created this application fee. """ - type: Literal["charge", "payout", "transfer"] + type: Union[Literal["charge", "payout", "transfer"], str] """ Type of object that created the application fee. """ diff --git a/stripe/_balance_settings.py b/stripe/_balance_settings.py index f098c0959..3e9de3d28 100644 --- a/stripe/_balance_settings.py +++ b/stripe/_balance_settings.py @@ -3,7 +3,7 @@ from stripe._singleton_api_resource import SingletonAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -36,14 +36,16 @@ class AutomaticTransferRulesByCurrency(StripeObject): """ The maximum amount in minor units to transfer to the FinancialAccount. Only applicable when `type` is `transfer_up_to_amount`. """ - type: Literal["transfer_all", "transfer_up_to_amount"] + type: Union[ + Literal["transfer_all", "transfer_up_to_amount"], str + ] """ The type of automatic transfer rule. """ class Schedule(StripeObject): interval: Optional[ - Literal["daily", "manual", "monthly", "weekly"] + Union[Literal["daily", "manual", "monthly", "weekly"], str] ] """ How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. @@ -54,12 +56,15 @@ class Schedule(StripeObject): """ weekly_payout_days: Optional[ List[ - Literal[ - "friday", - "monday", - "thursday", - "tuesday", - "wednesday", + Union[ + Literal[ + "friday", + "monday", + "thursday", + "tuesday", + "wednesday", + ], + str, ] ] ] @@ -85,7 +90,7 @@ class Schedule(StripeObject): """ The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. """ - status: Literal["disabled", "enabled"] + status: Union[Literal["disabled", "enabled"], str] """ Whether the funds in this account can be paid out. """ @@ -138,7 +143,12 @@ class StartOfDay(StripeObject): """ settlement_currencies: Optional[ UntypedStripeObject[ - Literal["disabled", "enabled", "restricted_by_application"] + Union[ + Literal[ + "disabled", "enabled", "restricted_by_application" + ], + str, + ] ] ] """ diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py index e4294d06a..afe06bd2a 100644 --- a/stripe/_balance_transaction.py +++ b/stripe/_balance_transaction.py @@ -76,13 +76,16 @@ class FeeDetail(StripeObject): """ The date that the transaction's net funds become available in the Stripe balance. """ - balance_type: Literal[ - "fee_credits", - "issuing", - "payments", - "refund_and_dispute_prefunding", - "risk_reserved", - "transit", + balance_type: Union[ + Literal[ + "fee_credits", + "issuing", + "payments", + "refund_and_dispute_prefunding", + "risk_reserved", + "transit", + ], + str, ] """ The balance that this transaction impacts. diff --git a/stripe/_capability.py b/stripe/_capability.py index 690e78911..383fd76ba 100644 --- a/stripe/_capability.py +++ b/stripe/_capability.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -155,17 +155,20 @@ class Error(StripeObject): Fields that need to be resolved to keep the capability enabled. If not resolved by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. """ disabled_reason: Optional[ - Literal[ - "other", - "paused.inactivity", - "pending.onboarding", - "pending.review", - "platform_disabled", - "platform_paused", - "rejected.inactivity", - "rejected.other", - "rejected.unsupported_business", - "requirements.fields_needed", + Union[ + Literal[ + "other", + "paused.inactivity", + "pending.onboarding", + "pending.review", + "platform_disabled", + "platform_paused", + "rejected.inactivity", + "rejected.other", + "rejected.unsupported_business", + "requirements.fields_needed", + ], + str, ] ] """ @@ -199,7 +202,9 @@ class PspMigration(StripeObject): """ Time at which the protection was requested. Measured in seconds since the Unix epoch. """ - status: Literal["active", "disrupted", "expired", "inactive"] + status: Union[ + Literal["active", "disrupted", "expired", "inactive"], str + ] """ The status of the capability protection. """ @@ -344,17 +349,20 @@ class Error(StripeObject): Fields that need to be resolved to keep the capability enabled. If not resolved by `current_deadline`, these fields will appear in `past_due` as well, and the capability is disabled. """ disabled_reason: Optional[ - Literal[ - "other", - "paused.inactivity", - "pending.onboarding", - "pending.review", - "platform_disabled", - "platform_paused", - "rejected.inactivity", - "rejected.other", - "rejected.unsupported_business", - "requirements.fields_needed", + Union[ + Literal[ + "other", + "paused.inactivity", + "pending.onboarding", + "pending.review", + "platform_disabled", + "platform_paused", + "rejected.inactivity", + "rejected.other", + "rejected.unsupported_business", + "requirements.fields_needed", + ], + str, ] ] """ @@ -401,7 +409,7 @@ class Error(StripeObject): Time at which the capability was requested. Measured in seconds since the Unix epoch. """ requirements: Optional[Requirements] - status: Literal["active", "inactive", "pending", "unrequested"] + status: Union[Literal["active", "inactive", "pending", "unrequested"], str] """ The status of the capability. """ diff --git a/stripe/_card.py b/stripe/_card.py index fa103f75e..eb850283a 100644 --- a/stripe/_card.py +++ b/stripe/_card.py @@ -44,7 +44,7 @@ class Networks(StripeObject): """ class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -82,7 +82,9 @@ class Redaction(StripeObject): """ If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. """ - allow_redisplay: Optional[Literal["always", "limited", "unspecified"]] + allow_redisplay: Optional[ + Union[Literal["always", "limited", "unspecified"], str] + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. """ @@ -182,7 +184,7 @@ class Redaction(StripeObject): """ Redaction status of this card. If not null, this card is associated to a redaction job. """ - regulated_status: Optional[Literal["regulated", "unregulated"]] + regulated_status: Optional[Union[Literal["regulated", "unregulated"], str]] """ Status of a card based on the card issuer. """ diff --git a/stripe/_charge.py b/stripe/_charge.py index 407420a94..f458450a2 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -519,19 +519,19 @@ class Checks(StripeObject): """ class DecrementalAuthorization(StripeObject): - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether or not the decremental authorization feature is supported. """ class ExtendedAuthorization(StripeObject): - status: Literal["disabled", "enabled"] + status: Union[Literal["disabled", "enabled"], str] """ Indicates whether or not the capture window is extended beyond the standard authorization. """ class IncrementalAuthorization(StripeObject): - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether or not the incremental authorization feature is supported. """ @@ -547,7 +547,9 @@ class Plan(StripeObject): For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[ + Literal["bonus", "fixed_count", "revolving"], str + ] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ @@ -559,7 +561,7 @@ class Plan(StripeObject): _inner_class_types = {"plan": Plan} class Multicapture(StripeObject): - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether or not multiple captures are supported. """ @@ -575,44 +577,49 @@ class Overcapture(StripeObject): """ The maximum amount that can be captured. """ - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether or not the authorized amount can be over-captured. """ class PartialAuthorization(StripeObject): - status: Literal[ - "declined", - "fully_authorized", - "not_requested", - "partially_authorized", + status: Union[ + Literal[ + "declined", + "fully_authorized", + "not_requested", + "partially_authorized", + ], + str, ] """ Indicates whether the transaction requested for partial authorization feature and the authorization outcome. """ class Reauthorization(StripeObject): - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether or not the reauthorization feature is supported. """ class ThreeDSecure(StripeObject): authentication_flow: Optional[ - Literal["challenge", "frictionless"] + Union[Literal["challenge", "frictionless"], str] ] """ For authenticated transactions: how the customer was authenticated by the issuing bank. """ electronic_commerce_indicator: Optional[ - Literal["01", "02", "05", "06", "07"] + Union[Literal["01", "02", "05", "06", "07"], str] ] """ The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of authentication was performed. """ - exemption_indicator: Optional[Literal["low_risk", "none"]] + exemption_indicator: Optional[ + Union[Literal["low_risk", "none"], str] + ] """ The exemption requested via 3DS and accepted by the issuer at authentication time. """ @@ -622,27 +629,33 @@ class ThreeDSecure(StripeObject): the outcome of Stripe's internal risk assessment. """ result: Optional[ - Literal[ - "attempt_acknowledged", - "authenticated", - "exempted", - "failed", - "not_supported", - "processing_error", + Union[ + Literal[ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error", + ], + str, ] ] """ Indicates the outcome of 3D Secure authentication. """ result_reason: Optional[ - Literal[ - "abandoned", - "bypassed", - "canceled", - "card_not_enrolled", - "network_not_supported", - "protocol_error", - "rejected", + Union[ + Literal[ + "abandoned", + "bypassed", + "canceled", + "card_not_enrolled", + "network_not_supported", + "protocol_error", + "rejected", + ], + str, ] ] """ @@ -655,7 +668,10 @@ class ThreeDSecure(StripeObject): (dsTransId) for this payment. """ version: Optional[ - Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"] + Union[ + Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"], + str, + ] ] """ The version of 3D Secure that was used. @@ -966,7 +982,9 @@ class ShippingAddress(StripeObject): """ The time at which the associated PaymentIntent will transition to a terminal state if it is not reauthorized. """ - regulated_status: Optional[Literal["regulated", "unregulated"]] + regulated_status: Optional[ + Union[Literal["regulated", "unregulated"], str] + ] """ Status of a card based on the card issuer. """ @@ -1017,14 +1035,17 @@ class Offline(StripeObject): """ class Reauthorization(StripeObject): - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether or not the reauthorization feature is supported. """ class Receipt(StripeObject): account_type: Optional[ - Literal["checking", "credit", "prepaid", "unknown"] + Union[ + Literal["checking", "credit", "prepaid", "unknown"], + str, + ] ] """ The type of account being debited or credited @@ -1063,8 +1084,11 @@ class Receipt(StripeObject): """ class Wallet(StripeObject): - type: Literal[ - "apple_pay", "google_pay", "samsung_pay", "unknown" + type: Union[ + Literal[ + "apple_pay", "google_pay", "samsung_pay", "unknown" + ], + str, ] """ The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. @@ -1166,12 +1190,15 @@ class Wallet(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -1230,16 +1257,27 @@ class Crypto(StripeObject): The wallet address of the customer. """ network: Optional[ - Literal[ - "base", "ethereum", "polygon", "solana", "sui", "tempo" + Union[ + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ], + str, ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal[ - "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + Union[ + Literal[ + "phantom_cash", + "usdc", + "usdg", + "usdp", + "usdsui", + "usdt", + ], + str, ] ] """ @@ -1348,7 +1386,7 @@ class Balance(StripeObject): """ balance: Balance - brand: Literal["fiserv_valuelink", "givex", "svs"] + brand: Union[Literal["fiserv_valuelink", "givex", "svs"], str] """ The brand of the gift card. """ @@ -1420,7 +1458,7 @@ class IdBankTransfer(StripeObject): """ Account number of the bank account to transfer funds to. """ - bank: Literal["bca", "bni", "bri", "cimb", "permata"] + bank: Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] """ Bank where the account is located. """ @@ -1518,7 +1556,7 @@ class Ideal(StripeObject): class InteracPresent(StripeObject): class Receipt(StripeObject): account_type: Optional[ - Literal["checking", "savings", "unknown"] + Union[Literal["checking", "savings", "unknown"], str] ] """ The type of account being debited or credited @@ -1627,12 +1665,15 @@ class Receipt(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -1713,29 +1754,32 @@ class Store(StripeObject): class KrCard(StripeObject): brand: Optional[ - Literal[ - "bc", - "citi", - "hana", - "hyundai", - "jeju", - "jeonbuk", - "kakaobank", - "kbank", - "kdbbank", - "kookmin", - "kwangju", - "lotte", - "mg", - "nh", - "post", - "samsung", - "savingsbank", - "shinhan", - "shinhyup", - "suhyup", - "tossbank", - "woori", + Union[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ], + str, ] ] """ @@ -1924,13 +1968,18 @@ class Paynow(StripeObject): class Paypal(StripeObject): class SellerProtection(StripeObject): dispute_categories: Optional[ - List[Literal["fraudulent", "product_not_received"]] + List[ + Union[ + Literal["fraudulent", "product_not_received"], str + ] + ] ] """ An array of conditions that are covered for the transaction, if applicable. """ - status: Literal[ - "eligible", "not_eligible", "partially_eligible" + status: Union[ + Literal["eligible", "not_eligible", "partially_eligible"], + str, ] """ Indicates whether the transaction is eligible for PayPal's seller protection. @@ -2297,11 +2346,13 @@ class Upi(StripeObject): """ class UsBankAccount(StripeObject): - account_holder_type: Optional[Literal["company", "individual"]] + account_holder_type: Optional[ + Union[Literal["company", "individual"], str] + ] """ Account holder type: individual or company. """ - account_type: Optional[Literal["checking", "savings"]] + account_type: Optional[Union[Literal["checking", "savings"], str]] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -2524,7 +2575,7 @@ class RadarOptions(StripeObject): """ class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -2764,7 +2815,7 @@ class TransferData(StripeObject): """ Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. """ - status: Literal["failed", "pending", "succeeded"] + status: Union[Literal["failed", "pending", "succeeded"], str] """ The status of the payment is either `succeeded`, `pending`, or `failed`. """ diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 73ccd5af7..7e8d43d4f 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -4,7 +4,7 @@ from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -74,7 +74,9 @@ class Plan(StripeObject): For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[ + Literal["bonus", "fixed_count", "revolving"], str + ] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ @@ -286,15 +288,23 @@ class Offline(StripeObject): """ class Reauthorization(StripeObject): - status: Literal["available", "unavailable"] + status: Union[ + Literal["available", "unavailable"], str + ] """ Indicates whether or not the reauthorization feature is supported. """ class Receipt(StripeObject): account_type: Optional[ - Literal[ - "checking", "credit", "prepaid", "unknown" + Union[ + Literal[ + "checking", + "credit", + "prepaid", + "unknown", + ], + str, ] ] """ @@ -334,11 +344,14 @@ class Receipt(StripeObject): """ class Wallet(StripeObject): - type: Literal[ - "apple_pay", - "google_pay", - "samsung_pay", - "unknown", + type: Union[ + Literal[ + "apple_pay", + "google_pay", + "samsung_pay", + "unknown", + ], + str, ] """ The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. @@ -440,12 +453,15 @@ class Wallet(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -771,7 +787,9 @@ class ShippingAddress(StripeObject): """ Contains information about card networks that can be used to process the payment. """ - regulated_status: Optional[Literal["regulated", "unregulated"]] + regulated_status: Optional[ + Union[Literal["regulated", "unregulated"], str] + ] """ Status of a card based on the card issuer. """ @@ -814,8 +832,11 @@ class Offline(StripeObject): """ class Wallet(StripeObject): - type: Literal[ - "apple_pay", "google_pay", "samsung_pay", "unknown" + type: Union[ + Literal[ + "apple_pay", "google_pay", "samsung_pay", "unknown" + ], + str, ] """ The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. @@ -884,12 +905,15 @@ class Wallet(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -1023,7 +1047,9 @@ class Grabpay(StripeObject): pass class IdBankTransfer(StripeObject): - bank: Optional[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: Optional[ + Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] + ] bank_code: Optional[str] bank_name: Optional[str] display_name: Optional[str] @@ -1151,12 +1177,15 @@ class Networks(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -1193,29 +1222,32 @@ class Konbini(StripeObject): class KrCard(StripeObject): brand: Optional[ - Literal[ - "bc", - "citi", - "hana", - "hyundai", - "jeju", - "jeonbuk", - "kakaobank", - "kbank", - "kdbbank", - "kookmin", - "kwangju", - "lotte", - "mg", - "nh", - "post", - "samsung", - "savingsbank", - "shinhan", - "shinhyup", - "suhyup", - "tossbank", - "woori", + Union[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ], + str, ] ] """ @@ -1250,7 +1282,7 @@ class NaverPay(StripeObject): """ Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same. """ - funding: Literal["card", "points"] + funding: Union[Literal["card", "points"], str] """ Whether to fund this transaction with Naver Pay points or a card. """ @@ -1286,33 +1318,36 @@ class Oxxo(StripeObject): class P24(StripeObject): bank: Optional[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", + Union[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ], + str, ] ] """ @@ -1499,33 +1534,39 @@ class Networks(StripeObject): class StatusDetails(StripeObject): class Blocked(StripeObject): network_code: Optional[ - Literal[ - "R02", - "R03", - "R04", - "R05", - "R07", - "R08", - "R10", - "R11", - "R16", - "R20", - "R29", - "R31", + Union[ + Literal[ + "R02", + "R03", + "R04", + "R05", + "R07", + "R08", + "R10", + "R11", + "R16", + "R20", + "R29", + "R31", + ], + str, ] ] """ The ACH network code that resulted in this block. """ reason: Optional[ - Literal[ - "bank_account_closed", - "bank_account_frozen", - "bank_account_invalid_details", - "bank_account_restricted", - "bank_account_unusable", - "debit_not_authorized", - "tokenized_account_number_deactivated", + Union[ + Literal[ + "bank_account_closed", + "bank_account_frozen", + "bank_account_invalid_details", + "bank_account_restricted", + "bank_account_unusable", + "debit_not_authorized", + "tokenized_account_number_deactivated", + ], + str, ] ] """ @@ -1535,7 +1576,9 @@ class Blocked(StripeObject): blocked: Optional[Blocked] _inner_class_types = {"blocked": Blocked} - account_holder_type: Optional[Literal["company", "individual"]] + account_holder_type: Optional[ + Union[Literal["company", "individual"], str] + ] """ Account holder type: individual or company. """ @@ -1543,7 +1586,7 @@ class Blocked(StripeObject): """ Account number of the bank account. """ - account_type: Optional[Literal["checking", "savings"]] + account_type: Optional[Union[Literal["checking", "savings"], str]] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -1590,7 +1633,9 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] - allow_redisplay: Optional[Literal["always", "limited", "unspecified"]] + allow_redisplay: Optional[ + Union[Literal["always", "limited", "unspecified"], str] + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. """ @@ -1657,73 +1702,76 @@ class Zip(StripeObject): swish: Optional[Swish] tamara: Optional[Tamara] twint: Optional[Twint] - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "card_present", - "cashapp", - "crypto", - "custom", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "interac_present", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "crypto", + "custom", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -1879,7 +1927,9 @@ class Address(StripeObject): """ Return URL used to confirm the Intent. """ - setup_future_usage: Optional[Literal["off_session", "on_session"]] + setup_future_usage: Optional[ + Union[Literal["off_session", "on_session"], str] + ] """ Indicates that you intend to make future payments with this ConfirmationToken's payment method. diff --git a/stripe/_coupon.py b/stripe/_coupon.py index f4a45bb08..fbc37ecf4 100644 --- a/stripe/_coupon.py +++ b/stripe/_coupon.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import Any, ClassVar, List, Optional, cast, overload +from typing import Any, ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -64,7 +64,7 @@ class Iterations(StripeObject): """ The number of iterations the service period will repeat for. Only used when type is `count`. """ - type: Literal["count", "forever"] + type: Union[Literal["count", "forever"], str] """ The type of iterations. """ @@ -101,7 +101,9 @@ class Iterations(StripeObject): """ Always true for a deleted object """ - duration: Literal["forever", "once", "repeating", "service_period"] + duration: Union[ + Literal["forever", "once", "repeating", "service_period"], str + ] """ One of `forever`, `once`, or `repeating`. Describes how long a customer who applies this coupon will get the discount. """ @@ -150,7 +152,7 @@ class Iterations(StripeObject): """ Number of times this coupon has been applied to a customer. """ - type: Optional[Literal["amount_off", "percent_off", "script"]] + type: Optional[Union[Literal["amount_off", "percent_off", "script"], str]] """ One of `amount_off`, `percent_off`, or `script`. Describes the type of coupon logic used to calculate the discount. """ diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index d13ef0f2b..7c73b0e28 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -8,7 +8,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -82,7 +82,7 @@ class PretaxCreditAmount(StripeObject): """ The discount that was applied to get this pretax credit amount. """ - type: Literal["credit_balance_transaction", "discount"] + type: Union[Literal["credit_balance_transaction", "discount"], str] """ Type of the pretax credit amount referenced. """ @@ -110,7 +110,7 @@ class PaymentRecordRefund(StripeObject): """ ID of the refund. """ - type: Optional[Literal["payment_record_refund", "refund"]] + type: Optional[Union[Literal["payment_record_refund", "refund"], str]] """ Type of the refund, one of `refund` or `payment_record_refund`. """ @@ -129,22 +129,25 @@ class Tax(StripeObject): Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) """ taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] ] """ @@ -196,23 +199,26 @@ class TaxRateDetails(StripeObject): """ Additional details about the tax rate. Only present when `type` is `tax_rate_details`. """ - taxability_reason: Literal[ - "customer_exempt", - "not_available", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + taxability_reason: Union[ + Literal[ + "customer_exempt", + "not_available", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] """ The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. @@ -322,8 +328,14 @@ class TaxRateDetails(StripeObject): The pretax credit amounts (ex: discount, credit grants, etc) for all line items. """ reason: Optional[ - Literal[ - "duplicate", "fraudulent", "order_change", "product_unsatisfactory" + Union[ + Literal[ + "duplicate", + "fraudulent", + "order_change", + "product_unsatisfactory", + ], + str, ] ] """ @@ -337,7 +349,7 @@ class TaxRateDetails(StripeObject): """ The details of the cost of shipping, including the ShippingRate applied to the invoice. """ - status: Literal["issued", "void"] + status: Union[Literal["issued", "void"], str] """ Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://docs.stripe.com/billing/invoices/credit-notes#voiding). """ diff --git a/stripe/_credit_note_line_item.py b/stripe/_credit_note_line_item.py index 99bd2a532..8246cf87a 100644 --- a/stripe/_credit_note_line_item.py +++ b/stripe/_credit_note_line_item.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -48,7 +48,7 @@ class PretaxCreditAmount(StripeObject): """ The discount that was applied to get this pretax credit amount. """ - type: Literal["credit_balance_transaction", "discount"] + type: Union[Literal["credit_balance_transaction", "discount"], str] """ Type of the pretax credit amount referenced. """ @@ -82,23 +82,26 @@ class TaxRateDetails(StripeObject): """ Additional details about the tax rate. Only present when `type` is `tax_rate_details`. """ - taxability_reason: Literal[ - "customer_exempt", - "not_available", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + taxability_reason: Union[ + Literal[ + "customer_exempt", + "not_available", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] """ The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. diff --git a/stripe/_customer.py b/stripe/_customer.py index c65b5220b..3a88804c5 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -201,7 +201,7 @@ class RenderingOptions(StripeObject): } class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -258,11 +258,14 @@ class Location(StripeObject): """ The identified tax country of the customer. """ - source: Literal[ - "billing_address", - "ip_address", - "payment_method", - "shipping_destination", + source: Union[ + Literal[ + "billing_address", + "ip_address", + "payment_method", + "shipping_destination", + ], + str, ] """ The data source used to infer the customer's location. @@ -272,8 +275,14 @@ class Location(StripeObject): The identified tax state, county, province, or region of the customer. """ - automatic_tax: Literal[ - "failed", "not_collecting", "supported", "unrecognized_location" + automatic_tax: Union[ + Literal[ + "failed", + "not_collecting", + "supported", + "unrecognized_location", + ], + str, ] """ Surfaces if automatic tax computation is possible given the current customer location information. @@ -286,7 +295,7 @@ class Location(StripeObject): """ The identified tax location of the customer. """ - provider: Literal["anrok", "avalara", "sphere", "stripe"] + provider: Union[Literal["anrok", "avalara", "sphere", "stripe"], str] """ The tax calculation provider used for location resolution. Defaults to `stripe` when not using a [third-party provider](https://docs.stripe.com/tax/third-party-apps). """ diff --git a/stripe/_customer_balance_transaction.py b/stripe/_customer_balance_transaction.py index ee9a0abf4..873c74423 100644 --- a/stripe/_customer_balance_transaction.py +++ b/stripe/_customer_balance_transaction.py @@ -5,7 +5,7 @@ from stripe._expandable_field import ExpandableField from stripe._stripe_object import UntypedStripeObject from stripe._util import sanitize_id -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -83,19 +83,22 @@ class CustomerBalanceTransaction(APIResource["CustomerBalanceTransaction"]): """ String representing the object's type. Objects of the same type share the same value. """ - type: Literal[ - "adjustment", - "applied_to_invoice", - "checkout_session_subscription_payment", - "checkout_session_subscription_payment_canceled", - "credit_note", - "initial", - "invoice_overpaid", - "invoice_too_large", - "invoice_too_small", - "migration", - "unapplied_from_invoice", - "unspent_receiver_credit", + type: Union[ + Literal[ + "adjustment", + "applied_to_invoice", + "checkout_session_subscription_payment", + "checkout_session_subscription_payment_canceled", + "credit_note", + "initial", + "invoice_overpaid", + "invoice_too_large", + "invoice_too_small", + "migration", + "unapplied_from_invoice", + "unspent_receiver_credit", + ], + str, ] """ Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, `unapplied_from_invoice`, `checkout_session_subscription_payment`, or `checkout_session_subscription_payment_canceled`. See the [Customer Balance page](https://docs.stripe.com/billing/customer/balance#types) to learn more about transaction types. diff --git a/stripe/_customer_cash_balance_transaction.py b/stripe/_customer_cash_balance_transaction.py index aeb4f2b7d..f144e71c4 100644 --- a/stripe/_customer_cash_balance_transaction.py +++ b/stripe/_customer_cash_balance_transaction.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -85,7 +85,9 @@ class JpBankTransfer(StripeObject): """ class UsBankTransfer(StripeObject): - network: Optional[Literal["ach", "domestic_wire_us", "swift"]] + network: Optional[ + Union[Literal["ach", "domestic_wire_us", "swift"], str] + ] """ The banking network used for this funding. """ @@ -101,12 +103,15 @@ class UsBankTransfer(StripeObject): """ The user-supplied reference field on the bank transfer. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. @@ -181,16 +186,19 @@ class UnappliedFromPayment(StripeObject): """ refunded_from_payment: Optional[RefundedFromPayment] transferred_to_balance: Optional[TransferredToBalance] - type: Literal[ - "adjusted_for_overdraft", - "applied_to_payment", - "funded", - "funding_reversed", - "refunded_from_payment", - "return_canceled", - "return_initiated", - "transferred_to_balance", - "unapplied_from_payment", + type: Union[ + Literal[ + "adjusted_for_overdraft", + "applied_to_payment", + "funded", + "funding_reversed", + "refunded_from_payment", + "return_canceled", + "return_initiated", + "transferred_to_balance", + "unapplied_from_payment", + ], + str, ] """ The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://docs.stripe.com/payments/customer-balance#types) to learn more about these types. diff --git a/stripe/_customer_session.py b/stripe/_customer_session.py index 012ee91d8..5d50b3732 100644 --- a/stripe/_customer_session.py +++ b/stripe/_customer_session.py @@ -3,7 +3,7 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -35,14 +35,18 @@ class BuyButton(StripeObject): class CustomerSheet(StripeObject): class Features(StripeObject): payment_method_allow_redisplay_filters: Optional[ - List[Literal["always", "limited", "unspecified"]] + List[ + Union[Literal["always", "limited", "unspecified"], str] + ] ] """ A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the customer sheet displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. """ - payment_method_remove: Optional[Literal["disabled", "enabled"]] + payment_method_remove: Optional[ + Union[Literal["disabled", "enabled"], str] + ] """ Controls whether the customer sheet displays the option to remove a saved payment method." @@ -62,7 +66,9 @@ class Features(StripeObject): class MobilePaymentElement(StripeObject): class Features(StripeObject): payment_method_allow_redisplay_filters: Optional[ - List[Literal["always", "limited", "unspecified"]] + List[ + Union[Literal["always", "limited", "unspecified"], str] + ] ] """ A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the mobile payment element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. @@ -70,25 +76,29 @@ class Features(StripeObject): If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. """ payment_method_redisplay: Optional[ - Literal["disabled", "enabled"] + Union[Literal["disabled", "enabled"], str] ] """ Controls whether or not the mobile payment element shows saved payment methods. """ - payment_method_remove: Optional[Literal["disabled", "enabled"]] + payment_method_remove: Optional[ + Union[Literal["disabled", "enabled"], str] + ] """ Controls whether the mobile payment element displays the option to remove a saved payment method." Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). """ - payment_method_save: Optional[Literal["disabled", "enabled"]] + payment_method_save: Optional[ + Union[Literal["disabled", "enabled"], str] + ] """ Controls whether the mobile payment element displays a checkbox offering to save a new payment method. If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. """ payment_method_save_allow_redisplay_override: Optional[ - Literal["always", "limited", "unspecified"] + Union[Literal["always", "limited", "unspecified"], str] ] """ Allows overriding the value of allow_override when saving a new payment method when payment_method_save is set to disabled. Use values: "always", "limited", or "unspecified". @@ -109,14 +119,16 @@ class Features(StripeObject): class PaymentElement(StripeObject): class Features(StripeObject): payment_method_allow_redisplay_filters: List[ - Literal["always", "limited", "unspecified"] + Union[Literal["always", "limited", "unspecified"], str] ] """ A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. """ - payment_method_redisplay: Literal["disabled", "enabled"] + payment_method_redisplay: Union[ + Literal["disabled", "enabled"], str + ] """ Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. """ @@ -124,20 +136,22 @@ class Features(StripeObject): """ Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. """ - payment_method_remove: Literal["disabled", "enabled"] + payment_method_remove: Union[ + Literal["disabled", "enabled"], str + ] """ Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). """ - payment_method_save: Literal["disabled", "enabled"] + payment_method_save: Union[Literal["disabled", "enabled"], str] """ Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. """ payment_method_save_usage: Optional[ - Literal["off_session", "on_session"] + Union[Literal["off_session", "on_session"], str] ] """ When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. @@ -163,13 +177,13 @@ class PricingTable(StripeObject): class TaxIdElement(StripeObject): class Features(StripeObject): - tax_id_redisplay: Literal["disabled", "enabled"] + tax_id_redisplay: Union[Literal["disabled", "enabled"], str] """ Controls whether the Tax ID Element displays saved tax IDs for the customer. This parameter defaults to `disabled`. When enabled, the Tax ID Element will show existing tax IDs associated with the customer, allowing them to select from previously saved tax identification numbers. """ - tax_id_save: Literal["disabled", "enabled"] + tax_id_save: Union[Literal["disabled", "enabled"], str] """ Controls whether the Tax ID Element allows merchants to save new tax IDs for their customer. This parameter defaults to `disabled`. diff --git a/stripe/_dispute.py b/stripe/_dispute.py index c1cba2d1b..4ad159b06 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -6,7 +6,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -90,7 +90,7 @@ class ShippingAddress(StripeObject): The IP address that the customer used when making the purchase. """ merchandise_or_services: Optional[ - Literal["merchandise", "services"] + Union[Literal["merchandise", "services"], str] ] """ Categorization of disputed payment. @@ -317,27 +317,34 @@ class MastercardCompliance(StripeObject): class VisaCompellingEvidence3(StripeObject): required_actions: List[ - Literal[ - "missing_customer_identifiers", - "missing_disputed_transaction_description", - "missing_merchandise_or_services", - "missing_prior_undisputed_transaction_description", - "missing_prior_undisputed_transactions", + Union[ + Literal[ + "missing_customer_identifiers", + "missing_disputed_transaction_description", + "missing_merchandise_or_services", + "missing_prior_undisputed_transaction_description", + "missing_prior_undisputed_transactions", + ], + str, ] ] """ List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. """ - status: Literal[ - "not_qualified", "qualified", "requires_action" + status: Union[ + Literal["not_qualified", "qualified", "requires_action"], + str, ] """ Visa Compelling Evidence 3.0 eligibility status. """ class VisaCompliance(StripeObject): - status: Literal[ - "fee_acknowledged", "requires_fee_acknowledgement" + status: Union[ + Literal[ + "fee_acknowledged", "requires_fee_acknowledgement" + ], + str, ] """ Visa compliance eligibility status. @@ -370,7 +377,7 @@ class VisaCompliance(StripeObject): The number of times evidence has been submitted. Typically, you may only submit evidence once. """ submission_method: Optional[ - Literal["manual", "not_submitted", "smart_disputes"] + Union[Literal["manual", "not_submitted", "smart_disputes"], str] ] """ Whether the dispute was submitted manually, with Smart Disputes, or not submitted. @@ -379,7 +386,7 @@ class VisaCompliance(StripeObject): class PaymentMethodDetails(StripeObject): class AmazonPay(StripeObject): - dispute_type: Optional[Literal["chargeback", "claim"]] + dispute_type: Optional[Union[Literal["chargeback", "claim"], str]] """ The AmazonPay dispute type, chargeback or claim """ @@ -389,8 +396,15 @@ class Card(StripeObject): """ Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`. """ - case_type: Literal[ - "block", "chargeback", "compliance", "inquiry", "resolution" + case_type: Union[ + Literal[ + "block", + "chargeback", + "compliance", + "inquiry", + "resolution", + ], + str, ] """ The type of dispute opened. Different case types may have varying fees and financial impact. @@ -428,7 +442,7 @@ class Paypal(StripeObject): card: Optional[Card] klarna: Optional[Klarna] paypal: Optional[Paypal] - type: Literal["amazon_pay", "card", "klarna", "paypal"] + type: Union[Literal["amazon_pay", "card", "klarna", "paypal"], str] """ Payment method type. """ @@ -476,10 +490,13 @@ class SmartDisputes(StripeObject): Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ enhanced_eligibility_types: List[ - Literal[ - "mastercard_compliance", - "visa_compelling_evidence_3", - "visa_compliance", + Union[ + Literal[ + "mastercard_compliance", + "visa_compelling_evidence_3", + "visa_compliance", + ], + str, ] ] """ @@ -532,15 +549,18 @@ class SmartDisputes(StripeObject): Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `noncompliant`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://docs.stripe.com/disputes/categories). """ smart_disputes: Optional[SmartDisputes] - status: Literal[ - "lost", - "needs_response", - "prevented", - "under_review", - "warning_closed", - "warning_needs_response", - "warning_under_review", - "won", + status: Union[ + Literal[ + "lost", + "needs_response", + "prevented", + "under_review", + "warning_closed", + "warning_needs_response", + "warning_under_review", + "won", + ], + str, ] """ The current status of a dispute. Possible values include:`warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, `lost`, or `prevented`. diff --git a/stripe/_event.py b/stripe/_event.py index 66cd45a33..54ce14ad1 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -3,7 +3,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import Any, ClassVar, Optional +from typing import Any, ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -81,7 +81,7 @@ class Request(StripeObject): automation_action: Optional[AutomationAction] request: Optional[Request] - type: Literal["automation_action", "request"] + type: Union[Literal["automation_action", "request"], str] """ The type of the reason for the event. """ diff --git a/stripe/_file.py b/stripe/_file.py index 61a79a303..55dc1d07d 100644 --- a/stripe/_file.py +++ b/stripe/_file.py @@ -3,7 +3,7 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -49,28 +49,31 @@ class File(CreateableAPIResource["File"], ListableAPIResource["File"]): """ String representing the object's type. Objects of the same type share the same value. """ - purpose: Literal[ - "account_requirement", - "additional_verification", - "business_icon", - "business_logo", - "customer_signature", - "dispute_evidence", - "document_provider_identity_document", - "finance_report_run", - "financial_account_statement", - "identity_document", - "identity_document_downloadable", - "issuing_regulatory_reporting", - "pci_document", - "platform_terms_of_service", - "selfie", - "sigma_scheduled_query", - "tax_document_user_upload", - "terminal_android_apk", - "terminal_reader_splashscreen", - "terminal_wifi_certificate", - "terminal_wifi_private_key", + purpose: Union[ + Literal[ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "document_provider_identity_document", + "finance_report_run", + "financial_account_statement", + "identity_document", + "identity_document_downloadable", + "issuing_regulatory_reporting", + "pci_document", + "platform_terms_of_service", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_android_apk", + "terminal_reader_splashscreen", + "terminal_wifi_certificate", + "terminal_wifi_private_key", + ], + str, ] """ The [purpose](https://docs.stripe.com/file-upload#uploading-a-file) of the uploaded file. diff --git a/stripe/_funding_instructions.py b/stripe/_funding_instructions.py index d8a297bda..e25753d72 100644 --- a/stripe/_funding_instructions.py +++ b/stripe/_funding_instructions.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -510,16 +510,19 @@ class BankAddress(StripeObject): """ supported_networks: Optional[ List[ - Literal[ - "ach", - "bacs", - "chaps", - "domestic_wire_us", - "fps", - "sepa", - "spei", - "swift", - "zengin", + Union[ + Literal[ + "ach", + "bacs", + "chaps", + "domestic_wire_us", + "fps", + "sepa", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -530,8 +533,9 @@ class BankAddress(StripeObject): """ SWIFT Records contain U.S. bank account details per the SWIFT format. """ - type: Literal[ - "aba", "iban", "sort_code", "spei", "swift", "zengin" + type: Union[ + Literal["aba", "iban", "sort_code", "spei", "swift", "zengin"], + str, ] """ The type of financial address @@ -557,7 +561,7 @@ class BankAddress(StripeObject): """ A list of financial addresses that can be used to fund a particular balance """ - type: Literal["eu_bank_transfer", "jp_bank_transfer"] + type: Union[Literal["eu_bank_transfer", "jp_bank_transfer"], str] """ The bank_transfer type """ diff --git a/stripe/_fx_quote.py b/stripe/_fx_quote.py index 34abe2188..4c77bc310 100644 --- a/stripe/_fx_quote.py +++ b/stripe/_fx_quote.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -88,7 +88,7 @@ class Transfer(StripeObject): """ The details required to use an FX Quote for a transfer """ - type: Literal["payment", "transfer"] + type: Union[Literal["payment", "transfer"], str] """ The transaction type for which the FX Quote will be used. @@ -104,7 +104,7 @@ class Transfer(StripeObject): """ Unique identifier for the object. """ - lock_duration: Literal["day", "five_minutes", "hour", "none"] + lock_duration: Union[Literal["day", "five_minutes", "hour", "none"], str] """ The duration the exchange rate quote remains valid from creation time. Allowed values are none, hour, and day. Note that for the test mode API available in alpha, you can request an extended quote, but it won't be usable for any transactions. """ @@ -114,7 +114,7 @@ class Transfer(StripeObject): If lock_duration is set to ‘none' this field will be set to null. """ - lock_status: Literal["active", "expired", "none"] + lock_status: Union[Literal["active", "expired", "none"], str] """ Lock status of the quote. Transitions from active to expired once past the lock_expires_at timestamp. diff --git a/stripe/_gift_card_operation.py b/stripe/_gift_card_operation.py index 1b62417ee..13cde02b5 100644 --- a/stripe/_gift_card_operation.py +++ b/stripe/_gift_card_operation.py @@ -3,7 +3,7 @@ from stripe._api_resource import APIResource from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -202,28 +202,31 @@ class Balance(StripeObject): Time at which the object was created. Measured in seconds since the Unix epoch. """ failure_code: Optional[ - Literal[ - "action_not_supported", - "card_already_activated", - "card_expired", - "card_not_activated", - "do_not_honor", - "generic_failure", - "insufficient_balance", - "invalid_amount", - "invalid_currency", - "invalid_number", - "invalid_pin", - "invalid_track_data", - "lost_card", - "lost_or_stolen_card", - "pin_required", - "pin_tries_exceeded", - "processing_error", - "provider_unavailable", - "stolen_card", - "suspected_fraud", - "timeout", + Union[ + Literal[ + "action_not_supported", + "card_already_activated", + "card_expired", + "card_not_activated", + "do_not_honor", + "generic_failure", + "insufficient_balance", + "invalid_amount", + "invalid_currency", + "invalid_number", + "invalid_pin", + "invalid_track_data", + "lost_card", + "lost_or_stolen_card", + "pin_required", + "pin_tries_exceeded", + "processing_error", + "provider_unavailable", + "stolen_card", + "suspected_fraud", + "timeout", + ], + str, ] ] """ diff --git a/stripe/_invoice.py b/stripe/_invoice.py index c68325323..8495e7f58 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -169,15 +169,18 @@ class Liability(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ disabled_reason: Optional[ - Literal[ - "finalization_requires_location_inputs", - "finalization_system_error", + Union[ + Literal[ + "finalization_requires_location_inputs", + "finalization_system_error", + ], + str, ] ] """ @@ -196,7 +199,9 @@ class Liability(StripeObject): The tax provider powering automatic tax. """ status: Optional[ - Literal["complete", "failed", "requires_location_inputs"] + Union[ + Literal["complete", "failed", "requires_location_inputs"], str + ] ] """ The status of the most recent automated tax calculation for this invoice. @@ -439,7 +444,7 @@ class Issuer(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -827,11 +832,14 @@ class PauseCollection(StripeObject): """ Details about the subscription that generated this invoice """ - type: Literal[ - "billing_cadence_details", - "quote_details", - "schedule_details", - "subscription_details", + type: Union[ + Literal[ + "billing_cadence_details", + "quote_details", + "schedule_details", + "subscription_details", + ], + str, ] """ The type of parent that generated this invoice @@ -847,14 +855,18 @@ class PaymentSettings(StripeObject): class PaymentMethodOptions(StripeObject): class AcssDebit(StripeObject): class MandateOptions(StripeObject): - transaction_type: Optional[Literal["business", "personal"]] + transaction_type: Optional[ + Union[Literal["business", "personal"], str] + ] """ Transaction type of the mandate. """ mandate_options: Optional[MandateOptions] verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[ + Literal["automatic", "instant", "microdeposits"], str + ] ] """ Bank account verification method. The default value is `automatic`. @@ -862,7 +874,7 @@ class MandateOptions(StripeObject): _inner_class_types = {"mandate_options": MandateOptions} class Bancontact(StripeObject): - preferred_language: Literal["de", "en", "fr", "nl"] + preferred_language: Union[Literal["de", "en", "fr", "nl"], str] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -882,7 +894,7 @@ class Installments(StripeObject): installments: Optional[Installments] request_three_d_secure: Optional[ - Literal["any", "automatic", "challenge"] + Union[Literal["any", "automatic", "challenge"], str] ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -926,23 +938,28 @@ class MandateOptions(StripeObject): """ The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[ + Union[Literal["fixed", "maximum"], str] + ] """ Only `maximum` is supported. """ purpose: Optional[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", + Union[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ], + str, ] ] """ @@ -953,7 +970,9 @@ class MandateOptions(StripeObject): _inner_class_types = {"mandate_options": MandateOptions} class Pix(StripeObject): - amount_includes_iof: Optional[Literal["always", "never"]] + amount_includes_iof: Optional[ + Union[Literal["always", "never"], str] + ] """ Determines if the amount includes the IOF tax. """ @@ -971,7 +990,9 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[ + Union[Literal["fixed", "maximum"], str] + ] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -991,7 +1012,7 @@ class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): account_subcategories: Optional[ - List[Literal["checking", "savings"]] + List[Union[Literal["checking", "savings"], str]] ] """ The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. @@ -1004,11 +1025,14 @@ class Filters(StripeObject): filters: Optional[Filters] permissions: Optional[ List[ - Literal[ - "balances", - "ownership", - "payment_method", - "transactions", + Union[ + Literal[ + "balances", + "ownership", + "payment_method", + "transactions", + ], + str, ] ] ] @@ -1017,11 +1041,14 @@ class Filters(StripeObject): """ prefetch: Optional[ List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -1032,7 +1059,9 @@ class Filters(StripeObject): financial_connections: Optional[FinancialConnections] verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[ + Literal["automatic", "instant", "microdeposits"], str + ] ] """ Bank account verification method. The default value is `automatic`. @@ -1141,61 +1170,64 @@ class WechatPay(StripeObject): """ payment_method_types: Optional[ List[ - Literal[ - "ach_credit_transfer", - "ach_debit", - "acss_debit", - "affirm", - "alipay", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "check_scan", - "crypto", - "custom", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "id_bank_transfer", - "ideal", - "jp_credit_transfer", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "momo", - "multibanco", - "naver_pay", - "nz_bank_account", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "payto", - "pix", - "promptpay", - "revolut_pay", - "satispay", - "sepa_credit_transfer", - "sepa_debit", - "sequra", - "sofort", - "stripe_balance", - "swish", - "twint", - "upi", - "us_bank_account", - "wechat_pay", + Union[ + Literal[ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "alipay", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "check_scan", + "crypto", + "custom", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "id_bank_transfer", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "momo", + "multibanco", + "naver_pay", + "nz_bank_account", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "satispay", + "sepa_credit_transfer", + "sepa_debit", + "sequra", + "sofort", + "stripe_balance", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + ], + str, ] ] ] @@ -1242,22 +1274,25 @@ class Tax(StripeObject): Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) """ taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] ] """ @@ -1414,7 +1449,9 @@ class TotalPretaxCreditAmount(StripeObject): """ The margin that was applied to get this pretax credit amount. """ - type: Literal["credit_balance_transaction", "discount", "margin"] + type: Union[ + Literal["credit_balance_transaction", "discount", "margin"], str + ] """ Type of the pretax credit amount referenced. """ @@ -1438,23 +1475,26 @@ class TaxRateDetails(StripeObject): """ Additional details about the tax rate. Only present when `type` is `tax_rate_details`. """ - taxability_reason: Literal[ - "customer_exempt", - "not_available", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + taxability_reason: Union[ + Literal[ + "customer_exempt", + "not_available", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] """ The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. @@ -1554,7 +1594,9 @@ class TaxRateDetails(StripeObject): * `subscription_update`: A subscription was updated. * `upcoming`: Reserved for upcoming invoices created through the Create Preview Invoice API or when an `invoice.upcoming` event is generated for an upcoming invoice on a subscription. """ - collection_method: Literal["charge_automatically", "send_invoice"] + collection_method: Union[ + Literal["charge_automatically", "send_invoice"], str + ] """ Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. """ @@ -1760,7 +1802,9 @@ class TaxRateDetails(StripeObject): """ Extra information about an invoice for the customer's credit card statement. """ - status: Optional[Literal["draft", "open", "paid", "uncollectible", "void"]] + status: Optional[ + Union[Literal["draft", "open", "paid", "uncollectible", "void"], str] + ] """ The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://docs.stripe.com/billing/invoices/workflow#workflow-overview) """ diff --git a/stripe/_invoice_item.py b/stripe/_invoice_item.py index 60aed2fcf..ff395bbb1 100644 --- a/stripe/_invoice_item.py +++ b/stripe/_invoice_item.py @@ -9,7 +9,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -113,11 +113,14 @@ class SubscriptionDetails(StripeObject): """ Details about the subscription that generated this invoice item """ - type: Literal[ - "pricing_plan_subscription_details", - "rate_card_subscription_details", - "schedule_details", - "subscription_details", + type: Union[ + Literal[ + "pricing_plan_subscription_details", + "rate_card_subscription_details", + "schedule_details", + "subscription_details", + ], + str, ] """ The type of parent that generated this invoice item @@ -202,11 +205,14 @@ class RateCardRateDetails(StripeObject): RateCardCustomPricingUnitOverageRateDetails ] rate_card_rate_details: Optional[RateCardRateDetails] - type: Literal[ - "license_fee_details", - "price_details", - "rate_card_custom_pricing_unit_overage_rate_details", - "rate_card_rate_details", + type: Union[ + Literal[ + "license_fee_details", + "price_details", + "rate_card_custom_pricing_unit_overage_rate_details", + "rate_card_rate_details", + ], + str, ] """ The type of the pricing details. diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index 56f597584..5065245b0 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -215,12 +215,15 @@ class CreditedItems(StripeObject): """ Details about the subscription item that generated this line item """ - type: Literal[ - "invoice_item_details", - "pricing_plan_subscription_details", - "rate_card_subscription_details", - "schedule_details", - "subscription_item_details", + type: Union[ + Literal[ + "invoice_item_details", + "pricing_plan_subscription_details", + "rate_card_subscription_details", + "schedule_details", + "subscription_item_details", + ], + str, ] """ The type of parent that generated this line item @@ -262,7 +265,9 @@ class PretaxCreditAmount(StripeObject): """ The margin that was applied to get this pretax credit amount. """ - type: Literal["credit_balance_transaction", "discount", "margin"] + type: Union[ + Literal["credit_balance_transaction", "discount", "margin"], str + ] """ Type of the pretax credit amount referenced. """ @@ -330,11 +335,14 @@ class RateCardRateDetails(StripeObject): RateCardCustomPricingUnitOverageRateDetails ] rate_card_rate_details: Optional[RateCardRateDetails] - type: Literal[ - "license_fee_details", - "price_details", - "rate_card_custom_pricing_unit_overage_rate_details", - "rate_card_rate_details", + type: Union[ + Literal[ + "license_fee_details", + "price_details", + "rate_card_custom_pricing_unit_overage_rate_details", + "rate_card_rate_details", + ], + str, ] """ The type of the pricing details. @@ -380,23 +388,26 @@ class TaxRateDetails(StripeObject): """ Additional details about the tax rate. Only present when `type` is `tax_rate_details`. """ - taxability_reason: Literal[ - "customer_exempt", - "not_available", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + taxability_reason: Union[ + Literal[ + "customer_exempt", + "not_available", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] """ The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. diff --git a/stripe/_line_item.py b/stripe/_line_item.py index fc65016f6..75b7882ce 100644 --- a/stripe/_line_item.py +++ b/stripe/_line_item.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -64,22 +64,25 @@ class Tax(StripeObject): Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) """ taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] ] """ diff --git a/stripe/_mandate.py b/stripe/_mandate.py index 94729f9b5..cfa93ca77 100644 --- a/stripe/_mandate.py +++ b/stripe/_mandate.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -58,7 +58,9 @@ class MultiUse(StripeObject): class PaymentMethodDetails(StripeObject): class AcssDebit(StripeObject): - default_for: Optional[List[Literal["invoice", "subscription"]]] + default_for: Optional[ + List[Union[Literal["invoice", "subscription"], str]] + ] """ List of Stripe products where this mandate can be selected automatically. """ @@ -66,11 +68,13 @@ class AcssDebit(StripeObject): """ Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: Literal["combined", "interval", "sporadic"] + payment_schedule: Union[ + Literal["combined", "interval", "sporadic"], str + ] """ Payment schedule for the mandate. """ - transaction_type: Literal["business", "personal"] + transaction_type: Union[Literal["business", "personal"], str] """ Transaction type of the mandate. """ @@ -100,12 +104,15 @@ class BacsDebit(StripeObject): The unique reference identifying the mandate on the Bacs network. """ revocation_reason: Optional[ - Literal[ - "account_closed", - "bank_account_restricted", - "bank_ownership_changed", - "could_not_process", - "debit_not_authorized", + Union[ + Literal[ + "account_closed", + "bank_account_restricted", + "bank_ownership_changed", + "could_not_process", + "debit_not_authorized", + ], + str, ] ] """ @@ -125,7 +132,7 @@ class Blik(StripeObject): """ Date at which the mandate expires. """ - type: Literal["off_session", "on_session"] + type: Union[Literal["off_session", "on_session"], str] """ Type of the mandate. """ @@ -178,7 +185,7 @@ class Payto(StripeObject): """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: Literal["fixed", "maximum"] + amount_type: Union[Literal["fixed", "maximum"], str] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -186,15 +193,18 @@ class Payto(StripeObject): """ Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ - payment_schedule: Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", + payment_schedule: Union[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ], + str, ] """ The periodicity at which payments will be collected. Defaults to `adhoc`. @@ -204,18 +214,21 @@ class Payto(StripeObject): The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: Optional[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", + Union[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ], + str, ] ] """ @@ -227,11 +240,13 @@ class Payto(StripeObject): """ class Pix(StripeObject): - amount_includes_iof: Optional[Literal["always", "never"]] + amount_includes_iof: Optional[ + Union[Literal["always", "never"], str] + ] """ Determines if the amount includes the IOF tax. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ Type of amount. """ @@ -240,8 +255,15 @@ class Pix(StripeObject): Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. """ payment_schedule: Optional[ - Literal[ - "halfyearly", "monthly", "quarterly", "weekly", "yearly" + Union[ + Literal[ + "halfyearly", + "monthly", + "quarterly", + "weekly", + "yearly", + ], + str, ] ] """ @@ -277,7 +299,7 @@ class Upi(StripeObject): """ Amount to be charged for future payments. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -379,11 +401,11 @@ class SingleUse(StripeObject): """ payment_method_details: PaymentMethodDetails single_use: Optional[SingleUse] - status: Literal["active", "inactive", "pending"] + status: Union[Literal["active", "inactive", "pending"], str] """ The mandate status indicates whether or not you can use it to initiate a payment. """ - type: Literal["multi_use", "single_use"] + type: Union[Literal["multi_use", "single_use"], str] """ The type of the mandate. """ diff --git a/stripe/_order.py b/stripe/_order.py index ba0fe0cc6..08c3dcb50 100644 --- a/stripe/_order.py +++ b/stripe/_order.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -47,7 +47,9 @@ class AutomaticTax(StripeObject): Whether Stripe automatically computes tax on this Order. """ status: Optional[ - Literal["complete", "failed", "requires_location_inputs"] + Union[ + Literal["complete", "failed", "requires_location_inputs"], str + ] ] """ The status of the most recent automated tax calculation for this Order. @@ -118,13 +120,16 @@ class MandateOptions(StripeObject): Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. """ payment_schedule: Optional[ - Literal["combined", "interval", "sporadic"] + Union[ + Literal["combined", "interval", "sporadic"], + str, + ] ] """ Payment schedule for the mandate. """ transaction_type: Optional[ - Literal["business", "personal"] + Union[Literal["business", "personal"], str] ] """ Transaction type of the mandate. @@ -132,7 +137,9 @@ class MandateOptions(StripeObject): mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[ + Literal["none", "off_session", "on_session"], str + ] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -148,7 +155,10 @@ class MandateOptions(StripeObject): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[ + Literal["automatic", "instant", "microdeposits"], + str, + ] ] """ Bank account verification method. The default value is `automatic`. @@ -157,7 +167,10 @@ class MandateOptions(StripeObject): class AfterpayClearpay(StripeObject): capture_method: Optional[ - Literal["automatic", "automatic_async", "manual"] + Union[ + Literal["automatic", "automatic_async", "manual"], + str, + ] ] """ Controls when the funds will be captured from the customer's account. @@ -179,7 +192,7 @@ class AfterpayClearpay(StripeObject): class Alipay(StripeObject): setup_future_usage: Optional[ - Literal["none", "off_session"] + Union[Literal["none", "off_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -197,7 +210,7 @@ class Bancontact(StripeObject): Preferred language of the Bancontact authorization page that the customer is redirected to. """ setup_future_usage: Optional[ - Literal["none", "off_session"] + Union[Literal["none", "off_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -210,14 +223,16 @@ class Bancontact(StripeObject): """ class Card(StripeObject): - capture_method: Literal[ - "automatic", "automatic_async", "manual" + capture_method: Union[ + Literal["automatic", "automatic_async", "manual"], str ] """ Controls when the funds will be captured from the customer's account. """ setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[ + Literal["none", "off_session", "on_session"], str + ] ] """ Indicates that you intend to make future payments with the payment method. @@ -242,14 +257,17 @@ class EuBankTransfer(StripeObject): eu_bank_transfer: Optional[EuBankTransfer] requested_address_types: Optional[ List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", + Union[ + Literal[ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -259,12 +277,15 @@ class EuBankTransfer(StripeObject): Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ type: Optional[ - Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] ] """ @@ -293,7 +314,7 @@ class EuBankTransfer(StripeObject): class Ideal(StripeObject): setup_future_usage: Optional[ - Literal["none", "off_session"] + Union[Literal["none", "off_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -315,7 +336,9 @@ class Klarna(StripeObject): Preferred locale of the Klarna checkout page that the customer is redirected to. """ setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[ + Literal["none", "off_session", "on_session"], str + ] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -337,7 +360,7 @@ class Link(StripeObject): [Deprecated] This is a legacy parameter that no longer has any function. """ setup_future_usage: Optional[ - Literal["none", "off_session"] + Union[Literal["none", "off_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -384,14 +407,21 @@ class Tax(StripeObject): """ The tax for a single unit of the line item in minor units. Cannot be a negative number. """ - behavior: Literal["exclusive", "inclusive"] + behavior: Union[ + Literal["exclusive", "inclusive"], str + ] """ The tax behavior for the line item. """ category: Optional[ - Literal[ - "digital_goods", "donation", "physical_goods" + Union[ + Literal[ + "digital_goods", + "donation", + "physical_goods", + ], + str, ] ] """ @@ -445,7 +475,7 @@ class Tax(StripeObject): A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. """ setup_future_usage: Optional[ - Literal["none", "off_session"] + Union[Literal["none", "off_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -471,7 +501,9 @@ class MandateOptions(StripeObject): mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[ + Literal["none", "off_session", "on_session"], str + ] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -496,7 +528,7 @@ class Sofort(StripeObject): Preferred language of the SOFORT authorization page that the customer is redirected to. """ setup_future_usage: Optional[ - Literal["none", "off_session"] + Union[Literal["none", "off_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -518,7 +550,10 @@ class WechatPay(StripeObject): The unique buyer ID for the app ID registered with WeChat Pay. Only required when client is mini_program. """ client: Optional[ - Literal["android", "ios", "mini_program", "web"] + Union[ + Literal["android", "ios", "mini_program", "web"], + str, + ] ] """ The client type that the end customer will pay from @@ -591,28 +626,31 @@ class TransferData(StripeObject): """ payment_method_types: Optional[ List[ - Literal[ - "acss_debit", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "card", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "link", - "oxxo", - "p24", - "paypal", - "sepa_debit", - "sofort", - "wechat_pay", + Union[ + Literal[ + "acss_debit", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "link", + "oxxo", + "p24", + "paypal", + "sepa_debit", + "sofort", + "wechat_pay", + ], + str, ] ] ] @@ -650,15 +688,18 @@ class TransferData(StripeObject): Settings describing how the order should configure generated PaymentIntents. """ status: Optional[ - Literal[ - "canceled", - "complete", - "not_required", - "processing", - "requires_action", - "requires_capture", - "requires_confirmation", - "requires_payment_method", + Union[ + Literal[ + "canceled", + "complete", + "not_required", + "processing", + "requires_action", + "requires_capture", + "requires_confirmation", + "requires_payment_method", + ], + str, ] ] """ @@ -679,22 +720,25 @@ class Tax(StripeObject): Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) """ taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] ] """ @@ -935,22 +979,25 @@ class Tax(StripeObject): Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) """ taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] ] """ @@ -1064,7 +1111,9 @@ class Tax(StripeObject): """ Customer shipping information associated with the order. """ - status: Literal["canceled", "complete", "open", "processing", "submitted"] + status: Union[ + Literal["canceled", "complete", "open", "processing", "submitted"], str + ] """ The overall status of the order. """ diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 9d539e6f4..07672cda2 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -5,7 +5,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -470,19 +470,28 @@ class Boleto(StripeObject): class Card(StripeObject): class Checks(StripeObject): address_line1_check: Optional[ - Literal["fail", "pass", "unavailable", "unchecked"] + Union[ + Literal["fail", "pass", "unavailable", "unchecked"], + str, + ] ] """ If you provide a value for `address.line1`, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`. """ address_postal_code_check: Optional[ - Literal["fail", "pass", "unavailable", "unchecked"] + Union[ + Literal["fail", "pass", "unavailable", "unchecked"], + str, + ] ] """ If you provide a address postal code, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`. """ cvc_check: Optional[ - Literal["fail", "pass", "unavailable", "unchecked"] + Union[ + Literal["fail", "pass", "unavailable", "unchecked"], + str, + ] ] """ If you provide a CVC, the check results is one of `pass`, `fail`, `unavailable`, or `unchecked`. @@ -498,7 +507,9 @@ class Plan(StripeObject): """ For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[ + Literal["bonus", "fixed_count", "revolving"], str + ] """ Type of installment plan, one of `fixed_count`, `revolving`, or `bonus`. """ @@ -517,7 +528,7 @@ class NetworkToken(StripeObject): class ThreeDSecure(StripeObject): authentication_flow: Optional[ - Literal["challenge", "frictionless"] + Union[Literal["challenge", "frictionless"], str] ] """ For authenticated transactions: Indicates how the issuing bank authenticated the customer. @@ -541,33 +552,41 @@ class ThreeDSecure(StripeObject): Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on the outcome of Stripe's internal risk assessment. """ result: Optional[ - Literal[ - "attempt_acknowledged", - "authenticated", - "exempted", - "failed", - "not_supported", - "processing_error", + Union[ + Literal[ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error", + ], + str, ] ] """ Indicates the outcome of 3D Secure authentication. """ result_reason: Optional[ - Literal[ - "abandoned", - "bypassed", - "canceled", - "card_not_enrolled", - "network_not_supported", - "protocol_error", - "rejected", + Union[ + Literal[ + "abandoned", + "bypassed", + "canceled", + "card_not_enrolled", + "network_not_supported", + "protocol_error", + "rejected", + ], + str, ] ] """ Additional information about why 3D Secure succeeded or failed, based on the `result`. """ - version: Optional[Literal["1.0.2", "2.1.0", "2.2.0"]] + version: Optional[ + Union[Literal["1.0.2", "2.1.0", "2.2.0"], str] + ] """ The version of 3D Secure that was used. """ @@ -602,19 +621,22 @@ class GooglePay(StripeObject): The authorization code of the payment. """ brand: Optional[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", + Union[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ], + str, ] ] """ @@ -650,7 +672,9 @@ class GooglePay(StripeObject): *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* """ - funding: Optional[Literal["credit", "debit", "prepaid", "unknown"]] + funding: Optional[ + Union[Literal["credit", "debit", "prepaid", "unknown"], str] + ] """ Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. """ @@ -675,19 +699,22 @@ class GooglePay(StripeObject): True if this payment was marked as MOTO and out of scope for SCA. """ network: Optional[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", + Union[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ], + str, ] ] """ @@ -743,14 +770,17 @@ class Offline(StripeObject): """ class Reauthorization(StripeObject): - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether or not the reauthorization feature is supported. """ class Receipt(StripeObject): account_type: Optional[ - Literal["checking", "credit", "prepaid", "unknown"] + Union[ + Literal["checking", "credit", "prepaid", "unknown"], + str, + ] ] """ The type of account being debited or credited @@ -789,8 +819,11 @@ class Receipt(StripeObject): """ class Wallet(StripeObject): - type: Literal[ - "apple_pay", "google_pay", "samsung_pay", "unknown" + type: Union[ + Literal[ + "apple_pay", "google_pay", "samsung_pay", "unknown" + ], + str, ] """ The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. @@ -892,12 +925,15 @@ class Wallet(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -956,16 +992,27 @@ class Crypto(StripeObject): The wallet address of the customer. """ network: Optional[ - Literal[ - "base", "ethereum", "polygon", "solana", "sui", "tempo" + Union[ + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ], + str, ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal[ - "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + Union[ + Literal[ + "phantom_cash", + "usdc", + "usdg", + "usdp", + "usdsui", + "usdt", + ], + str, ] ] """ @@ -1085,7 +1132,9 @@ class Balance(StripeObject): """ The balance of the gift card after the transaction. """ - brand: Optional[Literal["fiserv_valuelink", "givex", "svs"]] + brand: Optional[ + Union[Literal["fiserv_valuelink", "givex", "svs"], str] + ] """ The brand of the gift card. """ @@ -1155,7 +1204,7 @@ class IdBankTransfer(StripeObject): """ Account number of the bank account to transfer funds to. """ - bank: Literal["bca", "bni", "bri", "cimb", "permata"] + bank: Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] """ Bank where the account is located. """ @@ -1252,7 +1301,7 @@ class Ideal(StripeObject): class InteracPresent(StripeObject): class Receipt(StripeObject): account_type: Optional[ - Literal["checking", "savings", "unknown"] + Union[Literal["checking", "savings", "unknown"], str] ] """ The type of account being debited or credited @@ -1361,12 +1410,15 @@ class Receipt(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -1431,7 +1483,12 @@ class Address(StripeObject): class Konbini(StripeObject): class Store(StripeObject): chain: Optional[ - Literal["familymart", "lawson", "ministop", "seicomart"] + Union[ + Literal[ + "familymart", "lawson", "ministop", "seicomart" + ], + str, + ] ] """ The name of the convenience store chain where the payment was completed. @@ -1445,29 +1502,32 @@ class Store(StripeObject): class KrCard(StripeObject): brand: Optional[ - Literal[ - "bc", - "citi", - "hana", - "hyundai", - "jeju", - "jeonbuk", - "kakaobank", - "kbank", - "kdbbank", - "kookmin", - "kwangju", - "lotte", - "mg", - "nh", - "post", - "samsung", - "savingsbank", - "shinhan", - "shinhyup", - "suhyup", - "tossbank", - "woori", + Union[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ], + str, ] ] """ @@ -1653,13 +1713,18 @@ class Paynow(StripeObject): class Paypal(StripeObject): class SellerProtection(StripeObject): dispute_categories: Optional[ - List[Literal["fraudulent", "product_not_received"]] + List[ + Union[ + Literal["fraudulent", "product_not_received"], str + ] + ] ] """ An array of conditions that are covered for the transaction, if applicable. """ - status: Literal[ - "eligible", "not_eligible", "partially_eligible" + status: Union[ + Literal["eligible", "not_eligible", "partially_eligible"], + str, ] """ Indicates whether the transaction is eligible for PayPal's seller protection. @@ -2020,11 +2085,13 @@ class Upi(StripeObject): """ class UsBankAccount(StripeObject): - account_holder_type: Optional[Literal["company", "individual"]] + account_holder_type: Optional[ + Union[Literal["company", "individual"], str] + ] """ The type of entity that holds the account. This can be either 'individual' or 'company'. """ - account_type: Optional[Literal["checking", "savings"]] + account_type: Optional[Union[Literal["checking", "savings"], str]] """ The type of the bank account. This can be either 'checking' or 'savings'. """ @@ -2292,7 +2359,7 @@ class Svs(StripeObject): """ Represents the SVS gift card processor. """ - type: Literal["custom", "fiserv_valuelink", "givex", "svs"] + type: Union[Literal["custom", "fiserv_valuelink", "givex", "svs"], str] """ The processor used for this payment attempt. """ @@ -2384,7 +2451,9 @@ class Address(StripeObject): """ Customer information for this payment. """ - customer_presence: Optional[Literal["off_session", "on_session"]] + customer_presence: Optional[ + Union[Literal["off_session", "on_session"], str] + ] """ Indicates whether the customer was present in your checkout flow during this payment. """ @@ -2420,7 +2489,7 @@ class Address(StripeObject): """ Processor information associated with this payment. """ - reported_by: Literal["self", "stripe"] + reported_by: Union[Literal["self", "stripe"], str] """ Indicates who reported the payment. """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index ea1d23db6..26586b8f7 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -119,7 +119,7 @@ class PaymentIntent( class AdvancedFeatureDetails(StripeObject): class DecrementalAuthorization(StripeObject): - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether the feature is supported. """ @@ -129,19 +129,19 @@ class ForcedCapture(StripeObject): """ Timestamp at which the forced capture window expires. """ - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether forced capture is supported. """ class IncrementalAuthorization(StripeObject): - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether the feature is supported. """ class Multicapture(StripeObject): - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether the feature is supported. """ @@ -151,7 +151,7 @@ class Overcapture(StripeObject): """ The maximum amount that can be captured. """ - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether overcapture is supported. """ @@ -192,9 +192,12 @@ class AllocatedFunds(StripeObject): class AmountDetails(StripeObject): class Error(StripeObject): code: Optional[ - Literal[ - "amount_details_amount_mismatch", - "amount_details_tax_shipping_discount_greater_than_amount", + Union[ + Literal[ + "amount_details_amount_mismatch", + "amount_details_tax_shipping_discount_greater_than_amount", + ], + str, ] ] """ @@ -291,7 +294,7 @@ class Tax(StripeObject): _inner_class_types = {"inputs": Inputs} class AutomaticPaymentMethods(StripeObject): - allow_redirects: Optional[Literal["always", "never"]] + allow_redirects: Optional[Union[Literal["always", "never"], str]] """ Controls whether this PaymentIntent will accept redirect-based payment methods. @@ -1345,16 +1348,19 @@ class BankAddress(StripeObject): """ supported_networks: Optional[ List[ - Literal[ - "ach", - "bacs", - "chaps", - "domestic_wire_us", - "fps", - "sepa", - "spei", - "swift", - "zengin", + Union[ + Literal[ + "ach", + "bacs", + "chaps", + "domestic_wire_us", + "fps", + "sepa", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -1365,8 +1371,11 @@ class BankAddress(StripeObject): """ SWIFT Records contain U.S. bank account details per the SWIFT format. """ - type: Literal[ - "aba", "iban", "sort_code", "spei", "swift", "zengin" + type: Union[ + Literal[ + "aba", "iban", "sort_code", "spei", "swift", "zengin" + ], + str, ] """ The type of financial address @@ -1404,12 +1413,15 @@ class BankAddress(StripeObject): """ A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ Type of bank transfer @@ -1667,7 +1679,9 @@ class VerifyWithMicrodeposits(StripeObject): """ The URL for the hosted verification page, which allows customers to verify their bank account. """ - microdeposit_type: Optional[Literal["amounts", "descriptor_code"]] + microdeposit_type: Optional[ + Union[Literal["amounts", "descriptor_code"], str] + ] """ The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. """ @@ -1805,7 +1819,9 @@ class PaymentDetails(StripeObject): class Benefit(StripeObject): class FrMealVoucher(StripeObject): enabled: Optional[ - Literal["if_payment_method_is_eligible", "never"] + Union[ + Literal["if_payment_method_is_eligible", "never"], str + ] ] """ Whether meal voucher benefit is enabled for this payment. @@ -1840,7 +1856,9 @@ class Recipient(StripeObject): The phone number of the recipient the ticket is delivered to. """ - mode: Optional[Literal["email", "phone", "pickup", "post"]] + mode: Optional[ + Union[Literal["email", "phone", "pickup", "post"], str] + ] """ The delivery method for the payment """ @@ -1960,12 +1978,15 @@ class ReturnAddress(StripeObject): """ extra_charges: Optional[ List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", + Union[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ], + str, ] ] ] @@ -1989,7 +2010,9 @@ class ReturnAddress(StripeObject): """ Rental rate. """ - rate_interval: Optional[Literal["day", "month", "week"]] + rate_interval: Optional[ + Union[Literal["day", "month", "week"], str] + ] """ The frequency at which the rate amount is applied. One of `day`, `week` or `month` """ @@ -2039,7 +2062,7 @@ class Distance(StripeObject): """ Distance amount. """ - unit: Optional[Literal["kilometers", "miles"]] + unit: Optional[Union[Literal["kilometers", "miles"], str]] """ Unit for the distance. """ @@ -2126,13 +2149,16 @@ class Insurance(StripeObject): Name of the insurance company. """ insurance_type: Optional[ - Literal[ - "liability_supplement", - "loss_damage_waiver", - "other", - "partial_damage_waiver", - "personal_accident", - "personal_effects", + Union[ + Literal[ + "liability_supplement", + "loss_damage_waiver", + "other", + "partial_damage_waiver", + "personal_accident", + "personal_effects", + ], + str, ] ] """ @@ -2198,17 +2224,20 @@ class ExtraCharge(StripeObject): Amount of the extra charge. """ type: Optional[ - Literal[ - "extra_mileage", - "gas", - "gps", - "late_charge", - "one_way_drop_off", - "other", - "parking", - "phone", - "regular_mileage", - "towing", + Union[ + Literal[ + "extra_mileage", + "gas", + "gps", + "late_charge", + "one_way_drop_off", + "other", + "parking", + "phone", + "regular_mileage", + "towing", + ], + str, ] ] """ @@ -2257,7 +2286,7 @@ class Tax(StripeObject): """ Rate per unit. """ - rate_unit: Optional[Literal["kilometers", "miles"]] + rate_unit: Optional[Union[Literal["kilometers", "miles"], str]] """ Unit for the rate. """ @@ -2282,49 +2311,58 @@ class Vehicle(StripeObject): Odometer reading. """ type: Optional[ - Literal[ - "cargo_van", - "compact", - "economy", - "exotic", - "exotic_suv", - "fifteen_passenger_van", - "four_wheel_drive", - "full_size", - "intermediate", - "large_suv", - "large_truck", - "luxury", - "medium_suv", - "midsize", - "mini", - "minivan", - "miscellaneous", - "moped", - "moving_van", - "premium", - "regular", - "small_medium_truck", - "small_suv", - "special", - "standard", - "stretch", - "subcompact", - "taxi", - "twelve_foot_truck", - "twelve_passenger_van", - "twenty_foot_truck", - "twenty_four_foot_truck", - "twenty_six_foot_truck", - "unique", + Union[ + Literal[ + "cargo_van", + "compact", + "economy", + "exotic", + "exotic_suv", + "fifteen_passenger_van", + "four_wheel_drive", + "full_size", + "intermediate", + "large_suv", + "large_truck", + "luxury", + "medium_suv", + "midsize", + "mini", + "minivan", + "miscellaneous", + "moped", + "moving_van", + "premium", + "regular", + "small_medium_truck", + "small_suv", + "special", + "standard", + "stretch", + "subcompact", + "taxi", + "twelve_foot_truck", + "twelve_passenger_van", + "twenty_foot_truck", + "twenty_four_foot_truck", + "twenty_six_foot_truck", + "unique", + ], + str, ] ] """ Type of the vehicle. """ vehicle_class: Optional[ - Literal[ - "business", "economy", "first_class", "premium_economy" + Union[ + Literal[ + "business", + "economy", + "first_class", + "premium_economy", + ], + str, ] ] """ @@ -2432,7 +2470,9 @@ class Recipient(StripeObject): The phone number of the recipient the ticket is delivered to. """ - mode: Optional[Literal["email", "phone", "pickup", "post"]] + mode: Optional[ + Union[Literal["email", "phone", "pickup", "post"], str] + ] """ The delivery method for the payment """ @@ -2573,12 +2613,15 @@ class Insurance(StripeObject): Name of the insurance company. """ insurance_type: Optional[ - Literal[ - "baggage", - "bankruptcy", - "cancelation", - "emergency", - "medical", + Union[ + Literal[ + "baggage", + "bankruptcy", + "cancelation", + "emergency", + "medical", + ], + str, ] ] """ @@ -2671,8 +2714,14 @@ class Departure(StripeObject): Refundable ticket indicator. """ service_class: Optional[ - Literal[ - "business", "economy", "first_class", "premium_economy" + Union[ + Literal[ + "business", + "economy", + "first_class", + "premium_economy", + ], + str, ] ] """ @@ -2704,10 +2753,13 @@ class ExtraCharge(StripeObject): Amount of the extra charge. """ type: Optional[ - Literal[ - "additional_fees", - "ancillary_service_charges", - "exchange_fee", + Union[ + Literal[ + "additional_fees", + "ancillary_service_charges", + "exchange_fee", + ], + str, ] ] """ @@ -2740,12 +2792,15 @@ class Tax(StripeObject): Total amount. """ credit_reason: Optional[ - Literal[ - "other", - "partial_ticket_refund", - "passenger_transport_ancillary_cancellation", - "ticket_and_ancillary_cancellation", - "ticket_cancellation", + Union[ + Literal[ + "other", + "partial_ticket_refund", + "passenger_transport_ancillary_cancellation", + "ticket_and_ancillary_cancellation", + "ticket_cancellation", + ], + str, ] ] """ @@ -2798,11 +2853,14 @@ class Tax(StripeObject): """ total: Optional[Total] transaction_type: Optional[ - Literal[ - "exchange_ticket", - "miscellaneous", - "refund", - "ticket_purchase", + Union[ + Literal[ + "exchange_ticket", + "miscellaneous", + "refund", + "ticket_purchase", + ], + str, ] ] """ @@ -2819,15 +2877,18 @@ class Tax(StripeObject): class LodgingDatum(StripeObject): class Accommodation(StripeObject): accommodation_type: Optional[ - Literal[ - "apartment", - "cabana", - "house", - "penthouse", - "room", - "standard", - "suite", - "villa", + Union[ + Literal[ + "apartment", + "cabana", + "house", + "penthouse", + "room", + "standard", + "suite", + "villa", + ], + str, ] ] """ @@ -2911,7 +2972,10 @@ class Address(StripeObject): Reference number for the host. """ host_type: Optional[ - Literal["hostel", "hotel", "owner", "rental_agency"] + Union[ + Literal["hostel", "hotel", "owner", "rental_agency"], + str, + ] ] """ Type of host. @@ -2948,8 +3012,11 @@ class Insurance(StripeObject): Name of the insurance company. """ insurance_type: Optional[ - Literal[ - "bankruptcy", "cancelation", "emergency", "medical" + Union[ + Literal[ + "bankruptcy", "cancelation", "emergency", "medical" + ], + str, ] ] """ @@ -2973,13 +3040,16 @@ class ExtraCharge(StripeObject): Amount of the extra charge in cents. """ type: Optional[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "phone", - "restaurant", + Union[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "phone", + "restaurant", + ], + str, ] ] """ @@ -3230,7 +3300,7 @@ class DateOfBirth(StripeObject): beneficiary_account: Optional[str] beneficiary_details: Optional[BeneficiaryDetails] transaction_type: Optional[ - Literal["account_funding", "debt_repayment"] + Union[Literal["account_funding", "debt_repayment"], str] ] """ The type of money services transaction. @@ -3252,7 +3322,9 @@ class BillingInterval(StripeObject): """ The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. """ - interval: Optional[Literal["day", "month", "week", "year"]] + interval: Optional[ + Union[Literal["day", "month", "week", "year"], str] + ] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -3342,19 +3414,21 @@ class MandateOptions(StripeObject): Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. """ payment_schedule: Optional[ - Literal["combined", "interval", "sporadic"] + Union[Literal["combined", "interval", "sporadic"], str] ] """ Payment schedule for the mandate. """ - transaction_type: Optional[Literal["business", "personal"]] + transaction_type: Optional[ + Union[Literal["business", "personal"], str] + ] """ Transaction type of the mandate. """ mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3370,7 +3444,7 @@ class MandateOptions(StripeObject): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[Literal["automatic", "instant", "microdeposits"], str] ] """ Bank account verification method. The default value is `automatic`. @@ -3419,7 +3493,9 @@ class AfterpayClearpay(StripeObject): """ class Alipay(StripeObject): - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3441,7 +3517,9 @@ class AmazonPay(StripeObject): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3454,7 +3532,7 @@ class AmazonPay(StripeObject): class AuBecsDebit(StripeObject): setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3479,7 +3557,7 @@ class MandateOptions(StripeObject): mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3501,7 +3579,9 @@ class Bancontact(StripeObject): """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3539,7 +3619,7 @@ class Boleto(StripeObject): The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. """ setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3577,7 +3657,9 @@ class AvailablePlan(StripeObject): For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[ + Literal["bonus", "fixed_count", "revolving"], str + ] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ @@ -3592,7 +3674,9 @@ class Plan(StripeObject): For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[ + Literal["bonus", "fixed_count", "revolving"], str + ] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ @@ -3695,7 +3779,9 @@ class Address(StripeObject): If omitted, funds are captured before the authorization expires. """ capture_delay: Optional[CaptureDelay] - capture_method: Optional[Literal["automatic_delayed", "manual"]] + capture_method: Optional[ + Union[Literal["automatic_delayed", "manual"], str] + ] """ Controls when the funds will be captured from the customer's account. """ @@ -3730,43 +3816,49 @@ class Address(StripeObject): Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. """ request_decremental_authorization: Optional[ - Literal["if_available", "never"] + Union[Literal["if_available", "never"], str] ] """ Request ability to [decrement the authorization](https://docs.stripe.com/payments/decremental-authorization) for this PaymentIntent. """ request_extended_authorization: Optional[ - Literal["if_available", "never"] + Union[Literal["if_available", "never"], str] ] """ Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this PaymentIntent. """ request_incremental_authorization: Optional[ - Literal["if_available", "never"] + Union[Literal["if_available", "never"], str] ] """ Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this PaymentIntent. """ - request_multicapture: Optional[Literal["if_available", "never"]] + request_multicapture: Optional[ + Union[Literal["if_available", "never"], str] + ] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. """ - request_overcapture: Optional[Literal["if_available", "never"]] + request_overcapture: Optional[ + Union[Literal["if_available", "never"], str] + ] """ Request ability to [overcapture](https://docs.stripe.com/payments/overcapture) for this PaymentIntent. """ request_partial_authorization: Optional[ - Literal["if_available", "never"] + Union[Literal["if_available", "never"], str] ] """ Request partial authorization on this PaymentIntent. """ - request_reauthorization: Optional[Literal["if_available", "never"]] + request_reauthorization: Optional[ + Union[Literal["if_available", "never"], str] + ] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. """ request_three_d_secure: Optional[ - Literal["any", "automatic", "challenge"] + Union[Literal["any", "automatic", "challenge"], str] ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -3776,7 +3868,7 @@ class Address(StripeObject): When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3820,7 +3912,7 @@ class CaptureDelay(StripeObject): class Routing(StripeObject): requested_priority: Optional[ - Literal["domestic", "international"] + Union[Literal["domestic", "international"], str] ] """ Requested routing priority @@ -3849,11 +3941,15 @@ class Routing(StripeObject): """ Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support. """ - request_multicapture: Optional[Literal["if_available", "never"]] + request_multicapture: Optional[ + Union[Literal["if_available", "never"], str] + ] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. """ - request_reauthorization: Optional[Literal["if_available", "never"]] + request_reauthorization: Optional[ + Union[Literal["if_available", "never"], str] + ] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. """ @@ -3869,7 +3965,7 @@ class Cashapp(StripeObject): Controls when the funds will be captured from the customer's account. """ setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -3891,8 +3987,15 @@ class AmountReconciliation(StripeObject): class DepositOptions(StripeObject): networks: Optional[ List[ - Literal[ - "base", "ethereum", "polygon", "solana", "tempo" + Union[ + Literal[ + "base", + "ethereum", + "polygon", + "solana", + "tempo", + ], + str, ] ] ] @@ -3906,7 +4009,12 @@ class DepositOptions(StripeObject): class TransactionVerificationOptions(StripeObject): network: Optional[ - Literal["base", "ethereum", "polygon", "solana", "tempo"] + Union[ + Literal[ + "base", "ethereum", "polygon", "solana", "tempo" + ], + str, + ] ] """ The network on which the transaction was submitted. @@ -3919,7 +4027,10 @@ class TransactionVerificationOptions(StripeObject): amount_reconciliation: Optional[AmountReconciliation] deposit_options: Optional[DepositOptions] mode: Optional[ - Literal["default", "deposit", "transaction_verification"] + Union[ + Literal["default", "deposit", "transaction_verification"], + str, + ] ] """ The mode of the crypto payment. @@ -3954,14 +4065,17 @@ class EuBankTransfer(StripeObject): eu_bank_transfer: Optional[EuBankTransfer] requested_address_types: Optional[ List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", + Union[ + Literal[ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -3971,12 +4085,15 @@ class EuBankTransfer(StripeObject): Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ type: Optional[ - Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] ] """ @@ -4035,7 +4152,7 @@ class GiftCard(StripeObject): Set to `yes` to ignore transfer data on the PaymentIntent when redeeming this gift card. """ request_partial_authorization: Optional[ - Literal["if_available", "never"] + Union[Literal["if_available", "never"], str] ] """ Request partial authorization on this PaymentIntent. @@ -4054,7 +4171,9 @@ class Giropay(StripeObject): """ class Gopay(StripeObject): - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4098,7 +4217,9 @@ class IdBankTransfer(StripeObject): """ class Ideal(StripeObject): - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4117,7 +4238,9 @@ class KakaoPay(StripeObject): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4138,7 +4261,7 @@ class Klarna(StripeObject): Preferred locale of the Klarna checkout page that the customer is redirected to. """ setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4183,7 +4306,9 @@ class KrCard(StripeObject): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4203,7 +4328,9 @@ class Link(StripeObject): """ [Deprecated] This is a legacy parameter that no longer has any function. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4259,7 +4386,9 @@ class NaverPay(StripeObject): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4272,7 +4401,7 @@ class NaverPay(StripeObject): class NzBankAccount(StripeObject): setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4354,13 +4483,16 @@ class Tax(StripeObject): """ The tax for a single unit of the line item in minor units. Cannot be a negative number. """ - behavior: Literal["exclusive", "inclusive"] + behavior: Union[Literal["exclusive", "inclusive"], str] """ The tax behavior for the line item. """ category: Optional[ - Literal["digital_goods", "donation", "physical_goods"] + Union[ + Literal["digital_goods", "donation", "physical_goods"], + str, + ] ] """ Type of the line item. @@ -4412,7 +4544,9 @@ class Tax(StripeObject): """ A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4430,7 +4564,7 @@ class Tax(StripeObject): class Paypay(StripeObject): setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4448,7 +4582,7 @@ class MandateOptions(StripeObject): """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -4457,15 +4591,18 @@ class MandateOptions(StripeObject): Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: Optional[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", + Union[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ], + str, ] ] """ @@ -4476,18 +4613,21 @@ class MandateOptions(StripeObject): The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: Optional[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", + Union[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ], + str, ] ] """ @@ -4495,7 +4635,9 @@ class MandateOptions(StripeObject): """ mandate_options: Optional[MandateOptions] - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4513,11 +4655,13 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_includes_iof: Optional[Literal["always", "never"]] + amount_includes_iof: Optional[ + Union[Literal["always", "never"], str] + ] """ Determines if the amount includes the IOF tax. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ Type of amount. """ @@ -4530,12 +4674,15 @@ class MandateOptions(StripeObject): Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. """ payment_schedule: Optional[ - Literal[ - "halfyearly", - "monthly", - "quarterly", - "weekly", - "yearly", + Union[ + Literal[ + "halfyearly", + "monthly", + "quarterly", + "weekly", + "yearly", + ], + str, ] ] """ @@ -4550,7 +4697,9 @@ class MandateOptions(StripeObject): Start date of the mandate, in `YYYY-MM-DD`. """ - amount_includes_iof: Optional[Literal["always", "never"]] + amount_includes_iof: Optional[ + Union[Literal["always", "never"], str] + ] """ Determines if the amount includes the IOF tax. """ @@ -4563,7 +4712,9 @@ class MandateOptions(StripeObject): The timestamp at which the Pix expires. """ mandate_options: Optional[MandateOptions] - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4640,7 +4791,7 @@ class Satispay(StripeObject): Controls when the funds will be captured from the customer's account. """ setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4667,7 +4818,7 @@ class MandateOptions(StripeObject): mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4703,7 +4854,9 @@ class Sofort(StripeObject): """ Preferred language of the SOFORT authorization page that the customer is redirected to. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4722,7 +4875,9 @@ class MandateOptions(StripeObject): """ mandate_options: Optional[MandateOptions] - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4767,7 +4922,9 @@ class Swish(StripeObject): """ class Twint(StripeObject): - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4779,7 +4936,9 @@ class Twint(StripeObject): """ class Upi(StripeObject): - setup_future_usage: Optional[Literal["off_session", "on_session"]] + setup_future_usage: Optional[ + Union[Literal["off_session", "on_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4794,7 +4953,7 @@ class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): account_subcategories: Optional[ - List[Literal["checking", "savings"]] + List[Union[Literal["checking", "savings"], str]] ] """ The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. @@ -4805,7 +4964,7 @@ class Filters(StripeObject): """ class ManualEntry(StripeObject): - mode: Optional[Literal["automatic", "custom"]] + mode: Optional[Union[Literal["automatic", "custom"], str]] """ Settings for configuring manual entry of account details. """ @@ -4814,11 +4973,14 @@ class ManualEntry(StripeObject): manual_entry: Optional[ManualEntry] permissions: Optional[ List[ - Literal[ - "balances", - "ownership", - "payment_method", - "transactions", + Union[ + Literal[ + "balances", + "ownership", + "payment_method", + "transactions", + ], + str, ] ] ] @@ -4827,11 +4989,14 @@ class ManualEntry(StripeObject): """ prefetch: Optional[ List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -4856,7 +5021,7 @@ class MandateOptions(StripeObject): financial_connections: Optional[FinancialConnections] mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4872,13 +5037,15 @@ class MandateOptions(StripeObject): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ transaction_purpose: Optional[ - Literal["goods", "other", "services", "unspecified"] + Union[ + Literal["goods", "other", "services", "unspecified"], str + ] ] """ The purpose of the transaction. """ verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[Literal["automatic", "instant", "microdeposits"], str] ] """ Bank account verification method. The default value is `automatic`. @@ -4897,7 +5064,9 @@ class WechatPay(StripeObject): """ The unique buyer ID for the app ID registered with WeChat Pay. Only required when client is mini_program. """ - client: Optional[Literal["android", "ios", "mini_program", "web"]] + client: Optional[ + Union[Literal["android", "ios", "mini_program", "web"], str] + ] """ The client type that the end customer will pay from """ @@ -5096,7 +5265,7 @@ class CustomerNotification(StripeObject): _inner_class_types = {"card": Card} class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -5237,7 +5406,9 @@ class PaymentData(StripeObject): """ Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, `automatic`, or `expired`). """ - capture_method: Literal["automatic", "automatic_async", "manual"] + capture_method: Union[ + Literal["automatic", "automatic_async", "manual"], str + ] """ Controls when the funds will be captured from the customer's account. """ @@ -5249,7 +5420,7 @@ class PaymentData(StripeObject): Refer to our docs to [accept a payment](https://docs.stripe.com/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. """ - confirmation_method: Literal["automatic", "manual"] + confirmation_method: Union[Literal["automatic", "manual"], str] """ Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. """ @@ -5283,69 +5454,72 @@ class PaymentData(StripeObject): """ excluded_payment_method_types: Optional[ List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] ] ] @@ -5442,11 +5616,15 @@ class PaymentData(StripeObject): """ ID of the review associated with this PaymentIntent, if any. """ - secret_key_confirmation: Optional[Literal["optional", "required"]] + secret_key_confirmation: Optional[ + Union[Literal["optional", "required"], str] + ] """ Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. """ - setup_future_usage: Optional[Literal["off_session", "on_session"]] + setup_future_usage: Optional[ + Union[Literal["off_session", "on_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. diff --git a/stripe/_payment_intent_amount_details_line_item.py b/stripe/_payment_intent_amount_details_line_item.py index ca5ad950a..73fdd1fa1 100644 --- a/stripe/_payment_intent_amount_details_line_item.py +++ b/stripe/_payment_intent_amount_details_line_item.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -37,7 +37,9 @@ class Klarna(StripeObject): class Paypal(StripeObject): category: Optional[ - Literal["digital_goods", "donation", "physical_goods"] + Union[ + Literal["digital_goods", "donation", "physical_goods"], str + ] ] """ Type of the line item. diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 1aa49eba0..b0fb6d883 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -61,7 +61,7 @@ class Redirect(StripeObject): hosted_confirmation: Optional[HostedConfirmation] redirect: Optional[Redirect] - type: Literal["hosted_confirmation", "redirect"] + type: Union[Literal["hosted_confirmation", "redirect"], str] """ The specified behavior after the purchase is complete. """ @@ -98,7 +98,7 @@ class Liability(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -210,7 +210,7 @@ class Text(StripeObject): Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. """ text: Optional[Text] - type: Literal["dropdown", "numeric", "text"] + type: Union[Literal["dropdown", "numeric", "text"], str] """ The type of the field. """ @@ -286,7 +286,7 @@ class Issuer(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -398,7 +398,7 @@ class AdjustableQuantity(StripeObject): class PaymentIntentData(StripeObject): capture_method: Optional[ - Literal["automatic", "automatic_async", "manual"] + Union[Literal["automatic", "automatic_async", "manual"], str] ] """ Indicates when the funds will be captured from the customer's account. @@ -411,7 +411,9 @@ class PaymentIntentData(StripeObject): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will set metadata on [Payment Intents](https://docs.stripe.com/api/payment_intents) generated from this payment link. """ - setup_future_usage: Optional[Literal["off_session", "on_session"]] + setup_future_usage: Optional[ + Union[Literal["off_session", "on_session"], str] + ] """ Indicates that you intend to make future payments with the payment method collected during checkout. """ @@ -432,11 +434,14 @@ class PaymentMethodOptions(StripeObject): class Card(StripeObject): class Restrictions(StripeObject): brands_blocked: List[ - Literal[ - "american_express", - "discover_global_network", - "mastercard", - "visa", + Union[ + Literal[ + "american_express", + "discover_global_network", + "mastercard", + "visa", + ], + str, ] ] """ @@ -477,245 +482,248 @@ class CompletedSessions(StripeObject): class ShippingAddressCollection(StripeObject): allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", + Union[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", + ], + str, ] ] """ @@ -739,7 +747,7 @@ class Issuer(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -749,8 +757,8 @@ class Issuer(StripeObject): class TrialSettings(StripeObject): class EndBehavior(StripeObject): - missing_payment_method: Literal[ - "cancel", "create_invoice", "pause" + missing_payment_method: Union[ + Literal["cancel", "create_invoice", "pause"], str ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. @@ -789,7 +797,7 @@ class TaxIdCollection(StripeObject): """ Indicates whether tax ID collection is enabled for the session. """ - required: Literal["if_supported", "never"] + required: Union[Literal["if_supported", "never"], str] class TransferData(StripeObject): amount: Optional[int] @@ -824,7 +832,7 @@ class TransferData(StripeObject): """ automatic_surcharge: Optional[AutomaticSurcharge] automatic_tax: AutomaticTax - billing_address_collection: Literal["auto", "required"] + billing_address_collection: Union[Literal["auto", "required"], str] """ Configuration for collecting the customer's billing address. Defaults to `auto`. """ @@ -841,7 +849,7 @@ class TransferData(StripeObject): Collect additional information from your customer using custom fields. Up to 3 fields are supported. You can't set this parameter if `ui_mode` is `custom`. """ custom_text: CustomText - customer_creation: Literal["always", "if_required"] + customer_creation: Union[Literal["always", "if_required"], str] """ Configuration for Customer creation during checkout. """ @@ -890,7 +898,7 @@ class TransferData(StripeObject): """ Indicates the parameters to be passed to PaymentIntent creation during checkout. """ - payment_method_collection: Literal["always", "if_required"] + payment_method_collection: Union[Literal["always", "if_required"], str] """ Configuration for collecting a payment method during checkout. Defaults to `always`. """ @@ -900,54 +908,57 @@ class TransferData(StripeObject): """ payment_method_types: Optional[ List[ - Literal[ - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "ideal", - "klarna", - "konbini", - "link", - "mb_way", - "mobilepay", - "multibanco", - "oxxo", - "p24", - "pay_by_bank", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + Union[ + Literal[ + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "mb_way", + "mobilepay", + "multibanco", + "oxxo", + "p24", + "pay_by_bank", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] ] ] @@ -967,7 +978,9 @@ class TransferData(StripeObject): """ The shipping rate options applied to the session. """ - submit_type: Literal["auto", "book", "donate", "pay", "subscribe"] + submit_type: Union[ + Literal["auto", "book", "donate", "pay", "subscribe"], str + ] """ Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. """ diff --git a/stripe/_payment_location.py b/stripe/_payment_location.py index e5c116928..b49da585f 100644 --- a/stripe/_payment_location.py +++ b/stripe/_payment_location.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -76,13 +76,21 @@ class CapabilitySettings(StripeObject): class FrMealVouchersConecsPayments(StripeObject): class SupportedIssuers(StripeObject): card: Optional[ - List[Literal["bimpli", "edenred", "pluxee", "up"]] + List[ + Union[ + Literal["bimpli", "edenred", "pluxee", "up"], str + ] + ] ] """ Supported meal voucher issuers for card payments. """ card_present: Optional[ - List[Literal["bimpli", "edenred", "pluxee", "up"]] + List[ + Union[ + Literal["bimpli", "edenred", "pluxee", "up"], str + ] + ] ] """ Supported meal voucher issuers for card present payments. diff --git a/stripe/_payment_location_capability.py b/stripe/_payment_location_capability.py index d8df22027..e0b398d6a 100644 --- a/stripe/_payment_location_capability.py +++ b/stripe/_payment_location_capability.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -34,7 +34,9 @@ class PaymentLocationCapability( class Requirements(StripeObject): class Error(StripeObject): - code: Literal["information_missing", "invalid_value_other"] + code: Union[ + Literal["information_missing", "invalid_value_other"], str + ] """ The code for the type of error. """ @@ -52,13 +54,16 @@ class Error(StripeObject): Fields that need to be collected to keep the capability enabled. """ disabled_reason: Optional[ - Literal[ - "account.capability_required", - "pending.onboarding", - "pending.review", - "rejected.other", - "rejected.unsupported_business", - "requirements.fields_needed", + Union[ + Literal[ + "account.capability_required", + "pending.onboarding", + "pending.review", + "rejected.other", + "rejected.unsupported_business", + "requirements.fields_needed", + ], + str, ] ] """ @@ -99,7 +104,7 @@ class Error(StripeObject): Time when the capability was requested. Measured in seconds since the Unix epoch. """ requirements: Requirements - status: Literal["active", "inactive", "pending", "unrequested"] + status: Union[Literal["active", "inactive", "pending", "unrequested"], str] """ The status of the capability. """ diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index ef65bddf4..bb2a280c1 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -241,14 +241,19 @@ class Offline(StripeObject): """ class Reauthorization(StripeObject): - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether or not the reauthorization feature is supported. """ class Receipt(StripeObject): account_type: Optional[ - Literal["checking", "credit", "prepaid", "unknown"] + Union[ + Literal[ + "checking", "credit", "prepaid", "unknown" + ], + str, + ] ] """ The type of account being debited or credited @@ -287,8 +292,14 @@ class Receipt(StripeObject): """ class Wallet(StripeObject): - type: Literal[ - "apple_pay", "google_pay", "samsung_pay", "unknown" + type: Union[ + Literal[ + "apple_pay", + "google_pay", + "samsung_pay", + "unknown", + ], + str, ] """ The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. @@ -390,12 +401,15 @@ class Wallet(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -721,7 +735,9 @@ class ShippingAddress(StripeObject): """ Contains information about card networks that can be used to process the payment. """ - regulated_status: Optional[Literal["regulated", "unregulated"]] + regulated_status: Optional[ + Union[Literal["regulated", "unregulated"], str] + ] """ Status of a card based on the card issuer. """ @@ -764,7 +780,10 @@ class Offline(StripeObject): """ class Wallet(StripeObject): - type: Literal["apple_pay", "google_pay", "samsung_pay", "unknown"] + type: Union[ + Literal["apple_pay", "google_pay", "samsung_pay", "unknown"], + str, + ] """ The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. """ @@ -832,12 +851,15 @@ class Wallet(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -1004,7 +1026,9 @@ class Grabpay(StripeObject): pass class IdBankTransfer(StripeObject): - bank: Optional[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: Optional[ + Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] + ] bank_code: Optional[str] bank_name: Optional[str] display_name: Optional[str] @@ -1132,12 +1156,15 @@ class Networks(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -1174,29 +1201,32 @@ class Konbini(StripeObject): class KrCard(StripeObject): brand: Optional[ - Literal[ - "bc", - "citi", - "hana", - "hyundai", - "jeju", - "jeonbuk", - "kakaobank", - "kbank", - "kdbbank", - "kookmin", - "kwangju", - "lotte", - "mg", - "nh", - "post", - "samsung", - "savingsbank", - "shinhan", - "shinhyup", - "suhyup", - "tossbank", - "woori", + Union[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ], + str, ] ] """ @@ -1231,7 +1261,7 @@ class NaverPay(StripeObject): """ Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same. """ - funding: Literal["card", "points"] + funding: Union[Literal["card", "points"], str] """ Whether to fund this transaction with Naver Pay points or a card. """ @@ -1267,33 +1297,36 @@ class Oxxo(StripeObject): class P24(StripeObject): bank: Optional[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", + Union[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ], + str, ] ] """ @@ -1387,7 +1420,7 @@ class Dob(StripeObject): _inner_class_types = {"dob": Dob} class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -1492,33 +1525,39 @@ class Networks(StripeObject): class StatusDetails(StripeObject): class Blocked(StripeObject): network_code: Optional[ - Literal[ - "R02", - "R03", - "R04", - "R05", - "R07", - "R08", - "R10", - "R11", - "R16", - "R20", - "R29", - "R31", + Union[ + Literal[ + "R02", + "R03", + "R04", + "R05", + "R07", + "R08", + "R10", + "R11", + "R16", + "R20", + "R29", + "R31", + ], + str, ] ] """ The ACH network code that resulted in this block. """ reason: Optional[ - Literal[ - "bank_account_closed", - "bank_account_frozen", - "bank_account_invalid_details", - "bank_account_restricted", - "bank_account_unusable", - "debit_not_authorized", - "tokenized_account_number_deactivated", + Union[ + Literal[ + "bank_account_closed", + "bank_account_frozen", + "bank_account_invalid_details", + "bank_account_restricted", + "bank_account_unusable", + "debit_not_authorized", + "tokenized_account_number_deactivated", + ], + str, ] ] """ @@ -1528,7 +1567,9 @@ class Blocked(StripeObject): blocked: Optional[Blocked] _inner_class_types = {"blocked": Blocked} - account_holder_type: Optional[Literal["company", "individual"]] + account_holder_type: Optional[ + Union[Literal["company", "individual"], str] + ] """ Account holder type: individual or company. """ @@ -1536,7 +1577,7 @@ class Blocked(StripeObject): """ Account number of the bank account. """ - account_type: Optional[Literal["checking", "savings"]] + account_type: Optional[Union[Literal["checking", "savings"], str]] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -1583,7 +1624,9 @@ class Zip(StripeObject): affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] alipay: Optional[Alipay] - allow_redisplay: Optional[Literal["always", "limited", "unspecified"]] + allow_redisplay: Optional[ + Union[Literal["always", "limited", "unspecified"], str] + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. """ @@ -1687,73 +1730,76 @@ class Zip(StripeObject): swish: Optional[Swish] tamara: Optional[Tamara] twint: Optional[Twint] - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "card_present", - "cashapp", - "crypto", - "custom", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "interac_present", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "crypto", + "custom", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index 2f2585d08..a0ed8a425 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -6,7 +6,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -56,11 +56,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -78,11 +78,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -100,11 +100,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -122,11 +122,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -144,11 +144,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -166,11 +166,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -188,11 +188,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -210,11 +210,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -232,11 +232,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -254,11 +254,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -276,11 +276,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -298,11 +298,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -320,11 +320,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -342,11 +342,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -364,11 +364,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -386,11 +386,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -408,11 +408,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -430,11 +430,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -452,11 +452,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -474,11 +474,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -496,11 +496,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -518,11 +518,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -540,11 +540,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -562,11 +562,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -584,11 +584,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -606,11 +606,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -628,11 +628,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -650,11 +650,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -672,11 +672,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -694,11 +694,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -716,11 +716,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -738,11 +738,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -760,11 +760,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -782,11 +782,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -804,11 +804,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -826,11 +826,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -848,11 +848,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -870,11 +870,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -892,11 +892,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -914,11 +914,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -936,11 +936,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -958,11 +958,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -980,11 +980,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1002,11 +1002,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1024,11 +1024,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1046,11 +1046,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1068,11 +1068,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1090,11 +1090,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1112,11 +1112,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1134,11 +1134,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1156,11 +1156,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1178,11 +1178,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1200,11 +1200,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1222,11 +1222,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1244,11 +1244,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1266,11 +1266,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1288,11 +1288,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1310,11 +1310,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1332,11 +1332,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1354,11 +1354,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1376,11 +1376,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1398,11 +1398,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ @@ -1420,11 +1420,11 @@ class DisplayPreference(StripeObject): """ 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"] + preference: Union[Literal["none", "off", "on"], str] """ The account's display preference. """ - value: Literal["off", "on"] + value: Union[Literal["off", "on"], str] """ The effective display preference value. """ diff --git a/stripe/_payment_method_domain.py b/stripe/_payment_method_domain.py index 2921bcdb3..31d7467bd 100644 --- a/stripe/_payment_method_domain.py +++ b/stripe/_payment_method_domain.py @@ -6,7 +6,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -50,7 +50,7 @@ class StatusDetails(StripeObject): The error message associated with the status of the payment method on the domain. """ - status: Literal["active", "inactive"] + status: Union[Literal["active", "inactive"], str] """ The status of the payment method on the domain. """ @@ -67,7 +67,7 @@ class StatusDetails(StripeObject): The error message associated with the status of the payment method on the domain. """ - status: Literal["active", "inactive"] + status: Union[Literal["active", "inactive"], str] """ The status of the payment method on the domain. """ @@ -84,7 +84,7 @@ class StatusDetails(StripeObject): The error message associated with the status of the payment method on the domain. """ - status: Literal["active", "inactive"] + status: Union[Literal["active", "inactive"], str] """ The status of the payment method on the domain. """ @@ -101,7 +101,7 @@ class StatusDetails(StripeObject): The error message associated with the status of the payment method on the domain. """ - status: Literal["active", "inactive"] + status: Union[Literal["active", "inactive"], str] """ The status of the payment method on the domain. """ @@ -118,7 +118,7 @@ class StatusDetails(StripeObject): The error message associated with the status of the payment method on the domain. """ - status: Literal["active", "inactive"] + status: Union[Literal["active", "inactive"], str] """ The status of the payment method on the domain. """ @@ -135,7 +135,7 @@ class StatusDetails(StripeObject): The error message associated with the status of the payment method on the domain. """ - status: Literal["active", "inactive"] + status: Union[Literal["active", "inactive"], str] """ The status of the payment method on the domain. """ diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 4a4cfd9f1..24e5ceb48 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -12,6 +12,7 @@ Iterator, List, Optional, + Union, cast, overload, ) @@ -480,19 +481,28 @@ class Boleto(StripeObject): class Card(StripeObject): class Checks(StripeObject): address_line1_check: Optional[ - Literal["fail", "pass", "unavailable", "unchecked"] + Union[ + Literal["fail", "pass", "unavailable", "unchecked"], + str, + ] ] """ If you provide a value for `address.line1`, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`. """ address_postal_code_check: Optional[ - Literal["fail", "pass", "unavailable", "unchecked"] + Union[ + Literal["fail", "pass", "unavailable", "unchecked"], + str, + ] ] """ If you provide a address postal code, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`. """ cvc_check: Optional[ - Literal["fail", "pass", "unavailable", "unchecked"] + Union[ + Literal["fail", "pass", "unavailable", "unchecked"], + str, + ] ] """ If you provide a CVC, the check results is one of `pass`, `fail`, `unavailable`, or `unchecked`. @@ -508,7 +518,9 @@ class Plan(StripeObject): """ For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[ + Literal["bonus", "fixed_count", "revolving"], str + ] """ Type of installment plan, one of `fixed_count`, `revolving`, or `bonus`. """ @@ -527,7 +539,7 @@ class NetworkToken(StripeObject): class ThreeDSecure(StripeObject): authentication_flow: Optional[ - Literal["challenge", "frictionless"] + Union[Literal["challenge", "frictionless"], str] ] """ For authenticated transactions: Indicates how the issuing bank authenticated the customer. @@ -551,33 +563,41 @@ class ThreeDSecure(StripeObject): Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on the outcome of Stripe's internal risk assessment. """ result: Optional[ - Literal[ - "attempt_acknowledged", - "authenticated", - "exempted", - "failed", - "not_supported", - "processing_error", + Union[ + Literal[ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error", + ], + str, ] ] """ Indicates the outcome of 3D Secure authentication. """ result_reason: Optional[ - Literal[ - "abandoned", - "bypassed", - "canceled", - "card_not_enrolled", - "network_not_supported", - "protocol_error", - "rejected", + Union[ + Literal[ + "abandoned", + "bypassed", + "canceled", + "card_not_enrolled", + "network_not_supported", + "protocol_error", + "rejected", + ], + str, ] ] """ Additional information about why 3D Secure succeeded or failed, based on the `result`. """ - version: Optional[Literal["1.0.2", "2.1.0", "2.2.0"]] + version: Optional[ + Union[Literal["1.0.2", "2.1.0", "2.2.0"], str] + ] """ The version of 3D Secure that was used. """ @@ -612,19 +632,22 @@ class GooglePay(StripeObject): The authorization code of the payment. """ brand: Optional[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", + Union[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ], + str, ] ] """ @@ -660,7 +683,9 @@ class GooglePay(StripeObject): *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* """ - funding: Optional[Literal["credit", "debit", "prepaid", "unknown"]] + funding: Optional[ + Union[Literal["credit", "debit", "prepaid", "unknown"], str] + ] """ Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. """ @@ -685,19 +710,22 @@ class GooglePay(StripeObject): True if this payment was marked as MOTO and out of scope for SCA. """ network: Optional[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", + Union[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ], + str, ] ] """ @@ -753,14 +781,17 @@ class Offline(StripeObject): """ class Reauthorization(StripeObject): - status: Literal["available", "unavailable"] + status: Union[Literal["available", "unavailable"], str] """ Indicates whether or not the reauthorization feature is supported. """ class Receipt(StripeObject): account_type: Optional[ - Literal["checking", "credit", "prepaid", "unknown"] + Union[ + Literal["checking", "credit", "prepaid", "unknown"], + str, + ] ] """ The type of account being debited or credited @@ -799,8 +830,11 @@ class Receipt(StripeObject): """ class Wallet(StripeObject): - type: Literal[ - "apple_pay", "google_pay", "samsung_pay", "unknown" + type: Union[ + Literal[ + "apple_pay", "google_pay", "samsung_pay", "unknown" + ], + str, ] """ The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. @@ -902,12 +936,15 @@ class Wallet(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -966,16 +1003,27 @@ class Crypto(StripeObject): The wallet address of the customer. """ network: Optional[ - Literal[ - "base", "ethereum", "polygon", "solana", "sui", "tempo" + Union[ + Literal[ + "base", "ethereum", "polygon", "solana", "sui", "tempo" + ], + str, ] ] """ The blockchain network that the transaction was sent on. """ token_currency: Optional[ - Literal[ - "phantom_cash", "usdc", "usdg", "usdp", "usdsui", "usdt" + Union[ + Literal[ + "phantom_cash", + "usdc", + "usdg", + "usdp", + "usdsui", + "usdt", + ], + str, ] ] """ @@ -1095,7 +1143,9 @@ class Balance(StripeObject): """ The balance of the gift card after the transaction. """ - brand: Optional[Literal["fiserv_valuelink", "givex", "svs"]] + brand: Optional[ + Union[Literal["fiserv_valuelink", "givex", "svs"], str] + ] """ The brand of the gift card. """ @@ -1165,7 +1215,7 @@ class IdBankTransfer(StripeObject): """ Account number of the bank account to transfer funds to. """ - bank: Literal["bca", "bni", "bri", "cimb", "permata"] + bank: Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] """ Bank where the account is located. """ @@ -1262,7 +1312,7 @@ class Ideal(StripeObject): class InteracPresent(StripeObject): class Receipt(StripeObject): account_type: Optional[ - Literal["checking", "savings", "unknown"] + Union[Literal["checking", "savings", "unknown"], str] ] """ The type of account being debited or credited @@ -1371,12 +1421,15 @@ class Receipt(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -1441,7 +1494,12 @@ class Address(StripeObject): class Konbini(StripeObject): class Store(StripeObject): chain: Optional[ - Literal["familymart", "lawson", "ministop", "seicomart"] + Union[ + Literal[ + "familymart", "lawson", "ministop", "seicomart" + ], + str, + ] ] """ The name of the convenience store chain where the payment was completed. @@ -1455,29 +1513,32 @@ class Store(StripeObject): class KrCard(StripeObject): brand: Optional[ - Literal[ - "bc", - "citi", - "hana", - "hyundai", - "jeju", - "jeonbuk", - "kakaobank", - "kbank", - "kdbbank", - "kookmin", - "kwangju", - "lotte", - "mg", - "nh", - "post", - "samsung", - "savingsbank", - "shinhan", - "shinhyup", - "suhyup", - "tossbank", - "woori", + Union[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ], + str, ] ] """ @@ -1663,13 +1724,18 @@ class Paynow(StripeObject): class Paypal(StripeObject): class SellerProtection(StripeObject): dispute_categories: Optional[ - List[Literal["fraudulent", "product_not_received"]] + List[ + Union[ + Literal["fraudulent", "product_not_received"], str + ] + ] ] """ An array of conditions that are covered for the transaction, if applicable. """ - status: Literal[ - "eligible", "not_eligible", "partially_eligible" + status: Union[ + Literal["eligible", "not_eligible", "partially_eligible"], + str, ] """ Indicates whether the transaction is eligible for PayPal's seller protection. @@ -2030,11 +2096,13 @@ class Upi(StripeObject): """ class UsBankAccount(StripeObject): - account_holder_type: Optional[Literal["company", "individual"]] + account_holder_type: Optional[ + Union[Literal["company", "individual"], str] + ] """ The type of entity that holds the account. This can be either 'individual' or 'company'. """ - account_type: Optional[Literal["checking", "savings"]] + account_type: Optional[Union[Literal["checking", "savings"], str]] """ The type of the bank account. This can be either 'checking' or 'savings'. """ @@ -2302,7 +2370,7 @@ class Svs(StripeObject): """ Represents the SVS gift card processor. """ - type: Literal["custom", "fiserv_valuelink", "givex", "svs"] + type: Union[Literal["custom", "fiserv_valuelink", "givex", "svs"], str] """ The processor used for this payment attempt. """ @@ -2394,7 +2462,9 @@ class Address(StripeObject): """ Customer information for this payment. """ - customer_presence: Optional[Literal["off_session", "on_session"]] + customer_presence: Optional[ + Union[Literal["off_session", "on_session"], str] + ] """ Indicates whether the customer was present in your checkout flow during this payment. """ @@ -2430,7 +2500,7 @@ class Address(StripeObject): """ Processor information associated with this payment. """ - reported_by: Literal["self", "stripe"] + reported_by: Union[Literal["self", "stripe"], str] """ Indicates who reported the payment. """ diff --git a/stripe/_payout.py b/stripe/_payout.py index e29bffabb..1d40fbb53 100644 --- a/stripe/_payout.py +++ b/stripe/_payout.py @@ -133,8 +133,8 @@ class TraceId(StripeObject): """ ID of the v2 FinancialAccount the funds are sent to. """ - reconciliation_status: Literal[ - "completed", "in_progress", "not_applicable" + reconciliation_status: Union[ + Literal["completed", "in_progress", "not_applicable"], str ] """ If `completed`, you can use the [Balance Transactions API](https://docs.stripe.com/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. @@ -159,7 +159,7 @@ class TraceId(StripeObject): """ A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. """ - type: Literal["bank_account", "card"] + type: Union[Literal["bank_account", "card"], str] """ Can be `bank_account` or `card`. """ diff --git a/stripe/_person.py b/stripe/_person.py index 5ce399ff8..e5bd1a3c5 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -554,14 +554,17 @@ class UsCfpbData(StripeObject): class EthnicityDetails(StripeObject): ethnicity: Optional[ List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", + Union[ + Literal[ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican", + ], + str, ] ] ] @@ -576,31 +579,34 @@ class EthnicityDetails(StripeObject): class RaceDetails(StripeObject): race: Optional[ List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", + Union[ + Literal[ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white", + ], + str, ] ] ] @@ -784,7 +790,7 @@ class Document(StripeObject): """ The person's phone number. """ - political_exposure: Optional[Literal["existing", "none"]] + political_exposure: Optional[Union[Literal["existing", "none"], str]] """ Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. """ diff --git a/stripe/_plan.py b/stripe/_plan.py index bfd3a82de..f3f9b3b67 100644 --- a/stripe/_plan.py +++ b/stripe/_plan.py @@ -9,7 +9,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -71,7 +71,7 @@ class TransformUsage(StripeObject): """ Divide usage by this number. """ - round: Literal["down", "up"] + round: Union[Literal["down", "up"], str] """ After division, either round the result `up` or `down`. """ @@ -108,7 +108,7 @@ class TransformUsage(StripeObject): """ Unique identifier for the object. """ - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. """ @@ -156,7 +156,7 @@ class TransformUsage(StripeObject): """ Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://docs.stripe.com/api#create_subscription-trial_from_plan). """ - usage_type: Literal["licensed", "metered"] + usage_type: Union[Literal["licensed", "metered"], str] """ Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. """ diff --git a/stripe/_price.py b/stripe/_price.py index 71652ed78..1a5b8b3fe 100644 --- a/stripe/_price.py +++ b/stripe/_price.py @@ -10,7 +10,15 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import AsyncIterator, ClassVar, Iterator, List, Optional, cast +from typing import ( + AsyncIterator, + ClassVar, + Iterator, + List, + Optional, + Union, + cast, +) from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -137,7 +145,7 @@ class MigrateTo(StripeObject): """ class Recurring(StripeObject): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. """ @@ -153,7 +161,7 @@ class Recurring(StripeObject): """ Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://docs.stripe.com/api#create_subscription-trial_from_plan). """ - usage_type: Literal["licensed", "metered"] + usage_type: Union[Literal["licensed", "metered"], str] """ Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. """ @@ -189,7 +197,7 @@ class TransformQuantity(StripeObject): """ Divide usage by this number. """ - round: Literal["down", "up"] + round: Union[Literal["down", "up"], str] """ After division, either round the result `up` or `down`. """ diff --git a/stripe/_product.py b/stripe/_product.py index f4ccb684c..5405232f3 100644 --- a/stripe/_product.py +++ b/stripe/_product.py @@ -17,6 +17,7 @@ Iterator, List, Optional, + Union, cast, overload, ) @@ -100,7 +101,10 @@ class Identifiers(StripeObject): class ManagedPayments(StripeObject): class IneligibilityReason(StripeObject): code: Optional[ - Literal["ineligible_tax_code", "no_tax_code_specified"] + Union[ + Literal["ineligible_tax_code", "no_tax_code_specified"], + str, + ] ] """ A code identifying the reason this product can't be used with Managed Payments. Additional values might be added as Managed Payments evolves its eligibility criteria. @@ -110,7 +114,7 @@ class IneligibilityReason(StripeObject): A human-readable description of the reason this product can't be used with Managed Payments. """ - eligibility: Optional[Literal["eligible", "ineligible"]] + eligibility: Optional[Union[Literal["eligible", "ineligible"], str]] """ Whether this product is eligible for use with Managed Payments. Possible values are `eligible` and `ineligible`. """ diff --git a/stripe/_quote.py b/stripe/_quote.py index e5f03806b..32cb38c6c 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -8,7 +8,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import Any, ClassVar, List, Optional, cast, overload +from typing import Any, ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -82,7 +82,7 @@ class Liability(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -100,7 +100,9 @@ class Liability(StripeObject): The tax provider powering automatic tax. """ status: Optional[ - Literal["complete", "failed", "requires_location_inputs"] + Union[ + Literal["complete", "failed", "requires_location_inputs"], str + ] ] """ The status of the most recent automated tax calculation for this quote. @@ -118,7 +120,9 @@ class Failed(StripeObject): """ Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID". """ - reason: Literal["automation_failure", "internal_error"] + reason: Union[ + Literal["automation_failure", "internal_error"], str + ] """ The reason the reestimation failed. """ @@ -127,7 +131,7 @@ class Failed(StripeObject): """ When `status` is `failed`, provides details about the quote reestimation failure. """ - status: Literal["failed", "in_progress", "succeeded"] + status: Union[Literal["failed", "in_progress", "succeeded"], str] """ Latest status of the reestimation. """ @@ -161,22 +165,25 @@ class Tax(StripeObject): Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) """ taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] ] """ @@ -259,22 +266,25 @@ class Tax(StripeObject): Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) """ taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] ] """ @@ -370,7 +380,7 @@ class Issuer(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -397,12 +407,15 @@ class Issuer(StripeObject): class StatusDetails(StripeObject): class Canceled(StripeObject): reason: Optional[ - Literal[ - "canceled", - "quote_accepted", - "quote_expired", - "quote_superseded", - "subscription_canceled", + Union[ + Literal[ + "canceled", + "quote_accepted", + "quote_expired", + "quote_superseded", + "subscription_canceled", + ], + str, ] ] """ @@ -553,12 +566,15 @@ class LineStartsAt(StripeObject): """ A precise Unix timestamp. """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", + type: Union[ + Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ], + str, ] """ The type of method to specify the `bill_from` time. @@ -567,7 +583,9 @@ class LineStartsAt(StripeObject): class BillUntil(StripeObject): class Duration(StripeObject): - interval: Literal["day", "month", "week", "year"] + interval: Union[ + Literal["day", "month", "week", "year"], str + ] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -598,12 +616,15 @@ class LineEndsAt(StripeObject): """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -634,7 +655,7 @@ class Flexible(StripeObject): """ flexible: Optional[Flexible] - type: Literal["classic", "flexible"] + type: Union[Literal["classic", "flexible"], str] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -781,7 +802,7 @@ class Prebilling(StripeObject): """ When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. """ - end_behavior: Optional[Literal["cancel", "release"]] + end_behavior: Optional[Union[Literal["cancel", "release"], str]] """ Behavior of the subscription schedule and underlying subscription when it ends. """ @@ -794,7 +815,7 @@ class Prebilling(StripeObject): Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. """ phase_effective_at: Optional[ - Literal["billing_period_start", "phase_start"] + Union[Literal["billing_period_start", "phase_start"], str] ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. @@ -830,7 +851,7 @@ class AppliesTo(StripeObject): """ The ID of the schedule the line applies to. """ - type: Literal["new_reference", "subscription_schedule"] + type: Union[Literal["new_reference", "subscription_schedule"], str] """ Describes whether the quote line is affecting a new schedule or an existing schedule. """ @@ -855,12 +876,15 @@ class LineStartsAt(StripeObject): """ A precise Unix timestamp. """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", + type: Union[ + Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ], + str, ] """ The type of method to specify the `bill_from` time. @@ -869,7 +893,9 @@ class LineStartsAt(StripeObject): class BillUntil(StripeObject): class Duration(StripeObject): - interval: Literal["day", "month", "week", "year"] + interval: Union[ + Literal["day", "month", "week", "year"], str + ] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -900,12 +926,15 @@ class LineEndsAt(StripeObject): """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1059,12 +1088,12 @@ class LineEndsAt(StripeObject): """ The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. """ - end_behavior: Optional[Literal["cancel", "release"]] + end_behavior: Optional[Union[Literal["cancel", "release"], str]] """ Behavior of the subscription schedule and underlying subscription when it ends. """ phase_effective_at: Optional[ - Literal["billing_period_start", "phase_start"] + Union[Literal["billing_period_start", "phase_start"], str] ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. @@ -1091,7 +1120,7 @@ class AppliesTo(StripeObject): """ The ID of the schedule the line applies to. """ - type: Literal["new_reference", "subscription_schedule"] + type: Union[Literal["new_reference", "subscription_schedule"], str] """ Describes whether the quote line is affecting a new schedule or an existing schedule. """ @@ -1130,22 +1159,25 @@ class Tax(StripeObject): Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) """ taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] ] """ @@ -1306,8 +1338,9 @@ class TransferData(StripeObject): """ The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. """ - status: Literal[ - "accepted", "accepting", "canceled", "draft", "open", "stale" + status: Union[ + Literal["accepted", "accepting", "canceled", "draft", "open", "stale"], + str, ] """ The status of the quote. diff --git a/stripe/_quote_line.py b/stripe/_quote_line.py index 794c417f0..086b77696 100644 --- a/stripe/_quote_line.py +++ b/stripe/_quote_line.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -53,15 +53,20 @@ class Custom(StripeObject): """ custom: Optional[Custom] - type: Literal["custom", "inherit"] + type: Union[Literal["custom", "inherit"], str] """ The type of service period anchor config. """ _inner_class_types = {"custom": Custom} service_period_anchor_config: ServicePeriodAnchorConfig - start_date: Literal[ - "current_period_end", "current_period_start", "line_start" + start_date: Union[ + Literal[ + "current_period_end", + "current_period_start", + "line_start", + ], + str, ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. @@ -133,17 +138,20 @@ class Custom(StripeObject): """ custom: Optional[Custom] - type: Literal["custom", "inherit"] + type: Union[Literal["custom", "inherit"], str] """ The type of service period anchor config. """ _inner_class_types = {"custom": Custom} service_period_anchor_config: ServicePeriodAnchorConfig - start_date: Literal[ - "current_period_end", - "current_period_start", - "line_start", + start_date: Union[ + Literal[ + "current_period_end", + "current_period_start", + "line_start", + ], + str, ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. @@ -179,7 +187,7 @@ class Trial(StripeObject): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -285,15 +293,20 @@ class Custom(StripeObject): """ custom: Optional[Custom] - type: Literal["custom", "inherit"] + type: Union[Literal["custom", "inherit"], str] """ The type of service period anchor config. """ _inner_class_types = {"custom": Custom} service_period_anchor_config: ServicePeriodAnchorConfig - start_date: Literal[ - "current_period_end", "current_period_start", "line_start" + start_date: Union[ + Literal[ + "current_period_end", + "current_period_start", + "line_start", + ], + str, ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. @@ -361,17 +374,20 @@ class Custom(StripeObject): """ custom: Optional[Custom] - type: Literal["custom", "inherit"] + type: Union[Literal["custom", "inherit"], str] """ The type of service period anchor config. """ _inner_class_types = {"custom": Custom} service_period_anchor_config: ServicePeriodAnchorConfig - start_date: Literal[ - "current_period_end", - "current_period_start", - "line_start", + start_date: Union[ + Literal[ + "current_period_end", + "current_period_start", + "line_start", + ], + str, ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. @@ -407,7 +423,7 @@ class Trial(StripeObject): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -478,18 +494,21 @@ class Trial(StripeObject): """ Details for the `set_metadata` type: specify an array of key-value pairs. """ - type: Literal[ - "add_discount", - "add_item", - "add_metadata", - "clear_discounts", - "clear_metadata", - "remove_discount", - "remove_item", - "remove_metadata", - "set_discounts", - "set_items", - "set_metadata", + type: Union[ + Literal[ + "add_discount", + "add_item", + "add_metadata", + "clear_discounts", + "clear_metadata", + "remove_discount", + "remove_item", + "remove_metadata", + "set_discounts", + "set_items", + "set_metadata", + ], + str, ] """ The type of action the quote line performs. @@ -512,7 +531,7 @@ class AppliesTo(StripeObject): """ The ID of the schedule the line applies to. """ - type: Literal["new_reference", "subscription_schedule"] + type: Union[Literal["new_reference", "subscription_schedule"], str] """ Describes whether the quote line is affecting a new schedule or an existing schedule. """ @@ -539,7 +558,7 @@ class DiscountEnd(StripeObject): """ class Duration(StripeObject): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -564,14 +583,17 @@ class Duration(StripeObject): """ A precise Unix timestamp. """ - type: Literal[ - "billing_period_end", - "discount_end", - "duration", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "billing_period_end", + "discount_end", + "duration", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ Select a way to pass in `ends_at`. @@ -583,7 +605,9 @@ class Duration(StripeObject): class SetPauseCollection(StripeObject): class Set(StripeObject): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -592,7 +616,7 @@ class Set(StripeObject): """ If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment). """ - type: Literal["remove", "set"] + type: Union[Literal["remove", "set"], str] """ Defines the type of the pause_collection behavior for the quote line. """ @@ -627,14 +651,17 @@ class LineEndsAt(StripeObject): """ A precise Unix timestamp. """ - type: Literal[ - "discount_end", - "line_ends_at", - "now", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "discount_end", + "line_ends_at", + "now", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ Select a way to pass in `starts_at`. @@ -646,7 +673,7 @@ class LineEndsAt(StripeObject): class TrialSettings(StripeObject): class EndBehavior(StripeObject): - prorate_up_front: Optional[Literal["defer", "include"]] + prorate_up_front: Optional[Union[Literal["defer", "include"], str]] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -665,7 +692,9 @@ class EndBehavior(StripeObject): """ Details to identify the subscription schedule the quote line applies to. """ - billing_cycle_anchor: Optional[Literal["automatic", "line_starts_at"]] + billing_cycle_anchor: Optional[ + Union[Literal["automatic", "line_starts_at"], str] + ] """ For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. """ @@ -673,7 +702,9 @@ class EndBehavior(StripeObject): """ A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. """ - effective_at: Optional[Literal["billing_period_start", "line_start"]] + effective_at: Optional[ + Union[Literal["billing_period_start", "line_start"], str] + ] """ Configures how the subscription schedule handles billing for phase transitions. """ @@ -690,7 +721,7 @@ class EndBehavior(StripeObject): String representing the object's type. Objects of the same type share the same value. """ proration_behavior: Optional[ - Literal["always_invoice", "create_prorations", "none"] + Union[Literal["always_invoice", "create_prorations", "none"], str] ] """ Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. @@ -699,7 +730,9 @@ class EndBehavior(StripeObject): """ Details to modify the pause_collection behavior of the subscription schedule. """ - set_schedule_end: Optional[Literal["line_ends_at", "line_starts_at"]] + set_schedule_end: Optional[ + Union[Literal["line_ends_at", "line_starts_at"], str] + ] """ Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. """ diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index 07e1cd7c1..fc9cec806 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -114,7 +114,7 @@ class AppliesTo(StripeObject): """ The ID of the schedule the line applies to. """ - type: Literal["new_reference", "subscription_schedule"] + type: Union[Literal["new_reference", "subscription_schedule"], str] """ Describes whether the quote line is affecting a new schedule or an existing schedule. """ @@ -125,15 +125,18 @@ class Liability(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ disabled_reason: Optional[ - Literal[ - "finalization_requires_location_inputs", - "finalization_system_error", + Union[ + Literal[ + "finalization_requires_location_inputs", + "finalization_system_error", + ], + str, ] ] """ @@ -152,7 +155,9 @@ class Liability(StripeObject): The tax provider powering automatic tax. """ status: Optional[ - Literal["complete", "failed", "requires_location_inputs"] + Union[ + Literal["complete", "failed", "requires_location_inputs"], str + ] ] """ The status of the most recent automated tax calculation for this invoice. @@ -395,7 +400,7 @@ class Issuer(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -783,11 +788,14 @@ class PauseCollection(StripeObject): """ Details about the subscription that generated this invoice """ - type: Literal[ - "billing_cadence_details", - "quote_details", - "schedule_details", - "subscription_details", + type: Union[ + Literal[ + "billing_cadence_details", + "quote_details", + "schedule_details", + "subscription_details", + ], + str, ] """ The type of parent that generated this invoice @@ -803,14 +811,18 @@ class PaymentSettings(StripeObject): class PaymentMethodOptions(StripeObject): class AcssDebit(StripeObject): class MandateOptions(StripeObject): - transaction_type: Optional[Literal["business", "personal"]] + transaction_type: Optional[ + Union[Literal["business", "personal"], str] + ] """ Transaction type of the mandate. """ mandate_options: Optional[MandateOptions] verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[ + Literal["automatic", "instant", "microdeposits"], str + ] ] """ Bank account verification method. The default value is `automatic`. @@ -818,7 +830,7 @@ class MandateOptions(StripeObject): _inner_class_types = {"mandate_options": MandateOptions} class Bancontact(StripeObject): - preferred_language: Literal["de", "en", "fr", "nl"] + preferred_language: Union[Literal["de", "en", "fr", "nl"], str] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -838,7 +850,7 @@ class Installments(StripeObject): installments: Optional[Installments] request_three_d_secure: Optional[ - Literal["any", "automatic", "challenge"] + Union[Literal["any", "automatic", "challenge"], str] ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -882,23 +894,28 @@ class MandateOptions(StripeObject): """ The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[ + Union[Literal["fixed", "maximum"], str] + ] """ Only `maximum` is supported. """ purpose: Optional[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", + Union[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ], + str, ] ] """ @@ -909,7 +926,9 @@ class MandateOptions(StripeObject): _inner_class_types = {"mandate_options": MandateOptions} class Pix(StripeObject): - amount_includes_iof: Optional[Literal["always", "never"]] + amount_includes_iof: Optional[ + Union[Literal["always", "never"], str] + ] """ Determines if the amount includes the IOF tax. """ @@ -927,7 +946,9 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[ + Union[Literal["fixed", "maximum"], str] + ] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -947,7 +968,7 @@ class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): account_subcategories: Optional[ - List[Literal["checking", "savings"]] + List[Union[Literal["checking", "savings"], str]] ] """ The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. @@ -960,11 +981,14 @@ class Filters(StripeObject): filters: Optional[Filters] permissions: Optional[ List[ - Literal[ - "balances", - "ownership", - "payment_method", - "transactions", + Union[ + Literal[ + "balances", + "ownership", + "payment_method", + "transactions", + ], + str, ] ] ] @@ -973,11 +997,14 @@ class Filters(StripeObject): """ prefetch: Optional[ List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -988,7 +1015,9 @@ class Filters(StripeObject): financial_connections: Optional[FinancialConnections] verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[ + Literal["automatic", "instant", "microdeposits"], str + ] ] """ Bank account verification method. The default value is `automatic`. @@ -1097,61 +1126,64 @@ class WechatPay(StripeObject): """ payment_method_types: Optional[ List[ - Literal[ - "ach_credit_transfer", - "ach_debit", - "acss_debit", - "affirm", - "alipay", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "check_scan", - "crypto", - "custom", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "id_bank_transfer", - "ideal", - "jp_credit_transfer", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "momo", - "multibanco", - "naver_pay", - "nz_bank_account", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "payto", - "pix", - "promptpay", - "revolut_pay", - "satispay", - "sepa_credit_transfer", - "sepa_debit", - "sequra", - "sofort", - "stripe_balance", - "swish", - "twint", - "upi", - "us_bank_account", - "wechat_pay", + Union[ + Literal[ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "alipay", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "check_scan", + "crypto", + "custom", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "id_bank_transfer", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "momo", + "multibanco", + "naver_pay", + "nz_bank_account", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "satispay", + "sepa_credit_transfer", + "sepa_debit", + "sequra", + "sofort", + "stripe_balance", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + ], + str, ] ] ] @@ -1198,22 +1230,25 @@ class Tax(StripeObject): Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) """ taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] ] """ @@ -1370,7 +1405,9 @@ class TotalPretaxCreditAmount(StripeObject): """ The margin that was applied to get this pretax credit amount. """ - type: Literal["credit_balance_transaction", "discount", "margin"] + type: Union[ + Literal["credit_balance_transaction", "discount", "margin"], str + ] """ Type of the pretax credit amount referenced. """ @@ -1394,23 +1431,26 @@ class TaxRateDetails(StripeObject): """ Additional details about the tax rate. Only present when `type` is `tax_rate_details`. """ - taxability_reason: Literal[ - "customer_exempt", - "not_available", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + taxability_reason: Union[ + Literal[ + "customer_exempt", + "not_available", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] """ The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. @@ -1507,7 +1547,9 @@ class TaxRateDetails(StripeObject): * `subscription_update`: A subscription was updated. * `upcoming`: Reserved for upcoming invoices created through the Create Preview Invoice API or when an `invoice.upcoming` event is generated for an upcoming invoice on a subscription. """ - collection_method: Literal["charge_automatically", "send_invoice"] + collection_method: Union[ + Literal["charge_automatically", "send_invoice"], str + ] """ Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. """ @@ -1697,7 +1739,9 @@ class TaxRateDetails(StripeObject): """ Extra information about an invoice for the customer's credit card statement. """ - status: Optional[Literal["draft", "open", "paid", "uncollectible", "void"]] + status: Optional[ + Union[Literal["draft", "open", "paid", "uncollectible", "void"], str] + ] """ The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://docs.stripe.com/billing/invoices/workflow#workflow-overview) """ diff --git a/stripe/_quote_preview_subscription_schedule.py b/stripe/_quote_preview_subscription_schedule.py index b981f023a..152dc6c74 100644 --- a/stripe/_quote_preview_subscription_schedule.py +++ b/stripe/_quote_preview_subscription_schedule.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -36,7 +36,7 @@ class AppliesTo(StripeObject): """ The ID of the schedule the line applies to. """ - type: Literal["new_reference", "subscription_schedule"] + type: Union[Literal["new_reference", "subscription_schedule"], str] """ Describes whether the quote line is affecting a new schedule or an existing schedule. """ @@ -52,7 +52,7 @@ class Flexible(StripeObject): """ Configure behavior for flexible billing mode """ - type: Literal["classic", "flexible"] + type: Union[Literal["classic", "flexible"], str] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -96,7 +96,7 @@ class Duration(StripeObject): """ If specified, the billing schedule will apply until the specified timestamp. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -133,7 +133,7 @@ class Liability(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -178,7 +178,7 @@ class Issuer(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -233,7 +233,7 @@ class TransferData(StripeObject): Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period """ collection_method: Optional[ - Literal["charge_automatically", "send_invoice"] + Union[Literal["charge_automatically", "send_invoice"], str] ] """ Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. @@ -319,7 +319,9 @@ class UnusedTimeFrom(StripeObject): } bill_for: BillFor - invoicing_behavior: Literal["invoice", "pending_invoice_item"] + invoicing_behavior: Union[ + Literal["invoice", "pending_invoice_item"], str + ] """ Determines how to handle debits and credits when pausing. """ @@ -351,8 +353,8 @@ class Settings(StripeObject): """ Controls whether Stripe attempts payment on the resumption invoice and how that affects the subscription's status. """ - proration_behavior: Literal[ - "always_invoice", "create_prorations", "none" + proration_behavior: Union[ + Literal["always_invoice", "create_prorations", "none"], str ] """ Determines how to handle prorations resulting from the billing_cycle_anchor change on resume. @@ -413,8 +415,11 @@ class End(StripeObject): """ A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. """ - type: Literal[ - "min_item_period_end", "phase_end", "timestamp" + type: Union[ + Literal[ + "min_item_period_end", "phase_end", "timestamp" + ], + str, ] """ Select how to calculate the end of the invoice item period. @@ -425,8 +430,11 @@ class Start(StripeObject): """ A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. """ - type: Literal[ - "max_item_period_start", "phase_start", "timestamp" + type: Union[ + Literal[ + "max_item_period_start", "phase_start", "timestamp" + ], + str, ] """ Select how to calculate the start of the invoice item period. @@ -469,7 +477,7 @@ class Liability(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -534,15 +542,20 @@ class Custom(StripeObject): """ custom: Optional[Custom] - type: Literal["custom", "inherit"] + type: Union[Literal["custom", "inherit"], str] """ The type of service period anchor config. """ _inner_class_types = {"custom": Custom} service_period_anchor_config: ServicePeriodAnchorConfig - start_date: Literal[ - "current_period_end", "current_period_start", "phase_start" + start_date: Union[ + Literal[ + "current_period_end", + "current_period_start", + "phase_start", + ], + str, ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. @@ -589,7 +602,7 @@ class Issuer(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -666,17 +679,20 @@ class Custom(StripeObject): """ custom: Optional[Custom] - type: Literal["custom", "inherit"] + type: Union[Literal["custom", "inherit"], str] """ The type of service period anchor config. """ _inner_class_types = {"custom": Custom} service_period_anchor_config: ServicePeriodAnchorConfig - start_date: Literal[ - "current_period_end", - "current_period_start", - "phase_start", + start_date: Union[ + Literal[ + "current_period_end", + "current_period_start", + "phase_start", + ], + str, ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. @@ -712,7 +728,7 @@ class Trial(StripeObject): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -760,7 +776,9 @@ class Trial(StripeObject): } class PauseCollection(StripeObject): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -777,7 +795,9 @@ class TransferData(StripeObject): class TrialSettings(StripeObject): class EndBehavior(StripeObject): - prorate_up_front: Optional[Literal["defer", "include"]] + prorate_up_front: Optional[ + Union[Literal["defer", "include"], str] + ] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -877,7 +897,7 @@ class EndBehavior(StripeObject): """ If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. """ - trial_continuation: Optional[Literal["continue", "none"]] + trial_continuation: Optional[Union[Literal["continue", "none"], str]] """ Specify behavior of the trial when crossing schedule phase boundaries """ @@ -914,7 +934,7 @@ class Prebilling(StripeObject): """ The start of the first period for which the invoice pre-bills. """ - update_behavior: Optional[Literal["prebill", "reset"]] + update_behavior: Optional[Union[Literal["prebill", "reset"], str]] """ Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. """ @@ -963,7 +983,7 @@ class Prebilling(StripeObject): ID of the account who owns the subscription schedule. """ default_settings: DefaultSettings - end_behavior: Literal["cancel", "none", "release", "renew"] + end_behavior: Union[Literal["cancel", "none", "release", "renew"], str] """ Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. """ diff --git a/stripe/_refund.py b/stripe/_refund.py index fb6bd00b1..4b6908161 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -8,7 +8,7 @@ from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -95,7 +95,7 @@ class Card(StripeObject): """ Type of the reference number assigned to the refund. """ - type: Literal["pending", "refund", "reversal"] + type: Union[Literal["pending", "refund", "reversal"], str] """ The type of refund. This can be `refund`, `reversal`, or `pending`. """ @@ -445,18 +445,23 @@ class PresentmentDetails(StripeObject): ID of the PaymentIntent that's refunded. """ pending_reason: Optional[ - Literal["charge_pending", "insufficient_funds", "processing"] + Union[ + Literal["charge_pending", "insufficient_funds", "processing"], str + ] ] """ Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`. """ presentment_details: Optional[PresentmentDetails] reason: Optional[ - Literal[ - "duplicate", - "expired_uncaptured_charge", - "fraudulent", - "requested_by_customer", + Union[ + Literal[ + "duplicate", + "expired_uncaptured_charge", + "fraudulent", + "requested_by_customer", + ], + str, ] ] """ diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index dbc0e6cf4..2ecdc03da 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -101,41 +101,47 @@ class Checks(StripeObject): class ThreeDSecure(StripeObject): authentication_flow: Optional[ - Literal["challenge", "frictionless"] + Union[Literal["challenge", "frictionless"], str] ] """ For authenticated transactions: how the customer was authenticated by the issuing bank. """ electronic_commerce_indicator: Optional[ - Literal["01", "02", "05", "06", "07"] + Union[Literal["01", "02", "05", "06", "07"], str] ] """ The Electronic Commerce Indicator (ECI). A protocol-level field indicating what degree of authentication was performed. """ result: Optional[ - Literal[ - "attempt_acknowledged", - "authenticated", - "exempted", - "failed", - "not_supported", - "processing_error", + Union[ + Literal[ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "not_supported", + "processing_error", + ], + str, ] ] """ Indicates the outcome of 3D Secure authentication. """ result_reason: Optional[ - Literal[ - "abandoned", - "bypassed", - "canceled", - "card_not_enrolled", - "network_not_supported", - "protocol_error", - "rejected", + Union[ + Literal[ + "abandoned", + "bypassed", + "canceled", + "card_not_enrolled", + "network_not_supported", + "protocol_error", + "rejected", + ], + str, ] ] """ @@ -148,7 +154,10 @@ class ThreeDSecure(StripeObject): (dsTransId) for this payment. """ version: Optional[ - Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"] + Union[ + Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"], + str, + ] ] """ The version of 3D Secure that was used. @@ -265,7 +274,9 @@ class Cashapp(StripeObject): pass class IdBankTransfer(StripeObject): - bank: Optional[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: Optional[ + Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] + ] """ Bank where the account is located. """ diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 9f1851647..a374a1d15 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -75,7 +75,7 @@ class SetupIntent( OBJECT_NAME: ClassVar[Literal["setup_intent"]] = "setup_intent" class AutomaticPaymentMethods(StripeObject): - allow_redirects: Optional[Literal["always", "never"]] + allow_redirects: Optional[Union[Literal["always", "never"], str]] """ Controls whether this SetupIntent will accept redirect-based payment methods. @@ -497,7 +497,9 @@ class VerifyWithMicrodeposits(StripeObject): """ The URL for the hosted verification page, which allows customers to verify their bank account. """ - microdeposit_type: Optional[Literal["amounts", "descriptor_code"]] + microdeposit_type: Optional[ + Union[Literal["amounts", "descriptor_code"], str] + ] """ The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. """ @@ -554,7 +556,9 @@ class MandateOptions(StripeObject): """ A URL for custom mandate text """ - default_for: Optional[List[Literal["invoice", "subscription"]]] + default_for: Optional[ + List[Union[Literal["invoice", "subscription"], str]] + ] """ List of Stripe products where this mandate can be selected automatically. """ @@ -563,23 +567,25 @@ class MandateOptions(StripeObject): Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. """ payment_schedule: Optional[ - Literal["combined", "interval", "sporadic"] + Union[Literal["combined", "interval", "sporadic"], str] ] """ Payment schedule for the mandate. """ - transaction_type: Optional[Literal["business", "personal"]] + transaction_type: Optional[ + Union[Literal["business", "personal"], str] + ] """ Transaction type of the mandate. """ - currency: Optional[Literal["cad", "usd"]] + currency: Optional[Union[Literal["cad", "usd"], str]] """ Currency supported by the bank account """ mandate_options: Optional[MandateOptions] verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[Literal["automatic", "instant", "microdeposits"], str] ] """ Bank account verification method. The default value is `automatic`. @@ -670,7 +676,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"] + Union[Literal["any", "automatic", "challenge"], str] ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -716,7 +722,7 @@ class MandateOptions(StripeObject): """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -725,15 +731,18 @@ class MandateOptions(StripeObject): Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: Optional[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", + Union[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ], + str, ] ] """ @@ -744,18 +753,21 @@ class MandateOptions(StripeObject): The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: Optional[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", + Union[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ], + str, ] ] """ @@ -775,11 +787,13 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_includes_iof: Optional[Literal["always", "never"]] + amount_includes_iof: Optional[ + Union[Literal["always", "never"], str] + ] """ Determines if the amount includes the IOF tax. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ Type of amount. """ @@ -792,12 +806,15 @@ class MandateOptions(StripeObject): Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. """ payment_schedule: Optional[ - Literal[ - "halfyearly", - "monthly", - "quarterly", - "weekly", - "yearly", + Union[ + Literal[ + "halfyearly", + "monthly", + "quarterly", + "weekly", + "yearly", + ], + str, ] ] """ @@ -841,7 +858,7 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -861,7 +878,7 @@ class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): account_subcategories: Optional[ - List[Literal["checking", "savings"]] + List[Union[Literal["checking", "savings"], str]] ] """ The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. @@ -872,7 +889,7 @@ class Filters(StripeObject): """ class ManualEntry(StripeObject): - mode: Optional[Literal["automatic", "custom"]] + mode: Optional[Union[Literal["automatic", "custom"], str]] """ Settings for configuring manual entry of account details. """ @@ -881,11 +898,14 @@ class ManualEntry(StripeObject): manual_entry: Optional[ManualEntry] permissions: Optional[ List[ - Literal[ - "balances", - "ownership", - "payment_method", - "transactions", + Union[ + Literal[ + "balances", + "ownership", + "payment_method", + "transactions", + ], + str, ] ] ] @@ -894,11 +914,14 @@ class ManualEntry(StripeObject): """ prefetch: Optional[ List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -923,7 +946,7 @@ class MandateOptions(StripeObject): financial_connections: Optional[FinancialConnections] mandate_options: Optional[MandateOptions] verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[Literal["automatic", "instant", "microdeposits"], str] ] """ Bank account verification method. The default value is `automatic`. @@ -967,7 +990,7 @@ class MandateOptions(StripeObject): } class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -976,7 +999,9 @@ class SetupDetails(StripeObject): class Benefit(StripeObject): class FrMealVoucher(StripeObject): enabled: Optional[ - Literal["if_payment_method_is_eligible", "never"] + Union[ + Literal["if_payment_method_is_eligible", "never"], str + ] ] """ Whether meal voucher benefit is enabled for this setup intent. @@ -1044,69 +1069,72 @@ class FrMealVoucher(StripeObject): """ excluded_payment_method_types: Optional[ List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] ] ] diff --git a/stripe/_shipping_rate.py b/stripe/_shipping_rate.py index cceb53598..3b6823592 100644 --- a/stripe/_shipping_rate.py +++ b/stripe/_shipping_rate.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -38,7 +38,9 @@ class ShippingRate( class DeliveryEstimate(StripeObject): class Maximum(StripeObject): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[ + Literal["business_day", "day", "hour", "month", "week"], str + ] """ A unit of time. """ @@ -48,7 +50,9 @@ class Maximum(StripeObject): """ class Minimum(StripeObject): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[ + Literal["business_day", "day", "hour", "month", "week"], str + ] """ A unit of time. """ diff --git a/stripe/_source.py b/stripe/_source.py index a2ed66cf7..3c646db09 100644 --- a/stripe/_source.py +++ b/stripe/_source.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -331,7 +331,7 @@ class Receiver(StripeObject): """ class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -509,7 +509,9 @@ class Wechat(StripeObject): ach_debit: Optional[AchDebit] acss_debit: Optional[AcssDebit] alipay: Optional[Alipay] - allow_redisplay: Optional[Literal["always", "limited", "unspecified"]] + allow_redisplay: Optional[ + Union[Literal["always", "limited", "unspecified"], str] + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. """ diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 62d55a6d6..f68d6aa12 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -93,7 +93,7 @@ class Liability(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -145,7 +145,7 @@ class Flexible(StripeObject): """ Configure behavior for flexible billing mode """ - type: Literal["classic", "flexible"] + type: Union[Literal["classic", "flexible"], str] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -189,7 +189,7 @@ class Duration(StripeObject): """ If specified, the billing schedule will apply until the specified timestamp. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -225,26 +225,32 @@ class CancellationDetails(StripeObject): Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. """ feedback: Optional[ - Literal[ - "customer_service", - "low_quality", - "missing_features", - "other", - "switched_service", - "too_complex", - "too_expensive", - "unused", + Union[ + Literal[ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused", + ], + str, ] ] """ The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. """ reason: Optional[ - Literal[ - "canceled_by_retention_policy", - "cancellation_requested", - "payment_disputed", - "payment_failed", + Union[ + Literal[ + "canceled_by_retention_policy", + "cancellation_requested", + "payment_disputed", + "payment_failed", + ], + str, ] ] """ @@ -267,7 +273,7 @@ class Issuer(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -336,14 +342,18 @@ class PaymentSettings(StripeObject): class PaymentMethodOptions(StripeObject): class AcssDebit(StripeObject): class MandateOptions(StripeObject): - transaction_type: Optional[Literal["business", "personal"]] + transaction_type: Optional[ + Union[Literal["business", "personal"], str] + ] """ Transaction type of the mandate. """ mandate_options: Optional[MandateOptions] verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[ + Literal["automatic", "instant", "microdeposits"], str + ] ] """ Bank account verification method. The default value is `automatic`. @@ -351,7 +361,7 @@ class MandateOptions(StripeObject): _inner_class_types = {"mandate_options": MandateOptions} class Bancontact(StripeObject): - preferred_language: Literal["de", "en", "fr", "nl"] + preferred_language: Union[Literal["de", "en", "fr", "nl"], str] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -386,7 +396,9 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments, specified in the presentment currency. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[ + Union[Literal["fixed", "maximum"], str] + ] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -417,7 +429,7 @@ class MandateOptions(StripeObject): Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. """ request_three_d_secure: Optional[ - Literal["any", "automatic", "challenge"] + Union[Literal["any", "automatic", "challenge"], str] ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -461,23 +473,28 @@ class MandateOptions(StripeObject): """ The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[ + Union[Literal["fixed", "maximum"], str] + ] """ Only `maximum` is supported. """ purpose: Optional[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", + Union[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ], + str, ] ] """ @@ -493,7 +510,9 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_includes_iof: Optional[Literal["always", "never"]] + amount_includes_iof: Optional[ + Union[Literal["always", "never"], str] + ] """ Determines if the amount includes the IOF tax. """ @@ -502,12 +521,15 @@ class MandateOptions(StripeObject): Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. """ payment_schedule: Optional[ - Literal[ - "halfyearly", - "monthly", - "quarterly", - "weekly", - "yearly", + Union[ + Literal[ + "halfyearly", + "monthly", + "quarterly", + "weekly", + "yearly", + ], + str, ] ] """ @@ -530,7 +552,9 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[ + Union[Literal["fixed", "maximum"], str] + ] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -550,7 +574,7 @@ class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): account_subcategories: Optional[ - List[Literal["checking", "savings"]] + List[Union[Literal["checking", "savings"], str]] ] """ The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. @@ -563,11 +587,14 @@ class Filters(StripeObject): filters: Optional[Filters] permissions: Optional[ List[ - Literal[ - "balances", - "ownership", - "payment_method", - "transactions", + Union[ + Literal[ + "balances", + "ownership", + "payment_method", + "transactions", + ], + str, ] ] ] @@ -576,11 +603,14 @@ class Filters(StripeObject): """ prefetch: Optional[ List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -591,7 +621,9 @@ class Filters(StripeObject): financial_connections: Optional[FinancialConnections] verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[ + Literal["automatic", "instant", "microdeposits"], str + ] ] """ Bank account verification method. The default value is `automatic`. @@ -696,61 +728,64 @@ class WechatPay(StripeObject): """ payment_method_types: Optional[ List[ - Literal[ - "ach_credit_transfer", - "ach_debit", - "acss_debit", - "affirm", - "alipay", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "check_scan", - "crypto", - "custom", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "id_bank_transfer", - "ideal", - "jp_credit_transfer", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "momo", - "multibanco", - "naver_pay", - "nz_bank_account", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "payto", - "pix", - "promptpay", - "revolut_pay", - "satispay", - "sepa_credit_transfer", - "sepa_debit", - "sequra", - "sofort", - "stripe_balance", - "swish", - "twint", - "upi", - "us_bank_account", - "wechat_pay", + Union[ + Literal[ + "ach_credit_transfer", + "ach_debit", + "acss_debit", + "affirm", + "alipay", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "check_scan", + "crypto", + "custom", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "id_bank_transfer", + "ideal", + "jp_credit_transfer", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "momo", + "multibanco", + "naver_pay", + "nz_bank_account", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "payto", + "pix", + "promptpay", + "revolut_pay", + "satispay", + "sepa_credit_transfer", + "sepa_debit", + "sequra", + "sofort", + "stripe_balance", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + ], + str, ] ] ] @@ -758,7 +793,7 @@ class WechatPay(StripeObject): The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). """ save_default_payment_method: Optional[ - Literal["off", "on_subscription"] + Union[Literal["off", "on_subscription"], str] ] """ Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`. @@ -826,7 +861,7 @@ class Prebilling(StripeObject): """ The start of the first period for which the invoice pre-bills. """ - update_behavior: Optional[Literal["prebill", "reset"]] + update_behavior: Optional[Union[Literal["prebill", "reset"], str]] """ Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. """ @@ -840,10 +875,13 @@ class PresentmentDetails(StripeObject): class StatusDetails(StripeObject): class Paused(StripeObject): class Subscription(StripeObject): - type: Literal[ - "pause_requested", - "system", - "trial_end_without_payment_method", + type: Union[ + Literal[ + "pause_requested", + "system", + "trial_end_without_payment_method", + ], + str, ] """ The reason that the subscription was paused. @@ -885,8 +923,8 @@ class EndBehavior(StripeObject): """ Indicates how the subscription's billing cycle anchor is reset when a trial ends. If not set, the default is `now`. """ - missing_payment_method: Literal[ - "cancel", "create_invoice", "pause" + missing_payment_method: Union[ + Literal["cancel", "create_invoice", "pause"], str ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. @@ -1073,15 +1111,18 @@ class EndBehavior(StripeObject): """ Date when the subscription was first created. The date might differ from the `created` date due to backdating. """ - status: Literal[ - "active", - "canceled", - "incomplete", - "incomplete_expired", - "past_due", - "paused", - "trialing", - "unpaid", + status: Union[ + Literal[ + "active", + "canceled", + "incomplete", + "incomplete_expired", + "past_due", + "paused", + "trialing", + "unpaid", + ], + str, ] """ Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. diff --git a/stripe/_subscription_item.py b/stripe/_subscription_item.py index b648a1d72..8a4735e69 100644 --- a/stripe/_subscription_item.py +++ b/stripe/_subscription_item.py @@ -8,7 +8,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -62,7 +62,7 @@ class Trial(StripeObject): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index 15180997f..fbbd6b5b7 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -74,7 +74,7 @@ class Flexible(StripeObject): """ Configure behavior for flexible billing mode """ - type: Literal["classic", "flexible"] + type: Union[Literal["classic", "flexible"], str] """ Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ @@ -118,7 +118,7 @@ class Duration(StripeObject): """ If specified, the billing schedule will apply until the specified timestamp. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -155,7 +155,7 @@ class Liability(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -200,7 +200,7 @@ class Issuer(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -255,7 +255,7 @@ class TransferData(StripeObject): Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period """ collection_method: Optional[ - Literal["charge_automatically", "send_invoice"] + Union[Literal["charge_automatically", "send_invoice"], str] ] """ Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. @@ -341,7 +341,9 @@ class UnusedTimeFrom(StripeObject): } bill_for: BillFor - invoicing_behavior: Literal["invoice", "pending_invoice_item"] + invoicing_behavior: Union[ + Literal["invoice", "pending_invoice_item"], str + ] """ Determines how to handle debits and credits when pausing. """ @@ -373,8 +375,8 @@ class Settings(StripeObject): """ Controls whether Stripe attempts payment on the resumption invoice and how that affects the subscription's status. """ - proration_behavior: Literal[ - "always_invoice", "create_prorations", "none" + proration_behavior: Union[ + Literal["always_invoice", "create_prorations", "none"], str ] """ Determines how to handle prorations resulting from the billing_cycle_anchor change on resume. @@ -435,8 +437,11 @@ class End(StripeObject): """ A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. """ - type: Literal[ - "min_item_period_end", "phase_end", "timestamp" + type: Union[ + Literal[ + "min_item_period_end", "phase_end", "timestamp" + ], + str, ] """ Select how to calculate the end of the invoice item period. @@ -447,8 +452,11 @@ class Start(StripeObject): """ A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. """ - type: Literal[ - "max_item_period_start", "phase_start", "timestamp" + type: Union[ + Literal[ + "max_item_period_start", "phase_start", "timestamp" + ], + str, ] """ Select how to calculate the start of the invoice item period. @@ -491,7 +499,7 @@ class Liability(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -556,15 +564,20 @@ class Custom(StripeObject): """ custom: Optional[Custom] - type: Literal["custom", "inherit"] + type: Union[Literal["custom", "inherit"], str] """ The type of service period anchor config. """ _inner_class_types = {"custom": Custom} service_period_anchor_config: ServicePeriodAnchorConfig - start_date: Literal[ - "current_period_end", "current_period_start", "phase_start" + start_date: Union[ + Literal[ + "current_period_end", + "current_period_start", + "phase_start", + ], + str, ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. @@ -611,7 +624,7 @@ class Issuer(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -688,17 +701,20 @@ class Custom(StripeObject): """ custom: Optional[Custom] - type: Literal["custom", "inherit"] + type: Union[Literal["custom", "inherit"], str] """ The type of service period anchor config. """ _inner_class_types = {"custom": Custom} service_period_anchor_config: ServicePeriodAnchorConfig - start_date: Literal[ - "current_period_end", - "current_period_start", - "phase_start", + start_date: Union[ + Literal[ + "current_period_end", + "current_period_start", + "phase_start", + ], + str, ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. @@ -734,7 +750,7 @@ class Trial(StripeObject): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -782,7 +798,9 @@ class Trial(StripeObject): } class PauseCollection(StripeObject): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -799,7 +817,9 @@ class TransferData(StripeObject): class TrialSettings(StripeObject): class EndBehavior(StripeObject): - prorate_up_front: Optional[Literal["defer", "include"]] + prorate_up_front: Optional[ + Union[Literal["defer", "include"], str] + ] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -899,7 +919,7 @@ class EndBehavior(StripeObject): """ If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. """ - trial_continuation: Optional[Literal["continue", "none"]] + trial_continuation: Optional[Union[Literal["continue", "none"], str]] """ Specify behavior of the trial when crossing schedule phase boundaries """ @@ -936,7 +956,7 @@ class Prebilling(StripeObject): """ The start of the first period for which the invoice pre-bills. """ - update_behavior: Optional[Literal["prebill", "reset"]] + update_behavior: Optional[Union[Literal["prebill", "reset"], str]] """ Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. """ @@ -984,7 +1004,7 @@ class Prebilling(StripeObject): ID of the account who owns the subscription schedule. """ default_settings: DefaultSettings - end_behavior: Literal["cancel", "none", "release", "renew"] + end_behavior: Union[Literal["cancel", "none", "release", "renew"], str] """ Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. """ diff --git a/stripe/_tax_code.py b/stripe/_tax_code.py index 3b570be5d..d066b697d 100644 --- a/stripe/_tax_code.py +++ b/stripe/_tax_code.py @@ -3,7 +3,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -19,7 +19,9 @@ class TaxCode(ListableAPIResource["TaxCode"]): OBJECT_NAME: ClassVar[Literal["tax_code"]] = "tax_code" class Requirements(StripeObject): - performance_location: Optional[Literal["optional", "required"]] + performance_location: Optional[ + Union[Literal["optional", "required"], str] + ] """ Describes whether a performance location is required for a successful tax calculation with a tax code. """ diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index a0e75354a..57371176f 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -7,7 +7,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -51,7 +51,7 @@ class Owner(StripeObject): """ The Account representing the customer being referenced when `type` is `customer`. """ - type: Literal["account", "application", "customer", "self"] + type: Union[Literal["account", "application", "customer", "self"], str] """ Type of owner referenced. """ diff --git a/stripe/_tax_rate.py b/stripe/_tax_rate.py index 07890cab0..da640e625 100644 --- a/stripe/_tax_rate.py +++ b/stripe/_tax_rate.py @@ -6,7 +6,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -103,7 +103,7 @@ class FlatAmount(StripeObject): """ Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. """ - rate_type: Optional[Literal["flat_amount", "percentage"]] + rate_type: Optional[Union[Literal["flat_amount", "percentage"], str]] """ Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. """ diff --git a/stripe/_token.py b/stripe/_token.py index 064d03e84..cb0d3c910 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -39,7 +39,7 @@ class Token(CreateableAPIResource["Token"]): OBJECT_NAME: ClassVar[Literal["token"]] = "token" class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ diff --git a/stripe/apps/_secret.py b/stripe/apps/_secret.py index 6a6a9e756..983ce848d 100644 --- a/stripe/apps/_secret.py +++ b/stripe/apps/_secret.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -32,7 +32,7 @@ class Secret(CreateableAPIResource["Secret"], ListableAPIResource["Secret"]): OBJECT_NAME: ClassVar[Literal["apps.secret"]] = "apps.secret" class Scope(StripeObject): - type: Literal["account", "user"] + type: Union[Literal["account", "user"], str] """ The secret scope type. """ diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index 64c6f0081..a4dbd9846 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -7,7 +7,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -40,7 +40,7 @@ class Filter(StripeObject): """ Limit the scope of the alert to this customer ID """ - type: Literal["customer", "tenant"] + type: Union[Literal["customer", "tenant"], str] class Lte(StripeObject): class CustomPricingUnit(StripeObject): @@ -97,7 +97,9 @@ class Monetary(StripeObject): A positive integer representing the amount. """ - balance_type: Literal["custom_pricing_unit", "monetary"] + balance_type: Union[ + Literal["custom_pricing_unit", "monetary"], str + ] """ The type of this balance. We currently only support `monetary` amounts. """ @@ -199,7 +201,7 @@ class CustomPricingUnitDetails(StripeObject): """ The custom pricing unit amount. Present when type is `custom_pricing_unit`. """ - type: Literal["amount", "custom_pricing_unit"] + type: Union[Literal["amount", "custom_pricing_unit"], str] """ The type of the threshold amount. """ @@ -217,7 +219,7 @@ class CustomPricingUnitDetails(StripeObject): Filters to scope the spend calculation. """ group_by: Optional[ - Literal["billing_cadence", "pricing_plan_subscription"] + Union[Literal["billing_cadence", "pricing_plan_subscription"], str] ] """ Defines the granularity of spend aggregation. @@ -254,8 +256,11 @@ class Filter(StripeObject): """ _inner_class_types = {"filters": Filter} - alert_type: Literal[ - "credit_balance_threshold", "spend_threshold", "usage_threshold" + alert_type: Union[ + Literal[ + "credit_balance_threshold", "spend_threshold", "usage_threshold" + ], + str, ] """ Defines the type of the alert. @@ -280,7 +285,7 @@ class Filter(StripeObject): """ Encapsulates the alert's configuration to monitor spend on pricing plan subscriptions. """ - status: Optional[Literal["active", "archived", "inactive"]] + status: Optional[Union[Literal["active", "archived", "inactive"], str]] """ Status of the alert. This can be active, inactive or archived. """ diff --git a/stripe/billing/_alert_triggered.py b/stripe/billing/_alert_triggered.py index 302d324b0..b42b19c31 100644 --- a/stripe/billing/_alert_triggered.py +++ b/stripe/billing/_alert_triggered.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -33,7 +33,9 @@ class GroupBy(StripeObject): """ The pricing plan subscription ID, populated when type is `pricing_plan_subscription` """ - type: Literal["billing_cadence", "pricing_plan_subscription"] + type: Union[ + Literal["billing_cadence", "pricing_plan_subscription"], str + ] """ The type of grouping used for this alert notification """ diff --git a/stripe/billing/_credit_balance_summary.py b/stripe/billing/_credit_balance_summary.py index f0031a647..25517e61c 100644 --- a/stripe/billing/_credit_balance_summary.py +++ b/stripe/billing/_credit_balance_summary.py @@ -4,7 +4,7 @@ from stripe._expandable_field import ExpandableField from stripe._singleton_api_resource import SingletonAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -87,7 +87,7 @@ class Monetary(StripeObject): """ The monetary amount. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[Literal["custom_pricing_unit", "monetary"], str] """ The type of this amount. We currently only support `monetary` billing credits. """ @@ -176,7 +176,7 @@ class Monetary(StripeObject): """ The monetary amount. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[Literal["custom_pricing_unit", "monetary"], str] """ The type of this amount. We currently only support `monetary` billing credits. """ diff --git a/stripe/billing/_credit_balance_transaction.py b/stripe/billing/_credit_balance_transaction.py index f9482be51..6953163d3 100644 --- a/stripe/billing/_credit_balance_transaction.py +++ b/stripe/billing/_credit_balance_transaction.py @@ -5,7 +5,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -95,7 +95,7 @@ class Monetary(StripeObject): """ The monetary amount. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[Literal["custom_pricing_unit", "monetary"], str] """ The type of this amount. We currently only support `monetary` billing credits. """ @@ -121,7 +121,10 @@ class CreditsApplicationInvoiceVoided(StripeObject): """ Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`. """ - type: Literal["credits_application_invoice_voided", "credits_granted"] + type: Union[ + Literal["credits_application_invoice_voided", "credits_granted"], + str, + ] """ The type of credit transaction. """ @@ -194,7 +197,7 @@ class Monetary(StripeObject): """ The monetary amount. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[Literal["custom_pricing_unit", "monetary"], str] """ The type of this amount. We currently only support `monetary` billing credits. """ @@ -218,7 +221,10 @@ class CreditsApplied(StripeObject): """ Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. """ - type: Literal["credits_applied", "credits_expired", "credits_voided"] + type: Union[ + Literal["credits_applied", "credits_expired", "credits_voided"], + str, + ] """ The type of debit transaction. """ @@ -263,7 +269,7 @@ class CreditsApplied(StripeObject): """ ID of the test clock this credit balance transaction belongs to. """ - type: Optional[Literal["credit", "debit"]] + type: Optional[Union[Literal["credit", "debit"], str]] """ The type of credit balance transaction (credit or debit). """ diff --git a/stripe/billing/_credit_grant.py b/stripe/billing/_credit_grant.py index 7a6b1e5a6..c4ed3a9c1 100644 --- a/stripe/billing/_credit_grant.py +++ b/stripe/billing/_credit_grant.py @@ -8,7 +8,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -112,7 +112,7 @@ class Monetary(StripeObject): """ The monetary amount. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[Literal["custom_pricing_unit", "monetary"], str] """ The type of this amount. We currently only support `monetary` billing credits. """ @@ -157,7 +157,7 @@ class Price(StripeObject): amount: Amount applicability_config: ApplicabilityConfig - category: Literal["paid", "promotional"] + category: Union[Literal["paid", "promotional"], str] """ The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. """ diff --git a/stripe/billing/_meter.py b/stripe/billing/_meter.py index de98bef25..6be8b5ab9 100644 --- a/stripe/billing/_meter.py +++ b/stripe/billing/_meter.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -54,7 +54,7 @@ class CustomerMapping(StripeObject): """ class DefaultAggregation(StripeObject): - formula: Literal["count", "last", "sum"] + formula: Union[Literal["count", "last", "sum"], str] """ Specifies how events are aggregated. """ @@ -89,7 +89,7 @@ class ValueSettings(StripeObject): """ The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. """ - event_time_window: Optional[Literal["day", "hour"]] + event_time_window: Optional[Union[Literal["day", "hour"], str]] """ The time window which meter events have been pre-aggregated for, if any. """ @@ -105,7 +105,7 @@ class ValueSettings(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - status: Literal["active", "inactive"] + status: Union[Literal["active", "inactive"], str] """ The meter's status. """ diff --git a/stripe/billing/_meter_event_adjustment.py b/stripe/billing/_meter_event_adjustment.py index 9e506e3ee..d78729545 100644 --- a/stripe/billing/_meter_event_adjustment.py +++ b/stripe/billing/_meter_event_adjustment.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -42,7 +42,7 @@ class Cancel(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - status: Literal["complete", "pending"] + status: Union[Literal["complete", "pending"], str] """ The meter event adjustment's status. """ diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index 8a67364fb..2bdad7f3c 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -56,8 +56,16 @@ class BusinessProfile(StripeObject): class Features(StripeObject): class CustomerUpdate(StripeObject): allowed_updates: List[ - Literal[ - "address", "email", "name", "phone", "shipping", "tax_id" + Union[ + Literal[ + "address", + "email", + "name", + "phone", + "shipping", + "tax_id", + ], + str, ] ] """ @@ -91,15 +99,18 @@ class CancellationReason(StripeObject): Whether the feature is enabled. """ options: List[ - Literal[ - "customer_service", - "low_quality", - "missing_features", - "other", - "switched_service", - "too_complex", - "too_expensive", - "unused", + Union[ + Literal[ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused", + ], + str, ] ] """ @@ -111,7 +122,7 @@ class CancellationReason(StripeObject): """ Whether the feature is enabled. """ - mode: Literal["at_period_end", "immediately"] + mode: Union[Literal["at_period_end", "immediately"], str] """ Whether to cancel subscriptions immediately or at the end of the billing period. """ @@ -154,8 +165,11 @@ class AdjustableQuantity(StripeObject): class ScheduleAtPeriodEnd(StripeObject): class Condition(StripeObject): - type: Literal[ - "decreasing_item_amount", "shortening_interval" + type: Union[ + Literal[ + "decreasing_item_amount", "shortening_interval" + ], + str, ] """ The type of condition. @@ -172,7 +186,7 @@ class Condition(StripeObject): Determines the value to use for the billing cycle anchor on subscription updates. Valid values are `now` or `unchanged`, and the default value is `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle). """ default_allowed_updates: List[ - Literal["price", "promotion_code", "quantity"] + Union[Literal["price", "promotion_code", "quantity"], str] ] """ The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. @@ -192,7 +206,9 @@ class Condition(StripeObject): Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. """ schedule_at_period_end: ScheduleAtPeriodEnd - trial_update_behavior: Literal["continue_trial", "end_trial"] + trial_update_behavior: Union[ + Literal["continue_trial", "end_trial"], str + ] """ Determines how handle updates to trialing subscriptions. Valid values are `end_trial` and `continue_trial`. Defaults to a value of `end_trial` if you don't set it during creation. """ diff --git a/stripe/billing_portal/_session.py b/stripe/billing_portal/_session.py index ae74b82e8..f2dc44812 100644 --- a/stripe/billing_portal/_session.py +++ b/stripe/billing_portal/_session.py @@ -3,7 +3,7 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -57,7 +57,10 @@ class Redirect(StripeObject): """ Configuration when `after_completion.type=redirect`. """ - type: Literal["hosted_confirmation", "portal_homepage", "redirect"] + type: Union[ + Literal["hosted_confirmation", "portal_homepage", "redirect"], + str, + ] """ The specified type of behavior after the flow is completed. """ @@ -152,11 +155,14 @@ class Item(StripeObject): """ Configuration when `flow.type=subscription_update_confirm`. """ - type: Literal[ - "payment_method_update", - "subscription_cancel", - "subscription_update", - "subscription_update_confirm", + type: Union[ + Literal[ + "payment_method_update", + "subscription_cancel", + "subscription_update", + "subscription_update_confirm", + ], + str, ] """ Type of flow that the customer will go through. @@ -197,54 +203,57 @@ class Item(StripeObject): If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ locale: Optional[ - Literal[ - "auto", - "bg", - "cs", - "da", - "de", - "el", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-IE", - "en-IN", - "en-NZ", - "en-SG", - "es", - "es-419", - "et", - "fi", - "fil", - "fr", - "fr-CA", - "hr", - "hu", - "id", - "it", - "ja", - "ko", - "lt", - "lv", - "ms", - "mt", - "nb", - "nl", - "pl", - "pt", - "pt-BR", - "ro", - "ru", - "sk", - "sl", - "sv", - "th", - "tr", - "vi", - "zh", - "zh-HK", - "zh-TW", + Union[ + Literal[ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW", + ], + str, ] ] """ diff --git a/stripe/capital/_financing_offer.py b/stripe/capital/_financing_offer.py index d91e66d72..36af69950 100644 --- a/stripe/capital/_financing_offer.py +++ b/stripe/capital/_financing_offer.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -64,8 +64,13 @@ class OfferedTerms(StripeObject): """ Amount of financing offered, in minor units. For example, 1,000 USD is represented as 100000. """ - campaign_type: Literal[ - "newly_eligible_user", "previously_eligible_user", "repeat_user" + campaign_type: Union[ + Literal[ + "newly_eligible_user", + "previously_eligible_user", + "repeat_user", + ], + str, ] """ Describes the type of user the offer is being extended to. @@ -126,7 +131,7 @@ class OfferedTerms(StripeObject): """ Time at which the offer expires. Given in seconds since unix epoch. """ - financing_type: Optional[Literal["cash_advance", "flex_loan"]] + financing_type: Optional[Union[Literal["cash_advance", "flex_loan"], str]] """ The type of financing being offered. """ @@ -152,7 +157,7 @@ class OfferedTerms(StripeObject): Stripe Capital to a Connected account. This resource represents both the terms offered to the Connected account. """ - product_type: Optional[Literal["refill", "standard"]] + product_type: Optional[Union[Literal["refill", "standard"], str]] """ Financing product identifier. """ @@ -164,17 +169,20 @@ class OfferedTerms(StripeObject): """ The ID of the financing offer that this offer is a replacement for. """ - status: Literal[ - "accepted", - "canceled", - "completed", - "delivered", - "expired", - "fully_repaid", - "paid_out", - "rejected", - "replaced", - "undelivered", + status: Union[ + Literal[ + "accepted", + "canceled", + "completed", + "delivered", + "expired", + "fully_repaid", + "paid_out", + "rejected", + "replaced", + "undelivered", + ], + str, ] """ The current status of the offer. diff --git a/stripe/capital/_financing_summary.py b/stripe/capital/_financing_summary.py index 85bbc1ec6..8c38156a4 100644 --- a/stripe/capital/_financing_summary.py +++ b/stripe/capital/_financing_summary.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._singleton_api_resource import SingletonAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -107,7 +107,7 @@ class CurrentRepaymentInterval(StripeObject): """ The object type: financing_summary """ - status: Optional[Literal["accepted", "delivered", "none"]] + status: Optional[Union[Literal["accepted", "delivered", "none"], str]] """ The financing status of the connected account. """ diff --git a/stripe/capital/_financing_transaction.py b/stripe/capital/_financing_transaction.py index ac0d8079b..465cdf19c 100644 --- a/stripe/capital/_financing_transaction.py +++ b/stripe/capital/_financing_transaction.py @@ -3,7 +3,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -52,15 +52,18 @@ class Transaction(StripeObject): The linked payment for the transaction. This field only applies to financing transactions of type `payment` and reason `automatic_withholding`. """ reason: Optional[ - Literal[ - "automatic_withholding", - "automatic_withholding_refund", - "collection", - "collection_failure", - "financing_cancellation", - "refill", - "requested_by_user", - "user_initiated", + Union[ + Literal[ + "automatic_withholding", + "automatic_withholding_refund", + "collection", + "collection_failure", + "financing_cancellation", + "refill", + "requested_by_user", + "user_initiated", + ], + str, ] ] """ @@ -115,7 +118,7 @@ class Transaction(StripeObject): """ The object type: financing_transaction """ - type: Literal["payment", "payout", "reversal"] + type: Union[Literal["payment", "payout", "reversal"], str] """ The type of the financing transaction. """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 1a449d98b..9fc1096dc 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -8,7 +8,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -138,7 +138,7 @@ class Liability(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -160,7 +160,9 @@ class Liability(StripeObject): The tax provider powering automatic tax. """ status: Optional[ - Literal["complete", "failed", "requires_location_inputs"] + Union[ + Literal["complete", "failed", "requires_location_inputs"], str + ] ] """ The status of the most recent automated tax calculation for this session. @@ -652,7 +654,9 @@ class UsBankAccount(StripeObject): Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. """ - allow_redisplay: Literal["always", "limited", "unspecified"] + allow_redisplay: Union[ + Literal["always", "limited", "unspecified"], str + ] """ Indicates whether this payment method can be shown again to its customer in a checkout flow. """ @@ -827,7 +831,7 @@ class Text(StripeObject): Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. """ text: Optional[Text] - type: Literal["dropdown", "numeric", "text"] + type: Union[Literal["dropdown", "numeric", "text"], str] """ The type of the field. """ @@ -1104,7 +1108,7 @@ class Issuer(StripeObject): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced. """ @@ -1184,8 +1188,8 @@ class PendingInvoiceItemInterval(StripeObject): class TrialSettings(StripeObject): class EndBehavior(StripeObject): - missing_payment_method: Literal[ - "cancel", "create_invoice", "pause" + missing_payment_method: Union[ + Literal["cancel", "create_invoice", "pause"], str ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. @@ -1213,7 +1217,9 @@ class EndBehavior(StripeObject): """ Specifies an interval for how often to bill for any pending invoice items. """ - proration_behavior: Optional[Literal["create_prorations", "none"]] + proration_behavior: Optional[ + Union[Literal["create_prorations", "none"], str] + ] """ Determines how to handle prorations when the subscription is updated. """ @@ -1321,7 +1327,9 @@ class MandateOptions(StripeObject): """ A URL for custom mandate text """ - default_for: Optional[List[Literal["invoice", "subscription"]]] + default_for: Optional[ + List[Union[Literal["invoice", "subscription"], str]] + ] """ List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. """ @@ -1330,23 +1338,25 @@ class MandateOptions(StripeObject): Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. """ payment_schedule: Optional[ - Literal["combined", "interval", "sporadic"] + Union[Literal["combined", "interval", "sporadic"], str] ] """ Payment schedule for the mandate. """ - transaction_type: Optional[Literal["business", "personal"]] + transaction_type: Optional[ + Union[Literal["business", "personal"], str] + ] """ Transaction type of the mandate. """ - currency: Optional[Literal["cad", "usd"]] + currency: Optional[Union[Literal["cad", "usd"], str]] """ Currency supported by the bank account. Returned when the Session is in `setup` mode. """ mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1362,7 +1372,7 @@ class MandateOptions(StripeObject): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[Literal["automatic", "instant", "microdeposits"], str] ] """ Bank account verification method. The default value is `automatic`. @@ -1424,7 +1434,9 @@ class AmazonPay(StripeObject): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1460,7 +1472,7 @@ class MandateOptions(StripeObject): mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1508,7 +1520,7 @@ class Boleto(StripeObject): The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. """ setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1548,38 +1560,44 @@ class Restrictions(StripeObject): """ installments: Optional[Installments] request_decremental_authorization: Optional[ - Literal["if_available", "never"] + Union[Literal["if_available", "never"], str] ] """ Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession. """ request_extended_authorization: Optional[ - Literal["if_available", "never"] + Union[Literal["if_available", "never"], str] ] """ Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession. """ request_incremental_authorization: Optional[ - Literal["if_available", "never"] + Union[Literal["if_available", "never"], str] ] """ Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this CheckoutSession. """ - request_multicapture: Optional[Literal["if_available", "never"]] + request_multicapture: Optional[ + Union[Literal["if_available", "never"], str] + ] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this CheckoutSession. """ - request_overcapture: Optional[Literal["if_available", "never"]] + request_overcapture: Optional[ + Union[Literal["if_available", "never"], str] + ] """ Request ability to [overcapture](https://docs.stripe.com/payments/overcapture) for this CheckoutSession. """ - request_three_d_secure: Literal["any", "automatic", "challenge"] + request_three_d_secure: Union[ + Literal["any", "automatic", "challenge"], str + ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. """ restrictions: Optional[Restrictions] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1630,14 +1648,17 @@ class EuBankTransfer(StripeObject): eu_bank_transfer: Optional[EuBankTransfer] requested_address_types: Optional[ List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", + Union[ + Literal[ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -1647,12 +1668,15 @@ class EuBankTransfer(StripeObject): Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ type: Optional[ - Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] ] """ @@ -1742,7 +1766,9 @@ class KakaoPay(StripeObject): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1759,7 +1785,7 @@ class Klarna(StripeObject): Controls when the funds will be captured from the customer's account. """ setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1792,7 +1818,9 @@ class KrCard(StripeObject): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1808,7 +1836,9 @@ class Link(StripeObject): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1852,7 +1882,9 @@ class NaverPay(StripeObject): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1932,7 +1964,9 @@ class Paypal(StripeObject): """ A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. """ - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1953,7 +1987,7 @@ class MandateOptions(StripeObject): """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -1962,15 +1996,18 @@ class MandateOptions(StripeObject): Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: Optional[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", + Union[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ], + str, ] ] """ @@ -1981,18 +2018,21 @@ class MandateOptions(StripeObject): The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: Optional[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", + Union[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ], + str, ] ] """ @@ -2004,7 +2044,9 @@ class MandateOptions(StripeObject): """ mandate_options: Optional[MandateOptions] - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2022,11 +2064,13 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_includes_iof: Optional[Literal["always", "never"]] + amount_includes_iof: Optional[ + Union[Literal["always", "never"], str] + ] """ Determines if the amount includes the IOF tax. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ Type of amount. """ @@ -2039,12 +2083,15 @@ class MandateOptions(StripeObject): Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. """ payment_schedule: Optional[ - Literal[ - "halfyearly", - "monthly", - "quarterly", - "weekly", - "yearly", + Union[ + Literal[ + "halfyearly", + "monthly", + "quarterly", + "weekly", + "yearly", + ], + str, ] ] """ @@ -2059,7 +2106,9 @@ class MandateOptions(StripeObject): Start date of the mandate, in `YYYY-MM-DD`. """ - amount_includes_iof: Optional[Literal["always", "never"]] + amount_includes_iof: Optional[ + Union[Literal["always", "never"], str] + ] """ Determines if the amount includes the IOF tax. """ @@ -2068,7 +2117,9 @@ class MandateOptions(StripeObject): The number of seconds after which Pix payment will expire. """ mandate_options: Optional[MandateOptions] - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2133,7 +2184,7 @@ class MandateOptions(StripeObject): mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2185,7 +2236,9 @@ class Swish(StripeObject): """ class Twint(StripeObject): - setup_future_usage: Optional[Literal["none", "off_session"]] + setup_future_usage: Optional[ + Union[Literal["none", "off_session"], str] + ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2202,7 +2255,7 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -2217,7 +2270,7 @@ class MandateOptions(StripeObject): mandate_options: Optional[MandateOptions] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2234,7 +2287,7 @@ class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): account_subcategories: Optional[ - List[Literal["checking", "savings"]] + List[Union[Literal["checking", "savings"], str]] ] """ The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. @@ -2245,7 +2298,7 @@ class Filters(StripeObject): """ class ManualEntry(StripeObject): - mode: Optional[Literal["automatic", "custom"]] + mode: Optional[Union[Literal["automatic", "custom"], str]] """ Settings for configuring manual entry of account details. """ @@ -2254,11 +2307,14 @@ class ManualEntry(StripeObject): manual_entry: Optional[ManualEntry] permissions: Optional[ List[ - Literal[ - "balances", - "ownership", - "payment_method", - "transactions", + Union[ + Literal[ + "balances", + "ownership", + "payment_method", + "transactions", + ], + str, ] ] ] @@ -2267,11 +2323,14 @@ class ManualEntry(StripeObject): """ prefetch: Optional[ List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -2289,7 +2348,7 @@ class ManualEntry(StripeObject): financial_connections: Optional[FinancialConnections] setup_future_usage: Optional[ - Literal["none", "off_session", "on_session"] + Union[Literal["none", "off_session", "on_session"], str] ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2304,7 +2363,9 @@ class ManualEntry(StripeObject): """ Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ - verification_method: Optional[Literal["automatic", "instant"]] + verification_method: Optional[ + Union[Literal["automatic", "instant"], str] + ] """ Bank account verification method. The default value is `automatic`. """ @@ -2489,268 +2550,275 @@ class PresentmentDetails(StripeObject): """ class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ class SavedPaymentMethodOptions(StripeObject): allow_redisplay_filters: Optional[ - List[Literal["always", "limited", "unspecified"]] + List[Union[Literal["always", "limited", "unspecified"], str]] ] """ Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout. """ - payment_method_remove: Optional[Literal["disabled", "enabled"]] + payment_method_remove: Optional[ + Union[Literal["disabled", "enabled"], str] + ] """ Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. """ - payment_method_save: Optional[Literal["disabled", "enabled"]] + payment_method_save: Optional[ + Union[Literal["disabled", "enabled"], str] + ] """ Enable customers to choose if they wish to save their payment method for future use. Disabled by default. """ class ShippingAddressCollection(StripeObject): allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", + Union[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", + ], + str, ] ] """ @@ -2771,22 +2839,25 @@ class Tax(StripeObject): Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) """ taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] ] """ @@ -2848,7 +2919,7 @@ class TaxIdCollection(StripeObject): """ Indicates whether tax ID collection is enabled for the session """ - required: Literal["if_supported", "never"] + required: Union[Literal["if_supported", "never"], str] """ Indicates whether a tax ID is required on the payment page """ @@ -2880,22 +2951,25 @@ class Tax(StripeObject): Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) """ taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] ] """ @@ -2937,7 +3011,7 @@ class Tax(StripeObject): class WalletOptions(StripeObject): class Link(StripeObject): - display: Optional[Literal["auto", "never"]] + display: Optional[Union[Literal["auto", "never"], str]] """ Describes whether Checkout should display Link. Defaults to `auto`. """ @@ -2965,7 +3039,7 @@ class Link(StripeObject): """ Total of all items after discounts and taxes are applied. """ - approval_method: Optional[Literal["auto", "manual"]] + approval_method: Optional[Union[Literal["auto", "manual"], str]] """ Determines whether the customer's attempt to pay must be manually approved. @@ -2975,7 +3049,9 @@ class Link(StripeObject): """ automatic_surcharge: Optional[AutomaticSurcharge] automatic_tax: AutomaticTax - billing_address_collection: Optional[Literal["auto", "required"]] + billing_address_collection: Optional[ + Union[Literal["auto", "required"], str] + ] """ Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. """ @@ -3046,7 +3122,7 @@ class Link(StripeObject): """ The ID of the account for this Session. """ - customer_creation: Optional[Literal["always", "if_required"]] + customer_creation: Optional[Union[Literal["always", "if_required"], str]] """ Configure whether a Checkout Session creates a Customer when the Checkout Session completes. """ @@ -3103,48 +3179,51 @@ class Link(StripeObject): If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ locale: Optional[ - Literal[ - "auto", - "bg", - "cs", - "da", - "de", - "el", - "en", - "en-GB", - "es", - "es-419", - "et", - "fi", - "fil", - "fr", - "fr-CA", - "hr", - "hu", - "id", - "it", - "ja", - "ko", - "lt", - "lv", - "ms", - "mt", - "nb", - "nl", - "pl", - "pt", - "pt-BR", - "ro", - "ru", - "sk", - "sl", - "sv", - "th", - "tr", - "vi", - "zh", - "zh-HK", - "zh-TW", + Union[ + Literal[ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-GB", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW", + ], + str, ] ] """ @@ -3158,7 +3237,7 @@ class Link(StripeObject): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. """ - mode: Literal["payment", "setup", "subscription"] + mode: Union[Literal["payment", "setup", "subscription"], str] """ The mode of the Checkout Session. """ @@ -3171,7 +3250,7 @@ class Link(StripeObject): """ The optional items presented to the customer at checkout. """ - origin_context: Optional[Literal["mobile_app", "web"]] + origin_context: Optional[Union[Literal["mobile_app", "web"], str]] """ Where the user is coming from. This informs the optimizations that are applied to the session. """ @@ -3183,7 +3262,9 @@ class Link(StripeObject): """ The ID of the Payment Link that created this Session. """ - payment_method_collection: Optional[Literal["always", "if_required"]] + payment_method_collection: Optional[ + Union[Literal["always", "if_required"], str] + ] """ Configure whether a Checkout Session should collect a payment method. Defaults to `always`. """ @@ -3206,7 +3287,9 @@ class Link(StripeObject): """ The [Payment Record](https://docs.stripe.com/api/payment-record) for this Checkout Session. """ - payment_status: Literal["no_payment_required", "paid", "unpaid"] + payment_status: Union[ + Literal["no_payment_required", "paid", "unpaid"], str + ] """ The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. You can use this value to decide when to fulfill your customer's order. @@ -3227,7 +3310,9 @@ class Link(StripeObject): """ The redaction status of the Checkout Session. If the Session is not redacted, this field is null. """ - redirect_on_completion: Optional[Literal["always", "if_required", "never"]] + redirect_on_completion: Optional[ + Union[Literal["always", "if_required", "never"], str] + ] """ This parameter applies to `ui_mode: embedded_page`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. """ @@ -3260,7 +3345,7 @@ class Link(StripeObject): The status of the Checkout Session, one of `open`, `complete`, or `expired`. """ submit_type: Optional[ - Literal["auto", "book", "donate", "pay", "subscribe"] + Union[Literal["auto", "book", "donate", "pay", "subscribe"], str] ] """ Describes the type of transaction being performed by Checkout in order to customize @@ -3283,7 +3368,7 @@ class Link(StripeObject): Tax and discount details for the computed total amount. """ ui_mode: Optional[ - Literal["elements", "embedded_page", "form", "hosted_page"] + Union[Literal["elements", "embedded_page", "form", "hosted_page"], str] ] """ The UI mode of the Session. Defaults to `hosted_page`. diff --git a/stripe/climate/_order.py b/stripe/climate/_order.py index 6c6194ea1..5f21f6fde 100644 --- a/stripe/climate/_order.py +++ b/stripe/climate/_order.py @@ -8,7 +8,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -104,7 +104,7 @@ class Location(StripeObject): Time at which the order was canceled. Measured in seconds since the Unix epoch. """ cancellation_reason: Optional[ - Literal["expired", "product_unavailable", "requested"] + Union[Literal["expired", "product_unavailable", "requested"], str] ] """ Reason for the cancellation of this order. @@ -169,8 +169,11 @@ class Location(StripeObject): """ Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. """ - status: Literal[ - "awaiting_funds", "canceled", "confirmed", "delivered", "open" + status: Union[ + Literal[ + "awaiting_funds", "canceled", "confirmed", "delivered", "open" + ], + str, ] """ The current status of this order. diff --git a/stripe/climate/_supplier.py b/stripe/climate/_supplier.py index d1a4233e6..989ccb83e 100644 --- a/stripe/climate/_supplier.py +++ b/stripe/climate/_supplier.py @@ -3,7 +3,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -66,11 +66,14 @@ class Location(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - removal_pathway: Literal[ - "biomass_carbon_removal_and_storage", - "direct_air_capture", - "enhanced_weathering", - "marine_carbon_removal", + removal_pathway: Union[ + Literal[ + "biomass_carbon_removal_and_storage", + "direct_air_capture", + "enhanced_weathering", + "marine_carbon_removal", + ], + str, ] """ The scientific pathway used for carbon removal. diff --git a/stripe/crypto/_customer.py b/stripe/crypto/_customer.py index 2d8de155c..24a3e6ac5 100644 --- a/stripe/crypto/_customer.py +++ b/stripe/crypto/_customer.py @@ -5,7 +5,7 @@ from stripe._nested_resource_class_methods import nested_resource_class_methods from stripe._stripe_object import StripeObject from stripe._util import sanitize_id -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -37,17 +37,27 @@ class KycTier(StripeObject): The KYC tier level (e.g., l0, l1, l2). """ verification_errors: List[ - Literal[ - "id_document_verification_failed", - "phone_verification_failed", - "user_has_reached_max_verification_attempts", + Union[ + Literal[ + "id_document_verification_failed", + "phone_verification_failed", + "user_has_reached_max_verification_attempts", + ], + str, ] ] """ List of errors associated with this KYC tier verification. """ - verification_status: Literal[ - "not_available", "not_started", "pending", "rejected", "verified" + verification_status: Union[ + Literal[ + "not_available", + "not_started", + "pending", + "rejected", + "verified", + ], + str, ] """ The verification status for this KYC tier. @@ -55,21 +65,34 @@ class KycTier(StripeObject): class Verification(StripeObject): errors: List[ - Literal[ - "id_document_verification_failed", - "phone_verification_failed", - "user_has_reached_max_verification_attempts", + Union[ + Literal[ + "id_document_verification_failed", + "phone_verification_failed", + "user_has_reached_max_verification_attempts", + ], + str, ] ] """ List of errors associated with the verification. """ - name: Literal["id_document_verified", "kyc_verified", "phone_verified"] + name: Union[ + Literal["id_document_verified", "kyc_verified", "phone_verified"], + str, + ] """ Type of verification. """ - status: Literal[ - "not_available", "not_started", "pending", "rejected", "verified" + status: Union[ + Literal[ + "not_available", + "not_started", + "pending", + "rejected", + "verified", + ], + str, ] """ Outcome of the verification. @@ -79,7 +102,7 @@ class Verification(StripeObject): """ Unique identifier for the object. """ - kyc_region: Optional[Literal["eu", "us"]] + kyc_region: Optional[Union[Literal["eu", "us"], str]] """ The KYC region determined by the customer's address country. """ @@ -92,25 +115,28 @@ class Verification(StripeObject): String representing the object's type. Objects of the same type share the same value. """ provided_fields: List[ - Literal[ - "address_city", - "address_country", - "address_line_1", - "address_line_2", - "address_postal_code", - "address_state", - "attestation", - "birth_city", - "birth_country", - "dob", - "first_name", - "id_document", - "id_number", - "id_type", - "identifiers", - "last_name", - "nationalities", - "selfie", + Union[ + Literal[ + "address_city", + "address_country", + "address_line_1", + "address_line_2", + "address_postal_code", + "address_state", + "attestation", + "birth_city", + "birth_country", + "dob", + "first_name", + "id_document", + "id_number", + "id_type", + "identifiers", + "last_name", + "nationalities", + "selfie", + ], + str, ] ] """ diff --git a/stripe/crypto/_customer_consumer_wallet.py b/stripe/crypto/_customer_consumer_wallet.py index 535120400..def172b92 100644 --- a/stripe/crypto/_customer_consumer_wallet.py +++ b/stripe/crypto/_customer_consumer_wallet.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar +from typing import ClassVar, Union from typing_extensions import Literal @@ -21,17 +21,20 @@ class CustomerConsumerWallet(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ - network: Literal[ - "aptos", - "avalanche", - "base", - "bitcoin", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "worldchain", + network: Union[ + Literal[ + "aptos", + "avalanche", + "base", + "bitcoin", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "worldchain", + ], + str, ] """ The blockchain network for this wallet diff --git a/stripe/crypto/_customer_payment_token.py b/stripe/crypto/_customer_payment_token.py index fff7414ad..ab1fdb073 100644 --- a/stripe/crypto/_customer_payment_token.py +++ b/stripe/crypto/_customer_payment_token.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -16,7 +16,7 @@ class CustomerPaymentToken(StripeObject): class Card(StripeObject): class Wallet(StripeObject): - type: Literal["apple_pay", "google_pay"] + type: Union[Literal["apple_pay", "google_pay"], str] """ The type of the card wallet, one of `apple_pay` or `google_pay`. """ @@ -48,7 +48,7 @@ class Wallet(StripeObject): _inner_class_types = {"wallet": Wallet} class UsBankAccount(StripeObject): - account_type: Optional[Literal["checking", "savings"]] + account_type: Optional[Union[Literal["checking", "savings"], str]] """ Account type: `checkings` or `savings`. """ @@ -73,7 +73,7 @@ class UsBankAccount(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - type: Literal["card", "us_bank_account"] + type: Union[Literal["card", "us_bank_account"], str] """ Type of the Payment Token. """ diff --git a/stripe/crypto/_onramp_session.py b/stripe/crypto/_onramp_session.py index ef769fa16..057ff0648 100644 --- a/stripe/crypto/_onramp_session.py +++ b/stripe/crypto/_onramp_session.py @@ -5,7 +5,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -108,8 +108,18 @@ class DestinationTags(StripeObject): """ destination_currencies: Optional[ List[ - Literal[ - "avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm" + Union[ + Literal[ + "avax", + "btc", + "eth", + "matic", + "sol", + "usdc", + "wld", + "xlm", + ], + str, ] ] ] @@ -117,29 +127,18 @@ class DestinationTags(StripeObject): If a platform wants to lock the currencies an session will support, they can add supported currencies to this array. If left null, the experience will allow selection of all supported destination currencies. """ destination_currency: Optional[ - Literal["avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm"] + Union[ + Literal[ + "avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm" + ], + str, + ] ] """ The selected `destination_currency` to convert the `source` to. This should be a crypto currency code. If `destination_currencies` is set, it must be a value in that array. """ destination_network: Optional[ - Literal[ - "avalanche", - "base", - "bitcoin", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "worldchain", - ] - ] - """ - The specific crypto network the `destination_currency` is settled on. If `destination_networks` is set, it must be a value in that array. - """ - destination_networks: Optional[ - List[ + Union[ Literal[ "avalanche", "base", @@ -150,6 +149,28 @@ class DestinationTags(StripeObject): "solana", "stellar", "worldchain", + ], + str, + ] + ] + """ + The specific crypto network the `destination_currency` is settled on. If `destination_networks` is set, it must be a value in that array. + """ + destination_networks: Optional[ + List[ + Union[ + Literal[ + "avalanche", + "base", + "bitcoin", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "worldchain", + ], + str, ] ] ] @@ -164,7 +185,7 @@ class DestinationTags(StripeObject): """ Whether or not to lock the suggested wallet address. """ - settlement_speed: Optional[Literal["instant", "standard"]] + settlement_speed: Optional[Union[Literal["instant", "standard"], str]] """ Speed at which the cryptocurrency is delivered to the wallet One of: @@ -175,7 +196,7 @@ class DestinationTags(StripeObject): """ The amount of fiat we intend to onramp - excluding fees """ - source_currency: Optional[Literal["eur", "gbp", "usd"]] + source_currency: Optional[Union[Literal["eur", "gbp", "usd"], str]] """ A fiat currency code """ diff --git a/stripe/delegated_checkout/_order_event.py b/stripe/delegated_checkout/_order_event.py index 28dd9366a..143379223 100644 --- a/stripe/delegated_checkout/_order_event.py +++ b/stripe/delegated_checkout/_order_event.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -41,17 +41,20 @@ class LineItem(StripeObject): """ The line items associated with the adjustment. """ - status: Literal["completed", "failed", "pending"] + status: Union[Literal["completed", "failed", "pending"], str] """ The status of the adjustment. """ - type: Literal[ - "cancellation", - "credit", - "dispute", - "original_payment_refund", - "return", - "store_credit_refund", + type: Union[ + Literal[ + "cancellation", + "credit", + "dispute", + "original_payment_refund", + "return", + "store_credit_refund", + ], + str, ] """ The type of adjustment. @@ -85,13 +88,16 @@ class LineItem(StripeObject): """ Time at which the fulfillment shipped. Measured in seconds since the Unix epoch. """ - status: Literal[ - "confirmed", - "delivered", - "fulfilled", - "pending", - "returned", - "shipped", + status: Union[ + Literal[ + "confirmed", + "delivered", + "fulfilled", + "pending", + "returned", + "shipped", + ], + str, ] """ The status of the fulfillment. @@ -142,7 +148,7 @@ class LineItem(StripeObject): """ The requested session associated with this order event. """ - type: Literal["adjustment", "fulfillment"] + type: Union[Literal["adjustment", "fulfillment"], str] """ The type of order event. """ diff --git a/stripe/delegated_checkout/_requested_session.py b/stripe/delegated_checkout/_requested_session.py index b81ac6fdd..d1f94619a 100644 --- a/stripe/delegated_checkout/_requested_session.py +++ b/stripe/delegated_checkout/_requested_session.py @@ -6,7 +6,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -51,7 +51,7 @@ class Source(StripeObject): """ The platform of the attribution source. """ - type: Literal["platform", "url"] + type: Union[Literal["platform", "url"], str] """ The type of the attribution source. """ @@ -100,7 +100,7 @@ class Source(StripeObject): """ Agent-scoped sub-tracking identifier. """ - touchpoint: Literal["first", "last"] + touchpoint: Union[Literal["first", "last"], str] """ Whether this is the first or last touchpoint. """ @@ -174,7 +174,7 @@ class Applied(StripeObject): """ The percentage off provided by this discount. """ - type: Literal["cart", "fulfillment"] + type: Union[Literal["cart", "fulfillment"], str] """ The type of discount. """ @@ -301,7 +301,7 @@ class ShippingOption(StripeObject): """ The shipping option. """ - type: Literal["digital", "shipping"] + type: Union[Literal["digital", "shipping"], str] """ The type of the fulfillment option. """ @@ -328,7 +328,7 @@ class Shipping(StripeObject): """ The shipping option. """ - type: Literal["digital", "shipping"] + type: Union[Literal["digital", "shipping"], str] """ The type of the selected fulfillment option. """ @@ -359,7 +359,7 @@ class Shipping(StripeObject): """ The shipping option. """ - type: Literal["digital", "shipping"] + type: Union[Literal["digital", "shipping"], str] """ The type of the selected fulfillment option. """ @@ -419,7 +419,7 @@ class Disclosure(StripeObject): """ The content of the disclosure. """ - content_type: Literal["link", "markdown", "plain"] + content_type: Union[Literal["link", "markdown", "plain"], str] """ The content type of the disclosure. """ @@ -501,7 +501,11 @@ class OrderDetails(StripeObject): class PaymentMethodOptions(StripeObject): class Card(StripeObject): brands_blocked: Optional[ - List[Literal["american_express", "mastercard", "visa"]] + List[ + Union[ + Literal["american_express", "mastercard", "visa"], str + ] + ] ] """ The card brands blocked by the agent. @@ -512,19 +516,19 @@ class Card(StripeObject): Card-specific payment method options. """ displayable_card_brands: Optional[ - List[Literal["american_express", "mastercard", "visa"]] + List[Union[Literal["american_express", "mastercard", "visa"], str]] ] """ The computed displayable card brands. """ displayable_payment_method_types: Optional[ - List[Literal["affirm", "card", "klarna"]] + List[Union[Literal["affirm", "card", "klarna"], str]] ] """ The computed displayable payment method types. """ excluded_payment_method_types: Optional[ - List[Literal["affirm", "card", "klarna"]] + List[Union[Literal["affirm", "card", "klarna"], str]] ] """ The payment method types excluded by the agent. @@ -641,7 +645,7 @@ class MarketplaceSellerDetails(StripeObject): pass card_brands: Optional[ - List[Literal["american_express", "mastercard", "visa"]] + List[Union[Literal["american_express", "mastercard", "visa"], str]] ] """ The card brands supported by the seller. @@ -655,7 +659,7 @@ class MarketplaceSellerDetails(StripeObject): The network profile of the seller. """ payment_method_types: Optional[ - List[Literal["affirm", "card", "klarna"]] + List[Union[Literal["affirm", "card", "klarna"], str]] ] """ The payment method types supported by the seller. @@ -842,7 +846,9 @@ class Discount(StripeObject): """ The SPT used for payment. """ - status: Literal["completed", "expired", "open", "requires_action"] + status: Union[ + Literal["completed", "expired", "open", "requires_action"], str + ] """ The status of the requested session. """ diff --git a/stripe/events/_v1_account_signals_including_delinquency_created_event.py b/stripe/events/_v1_account_signals_including_delinquency_created_event.py index 639aeeb57..4ae159f6b 100644 --- a/stripe/events/_v1_account_signals_including_delinquency_created_event.py +++ b/stripe/events/_v1_account_signals_including_delinquency_created_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -47,28 +47,34 @@ class Indicator(StripeObject): """ A brief explanation of how this indicator contributed to the delinquency probability. """ - impact: Literal[ - "decrease", "neutral", "slight_increase", "strong_increase" + impact: Union[ + Literal[ + "decrease", "neutral", "slight_increase", "strong_increase" + ], + str, ] """ The effect this indicator had on the overall risk level. """ - indicator: Literal[ - "account_balance", - "aov", - "charge_concentration", - "disputes", - "dispute_window", - "duplicates", - "exposure", - "firmographic", - "lifetime_metrics", - "payment_processing", - "payment_volume", - "payouts", - "refunds", - "tenure", - "transfers", + indicator: Union[ + Literal[ + "account_balance", + "aov", + "charge_concentration", + "disputes", + "dispute_window", + "duplicates", + "exposure", + "firmographic", + "lifetime_metrics", + "payment_processing", + "payment_volume", + "payouts", + "refunds", + "tenure", + "transfers", + ], + str, ] """ The name of the specific indicator used in the risk assessment. @@ -90,8 +96,16 @@ class Indicator(StripeObject): """ The probability of delinquency. Can be between 0.00 and 100.00. """ - risk_level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" + risk_level: Union[ + Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ], + str, ] """ Categorical assessment of the delinquency risk based on probability. diff --git a/stripe/events/_v1_billing_meter_error_report_triggered_event.py b/stripe/events/_v1_billing_meter_error_report_triggered_event.py index 1005073d5..de3896cdb 100644 --- a/stripe/events/_v1_billing_meter_error_report_triggered_event.py +++ b/stripe/events/_v1_billing_meter_error_report_triggered_event.py @@ -5,7 +5,7 @@ from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -101,17 +101,20 @@ class Request(StripeObject): """ _inner_class_types = {"request": Request} - code: Literal[ - "archived_meter", - "meter_event_customer_not_found", - "meter_event_dimension_count_too_high", - "meter_event_invalid_value", - "meter_event_no_customer_defined", - "meter_event_value_too_many_digits", - "missing_dimension_payload_keys", - "no_meter", - "timestamp_in_future", - "timestamp_too_far_in_past", + code: Union[ + Literal[ + "archived_meter", + "meter_event_customer_not_found", + "meter_event_dimension_count_too_high", + "meter_event_invalid_value", + "meter_event_no_customer_defined", + "meter_event_value_too_many_digits", + "missing_dimension_payload_keys", + "no_meter", + "timestamp_in_future", + "timestamp_too_far_in_past", + ], + str, ] """ Open Enum. diff --git a/stripe/events/_v1_billing_meter_no_meter_found_event.py b/stripe/events/_v1_billing_meter_no_meter_found_event.py index 9e4363394..874c04b89 100644 --- a/stripe/events/_v1_billing_meter_no_meter_found_event.py +++ b/stripe/events/_v1_billing_meter_no_meter_found_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -54,17 +54,20 @@ class Request(StripeObject): """ _inner_class_types = {"request": Request} - code: Literal[ - "archived_meter", - "meter_event_customer_not_found", - "meter_event_dimension_count_too_high", - "meter_event_invalid_value", - "meter_event_no_customer_defined", - "meter_event_value_too_many_digits", - "missing_dimension_payload_keys", - "no_meter", - "timestamp_in_future", - "timestamp_too_far_in_past", + code: Union[ + Literal[ + "archived_meter", + "meter_event_customer_not_found", + "meter_event_dimension_count_too_high", + "meter_event_invalid_value", + "meter_event_no_customer_defined", + "meter_event_value_too_many_digits", + "missing_dimension_payload_keys", + "no_meter", + "timestamp_in_future", + "timestamp_too_far_in_past", + ], + str, ] """ Open Enum. diff --git a/stripe/events/_v2_core_account_including_configuration_card_creator_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_card_creator_capability_status_updated_event.py index f9b888cb7..83ab2c5e0 100644 --- a/stripe/events/_v2_core_account_including_configuration_card_creator_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_card_creator_capability_status_updated_event.py @@ -5,7 +5,7 @@ from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, Optional, cast +from typing import Any, Dict, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -98,20 +98,23 @@ class V2CoreAccountIncludingConfigurationCardCreatorCapabilityStatusUpdatedEvent class V2CoreAccountIncludingConfigurationCardCreatorCapabilityStatusUpdatedEventData( StripeObject, ): - updated_capability: Literal[ - "commercial.celtic.charge_card", - "commercial.celtic.spend_card", - "commercial.cross_river_bank.charge_card", - "commercial.cross_river_bank.prepaid_card", - "commercial.cross_river_bank.spend_card", - "commercial.fifth_third.charge_card", - "commercial.lead.prepaid_card", - "commercial.stripe.charge_card", - "commercial.stripe.prepaid_card", - "consumer.celtic.revolving_credit_card", - "consumer.cross_river_bank.prepaid_card", - "consumer.lead.debit_card", - "consumer.lead.prepaid_card", + updated_capability: Union[ + Literal[ + "commercial.celtic.charge_card", + "commercial.celtic.spend_card", + "commercial.cross_river_bank.charge_card", + "commercial.cross_river_bank.prepaid_card", + "commercial.cross_river_bank.spend_card", + "commercial.fifth_third.charge_card", + "commercial.lead.prepaid_card", + "commercial.stripe.charge_card", + "commercial.stripe.prepaid_card", + "consumer.celtic.revolving_credit_card", + "consumer.cross_river_bank.prepaid_card", + "consumer.lead.debit_card", + "consumer.lead.prepaid_card", + ], + str, ] """ Open Enum. The capability which had its status updated. diff --git a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py index 94aeb5f40..fd81f96a2 100644 --- a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py @@ -5,7 +5,7 @@ from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, Optional, cast +from typing import Any, Dict, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -98,53 +98,56 @@ class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent( class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventData( StripeObject, ): - updated_capability: Literal[ - "ach_debit_payments", - "acss_debit_payments", - "affirm_payments", - "afterpay_clearpay_payments", - "alma_payments", - "amazon_pay_payments", - "au_becs_debit_payments", - "bacs_debit_payments", - "bancontact_payments", - "blik_payments", - "boleto_payments", - "card_payments", - "cartes_bancaires_payments", - "cashapp_payments", - "eps_payments", - "fpx_payments", - "gb_bank_transfer_payments", - "grabpay_payments", - "ideal_payments", - "jcb_payments", - "jp_bank_transfer_payments", - "kakao_pay_payments", - "klarna_payments", - "konbini_payments", - "kr_card_payments", - "link_payments", - "mobilepay_payments", - "multibanco_payments", - "mx_bank_transfer_payments", - "naver_pay_payments", - "oxxo_payments", - "p24_payments", - "payco_payments", - "paynow_payments", - "stripe_balance.payouts", - "pay_by_bank_payments", - "promptpay_payments", - "revolut_pay_payments", - "samsung_pay_payments", - "sepa_bank_transfer_payments", - "sepa_debit_payments", - "sunbit_payments", - "swish_payments", - "twint_payments", - "us_bank_transfer_payments", - "zip_payments", + updated_capability: Union[ + Literal[ + "ach_debit_payments", + "acss_debit_payments", + "affirm_payments", + "afterpay_clearpay_payments", + "alma_payments", + "amazon_pay_payments", + "au_becs_debit_payments", + "bacs_debit_payments", + "bancontact_payments", + "blik_payments", + "boleto_payments", + "card_payments", + "cartes_bancaires_payments", + "cashapp_payments", + "eps_payments", + "fpx_payments", + "gb_bank_transfer_payments", + "grabpay_payments", + "ideal_payments", + "jcb_payments", + "jp_bank_transfer_payments", + "kakao_pay_payments", + "klarna_payments", + "konbini_payments", + "kr_card_payments", + "link_payments", + "mobilepay_payments", + "multibanco_payments", + "mx_bank_transfer_payments", + "naver_pay_payments", + "oxxo_payments", + "p24_payments", + "payco_payments", + "paynow_payments", + "stripe_balance.payouts", + "pay_by_bank_payments", + "promptpay_payments", + "revolut_pay_payments", + "samsung_pay_payments", + "sepa_bank_transfer_payments", + "sepa_debit_payments", + "sunbit_payments", + "swish_payments", + "twint_payments", + "us_bank_transfer_payments", + "zip_payments", + ], + str, ] """ Open Enum. The capability which had its status updated. diff --git a/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py index b3a5ac7d3..317fcac5f 100644 --- a/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_money_manager_capability_status_updated_event.py @@ -5,7 +5,7 @@ from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, Optional, cast +from typing import Any, Dict, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -94,33 +94,36 @@ class V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEven class V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventData( StripeObject, ): - updated_capability: Literal[ - "business_storage.inbound.cad", - "business_storage.inbound.eur", - "business_storage.inbound.gbp", - "business_storage.inbound.usd", - "business_storage.inbound.usdc", - "business_storage.outbound.cad", - "business_storage.outbound.eur", - "business_storage.outbound.gbp", - "business_storage.outbound.usd", - "business_storage.outbound.usdc", - "consumer_storage.inbound.usd", - "consumer_storage.inbound.usdc", - "consumer_storage.outbound.usd", - "consumer_storage.outbound.usdc", - "inbound_transfers.bank_accounts", - "outbound_payments.bank_accounts", - "outbound_payments.cards", - "outbound_payments.crypto_wallets", - "outbound_payments.financial_accounts", - "outbound_payments.paper_checks", - "outbound_transfers.bank_accounts", - "outbound_transfers.crypto_wallets", - "outbound_transfers.financial_accounts", - "received_credits.bank_accounts", - "received_credits.crypto_wallets", - "received_debits.bank_accounts", + updated_capability: Union[ + Literal[ + "business_storage.inbound.cad", + "business_storage.inbound.eur", + "business_storage.inbound.gbp", + "business_storage.inbound.usd", + "business_storage.inbound.usdc", + "business_storage.outbound.cad", + "business_storage.outbound.eur", + "business_storage.outbound.gbp", + "business_storage.outbound.usd", + "business_storage.outbound.usdc", + "consumer_storage.inbound.usd", + "consumer_storage.inbound.usdc", + "consumer_storage.outbound.usd", + "consumer_storage.outbound.usdc", + "inbound_transfers.bank_accounts", + "outbound_payments.bank_accounts", + "outbound_payments.cards", + "outbound_payments.crypto_wallets", + "outbound_payments.financial_accounts", + "outbound_payments.paper_checks", + "outbound_transfers.bank_accounts", + "outbound_transfers.crypto_wallets", + "outbound_transfers.financial_accounts", + "received_credits.bank_accounts", + "received_credits.crypto_wallets", + "received_debits.bank_accounts", + ], + str, ] """ Open Enum. The capability which had its status updated. diff --git a/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py index 57578d0a0..fd2e11862 100644 --- a/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py @@ -5,7 +5,7 @@ from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, Optional, cast +from typing import Any, Dict, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -98,26 +98,29 @@ class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent( class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventData( StripeObject, ): - updated_capability: Literal[ - "bank_accounts.ach", - "bank_accounts.becs", - "bank_accounts.eft", - "bank_accounts.fedwire", - "bank_accounts.fps", - "bank_accounts.instant", - "bank_accounts.local", - "bank_accounts.npp", - "bank_accounts.rtp", - "bank_accounts.sepa_credit", - "bank_accounts.sepa_instant", - "bank_accounts.swift", - "bank_accounts.wire", - "cards", - "crypto_wallets_v2", - "paper_checks", - "stripe_balance.payouts", - "stripe_balance.stripe_transfers", - "stripe.transfers", + updated_capability: Union[ + Literal[ + "bank_accounts.ach", + "bank_accounts.becs", + "bank_accounts.eft", + "bank_accounts.fedwire", + "bank_accounts.fps", + "bank_accounts.instant", + "bank_accounts.local", + "bank_accounts.npp", + "bank_accounts.rtp", + "bank_accounts.sepa_credit", + "bank_accounts.sepa_instant", + "bank_accounts.swift", + "bank_accounts.wire", + "cards", + "crypto_wallets_v2", + "paper_checks", + "stripe_balance.payouts", + "stripe_balance.stripe_transfers", + "stripe.transfers", + ], + str, ] """ Open Enum. The capability which had its status updated. diff --git a/stripe/events/_v2_core_account_link_returned_event.py b/stripe/events/_v2_core_account_link_returned_event.py index c1caac18f..dc505786a 100644 --- a/stripe/events/_v2_core_account_link_returned_event.py +++ b/stripe/events/_v2_core_account_link_returned_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -40,14 +40,21 @@ class V2CoreAccountLinkReturnedEventData(StripeObject): The ID of the v2 account. """ configurations: List[ - Literal[ - "customer", "merchant", "money_manager", "recipient", "storer" + Union[ + Literal[ + "customer", + "merchant", + "money_manager", + "recipient", + "storer", + ], + str, ] ] """ Configurations on the Account that was onboarded via the account link. """ - use_case: Literal["account_onboarding", "account_update"] + use_case: Union[Literal["account_onboarding", "account_update"], str] """ Open Enum. The use case type of the account link that has been completed. """ diff --git a/stripe/events/_v2_core_account_signals_fraudulent_website_ready_event.py b/stripe/events/_v2_core_account_signals_fraudulent_website_ready_event.py index be6d8910b..1f929a5fa 100644 --- a/stripe/events/_v2_core_account_signals_fraudulent_website_ready_event.py +++ b/stripe/events/_v2_core_account_signals_fraudulent_website_ready_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, Optional, cast +from typing import Any, Dict, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -55,8 +55,16 @@ class V2CoreAccountSignalsFraudulentWebsiteReadyEventData(StripeObject): """ Unique identifier for the fraudulent website evaluation request. """ - risk_level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" + risk_level: Union[ + Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ], + str, ] """ Risk level for the fraudulent website signal. If evaluation could not run (like invalid website), we return unknown. diff --git a/stripe/events/_v2_core_health_api_error_firing_event.py b/stripe/events/_v2_core_health_api_error_firing_event.py index 111527db5..ba6efbcb9 100644 --- a/stripe/events/_v2_core_health_api_error_firing_event.py +++ b/stripe/events/_v2_core_health_api_error_firing_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -62,7 +62,7 @@ class TopImpactedAccount(StripeObject): """ The error code. """ - http_method: Literal["DELETE", "GET", "POST", "PUT"] + http_method: Union[Literal["DELETE", "GET", "POST", "PUT"], str] """ The HTTP method. """ diff --git a/stripe/events/_v2_core_health_api_error_resolved_event.py b/stripe/events/_v2_core_health_api_error_resolved_event.py index 93bef6caa..335728d67 100644 --- a/stripe/events/_v2_core_health_api_error_resolved_event.py +++ b/stripe/events/_v2_core_health_api_error_resolved_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -62,7 +62,7 @@ class TopImpactedAccount(StripeObject): """ The error code. """ - http_method: Literal["DELETE", "GET", "POST", "PUT"] + http_method: Union[Literal["DELETE", "GET", "POST", "PUT"], str] """ The HTTP method. """ diff --git a/stripe/events/_v2_core_health_api_latency_firing_event.py b/stripe/events/_v2_core_health_api_latency_firing_event.py index cf0df138d..69254de20 100644 --- a/stripe/events/_v2_core_health_api_latency_firing_event.py +++ b/stripe/events/_v2_core_health_api_latency_firing_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -58,7 +58,7 @@ class TopImpactedAccount(StripeObject): """ The canonical path. """ - http_method: Literal["DELETE", "GET", "POST", "PUT"] + http_method: Union[Literal["DELETE", "GET", "POST", "PUT"], str] """ The HTTP method. """ diff --git a/stripe/events/_v2_core_health_api_latency_resolved_event.py b/stripe/events/_v2_core_health_api_latency_resolved_event.py index e6f4abdec..0473cd0dc 100644 --- a/stripe/events/_v2_core_health_api_latency_resolved_event.py +++ b/stripe/events/_v2_core_health_api_latency_resolved_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -58,7 +58,7 @@ class TopImpactedAccount(StripeObject): """ The canonical path. """ - http_method: Literal["DELETE", "GET", "POST", "PUT"] + http_method: Union[Literal["DELETE", "GET", "POST", "PUT"], str] """ The HTTP method. """ diff --git a/stripe/events/_v2_core_health_authorization_rate_drop_firing_event.py b/stripe/events/_v2_core_health_authorization_rate_drop_firing_event.py index 92a6d0ea8..a79ceae54 100644 --- a/stripe/events/_v2_core_health_authorization_rate_drop_firing_event.py +++ b/stripe/events/_v2_core_health_authorization_rate_drop_firing_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -51,7 +51,7 @@ class Dimension(StripeObject): The type of the dimension. """ - charge_type: Literal["money_moving", "validation"] + charge_type: Union[Literal["money_moving", "validation"], str] """ The type of the charge. """ @@ -63,76 +63,79 @@ class Dimension(StripeObject): """ Dimensions that describe what subset of payments are impacted. """ - payment_method_type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "apple_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "card_present", - "cartes_bancaires", - "cashapp", - "crypto", - "dummy_passthrough_card", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "interac_present", - "kakao_pay", - "klarna", - "konbini", - "kriya", - "kr_card", - "link", - "mb_way", - "mobilepay", - "mondu", - "multibanco", - "naver_pay", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "oxxo", - "p24", - "paper_check", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pay_by_bank", - "pix", - "promptpay", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "vipps", - "wechat_pay", - "zip", + payment_method_type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "apple_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cartes_bancaires", + "cashapp", + "crypto", + "dummy_passthrough_card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kriya", + "kr_card", + "link", + "mb_way", + "mobilepay", + "mondu", + "multibanco", + "naver_pay", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "oxxo", + "p24", + "paper_check", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pay_by_bank", + "pix", + "promptpay", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "vipps", + "wechat_pay", + "zip", + ], + str, ] """ The type of the payment method. diff --git a/stripe/events/_v2_core_health_authorization_rate_drop_resolved_event.py b/stripe/events/_v2_core_health_authorization_rate_drop_resolved_event.py index 4dcfbabf3..6f08b3481 100644 --- a/stripe/events/_v2_core_health_authorization_rate_drop_resolved_event.py +++ b/stripe/events/_v2_core_health_authorization_rate_drop_resolved_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -51,7 +51,7 @@ class Dimension(StripeObject): The type of the dimension. """ - charge_type: Literal["money_moving", "validation"] + charge_type: Union[Literal["money_moving", "validation"], str] """ The type of the charge. """ @@ -63,76 +63,79 @@ class Dimension(StripeObject): """ Dimensions that describe what subset of payments are impacted. """ - payment_method_type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "apple_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "card_present", - "cartes_bancaires", - "cashapp", - "crypto", - "dummy_passthrough_card", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "interac_present", - "kakao_pay", - "klarna", - "konbini", - "kriya", - "kr_card", - "link", - "mb_way", - "mobilepay", - "mondu", - "multibanco", - "naver_pay", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "oxxo", - "p24", - "paper_check", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pay_by_bank", - "pix", - "promptpay", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "vipps", - "wechat_pay", - "zip", + payment_method_type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "apple_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cartes_bancaires", + "cashapp", + "crypto", + "dummy_passthrough_card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kriya", + "kr_card", + "link", + "mb_way", + "mobilepay", + "mondu", + "multibanco", + "naver_pay", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "oxxo", + "p24", + "paper_check", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pay_by_bank", + "pix", + "promptpay", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "vipps", + "wechat_pay", + "zip", + ], + str, ] """ The type of the payment method. diff --git a/stripe/events/_v2_core_health_elements_error_firing_event.py b/stripe/events/_v2_core_health_elements_error_firing_event.py index 1eb00e9bc..33d12ac77 100644 --- a/stripe/events/_v2_core_health_elements_error_firing_event.py +++ b/stripe/events/_v2_core_health_elements_error_firing_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, Optional, cast +from typing import Any, Dict, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -38,7 +38,9 @@ class V2CoreHealthElementsErrorFiringEvent(Event): class V2CoreHealthElementsErrorFiringEventData(StripeObject): class Impact(StripeObject): - element_type: Optional[Literal["expressCheckout", "payment"]] + element_type: Optional[ + Union[Literal["expressCheckout", "payment"], str] + ] """ The type of the element. """ diff --git a/stripe/events/_v2_core_health_elements_error_resolved_event.py b/stripe/events/_v2_core_health_elements_error_resolved_event.py index 73cd32bfc..596ee7d2f 100644 --- a/stripe/events/_v2_core_health_elements_error_resolved_event.py +++ b/stripe/events/_v2_core_health_elements_error_resolved_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, Optional, cast +from typing import Any, Dict, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -38,7 +38,9 @@ class V2CoreHealthElementsErrorResolvedEvent(Event): class V2CoreHealthElementsErrorResolvedEventData(StripeObject): class Impact(StripeObject): - element_type: Optional[Literal["expressCheckout", "payment"]] + element_type: Optional[ + Union[Literal["expressCheckout", "payment"], str] + ] """ The type of the element. """ diff --git a/stripe/events/_v2_core_health_fraud_rate_increased_event.py b/stripe/events/_v2_core_health_fraud_rate_increased_event.py index a742707a7..ceebf5988 100644 --- a/stripe/events/_v2_core_health_fraud_rate_increased_event.py +++ b/stripe/events/_v2_core_health_fraud_rate_increased_event.py @@ -5,7 +5,7 @@ from stripe._stripe_response import StripeResponse from stripe.v2._amount import Amount from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, Optional, cast +from typing import Any, Dict, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -37,7 +37,7 @@ class V2CoreHealthFraudRateIncreasedEvent(Event): class V2CoreHealthFraudRateIncreasedEventData(StripeObject): class Impact(StripeObject): - attack_type: Literal["spike", "sustained_attack"] + attack_type: Union[Literal["spike", "sustained_attack"], str] """ Fraud attack type. """ diff --git a/stripe/events/_v2_core_health_payment_method_error_firing_event.py b/stripe/events/_v2_core_health_payment_method_error_firing_event.py index f4d0bf916..1e7f8ca88 100644 --- a/stripe/events/_v2_core_health_payment_method_error_firing_event.py +++ b/stripe/events/_v2_core_health_payment_method_error_firing_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -68,76 +68,79 @@ class TopImpactedAccount(StripeObject): """ The percentage of impacted requests. """ - payment_method_type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "apple_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "card_present", - "cartes_bancaires", - "cashapp", - "crypto", - "dummy_passthrough_card", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "interac_present", - "kakao_pay", - "klarna", - "konbini", - "kriya", - "kr_card", - "link", - "mb_way", - "mobilepay", - "mondu", - "multibanco", - "naver_pay", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "oxxo", - "p24", - "paper_check", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pay_by_bank", - "pix", - "promptpay", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "vipps", - "wechat_pay", - "zip", + payment_method_type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "apple_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cartes_bancaires", + "cashapp", + "crypto", + "dummy_passthrough_card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kriya", + "kr_card", + "link", + "mb_way", + "mobilepay", + "mondu", + "multibanco", + "naver_pay", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "oxxo", + "p24", + "paper_check", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pay_by_bank", + "pix", + "promptpay", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "vipps", + "wechat_pay", + "zip", + ], + str, ] """ The type of the payment method. diff --git a/stripe/events/_v2_core_health_payment_method_error_resolved_event.py b/stripe/events/_v2_core_health_payment_method_error_resolved_event.py index fe2cdc43f..e74cf8668 100644 --- a/stripe/events/_v2_core_health_payment_method_error_resolved_event.py +++ b/stripe/events/_v2_core_health_payment_method_error_resolved_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -70,76 +70,79 @@ class TopImpactedAccount(StripeObject): """ The percentage of impacted requests. """ - payment_method_type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "apple_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "card_present", - "cartes_bancaires", - "cashapp", - "crypto", - "dummy_passthrough_card", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "interac_present", - "kakao_pay", - "klarna", - "konbini", - "kriya", - "kr_card", - "link", - "mb_way", - "mobilepay", - "mondu", - "multibanco", - "naver_pay", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "oxxo", - "p24", - "paper_check", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pay_by_bank", - "pix", - "promptpay", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "vipps", - "wechat_pay", - "zip", + payment_method_type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "apple_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cartes_bancaires", + "cashapp", + "crypto", + "dummy_passthrough_card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kriya", + "kr_card", + "link", + "mb_way", + "mobilepay", + "mondu", + "multibanco", + "naver_pay", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "oxxo", + "p24", + "paper_check", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pay_by_bank", + "pix", + "promptpay", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "vipps", + "wechat_pay", + "zip", + ], + str, ] """ The type of the payment method. diff --git a/stripe/events/_v2_signals_account_signal_fraudulent_merchant_ready_event.py b/stripe/events/_v2_signals_account_signal_fraudulent_merchant_ready_event.py index 831363e7b..e9dd02588 100644 --- a/stripe/events/_v2_signals_account_signal_fraudulent_merchant_ready_event.py +++ b/stripe/events/_v2_signals_account_signal_fraudulent_merchant_ready_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2.core._event import Event, EventNotification -from typing import Any, Dict, List, Optional, cast +from typing import Any, Dict, List, Optional, Union, cast from typing_extensions import Literal, TYPE_CHECKING, override if TYPE_CHECKING: @@ -48,23 +48,32 @@ class Indicator(StripeObject): """ A brief explanation of how this indicator contributed to the fraudulent merchant probability. """ - impact: Literal[ - "decrease", "neutral", "slight_increase", "strong_increase" + impact: Union[ + Literal[ + "decrease", + "neutral", + "slight_increase", + "strong_increase", + ], + str, ] """ The effect this indicator had on the overall risk level. """ - indicator: Literal[ - "bank_account", - "business_information_and_account_activity", - "disputes", - "failures", - "geolocation", - "other", - "other_related_accounts", - "other_transaction_activity", - "owner_email", - "web_presence", + indicator: Union[ + Literal[ + "bank_account", + "business_information_and_account_activity", + "disputes", + "failures", + "geolocation", + "other", + "other_related_accounts", + "other_transaction_activity", + "owner_email", + "web_presence", + ], + str, ] """ The name of the specific indicator used in the risk assessment. @@ -78,13 +87,16 @@ class Indicator(StripeObject): """ The probability of the merchant being fraudulent. Can be between 0.00 and 100.00. May be empty if the risk_level is UNKNOWN or NOT_ASSESSED. """ - risk_level: Literal[ - "elevated", - "highest", - "low", - "normal", - "not_assessed", - "unknown", + risk_level: Union[ + Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ], + str, ] """ Categorical assessment of the fraudulent merchant risk based on probability. diff --git a/stripe/financial_connections/_account.py b/stripe/financial_connections/_account.py index 268cd5cda..45c918e46 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -6,7 +6,7 @@ from stripe._nested_resource_class_methods import nested_resource_class_methods from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -66,7 +66,7 @@ class AccountHolder(StripeObject): The ID for an Account representing a customer that this account belongs to. Only available when `account_holder.type` is `customer`. """ customer_account: Optional[str] - type: Literal["account", "customer"] + type: Union[Literal["account", "customer"], str] """ Type of account holder that this account belongs to. """ @@ -76,11 +76,13 @@ class AccountNumber(StripeObject): """ When the account number is expected to expire, if applicable. """ - identifier_type: Literal["account_number", "tokenized_account_number"] + identifier_type: Union[ + Literal["account_number", "tokenized_account_number"], str + ] """ The type of account number associated with the account. """ - status: Literal["deactivated", "transactable"] + status: Union[Literal["deactivated", "transactable"], str] """ Whether the account number is currently active and usable for transactions. """ @@ -124,7 +126,7 @@ class Credit(StripeObject): Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. """ - type: Literal["cash", "credit"] + type: Union[Literal["cash", "credit"], str] """ The `type` of the balance. An additional hash is included on the balance with a name matching this value. """ @@ -139,7 +141,7 @@ class BalanceRefresh(StripeObject): """ Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. """ - status: Literal["failed", "pending", "succeeded"] + status: Union[Literal["failed", "pending", "succeeded"], str] """ The status of the last refresh attempt. """ @@ -153,7 +155,7 @@ class InferredBalancesRefresh(StripeObject): """ Time at which the next inferred balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. """ - status: Literal["failed", "pending", "succeeded"] + status: Union[Literal["failed", "pending", "succeeded"], str] """ The status of the last refresh attempt. """ @@ -167,19 +169,22 @@ class OwnershipRefresh(StripeObject): """ Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. """ - status: Literal["failed", "pending", "succeeded"] + status: Union[Literal["failed", "pending", "succeeded"], str] """ The status of the last refresh attempt. """ class StatusDetails(StripeObject): class Active(StripeObject): - action: Literal["none", "relink_required"] + action: Union[Literal["none", "relink_required"], str] """ The action (if any) to proactively relink the Account. """ - cause: Literal[ - "access_expired", "institution_requirement", "unspecified" + cause: Union[ + Literal[ + "access_expired", "institution_requirement", "unspecified" + ], + str, ] """ The underlying cause of the Account becoming inactive. @@ -190,17 +195,20 @@ class Active(StripeObject): """ class Inactive(StripeObject): - action: Literal["none", "relink_required"] + action: Union[Literal["none", "relink_required"], str] """ The action (if any) to relink the inactive Account. """ - cause: Literal[ - "access_denied", - "access_expired", - "account_closed", - "account_unavailable", - "institution_requirement", - "unspecified", + cause: Union[ + Literal[ + "access_denied", + "access_expired", + "account_closed", + "account_unavailable", + "institution_requirement", + "unspecified", + ], + str, ] """ The underlying cause of the Account being inactive. @@ -223,7 +231,7 @@ class TransactionRefresh(StripeObject): """ Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. """ - status: Literal["failed", "pending", "succeeded"] + status: Union[Literal["failed", "pending", "succeeded"], str] """ The status of the last refresh attempt. """ @@ -248,7 +256,7 @@ class TransactionRefresh(StripeObject): """ The state of the most recent attempt to refresh the account balance. """ - category: Literal["cash", "credit", "investment", "other"] + category: Union[Literal["cash", "credit", "investment", "other"], str] """ The type of the account. Account category is further divided in `subcategory`. """ @@ -298,24 +306,32 @@ class TransactionRefresh(StripeObject): """ permissions: Optional[ List[ - Literal["balances", "ownership", "payment_method", "transactions"] + Union[ + Literal[ + "balances", "ownership", "payment_method", "transactions" + ], + str, + ] ] ] """ The list of permissions granted by this account. """ - status: Literal["active", "disconnected", "inactive"] + status: Union[Literal["active", "disconnected", "inactive"], str] """ The status of the link to the account. """ status_details: Optional[StatusDetails] - subcategory: Literal[ - "checking", - "credit_card", - "line_of_credit", - "mortgage", - "other", - "savings", + subcategory: Union[ + Literal[ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "other", + "savings", + ], + str, ] """ If `category` is `cash`, one of: @@ -334,12 +350,16 @@ class TransactionRefresh(StripeObject): If `category` is `investment` or `other`, this will be `other`. """ subscriptions: Optional[ - List[Literal["balance", "inferred_balances", "transactions"]] + List[ + Union[Literal["balance", "inferred_balances", "transactions"], str] + ] ] """ The list of data refresh subscriptions requested on this account. """ - supported_payment_method_types: List[Literal["link", "us_bank_account"]] + supported_payment_method_types: List[ + Union[Literal["link", "us_bank_account"], str] + ] """ The [PaymentMethod type](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. """ diff --git a/stripe/financial_connections/_authorization.py b/stripe/financial_connections/_authorization.py index df52e264c..59c1b1111 100644 --- a/stripe/financial_connections/_authorization.py +++ b/stripe/financial_connections/_authorization.py @@ -3,7 +3,7 @@ from stripe._api_resource import APIResource from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -34,14 +34,14 @@ class AccountHolder(StripeObject): The ID for an Account representing a customer that this account belongs to. Only available when `account_holder.type` is `customer`. """ customer_account: Optional[str] - type: Literal["account", "customer"] + type: Union[Literal["account", "customer"], str] """ Type of account holder that this account belongs to. """ class StatusDetails(StripeObject): class Active(StripeObject): - action: Literal["none", "relink_required"] + action: Union[Literal["none", "relink_required"], str] """ The action (if any) to proactively relink the Authorization. """ @@ -51,7 +51,7 @@ class Active(StripeObject): """ class Inactive(StripeObject): - action: Literal["none", "relink_required"] + action: Union[Literal["none", "relink_required"], str] """ The action (if any) to relink the inactive Authorization. """ @@ -84,7 +84,7 @@ class Inactive(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - status: Literal["active", "disconnected", "inactive"] + status: Union[Literal["active", "disconnected", "inactive"], str] """ The status of the connection to the Authorization. """ diff --git a/stripe/financial_connections/_institution.py b/stripe/financial_connections/_institution.py index 2f2df86e3..69c56e4e4 100644 --- a/stripe/financial_connections/_institution.py +++ b/stripe/financial_connections/_institution.py @@ -3,7 +3,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -85,7 +85,7 @@ class Transactions(StripeObject): """ A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions. """ - status: Literal["active", "degraded", "inactive"] + status: Union[Literal["active", "degraded", "inactive"], str] """ The status of this institution in the Financial Connections authentication flow. """ diff --git a/stripe/financial_connections/_session.py b/stripe/financial_connections/_session.py index bb6109a42..82e08eb27 100644 --- a/stripe/financial_connections/_session.py +++ b/stripe/financial_connections/_session.py @@ -4,7 +4,7 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -40,7 +40,7 @@ class AccountHolder(StripeObject): The ID for an Account representing a customer that this account belongs to. Only available when `account_holder.type` is `customer`. """ customer_account: Optional[str] - type: Literal["account", "customer"] + type: Union[Literal["account", "customer"], str] """ Type of account holder that this account belongs to. """ @@ -48,12 +48,15 @@ class AccountHolder(StripeObject): class Filters(StripeObject): account_subcategories: Optional[ List[ - Literal[ - "checking", - "credit_card", - "line_of_credit", - "mortgage", - "savings", + Union[ + Literal[ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "savings", + ], + str, ] ] ] @@ -92,7 +95,7 @@ class Limits(StripeObject): """ class ManualEntry(StripeObject): - mode: Optional[Literal["automatic", "custom", "disabled"]] + mode: Optional[Union[Literal["automatic", "custom", "disabled"], str]] """ Controls how manual entry of bank account details is presented to the user. """ @@ -117,7 +120,7 @@ class RelinkResult(StripeObject): The authorization relinked in the Session. Only present if relink is successful. """ failure_reason: Optional[ - Literal["no_account", "no_authorization", "other"] + Union[Literal["no_account", "no_authorization", "other"], str] ] """ Reason for why relink failed. One of `no_authorization`, `no_account`, or `other`. @@ -125,7 +128,7 @@ class RelinkResult(StripeObject): class StatusDetails(StripeObject): class Cancelled(StripeObject): - reason: Literal["custom_manual_entry", "other"] + reason: Union[Literal["custom_manual_entry", "other"], str] """ The reason for the Session being cancelled. """ @@ -165,15 +168,24 @@ class Cancelled(StripeObject): String representing the object's type. Objects of the same type share the same value. """ permissions: List[ - Literal["balances", "ownership", "payment_method", "transactions"] + Union[ + Literal["balances", "ownership", "payment_method", "transactions"], + str, + ] ] """ Permissions requested for accounts collected during this session. """ prefetch: Optional[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -186,12 +198,14 @@ class Cancelled(StripeObject): """ For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ - status: Optional[Literal["cancelled", "failed", "pending", "succeeded"]] + status: Optional[ + Union[Literal["cancelled", "failed", "pending", "succeeded"], str] + ] """ The current state of the session. """ status_details: Optional[StatusDetails] - ui_mode: Optional[Literal["hosted", "modal"]] + ui_mode: Optional[Union[Literal["hosted", "modal"], str]] """ The UI mode for this session. """ diff --git a/stripe/financial_connections/_transaction.py b/stripe/financial_connections/_transaction.py index 970366ec2..a288c187b 100644 --- a/stripe/financial_connections/_transaction.py +++ b/stripe/financial_connections/_transaction.py @@ -3,7 +3,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -62,7 +62,7 @@ class StatusTransitions(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - status: Literal["pending", "posted", "void"] + status: Union[Literal["pending", "posted", "void"], str] """ The status of the transaction. """ diff --git a/stripe/forwarding/_request.py b/stripe/forwarding/_request.py index 3923adae7..589b0f183 100644 --- a/stripe/forwarding/_request.py +++ b/stripe/forwarding/_request.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -126,12 +126,15 @@ class Header(StripeObject): The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. """ replacements: List[ - Literal[ - "card_cvc", - "card_expiry", - "card_number", - "cardholder_name", - "request_signature", + Union[ + Literal[ + "card_cvc", + "card_expiry", + "card_number", + "cardholder_name", + "request_signature", + ], + str, ] ] """ diff --git a/stripe/identity/_verification_report.py b/stripe/identity/_verification_report.py index d7be3cb42..34afba3da 100644 --- a/stripe/identity/_verification_report.py +++ b/stripe/identity/_verification_report.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -79,10 +79,13 @@ class Dob(StripeObject): class Error(StripeObject): code: Optional[ - Literal[ - "document_expired", - "document_type_not_supported", - "document_unverified_other", + Union[ + Literal[ + "document_expired", + "document_type_not_supported", + "document_unverified_other", + ], + str, ] ] """ @@ -165,15 +168,19 @@ class IssuedDate(StripeObject): """ Document ID number. """ - sex: Optional[Literal["[redacted]", "female", "male", "unknown"]] + sex: Optional[ + Union[Literal["[redacted]", "female", "male", "unknown"], str] + ] """ Sex of the person in the document. """ - status: Literal["unverified", "verified"] + status: Union[Literal["unverified", "verified"], str] """ Status of this `document` check. """ - type: Optional[Literal["driving_license", "id_card", "passport"]] + type: Optional[ + Union[Literal["driving_license", "id_card", "passport"], str] + ] """ Type of the document. """ @@ -210,8 +217,11 @@ class Details(StripeObject): class Error(StripeObject): code: Optional[ - Literal[ - "email_unverified_other", "email_verification_declined" + Union[ + Literal[ + "email_unverified_other", "email_verification_declined" + ], + str, ] ] """ @@ -234,7 +244,7 @@ class Error(StripeObject): """ Details on the verification error. Present when status is `unverified`. """ - status: Literal["unverified", "verified"] + status: Union[Literal["unverified", "verified"], str] """ Status of this `email` check. """ @@ -257,10 +267,13 @@ class Dob(StripeObject): class Error(StripeObject): code: Optional[ - Literal[ - "id_number_insufficient_document_data", - "id_number_mismatch", - "id_number_unverified_other", + Union[ + Literal[ + "id_number_insufficient_document_data", + "id_number_mismatch", + "id_number_unverified_other", + ], + str, ] ] """ @@ -287,7 +300,9 @@ class Error(StripeObject): """ ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present. """ - id_number_type: Optional[Literal["br_cpf", "sg_nric", "us_ssn"]] + id_number_type: Optional[ + Union[Literal["br_cpf", "sg_nric", "us_ssn"], str] + ] """ Type of ID number. """ @@ -295,7 +310,7 @@ class Error(StripeObject): """ Last name. """ - status: Literal["unverified", "verified"] + status: Union[Literal["unverified", "verified"], str] """ Status of this `id_number` check. """ @@ -304,7 +319,11 @@ class Error(StripeObject): class Options(StripeObject): class Document(StripeObject): allowed_types: Optional[ - List[Literal["driving_license", "id_card", "passport"]] + List[ + Union[ + Literal["driving_license", "id_card", "passport"], str + ] + ] ] """ Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. @@ -332,8 +351,11 @@ class IdNumber(StripeObject): class Phone(StripeObject): class Error(StripeObject): code: Optional[ - Literal[ - "phone_unverified_other", "phone_verification_declined" + Union[ + Literal[ + "phone_unverified_other", "phone_verification_declined" + ], + str, ] ] """ @@ -352,7 +374,7 @@ class Error(StripeObject): """ Phone to be verified. """ - status: Literal["unverified", "verified"] + status: Union[Literal["unverified", "verified"], str] """ Status of this `phone` check. """ @@ -361,11 +383,14 @@ class Error(StripeObject): class Selfie(StripeObject): class Error(StripeObject): code: Optional[ - Literal[ - "selfie_document_missing_photo", - "selfie_face_mismatch", - "selfie_manipulated", - "selfie_unverified_other", + Union[ + Literal[ + "selfie_document_missing_photo", + "selfie_face_mismatch", + "selfie_manipulated", + "selfie_unverified_other", + ], + str, ] ] """ @@ -392,7 +417,7 @@ class Error(StripeObject): """ ID of the [File](https://docs.stripe.com/api/files) holding the image of the selfie used in this check. """ - status: Literal["unverified", "verified"] + status: Union[Literal["unverified", "verified"], str] """ Status of this `selfie` check. """ @@ -439,7 +464,9 @@ class Error(StripeObject): """ Result from a selfie check """ - type: Literal["document", "email", "id_number", "verification_flow"] + type: Union[ + Literal["document", "email", "id_number", "verification_flow"], str + ] """ Type of report. """ diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index b2e014ae3..cb3b2870a 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -57,26 +57,29 @@ class VerificationSession( class LastError(StripeObject): code: Optional[ - Literal[ - "abandoned", - "consent_declined", - "country_not_supported", - "device_not_supported", - "document_expired", - "document_type_not_supported", - "document_unverified_other", - "email_unverified_other", - "email_verification_declined", - "id_number_insufficient_document_data", - "id_number_mismatch", - "id_number_unverified_other", - "phone_unverified_other", - "phone_verification_declined", - "selfie_document_missing_photo", - "selfie_face_mismatch", - "selfie_manipulated", - "selfie_unverified_other", - "under_supported_age", + Union[ + Literal[ + "abandoned", + "consent_declined", + "country_not_supported", + "device_not_supported", + "document_expired", + "document_type_not_supported", + "document_unverified_other", + "email_unverified_other", + "email_verification_declined", + "id_number_insufficient_document_data", + "id_number_mismatch", + "id_number_unverified_other", + "phone_unverified_other", + "phone_verification_declined", + "selfie_document_missing_photo", + "selfie_face_mismatch", + "selfie_manipulated", + "selfie_unverified_other", + "under_supported_age", + ], + str, ] ] """ @@ -90,7 +93,11 @@ class LastError(StripeObject): class Options(StripeObject): class Document(StripeObject): allowed_types: Optional[ - List[Literal["driving_license", "id_card", "passport"]] + List[ + Union[ + Literal["driving_license", "id_card", "passport"], str + ] + ] ] """ Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. @@ -118,11 +125,11 @@ class IdNumber(StripeObject): pass class Matching(StripeObject): - dob: Optional[Literal["none", "similar"]] + dob: Optional[Union[Literal["none", "similar"], str]] """ Strictness of the DOB matching policy to apply. """ - name: Optional[Literal["none", "similar"]] + name: Optional[Union[Literal["none", "similar"], str]] """ Strictness of the name matching policy to apply. """ @@ -157,7 +164,7 @@ class ProvidedDetails(StripeObject): """ class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -233,7 +240,9 @@ class Dob(StripeObject): """ The user's verified id number. """ - id_number_type: Optional[Literal["br_cpf", "sg_nric", "us_ssn"]] + id_number_type: Optional[ + Union[Literal["br_cpf", "sg_nric", "us_ssn"], str] + ] """ The user's verified id number type. """ @@ -245,7 +254,9 @@ class Dob(StripeObject): """ The user's verified phone number """ - sex: Optional[Literal["[redacted]", "female", "male", "unknown"]] + sex: Optional[ + Union[Literal["[redacted]", "female", "male", "unknown"], str] + ] """ The user's verified sex. """ @@ -316,11 +327,15 @@ class Dob(StripeObject): The ID of the Account representing a customer. """ related_person: Optional[RelatedPerson] - status: Literal["canceled", "processing", "requires_input", "verified"] + status: Union[ + Literal["canceled", "processing", "requires_input", "verified"], str + ] """ Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://docs.stripe.com/identity/how-sessions-work). """ - type: Literal["document", "email", "id_number", "verification_flow"] + type: Union[ + Literal["document", "email", "id_number", "verification_flow"], str + ] """ The type of [verification check](https://docs.stripe.com/identity/verification-checks) to be performed. """ diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index b069fa55f..3ab88fa73 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -8,7 +8,7 @@ from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -82,8 +82,16 @@ class AmountDetails(StripeObject): """ class BalanceResponse(StripeObject): - account_type: Literal[ - "checking", "credit", "default", "other", "savings", "universal" + account_type: Union[ + Literal[ + "checking", + "credit", + "default", + "other", + "savings", + "universal", + ], + str, ] """ The cardholder account type affected by this authorization. @@ -240,281 +248,284 @@ class Fee(StripeObject): class EnrichedMerchantData(StripeObject): class Merchant(StripeObject): class Industry(StripeObject): - id: Literal[ - "accessories", - "accounting_and_bookkeeping", - "acupuncture", - "administrative_services", - "adult_entertainment", - "adult_retail", - "advertising_and_marketing", - "advertising_technology", - "agricultural_technology", - "agriculture_and_forestry", - "airlines_and_aviation", - "alternative_medicine", - "alternative_rentals", - "anesthesiologists", - "antiques", - "aquatic_transportation", - "arcades_and_amusement_parks", - "art_dealers_and_galleries", - "arts_and_hobbies", - "atms", - "auctions", - "auto_parts_and_supplies", - "auto_smog_checks", - "auto_tires", - "auto_transmission", - "automotive_dealerships", - "automotive_retail", - "automotive_services", - "bakeries", - "banking_and_finance", - "bars", - "beauty_spas_and_salons", - "beer_wine_and_spirits", - "benefits", - "bicycles", - "billiards_and_pool", - "biotechnology", - "blood_banks_and_centers", - "boat_dealers", - "bookstores", - "bowling", - "breweries_distilleries_and_wineries", - "business_brokers_and_franchises", - "business_services", - "butchers", - "buy_now_pay_later", - "cafes", - "candy_shops", - "cannabis_dispensary", - "car_appraisers", - "car_wash_and_detail", - "cardiologists", - "cards_and_stationery", - "casinos_and_gambling", - "catering", - "charity", - "childcare", - "children_s_clothing", - "children_s_retail", - "chiropractors", - "circuses_and_carnivals", - "cleaning", - "clothing_and_accessories", - "clothing_services", - "commercial_supplies", - "communication_software", - "computers_and_electronics", - "construction_and_home_improvement", - "construction_supplies", - "contractors", - "convenience_stores", - "cosmetics", - "costumes", - "counseling_and_therapy", - "couriers", - "coworking_spaces", - "creative", - "creative_software", - "credit_reporting", - "crm", - "crowdfunding", - "cryptocurrency", - "dance_halls_and_saloons", - "delivery_services", - "dentists", - "department_stores", - "dermatologists", - "design_technology", - "developer_tools", - "digital_money_movement", - "discount_stores", - "education", - "educational_technology", - "electric_vehicle_charging", - "emergency_services", - "employment_services", - "enterprise_software", - "entertainment", - "ents", - "environmental_technology", - "equipment_rentals", - "events_and_event_planning", - "eyewear", - "fairgrounds_and_rodeos", - "family_medicine", - "fast_food", - "fertility", - "financial_management_software", - "financial_planning_and_investments", - "financial_technology", - "fishmongers", - "flea_markets", - "fleet", - "florists", - "food_and_drink", - "food_delivery_services", - "food_trucks", - "fuel_dealers", - "funeral_services", - "furniture", - "gas_stations", - "gastroenterologists", - "general_goods", - "general_surgery", - "gift_and_novelty", - "government", - "grocery_delivery_services", - "gyms_health_and_fitness_centers", - "hair_removal", - "hair_salons_and_barbers", - "hardware", - "hardware_and_home_improvement", - "hospitals_clinics_and_medical_centers", - "household_services", - "hr_platform", - "immigration", - "import_and_export", - "industrial_and_energy", - "inflight_internet_and_entertainment", - "insurance", - "internal_medicine", - "internet", - "jewelry_and_watches", - "landmarks", - "laundry_and_garment_services", - "lawn_and_garden", - "legal_services", - "legal_technology", - "lending", - "lingerie", - "lodging", - "luggage", - "maintenance_and_repair", - "manicures_and_pedicures", - "manufacturing", - "marina", - "marine_supplies", - "marketing_software", - "massage_clinics_and_therapists", - "media", - "medical_and_healthcare_services", - "medical_supplies_and_labs", - "men_s_clothing", - "mental_health_professionals", - "mobile_applications", - "motorcycle_moped_and_scooter_repair", - "museums", - "musical_instruments", - "neurologists", - "news_and_magazines", - "newsstands", - "nutritionists", - "obstetricians_and_gynecologists", - "office_supplies", - "oil_and_gas", - "oncologists", - "online_marketplace", - "ophthalmologists", - "optometrists", - "organizations", - "orthopedic_surgeons", - "other", - "outlets", - "packaging", - "paper", - "parking", - "parks_and_outdoors", - "party_centers", - "pathologists", - "pawn_shops", - "pediatricians", - "pet_grooming", - "pet_services", - "pets", - "pharmacies", - "photography", - "physical_therapy", - "piercings", - "plastic_surgeons", - "podiatrists", - "pregnancy_and_sexual_health", - "professional_services", - "property_management", - "psychiatrists", - "psychics_and_astrologers", - "psychologists", - "public_services", - "public_transportation", - "publishing_software", - "radiologists", - "rails", - "real_estate", - "recreation", - "religious", - "renewable_energy", - "respiratory", - "restaurants", - "retail", - "ride_shares", - "sales_enablement_software", - "security_and_privacy", - "security_and_safety", - "services", - "shipping_and_freight", - "shoes", - "skin_care", - "social_clubs", - "software", - "software_engineering", - "spas", - "specialist_physicans", - "specialty_clothing_and_accessories", - "specialty_foods", - "specialty_groceries", - "specialty_retail", - "sporting_goods", - "storage", - "streaming_services", - "supermarkets_and_grocery_stores", - "swimwear", - "tailors", - "tanning_salons", - "tattoos", - "taxes", - "taxi_and_limousines", - "technology", - "telecommunications", - "television", - "textiles", - "theater_and_cinema", - "tickets_and_reservations", - "tobacco_smoke_and_vape_shops", - "tolls_and_fees", - "tourist_information_and_services", - "towing_and_roadside_assistance", - "toy_stores", - "transportation", - "travel", - "travel_services", - "travel_software", - "urologists", - "utilities", - "vehicle_rentals", - "vending_machine", - "venues", - "veterinarians", - "video_games", - "vintage_and_thrift", - "warehouses_and_wholesale_stores", - "water_and_waste_management_services", - "web_infrastructure", - "wedding_and_bridal", - "women_s_clothing", - "zoos_and_aquariums", + id: Union[ + Literal[ + "accessories", + "accounting_and_bookkeeping", + "acupuncture", + "administrative_services", + "adult_entertainment", + "adult_retail", + "advertising_and_marketing", + "advertising_technology", + "agricultural_technology", + "agriculture_and_forestry", + "airlines_and_aviation", + "alternative_medicine", + "alternative_rentals", + "anesthesiologists", + "antiques", + "aquatic_transportation", + "arcades_and_amusement_parks", + "art_dealers_and_galleries", + "arts_and_hobbies", + "atms", + "auctions", + "auto_parts_and_supplies", + "auto_smog_checks", + "auto_tires", + "auto_transmission", + "automotive_dealerships", + "automotive_retail", + "automotive_services", + "bakeries", + "banking_and_finance", + "bars", + "beauty_spas_and_salons", + "beer_wine_and_spirits", + "benefits", + "bicycles", + "billiards_and_pool", + "biotechnology", + "blood_banks_and_centers", + "boat_dealers", + "bookstores", + "bowling", + "breweries_distilleries_and_wineries", + "business_brokers_and_franchises", + "business_services", + "butchers", + "buy_now_pay_later", + "cafes", + "candy_shops", + "cannabis_dispensary", + "car_appraisers", + "car_wash_and_detail", + "cardiologists", + "cards_and_stationery", + "casinos_and_gambling", + "catering", + "charity", + "childcare", + "children_s_clothing", + "children_s_retail", + "chiropractors", + "circuses_and_carnivals", + "cleaning", + "clothing_and_accessories", + "clothing_services", + "commercial_supplies", + "communication_software", + "computers_and_electronics", + "construction_and_home_improvement", + "construction_supplies", + "contractors", + "convenience_stores", + "cosmetics", + "costumes", + "counseling_and_therapy", + "couriers", + "coworking_spaces", + "creative", + "creative_software", + "credit_reporting", + "crm", + "crowdfunding", + "cryptocurrency", + "dance_halls_and_saloons", + "delivery_services", + "dentists", + "department_stores", + "dermatologists", + "design_technology", + "developer_tools", + "digital_money_movement", + "discount_stores", + "education", + "educational_technology", + "electric_vehicle_charging", + "emergency_services", + "employment_services", + "enterprise_software", + "entertainment", + "ents", + "environmental_technology", + "equipment_rentals", + "events_and_event_planning", + "eyewear", + "fairgrounds_and_rodeos", + "family_medicine", + "fast_food", + "fertility", + "financial_management_software", + "financial_planning_and_investments", + "financial_technology", + "fishmongers", + "flea_markets", + "fleet", + "florists", + "food_and_drink", + "food_delivery_services", + "food_trucks", + "fuel_dealers", + "funeral_services", + "furniture", + "gas_stations", + "gastroenterologists", + "general_goods", + "general_surgery", + "gift_and_novelty", + "government", + "grocery_delivery_services", + "gyms_health_and_fitness_centers", + "hair_removal", + "hair_salons_and_barbers", + "hardware", + "hardware_and_home_improvement", + "hospitals_clinics_and_medical_centers", + "household_services", + "hr_platform", + "immigration", + "import_and_export", + "industrial_and_energy", + "inflight_internet_and_entertainment", + "insurance", + "internal_medicine", + "internet", + "jewelry_and_watches", + "landmarks", + "laundry_and_garment_services", + "lawn_and_garden", + "legal_services", + "legal_technology", + "lending", + "lingerie", + "lodging", + "luggage", + "maintenance_and_repair", + "manicures_and_pedicures", + "manufacturing", + "marina", + "marine_supplies", + "marketing_software", + "massage_clinics_and_therapists", + "media", + "medical_and_healthcare_services", + "medical_supplies_and_labs", + "men_s_clothing", + "mental_health_professionals", + "mobile_applications", + "motorcycle_moped_and_scooter_repair", + "museums", + "musical_instruments", + "neurologists", + "news_and_magazines", + "newsstands", + "nutritionists", + "obstetricians_and_gynecologists", + "office_supplies", + "oil_and_gas", + "oncologists", + "online_marketplace", + "ophthalmologists", + "optometrists", + "organizations", + "orthopedic_surgeons", + "other", + "outlets", + "packaging", + "paper", + "parking", + "parks_and_outdoors", + "party_centers", + "pathologists", + "pawn_shops", + "pediatricians", + "pet_grooming", + "pet_services", + "pets", + "pharmacies", + "photography", + "physical_therapy", + "piercings", + "plastic_surgeons", + "podiatrists", + "pregnancy_and_sexual_health", + "professional_services", + "property_management", + "psychiatrists", + "psychics_and_astrologers", + "psychologists", + "public_services", + "public_transportation", + "publishing_software", + "radiologists", + "rails", + "real_estate", + "recreation", + "religious", + "renewable_energy", + "respiratory", + "restaurants", + "retail", + "ride_shares", + "sales_enablement_software", + "security_and_privacy", + "security_and_safety", + "services", + "shipping_and_freight", + "shoes", + "skin_care", + "social_clubs", + "software", + "software_engineering", + "spas", + "specialist_physicans", + "specialty_clothing_and_accessories", + "specialty_foods", + "specialty_groceries", + "specialty_retail", + "sporting_goods", + "storage", + "streaming_services", + "supermarkets_and_grocery_stores", + "swimwear", + "tailors", + "tanning_salons", + "tattoos", + "taxes", + "taxi_and_limousines", + "technology", + "telecommunications", + "television", + "textiles", + "theater_and_cinema", + "tickets_and_reservations", + "tobacco_smoke_and_vape_shops", + "tolls_and_fees", + "tourist_information_and_services", + "towing_and_roadside_assistance", + "toy_stores", + "transportation", + "travel", + "travel_services", + "travel_software", + "urologists", + "utilities", + "vehicle_rentals", + "vending_machine", + "venues", + "veterinarians", + "video_games", + "vintage_and_thrift", + "warehouses_and_wholesale_stores", + "water_and_waste_management_services", + "web_infrastructure", + "wedding_and_bridal", + "women_s_clothing", + "zoos_and_aquariums", + ], + str, ] """ Most specific value of the seller's category. @@ -636,13 +647,16 @@ class Spade(StripeObject): """ If `spade` is a data source, this hash contains details provided by Spade. """ - type: Literal[ - "buy_now_pay_later", - "delivery_service", - "marketplace", - "other", - "payment_processor", - "platform", + type: Union[ + Literal[ + "buy_now_pay_later", + "delivery_service", + "marketplace", + "other", + "payment_processor", + "platform", + ], + str, ] """ Category of the third party. @@ -741,10 +755,13 @@ class Tax(StripeObject): Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. """ purchase_type: Optional[ - Literal[ - "fuel_and_non_fuel_purchase", - "fuel_purchase", - "non_fuel_purchase", + Union[ + Literal[ + "fuel_and_non_fuel_purchase", + "fuel_purchase", + "non_fuel_purchase", + ], + str, ] ] """ @@ -755,7 +772,12 @@ class Tax(StripeObject): More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data. """ service_type: Optional[ - Literal["full_service", "non_fuel_transaction", "self_service"] + Union[ + Literal[ + "full_service", "non_fuel_transaction", "self_service" + ], + str, + ] ] """ The type of fuel service. @@ -770,14 +792,17 @@ class FraudChallenge(StripeObject): """ The method by which the fraud challenge was delivered to the cardholder. """ - status: Literal[ - "expired", "pending", "rejected", "undeliverable", "verified" + status: Union[ + Literal[ + "expired", "pending", "rejected", "undeliverable", "verified" + ], + str, ] """ The status of the fraud challenge. """ undeliverable_reason: Optional[ - Literal["no_phone_number", "unsupported_phone_number"] + Union[Literal["no_phone_number", "unsupported_phone_number"], str] ] """ If the challenge is not deliverable, the reason why. @@ -793,27 +818,33 @@ class Fuel(StripeObject): The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. """ type: Optional[ - Literal[ - "diesel", - "other", - "unleaded_plus", - "unleaded_regular", - "unleaded_super", + Union[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ], + str, ] ] """ The type of fuel that was purchased. """ unit: Optional[ - Literal[ - "charging_minute", - "imperial_gallon", - "kilogram", - "kilowatt_hour", - "liter", - "other", - "pound", - "us_gallon", + Union[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ], + str, ] ] """ @@ -946,7 +977,7 @@ class AmountDetails(StripeObject): _inner_class_types = {"amount_details": AmountDetails} class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -1023,28 +1054,31 @@ class TraceId(StripeObject): """ The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. """ - reason: Literal[ - "account_disabled", - "card_active", - "card_canceled", - "card_expired", - "card_inactive", - "cardholder_blocked", - "cardholder_inactive", - "cardholder_verification_required", - "insecure_authorization_method", - "insufficient_funds", - "network_fallback", - "not_allowed", - "pin_blocked", - "spending_controls", - "stripe_internal_error", - "suspected_fraud", - "verification_failed", - "webhook_approved", - "webhook_declined", - "webhook_error", - "webhook_timeout", + reason: Union[ + Literal[ + "account_disabled", + "card_active", + "card_canceled", + "card_expired", + "card_inactive", + "cardholder_blocked", + "cardholder_inactive", + "cardholder_verification_required", + "insecure_authorization_method", + "insufficient_funds", + "network_fallback", + "not_allowed", + "pin_blocked", + "spending_controls", + "stripe_internal_error", + "suspected_fraud", + "verification_failed", + "webhook_approved", + "webhook_declined", + "webhook_error", + "webhook_timeout", + ], + str, ] """ When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. @@ -1064,13 +1098,16 @@ class TraceId(StripeObject): class TerminalData(StripeObject): cardholder_verification_result: Optional[ - Literal[ - "failed", - "none", - "pin", - "pin_and_signature", - "signature", - "unknown", + Union[ + Literal[ + "failed", + "none", + "pin", + "pin_and_signature", + "signature", + "unknown", + ], + str, ] ] """ @@ -1089,190 +1126,193 @@ class Device(StripeObject): The IP address of the device at provisioning time. """ language: Optional[ - Literal[ - "aa", - "ab", - "ae", - "af", - "ak", - "am", - "an", - "ar", - "as", - "av", - "ay", - "az", - "ba", - "be", - "bg", - "bi", - "bm", - "bn", - "bo", - "br", - "bs", - "ca", - "ce", - "ch", - "co", - "cr", - "cs", - "cu", - "cv", - "cy", - "da", - "de", - "dv", - "dz", - "ee", - "el", - "en", - "eo", - "es", - "et", - "eu", - "fa", - "ff", - "fi", - "fj", - "fo", - "fr", - "fy", - "ga", - "gd", - "gl", - "gn", - "gu", - "gv", - "ha", - "he", - "hi", - "ho", - "hr", - "ht", - "hu", - "hy", - "hz", - "ia", - "id", - "ie", - "ig", - "ii", - "ik", - "io", - "is", - "it", - "iu", - "ja", - "jv", - "ka", - "kg", - "ki", - "kj", - "kk", - "kl", - "km", - "kn", - "ko", - "kr", - "ks", - "ku", - "kv", - "kw", - "ky", - "la", - "lb", - "lg", - "li", - "ln", - "lo", - "lt", - "lu", - "lv", - "mg", - "mh", - "mi", - "mk", - "ml", - "mn", - "mr", - "ms", - "mt", - "my", - "na", - "nb", - "nd", - "ne", - "ng", - "nl", - "nn", - "no", - "nr", - "nv", - "ny", - "oc", - "oj", - "om", - "or", - "os", - "pa", - "pi", - "pl", - "ps", - "pt", - "qu", - "rm", - "rn", - "ro", - "ru", - "rw", - "sa", - "sc", - "sd", - "se", - "sg", - "si", - "sk", - "sl", - "sm", - "sn", - "so", - "sq", - "sr", - "ss", - "st", - "su", - "sv", - "sw", - "ta", - "te", - "tg", - "th", - "ti", - "tk", - "tl", - "tn", - "to", - "tr", - "ts", - "tt", - "tw", - "ty", - "ug", - "uk", - "ur", - "uz", - "ve", - "vi", - "vo", - "wa", - "wo", - "xh", - "yi", - "yo", - "za", - "zh", - "zu", + Union[ + Literal[ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yo", + "za", + "zh", + "zu", + ], + str, ] ] """ @@ -1303,7 +1343,10 @@ class Visa(StripeObject): A unique reference ID from the network to represent the card account number. """ token_decision_recommendation: Optional[ - Literal["approve", "decline", "recommend_id_and_v"] + Union[ + Literal["approve", "decline", "recommend_id_and_v"], + str, + ] ] """ The network's recommendation to Stripe for this token activation request. @@ -1327,7 +1370,7 @@ class WalletProvider(StripeObject): An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. """ card_number_source: Optional[ - Literal["app", "manual", "on_file", "other"] + Union[Literal["app", "manual", "on_file", "other"], str] ] """ The method used for tokenizing a card. @@ -1338,35 +1381,38 @@ class WalletProvider(StripeObject): """ reason_codes: Optional[ List[ - Literal[ - "account_card_too_new", - "account_recently_changed", - "account_too_new", - "account_too_new_since_launch", - "additional_device", - "data_expired", - "defer_id_v_decision", - "device_recently_lost", - "good_activity_history", - "has_suspended_tokens", - "high_risk", - "inactive_account", - "long_account_tenure", - "low_account_score", - "low_device_score", - "low_phone_number_score", - "network_service_error", - "outside_home_territory", - "provisioning_cardholder_mismatch", - "provisioning_device_and_cardholder_mismatch", - "provisioning_device_mismatch", - "same_device_no_prior_authentication", - "same_device_successful_prior_authentication", - "software_update", - "suspicious_activity", - "too_many_different_cardholders", - "too_many_recent_attempts", - "too_many_recent_tokens", + Union[ + Literal[ + "account_card_too_new", + "account_recently_changed", + "account_too_new", + "account_too_new_since_launch", + "additional_device", + "data_expired", + "defer_id_v_decision", + "device_recently_lost", + "good_activity_history", + "has_suspended_tokens", + "high_risk", + "inactive_account", + "long_account_tenure", + "low_account_score", + "low_device_score", + "low_phone_number_score", + "network_service_error", + "outside_home_territory", + "provisioning_cardholder_mismatch", + "provisioning_device_and_cardholder_mismatch", + "provisioning_device_mismatch", + "same_device_no_prior_authentication", + "same_device_successful_prior_authentication", + "software_update", + "suspicious_activity", + "too_many_different_cardholders", + "too_many_recent_attempts", + "too_many_recent_tokens", + ], + str, ] ] ] @@ -1374,7 +1420,7 @@ class WalletProvider(StripeObject): The reasons for suggested tokenization given by the card network. """ suggested_decision: Optional[ - Literal["approve", "decline", "require_auth"] + Union[Literal["approve", "decline", "require_auth"], str] ] """ The recommendation on responding to the tokenization request. @@ -1382,7 +1428,7 @@ class WalletProvider(StripeObject): device: Optional[Device] mastercard: Optional[Mastercard] - type: Literal["mastercard", "visa"] + type: Union[Literal["mastercard", "visa"], str] """ The card network for this token. """ @@ -1409,19 +1455,24 @@ class WalletProvider(StripeObject): """ network_data: Optional[NetworkData] provisioning_decision: Optional[ - Literal["approve", "approve_pending_id_and_v", "decline"] + Union[ + Literal["approve", "approve_pending_id_and_v", "decline"], str + ] ] """ The decision made during token provisioning. """ token_type: Optional[ - Literal[ - "card_on_file", - "cloud_based", - "commerce_platform", - "commercial_virtual_account", - "secure_element", - "static_credential", + Union[ + Literal[ + "card_on_file", + "cloud_based", + "commerce_platform", + "commercial_virtual_account", + "secure_element", + "static_credential", + ], + str, ] ] """ @@ -1445,30 +1496,45 @@ class Treasury(StripeObject): class VerificationData(StripeObject): class AuthenticationExemption(StripeObject): - claimed_by: Literal["acquirer", "issuer"] + claimed_by: Union[Literal["acquirer", "issuer"], str] """ The entity that requested the exemption, either the acquiring merchant or the Issuing user. """ - type: Literal[ - "low_value_transaction", "transaction_risk_analysis", "unknown" + type: Union[ + Literal[ + "low_value_transaction", + "transaction_risk_analysis", + "unknown", + ], + str, ] """ The specific exemption claimed for this authorization. """ class ThreeDSecure(StripeObject): - result: Literal[ - "attempt_acknowledged", "authenticated", "failed", "required" + result: Union[ + Literal[ + "attempt_acknowledged", + "authenticated", + "failed", + "required", + ], + str, ] """ The outcome of the 3D Secure authentication request. """ - address_line1_check: Literal["match", "mismatch", "not_provided"] + address_line1_check: Union[ + Literal["match", "mismatch", "not_provided"], str + ] """ Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`. """ - address_postal_code_check: Literal["match", "mismatch", "not_provided"] + address_postal_code_check: Union[ + Literal["match", "mismatch", "not_provided"], str + ] """ Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. """ @@ -1476,11 +1542,11 @@ class ThreeDSecure(StripeObject): """ The exemption applied to this authorization. """ - cvc_check: Literal["match", "mismatch", "not_provided"] + cvc_check: Union[Literal["match", "mismatch", "not_provided"], str] """ Whether the cardholder provided a CVC and if it matched Stripe's record. """ - expiry_check: Literal["match", "mismatch", "not_provided"] + expiry_check: Union[Literal["match", "mismatch", "not_provided"], str] """ Whether the cardholder provided an expiry date and if it matched Stripe's record. """ @@ -1509,8 +1575,8 @@ class ThreeDSecure(StripeObject): """ Whether the authorization has been approved. """ - authorization_method: Literal[ - "chip", "contactless", "keyed_in", "online", "swipe" + authorization_method: Union[ + Literal["chip", "contactless", "keyed_in", "online", "swipe"], str ] """ How the card details were provided. @@ -1524,7 +1590,7 @@ class ThreeDSecure(StripeObject): """ You can [create physical or virtual cards](https://docs.stripe.com/issuing) that are issued to cardholders. """ - card_presence: Optional[Literal["not_present", "present"]] + card_presence: Optional[Union[Literal["not_present", "present"], str]] """ Whether the card was present at the point of sale for the authorization. """ @@ -1605,7 +1671,7 @@ class ThreeDSecure(StripeObject): """ History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. """ - status: Literal["closed", "expired", "pending", "reversed"] + status: Union[Literal["closed", "expired", "pending", "reversed"], str] """ The current status of the authorization in its lifecycle. """ diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index f203bd538..d47faafe7 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -8,7 +8,7 @@ from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -48,11 +48,14 @@ class LatestFraudWarning(StripeObject): Timestamp of the most recent fraud warning. """ type: Optional[ - Literal[ - "card_testing_exposure", - "fraud_dispute_filed", - "third_party_reported", - "user_indicated_fraud", + Union[ + Literal[ + "card_testing_exposure", + "fraud_dispute_filed", + "third_party_reported", + "user_indicated_fraud", + ], + str, ] ] """ @@ -70,7 +73,7 @@ class CancelAfter(StripeObject): _inner_class_types = {"cancel_after": CancelAfter} class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -129,10 +132,13 @@ class NormalizedAddress(StripeObject): State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). """ - mode: Literal[ - "disabled", - "normalization_only", - "validation_and_normalization", + mode: Union[ + Literal[ + "disabled", + "normalization_only", + "validation_and_normalization", + ], + str, ] """ The address validation capabilities to use. @@ -142,10 +148,13 @@ class NormalizedAddress(StripeObject): The normalized shipping address. """ result: Optional[ - Literal[ - "indeterminate", - "likely_deliverable", - "likely_undeliverable", + Union[ + Literal[ + "indeterminate", + "likely_deliverable", + "likely_undeliverable", + ], + str, ] ] """ @@ -169,7 +178,9 @@ class Customs(StripeObject): The name of the business at the shipping address, used on the shipping label to ensure delivery when the card is shipped to a cardholder's workplace. """ carrier: Optional[ - Literal["correos", "dhl", "fedex", "royal_mail", "usps"] + Union[ + Literal["correos", "dhl", "fedex", "royal_mail", "usps"], str + ] ] """ The delivery company that shipped a card. @@ -194,19 +205,22 @@ class Customs(StripeObject): """ Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. """ - service: Literal["express", "priority", "standard"] + service: Union[Literal["express", "priority", "standard"], str] """ Shipment service, such as `standard` or `express`. """ status: Optional[ - Literal[ - "canceled", - "delivered", - "failure", - "pending", - "returned", - "shipped", - "submitted", + Union[ + Literal[ + "canceled", + "delivered", + "failure", + "pending", + "returned", + "shipped", + "submitted", + ], + str, ] ] """ @@ -220,7 +234,7 @@ class Customs(StripeObject): """ A link to the shipping carrier's site where you can view detailed information about a card shipment. """ - type: Literal["bulk", "individual"] + type: Union[Literal["bulk", "individual"], str] """ Packaging options. """ @@ -540,13 +554,16 @@ class SpendingLimit(StripeObject): """ Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", + interval: Union[ + Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ], + str, ] """ Interval (or event) to which the amount applies. @@ -1197,10 +1214,13 @@ class ApplePay(StripeObject): Apple Pay Eligibility """ ineligible_reason: Optional[ - Literal[ - "missing_agreement", - "missing_cardholder_contact", - "unsupported_region", + Union[ + Literal[ + "missing_agreement", + "missing_cardholder_contact", + "unsupported_region", + ], + str, ] ] """ @@ -1217,10 +1237,13 @@ class GooglePay(StripeObject): Google Pay Eligibility """ ineligible_reason: Optional[ - Literal[ - "missing_agreement", - "missing_cardholder_contact", - "unsupported_region", + Union[ + Literal[ + "missing_agreement", + "missing_cardholder_contact", + "unsupported_region", + ], + str, ] ] """ @@ -1346,11 +1369,11 @@ class GooglePay(StripeObject): Where and how the card will be shipped. """ spending_controls: SpendingControls - status: Literal["active", "canceled", "inactive"] + status: Union[Literal["active", "canceled", "inactive"], str] """ Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. """ - type: Literal["physical", "virtual"] + type: Union[Literal["physical", "virtual"], str] """ The type of the card. """ diff --git a/stripe/issuing/_cardholder.py b/stripe/issuing/_cardholder.py index 6778bc01f..acd915e26 100644 --- a/stripe/issuing/_cardholder.py +++ b/stripe/issuing/_cardholder.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -155,18 +155,21 @@ class Document(StripeObject): } class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ class Requirements(StripeObject): disabled_reason: Optional[ - Literal[ - "listed", - "rejected.listed", - "requirements.past_due", - "under_review", + Union[ + Literal[ + "listed", + "rejected.listed", + "requirements.past_due", + "under_review", + ], + str, ] ] """ @@ -174,16 +177,19 @@ class Requirements(StripeObject): """ past_due: Optional[ List[ - Literal[ - "company.tax_id", - "individual.card_issuing.user_terms_acceptance.date", - "individual.card_issuing.user_terms_acceptance.ip", - "individual.dob.day", - "individual.dob.month", - "individual.dob.year", - "individual.first_name", - "individual.last_name", - "individual.verification.document", + Union[ + Literal[ + "company.tax_id", + "individual.card_issuing.user_terms_acceptance.date", + "individual.card_issuing.user_terms_acceptance.ip", + "individual.dob.day", + "individual.dob.month", + "individual.dob.year", + "individual.first_name", + "individual.last_name", + "individual.verification.document", + ], + str, ] ] ] @@ -501,13 +507,16 @@ class SpendingLimit(StripeObject): """ Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", + interval: Union[ + Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ], + str, ] """ Interval (or event) to which the amount applies. @@ -1193,7 +1202,9 @@ class SpendingLimit(StripeObject): The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://docs.stripe.com/issuing/3d-secure#when-is-3d-secure-applied) for more details. """ preferred_locales: Optional[ - List[Literal["da", "de", "en", "es", "fr", "it", "pl", "sv"]] + List[ + Union[Literal["da", "de", "en", "es", "fr", "it", "pl", "sv"], str] + ] ] """ The cardholder's preferred locales (languages), ordered by preference. Locales can be `da`, `de`, `en`, `es`, `fr`, `it`, `pl`, or `sv`. @@ -1208,11 +1219,11 @@ class SpendingLimit(StripeObject): """ Rules that control spending across this cardholder's cards. Refer to our [documentation](https://docs.stripe.com/issuing/controls/spending-controls) for more details. """ - status: Literal["active", "blocked", "inactive"] + status: Union[Literal["active", "blocked", "inactive"], str] """ Specifies whether to permit authorizations on this cardholder's cards. """ - type: Literal["company", "individual"] + type: Union[Literal["company", "individual"], str] """ One of `individual` or `company`. See [Choose a cardholder type](https://docs.stripe.com/issuing/other/choose-cardholder) for more details. """ diff --git a/stripe/issuing/_credit_underwriting_record.py b/stripe/issuing/_credit_underwriting_record.py index 4be522a94..22e848104 100644 --- a/stripe/issuing/_credit_underwriting_record.py +++ b/stripe/issuing/_credit_underwriting_record.py @@ -4,7 +4,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -45,11 +45,15 @@ class CreditUnderwritingRecord( ) class Application(StripeObject): - application_method: Literal["in_person", "mail", "online", "phone"] + application_method: Union[ + Literal["in_person", "mail", "online", "phone"], str + ] """ The channel through which the applicant has submitted their application. """ - purpose: Literal["credit_limit_increase", "credit_line_opening"] + purpose: Union[ + Literal["credit_limit_increase", "credit_line_opening"], str + ] """ Scope of demand made by the applicant. """ @@ -75,70 +79,73 @@ class ApplicationRejected(StripeObject): Details about the `reasons.other` when present. """ reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", + Union[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ], + str, ] ] """ @@ -169,78 +176,81 @@ class CreditLimitDecreased(StripeObject): Details about the `reasons.other` when present. """ reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", + Union[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "change_in_financial_state", + "change_in_utilization_of_credit_line", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "decrease_in_income_to_expense_ratio", + "decrease_in_social_media_performance", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "exceeds_acceptable_platform_exposure", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "has_recent_credit_limit_increase", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_credit_utilization", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "insufficient_usage_as_qualified_expenses", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ], + str, ] ] """ @@ -253,78 +263,81 @@ class CreditLineClosed(StripeObject): Details about the `reasons.other` when present. """ reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", + Union[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "change_in_financial_state", + "change_in_utilization_of_credit_line", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "decrease_in_income_to_expense_ratio", + "decrease_in_social_media_performance", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "exceeds_acceptable_platform_exposure", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "has_recent_credit_limit_increase", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_credit_utilization", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "insufficient_usage_as_qualified_expenses", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ], + str, ] ] """ @@ -347,14 +360,17 @@ class CreditLineClosed(StripeObject): """ Details about a decision credit_line_closed. """ - type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", + type: Union[ + Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + "withdrawn_by_applicant", + ], + str, ] """ Outcome of the decision. @@ -371,14 +387,17 @@ class UnderwritingException(StripeObject): """ Written explanation for the exception. """ - original_decision_type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", + original_decision_type: Union[ + Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + "withdrawn_by_applicant", + ], + str, ] """ The decision before the exception was applied. @@ -392,7 +411,7 @@ class UnderwritingException(StripeObject): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ - created_from: Literal["application", "proactive_review"] + created_from: Union[Literal["application", "proactive_review"], str] """ The event that triggered the underwriting. """ diff --git a/stripe/issuing/_dispute.py b/stripe/issuing/_dispute.py index 2730e8a96..1e5f6e646 100644 --- a/stripe/issuing/_dispute.py +++ b/stripe/issuing/_dispute.py @@ -8,7 +8,7 @@ from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -222,11 +222,15 @@ class Canceled(StripeObject): """ Description of the merchandise or service that was purchased. """ - product_type: Optional[Literal["merchandise", "service"]] + product_type: Optional[ + Union[Literal["merchandise", "service"], str] + ] """ Whether the product was a merchandise or service. """ - return_status: Optional[Literal["merchant_rejected", "successful"]] + return_status: Optional[ + Union[Literal["merchant_rejected", "successful"], str] + ] """ Result of cardholder's attempt to return the product. """ @@ -288,7 +292,9 @@ class MerchandiseNotAsDescribed(StripeObject): """ Description of the cardholder's attempt to return the product. """ - return_status: Optional[Literal["merchant_rejected", "successful"]] + return_status: Optional[ + Union[Literal["merchant_rejected", "successful"], str] + ] """ Result of cardholder's attempt to return the product. """ @@ -324,7 +330,9 @@ class NotReceived(StripeObject): """ Description of the merchandise or service that was purchased. """ - product_type: Optional[Literal["merchandise", "service"]] + product_type: Optional[ + Union[Literal["merchandise", "service"], str] + ] """ Whether the product was a merchandise or service. """ @@ -342,7 +350,9 @@ class Other(StripeObject): """ Description of the merchandise or service that was purchased. """ - product_type: Optional[Literal["merchandise", "service"]] + product_type: Optional[ + Union[Literal["merchandise", "service"], str] + ] """ Whether the product was a merchandise or service. """ @@ -376,15 +386,18 @@ class ServiceNotAsDescribed(StripeObject): no_valid_authorization: Optional[NoValidAuthorization] not_received: Optional[NotReceived] other: Optional[Other] - reason: Literal[ - "canceled", - "duplicate", - "fraudulent", - "merchandise_not_as_described", - "no_valid_authorization", - "not_received", - "other", - "service_not_as_described", + reason: Union[ + Literal[ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "no_valid_authorization", + "not_received", + "other", + "service_not_as_described", + ], + str, ] """ The reason for filing the dispute. Its value will match the field containing the evidence. @@ -467,22 +480,25 @@ class ProvisionalCredit(StripeObject): """ The time at which the platform reported revoking the provisional credit. """ - status: Literal[ - "delinquent", - "granted", - "not_required", - "permanent", - "required", - "revocable", - "revocation_notice_period", - "revoked", + status: Union[ + Literal[ + "delinquent", + "granted", + "not_required", + "permanent", + "required", + "revocable", + "revocation_notice_period", + "revoked", + ], + str, ] """ The status of the provisional credit obligation. """ class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -527,27 +543,30 @@ class Treasury(StripeObject): If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ loss_reason: Optional[ - Literal[ - "cardholder_authentication_issuer_liability", - "eci5_token_transaction_with_tavv", - "excess_disputes_in_timeframe", - "has_not_met_the_minimum_dispute_amount_requirements", - "invalid_duplicate_dispute", - "invalid_incorrect_amount_dispute", - "invalid_no_authorization", - "invalid_use_of_disputes", - "merchandise_delivered_or_shipped", - "merchandise_or_service_as_described", - "not_cancelled", - "other", - "refund_issued", - "submitted_beyond_allowable_time_limit", - "transaction_3ds_required", - "transaction_approved_after_prior_fraud_dispute", - "transaction_authorized", - "transaction_electronically_read", - "transaction_qualifies_for_visa_easy_payment_service", - "transaction_unattended", + Union[ + Literal[ + "cardholder_authentication_issuer_liability", + "eci5_token_transaction_with_tavv", + "excess_disputes_in_timeframe", + "has_not_met_the_minimum_dispute_amount_requirements", + "invalid_duplicate_dispute", + "invalid_incorrect_amount_dispute", + "invalid_no_authorization", + "invalid_use_of_disputes", + "merchandise_delivered_or_shipped", + "merchandise_or_service_as_described", + "not_cancelled", + "other", + "refund_issued", + "submitted_beyond_allowable_time_limit", + "transaction_3ds_required", + "transaction_approved_after_prior_fraud_dispute", + "transaction_authorized", + "transaction_electronically_read", + "transaction_qualifies_for_visa_easy_payment_service", + "transaction_unattended", + ], + str, ] ] """ @@ -573,7 +592,9 @@ class Treasury(StripeObject): """ Redaction status of this dispute. If the dispute is not redacted, this field will be null. """ - status: Literal["expired", "lost", "submitted", "unsubmitted", "won"] + status: Union[ + Literal["expired", "lost", "submitted", "unsubmitted", "won"], str + ] """ Current status of the dispute. """ diff --git a/stripe/issuing/_dispute_settlement_detail.py b/stripe/issuing/_dispute_settlement_detail.py index b24f73511..1cfb2b2a6 100644 --- a/stripe/issuing/_dispute_settlement_detail.py +++ b/stripe/issuing/_dispute_settlement_detail.py @@ -3,7 +3,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -50,7 +50,7 @@ class NetworkData(StripeObject): """ The ID of the linked dispute. """ - event_type: Literal["filing", "loss", "representment", "win"] + event_type: Union[Literal["filing", "loss", "representment", "win"], str] """ The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle. """ @@ -62,7 +62,7 @@ class NetworkData(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ - network: Literal["maestro", "mastercard", "visa"] + network: Union[Literal["maestro", "mastercard", "visa"], str] """ The card network for this dispute settlement detail. One of ["visa", "mastercard", "maestro"] """ diff --git a/stripe/issuing/_personalization_design.py b/stripe/issuing/_personalization_design.py index 8c5ca1476..cc45c428a 100644 --- a/stripe/issuing/_personalization_design.py +++ b/stripe/issuing/_personalization_design.py @@ -8,7 +8,7 @@ from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -81,15 +81,18 @@ class Preferences(StripeObject): class RejectionReasons(StripeObject): card_logo: Optional[ List[ - Literal[ - "geographic_location", - "inappropriate", - "network_name", - "non_binary_image", - "non_fiat_currency", - "other", - "other_entity", - "promotional_material", + Union[ + Literal[ + "geographic_location", + "inappropriate", + "network_name", + "non_binary_image", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ], + str, ] ] ] @@ -98,14 +101,17 @@ class RejectionReasons(StripeObject): """ carrier_text: Optional[ List[ - Literal[ - "geographic_location", - "inappropriate", - "network_name", - "non_fiat_currency", - "other", - "other_entity", - "promotional_material", + Union[ + Literal[ + "geographic_location", + "inappropriate", + "network_name", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ], + str, ] ] ] @@ -155,7 +161,7 @@ class RejectionReasons(StripeObject): """ preferences: Preferences rejection_reasons: RejectionReasons - status: Literal["active", "inactive", "rejected", "review"] + status: Union[Literal["active", "inactive", "rejected", "review"], str] """ Whether this personalization design can be used to create cards. """ diff --git a/stripe/issuing/_physical_bundle.py b/stripe/issuing/_physical_bundle.py index 7b29c2055..ddf556499 100644 --- a/stripe/issuing/_physical_bundle.py +++ b/stripe/issuing/_physical_bundle.py @@ -3,7 +3,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar +from typing import ClassVar, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -25,15 +25,17 @@ class PhysicalBundle(ListableAPIResource["PhysicalBundle"]): ) class Features(StripeObject): - card_logo: Literal["optional", "required", "unsupported"] + card_logo: Union[Literal["optional", "required", "unsupported"], str] """ The policy for how to use card logo images in a card design with this physical bundle. """ - carrier_text: Literal["optional", "required", "unsupported"] + carrier_text: Union[ + Literal["optional", "required", "unsupported"], str + ] """ The policy for how to use carrier letter text in a card design with this physical bundle. """ - second_line: Literal["optional", "required", "unsupported"] + second_line: Union[Literal["optional", "required", "unsupported"], str] """ The policy for how to use a second line on a card with this physical bundle. """ @@ -55,11 +57,11 @@ class Features(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - status: Literal["active", "inactive", "review"] + status: Union[Literal["active", "inactive", "review"], str] """ Whether this physical bundle can be used to create cards. """ - type: Literal["custom", "standard"] + type: Union[Literal["custom", "standard"], str] """ Whether this physical bundle is a standard Stripe offering or custom-made for you. """ diff --git a/stripe/issuing/_settlement.py b/stripe/issuing/_settlement.py index 44209e621..668879592 100644 --- a/stripe/issuing/_settlement.py +++ b/stripe/issuing/_settlement.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -75,7 +75,7 @@ class Settlement(StripeObject): """ One of `international` or `uk_national_net`. """ - status: Literal["complete", "pending"] + status: Union[Literal["complete", "pending"], str] """ The current processing status of this settlement. """ diff --git a/stripe/issuing/_token.py b/stripe/issuing/_token.py index 62b2bb61a..7541ed744 100644 --- a/stripe/issuing/_token.py +++ b/stripe/issuing/_token.py @@ -6,7 +6,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -40,190 +40,193 @@ class Device(StripeObject): The IP address of the device at provisioning time. """ language: Optional[ - Literal[ - "aa", - "ab", - "ae", - "af", - "ak", - "am", - "an", - "ar", - "as", - "av", - "ay", - "az", - "ba", - "be", - "bg", - "bi", - "bm", - "bn", - "bo", - "br", - "bs", - "ca", - "ce", - "ch", - "co", - "cr", - "cs", - "cu", - "cv", - "cy", - "da", - "de", - "dv", - "dz", - "ee", - "el", - "en", - "eo", - "es", - "et", - "eu", - "fa", - "ff", - "fi", - "fj", - "fo", - "fr", - "fy", - "ga", - "gd", - "gl", - "gn", - "gu", - "gv", - "ha", - "he", - "hi", - "ho", - "hr", - "ht", - "hu", - "hy", - "hz", - "ia", - "id", - "ie", - "ig", - "ii", - "ik", - "io", - "is", - "it", - "iu", - "ja", - "jv", - "ka", - "kg", - "ki", - "kj", - "kk", - "kl", - "km", - "kn", - "ko", - "kr", - "ks", - "ku", - "kv", - "kw", - "ky", - "la", - "lb", - "lg", - "li", - "ln", - "lo", - "lt", - "lu", - "lv", - "mg", - "mh", - "mi", - "mk", - "ml", - "mn", - "mr", - "ms", - "mt", - "my", - "na", - "nb", - "nd", - "ne", - "ng", - "nl", - "nn", - "no", - "nr", - "nv", - "ny", - "oc", - "oj", - "om", - "or", - "os", - "pa", - "pi", - "pl", - "ps", - "pt", - "qu", - "rm", - "rn", - "ro", - "ru", - "rw", - "sa", - "sc", - "sd", - "se", - "sg", - "si", - "sk", - "sl", - "sm", - "sn", - "so", - "sq", - "sr", - "ss", - "st", - "su", - "sv", - "sw", - "ta", - "te", - "tg", - "th", - "ti", - "tk", - "tl", - "tn", - "to", - "tr", - "ts", - "tt", - "tw", - "ty", - "ug", - "uk", - "ur", - "uz", - "ve", - "vi", - "vo", - "wa", - "wo", - "xh", - "yi", - "yo", - "za", - "zh", - "zu", + Union[ + Literal[ + "aa", + "ab", + "ae", + "af", + "ak", + "am", + "an", + "ar", + "as", + "av", + "ay", + "az", + "ba", + "be", + "bg", + "bi", + "bm", + "bn", + "bo", + "br", + "bs", + "ca", + "ce", + "ch", + "co", + "cr", + "cs", + "cu", + "cv", + "cy", + "da", + "de", + "dv", + "dz", + "ee", + "el", + "en", + "eo", + "es", + "et", + "eu", + "fa", + "ff", + "fi", + "fj", + "fo", + "fr", + "fy", + "ga", + "gd", + "gl", + "gn", + "gu", + "gv", + "ha", + "he", + "hi", + "ho", + "hr", + "ht", + "hu", + "hy", + "hz", + "ia", + "id", + "ie", + "ig", + "ii", + "ik", + "io", + "is", + "it", + "iu", + "ja", + "jv", + "ka", + "kg", + "ki", + "kj", + "kk", + "kl", + "km", + "kn", + "ko", + "kr", + "ks", + "ku", + "kv", + "kw", + "ky", + "la", + "lb", + "lg", + "li", + "ln", + "lo", + "lt", + "lu", + "lv", + "mg", + "mh", + "mi", + "mk", + "ml", + "mn", + "mr", + "ms", + "mt", + "my", + "na", + "nb", + "nd", + "ne", + "ng", + "nl", + "nn", + "no", + "nr", + "nv", + "ny", + "oc", + "oj", + "om", + "or", + "os", + "pa", + "pi", + "pl", + "ps", + "pt", + "qu", + "rm", + "rn", + "ro", + "ru", + "rw", + "sa", + "sc", + "sd", + "se", + "sg", + "si", + "sk", + "sl", + "sm", + "sn", + "so", + "sq", + "sr", + "ss", + "st", + "su", + "sv", + "sw", + "ta", + "te", + "tg", + "th", + "ti", + "tk", + "tl", + "tn", + "to", + "tr", + "ts", + "tt", + "tw", + "ty", + "ug", + "uk", + "ur", + "uz", + "ve", + "vi", + "vo", + "wa", + "wo", + "xh", + "yi", + "yo", + "za", + "zh", + "zu", + ], + str, ] ] """ @@ -241,7 +244,7 @@ class Device(StripeObject): """ The phone number of the device used for tokenization. """ - type: Optional[Literal["other", "phone", "watch"]] + type: Optional[Union[Literal["other", "phone", "watch"], str]] """ The type of device used for tokenization. """ @@ -270,7 +273,7 @@ class Visa(StripeObject): A unique reference ID from Visa to represent the card account number. """ token_decision_recommendation: Optional[ - Literal["approve", "decline", "recommend_id_and_v"] + Union[Literal["approve", "decline", "recommend_id_and_v"], str] ] """ The network's recommendation to Stripe for this token activation request. @@ -308,7 +311,7 @@ class CardholderAddress(StripeObject): An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. """ card_number_source: Optional[ - Literal["app", "manual", "on_file", "other"] + Union[Literal["app", "manual", "on_file", "other"], str] ] """ The method used for tokenizing a card. @@ -328,35 +331,38 @@ class CardholderAddress(StripeObject): """ reason_codes: Optional[ List[ - Literal[ - "account_card_too_new", - "account_recently_changed", - "account_too_new", - "account_too_new_since_launch", - "additional_device", - "data_expired", - "defer_id_v_decision", - "device_recently_lost", - "good_activity_history", - "has_suspended_tokens", - "high_risk", - "inactive_account", - "long_account_tenure", - "low_account_score", - "low_device_score", - "low_phone_number_score", - "network_service_error", - "outside_home_territory", - "provisioning_cardholder_mismatch", - "provisioning_device_and_cardholder_mismatch", - "provisioning_device_mismatch", - "same_device_no_prior_authentication", - "same_device_successful_prior_authentication", - "software_update", - "suspicious_activity", - "too_many_different_cardholders", - "too_many_recent_attempts", - "too_many_recent_tokens", + Union[ + Literal[ + "account_card_too_new", + "account_recently_changed", + "account_too_new", + "account_too_new_since_launch", + "additional_device", + "data_expired", + "defer_id_v_decision", + "device_recently_lost", + "good_activity_history", + "has_suspended_tokens", + "high_risk", + "inactive_account", + "long_account_tenure", + "low_account_score", + "low_device_score", + "low_phone_number_score", + "network_service_error", + "outside_home_territory", + "provisioning_cardholder_mismatch", + "provisioning_device_and_cardholder_mismatch", + "provisioning_device_mismatch", + "same_device_no_prior_authentication", + "same_device_successful_prior_authentication", + "software_update", + "suspicious_activity", + "too_many_different_cardholders", + "too_many_recent_attempts", + "too_many_recent_tokens", + ], + str, ] ] ] @@ -364,7 +370,7 @@ class CardholderAddress(StripeObject): The reasons for suggested tokenization given by the card network. """ suggested_decision: Optional[ - Literal["approve", "decline", "require_auth"] + Union[Literal["approve", "decline", "require_auth"], str] ] """ The recommendation on responding to the tokenization request. @@ -377,7 +383,7 @@ class CardholderAddress(StripeObject): device: Optional[Device] mastercard: Optional[Mastercard] - type: Literal["mastercard", "visa"] + type: Union[Literal["mastercard", "visa"], str] """ The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. """ @@ -414,7 +420,7 @@ class CardholderAddress(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ - network: Literal["mastercard", "visa"] + network: Union[Literal["mastercard", "visa"], str] """ The token service provider / card network associated with the token. """ @@ -428,30 +434,33 @@ class CardholderAddress(StripeObject): String representing the object's type. Objects of the same type share the same value. """ provisioning_decision: Optional[ - Literal["approve", "approve_pending_id_and_v", "decline"] + Union[Literal["approve", "approve_pending_id_and_v", "decline"], str] ] """ The decision made during token provisioning. """ - status: Literal["active", "deleted", "requested", "suspended"] + status: Union[Literal["active", "deleted", "requested", "suspended"], str] """ The usage state of the token. """ token_type: Optional[ - Literal[ - "card_on_file", - "cloud_based", - "commerce_platform", - "commercial_virtual_account", - "secure_element", - "static_credential", + Union[ + Literal[ + "card_on_file", + "cloud_based", + "commerce_platform", + "commercial_virtual_account", + "secure_element", + "static_credential", + ], + str, ] ] """ The type of the token, indicating how it is used. """ wallet_provider: Optional[ - Literal["apple_pay", "google_pay", "samsung_pay"] + Union[Literal["apple_pay", "google_pay", "samsung_pay"], str] ] """ The digital wallet for this token, if one was used. diff --git a/stripe/issuing/_transaction.py b/stripe/issuing/_transaction.py index d09b3bb44..2971ce0ec 100644 --- a/stripe/issuing/_transaction.py +++ b/stripe/issuing/_transaction.py @@ -8,7 +8,7 @@ from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -295,14 +295,17 @@ class TraceId(StripeObject): Identifier assigned by the acquirer to track all messages related to this transaction. """ routed_network: Optional[ - Literal[ - "cirrus", - "interlink", - "maestro", - "mastercard", - "other", - "plus", - "visa", + Union[ + Literal[ + "cirrus", + "interlink", + "maestro", + "mastercard", + "other", + "plus", + "visa", + ], + str, ] ] """ @@ -550,7 +553,7 @@ class Receipt(StripeObject): } class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ @@ -676,11 +679,13 @@ class Treasury(StripeObject): """ [Treasury](https://docs.stripe.com/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts """ - type: Literal["capture", "refund"] + type: Union[Literal["capture", "refund"], str] """ The nature of the transaction. """ - wallet: Optional[Literal["apple_pay", "google_pay", "samsung_pay"]] + wallet: Optional[ + Union[Literal["apple_pay", "google_pay", "samsung_pay"], str] + ] """ The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. """ diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index ee4063c23..6d3cba9cd 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -16,7 +16,7 @@ class AccountCreateParams(RequestOptions): Business information about the account. """ business_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] + "Literal['company', 'government_entity', 'individual', 'non_profit']|str" ] """ The business type. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. @@ -117,12 +117,15 @@ class AccountCreateParamsBusinessProfile(TypedDict): """ minority_owned_business_designation: NotRequired[ List[ - Literal[ - "lgbtqi_owned_business", - "minority_owned_business", - "none_of_these_apply", - "prefer_not_to_answer", - "women_owned_business", + Union[ + Literal[ + "lgbtqi_owned_business", + "minority_owned_business", + "none_of_these_apply", + "prefer_not_to_answer", + "women_owned_business", + ], + str, ] ] ] @@ -1290,7 +1293,7 @@ class AccountCreateParamsCompany(TypedDict): This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. """ ownership_exemption_reason: NotRequired[ - "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']" + "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']|str" ] """ This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. @@ -1316,7 +1319,7 @@ class AccountCreateParamsCompany(TypedDict): This hash is used to attest that the representative is authorized to act as the representative of their legal entity. """ structure: NotRequired[ - "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" + "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']|str" ] """ The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. @@ -1525,7 +1528,7 @@ class AccountCreateParamsController(TypedDict): """ A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. """ - requirement_collection: NotRequired[Literal["application", "stripe"]] + requirement_collection: NotRequired["Literal['application', 'stripe']|str"] """ A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`. """ @@ -1553,28 +1556,28 @@ class AccountCreateParamsControllerApplication(TypedDict): class AccountCreateParamsControllerDashboard(TypedDict): - type: NotRequired[Literal["express", "full", "none"]] + type: NotRequired["Literal['express', 'full', 'none']|str"] """ Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. """ class AccountCreateParamsControllerFees(TypedDict): - payer: NotRequired[Literal["account", "application"]] + payer: NotRequired["Literal['account', 'application']|str"] """ A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). """ class AccountCreateParamsControllerLosses(TypedDict): - payments: NotRequired[Literal["application", "stripe"]] + payments: NotRequired["Literal['application', 'stripe']|str"] """ A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. """ class AccountCreateParamsControllerStripeDashboard(TypedDict): - type: NotRequired[Literal["express", "full", "none"]] + type: NotRequired["Literal['express', 'full', 'none']|str"] """ Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. """ @@ -1864,7 +1867,7 @@ class AccountCreateParamsIndividual(TypedDict): """ The individual's phone number. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. """ @@ -2332,7 +2335,7 @@ class AccountCreateParamsSettingsCardPaymentsDeclineOn(TypedDict): class AccountCreateParamsSettingsInvoices(TypedDict): hosted_payment_method_save: NotRequired[ - Literal["always", "never", "offer"] + "Literal['always', 'never', 'offer']|str" ] """ Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page. @@ -2405,7 +2408,14 @@ class AccountCreateParamsSettingsPayoutsSchedule(TypedDict): The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. Required and applicable only if `interval` is `weekly`. """ weekly_payout_days: NotRequired[ - List[Literal["friday", "monday", "thursday", "tuesday", "wednesday"]] + List[ + Union[ + Literal[ + "friday", "monday", "thursday", "tuesday", "wednesday" + ], + str, + ] + ] ] """ The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. diff --git a/stripe/params/_account_create_person_params.py b/stripe/params/_account_create_person_params.py index 682993589..c57a580bc 100644 --- a/stripe/params/_account_create_person_params.py +++ b/stripe/params/_account_create_person_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -111,7 +111,7 @@ class AccountCreatePersonParams(RequestOptions): """ The person's phone number. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. """ @@ -450,14 +450,17 @@ class AccountCreatePersonParamsUsCfpbData(TypedDict): class AccountCreatePersonParamsUsCfpbDataEthnicityDetails(TypedDict): ethnicity: NotRequired[ List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", + Union[ + Literal[ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican", + ], + str, ] ] ] @@ -473,31 +476,34 @@ class AccountCreatePersonParamsUsCfpbDataEthnicityDetails(TypedDict): class AccountCreatePersonParamsUsCfpbDataRaceDetails(TypedDict): race: NotRequired[ List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", + Union[ + Literal[ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white", + ], + str, ] ] ] diff --git a/stripe/params/_account_link_create_params.py b/stripe/params/_account_link_create_params.py index 0c67770ab..2dca502f1 100644 --- a/stripe/params/_account_link_create_params.py +++ b/stripe/params/_account_link_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -30,11 +30,14 @@ class AccountLinkCreateParams(RequestOptions): """ The URL that the user will be redirected to upon leaving or completing the linked flow. """ - type: Literal[ - "account_onboarding", - "account_update", - "capital_financing_offer", - "capital_financing_reporting", + type: Union[ + Literal[ + "account_onboarding", + "account_update", + "capital_financing_offer", + "capital_financing_reporting", + ], + str, ] """ The type of account link the user is requesting. diff --git a/stripe/params/_account_modify_person_params.py b/stripe/params/_account_modify_person_params.py index 14b82d1ec..a3fadd42e 100644 --- a/stripe/params/_account_modify_person_params.py +++ b/stripe/params/_account_modify_person_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -111,7 +111,7 @@ class AccountModifyPersonParams(RequestOptions): """ The person's phone number. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. """ @@ -450,14 +450,17 @@ class AccountModifyPersonParamsUsCfpbData(TypedDict): class AccountModifyPersonParamsUsCfpbDataEthnicityDetails(TypedDict): ethnicity: NotRequired[ List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", + Union[ + Literal[ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican", + ], + str, ] ] ] @@ -473,31 +476,34 @@ class AccountModifyPersonParamsUsCfpbDataEthnicityDetails(TypedDict): class AccountModifyPersonParamsUsCfpbDataRaceDetails(TypedDict): race: NotRequired[ List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", + Union[ + Literal[ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white", + ], + str, ] ] ] diff --git a/stripe/params/_account_person_create_params.py b/stripe/params/_account_person_create_params.py index ae726fa16..1c1c00f03 100644 --- a/stripe/params/_account_person_create_params.py +++ b/stripe/params/_account_person_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -110,7 +110,7 @@ class AccountPersonCreateParams(TypedDict): """ The person's phone number. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. """ @@ -449,14 +449,17 @@ class AccountPersonCreateParamsUsCfpbData(TypedDict): class AccountPersonCreateParamsUsCfpbDataEthnicityDetails(TypedDict): ethnicity: NotRequired[ List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", + Union[ + Literal[ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican", + ], + str, ] ] ] @@ -472,31 +475,34 @@ class AccountPersonCreateParamsUsCfpbDataEthnicityDetails(TypedDict): class AccountPersonCreateParamsUsCfpbDataRaceDetails(TypedDict): race: NotRequired[ List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", + Union[ + Literal[ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white", + ], + str, ] ] ] diff --git a/stripe/params/_account_person_update_params.py b/stripe/params/_account_person_update_params.py index 9cbf61317..569d95aac 100644 --- a/stripe/params/_account_person_update_params.py +++ b/stripe/params/_account_person_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -110,7 +110,7 @@ class AccountPersonUpdateParams(TypedDict): """ The person's phone number. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. """ @@ -449,14 +449,17 @@ class AccountPersonUpdateParamsUsCfpbData(TypedDict): class AccountPersonUpdateParamsUsCfpbDataEthnicityDetails(TypedDict): ethnicity: NotRequired[ List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", + Union[ + Literal[ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican", + ], + str, ] ] ] @@ -472,31 +475,34 @@ class AccountPersonUpdateParamsUsCfpbDataEthnicityDetails(TypedDict): class AccountPersonUpdateParamsUsCfpbDataRaceDetails(TypedDict): race: NotRequired[ List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", + Union[ + Literal[ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white", + ], + str, ] ] ] diff --git a/stripe/params/_account_update_params.py b/stripe/params/_account_update_params.py index 44d1b97b6..319f6cc99 100644 --- a/stripe/params/_account_update_params.py +++ b/stripe/params/_account_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -15,7 +15,7 @@ class AccountUpdateParams(TypedDict): Business information about the account. """ business_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] + "Literal['company', 'government_entity', 'individual', 'non_profit']|str" ] """ The business type. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. @@ -104,12 +104,15 @@ class AccountUpdateParamsBusinessProfile(TypedDict): """ minority_owned_business_designation: NotRequired[ List[ - Literal[ - "lgbtqi_owned_business", - "minority_owned_business", - "none_of_these_apply", - "prefer_not_to_answer", - "women_owned_business", + Union[ + Literal[ + "lgbtqi_owned_business", + "minority_owned_business", + "none_of_these_apply", + "prefer_not_to_answer", + "women_owned_business", + ], + str, ] ] ] @@ -1277,7 +1280,7 @@ class AccountUpdateParamsCompany(TypedDict): This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. """ ownership_exemption_reason: NotRequired[ - "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']" + "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']|str" ] """ This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. @@ -1300,7 +1303,7 @@ class AccountUpdateParamsCompany(TypedDict): This hash is used to attest that the representative is authorized to act as the representative of their legal entity. """ structure: NotRequired[ - "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" + "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']|str" ] """ The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. @@ -1776,7 +1779,7 @@ class AccountUpdateParamsIndividual(TypedDict): """ The individual's phone number. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. """ @@ -2248,7 +2251,7 @@ class AccountUpdateParamsSettingsInvoices(TypedDict): The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. """ hosted_payment_method_save: NotRequired[ - Literal["always", "never", "offer"] + "Literal['always', 'never', 'offer']|str" ] """ Whether to save the payment method after a payment is completed for a one-time invoice or a subscription invoice when the customer already has a default payment method on the hosted invoice page. @@ -2321,7 +2324,14 @@ class AccountUpdateParamsSettingsPayoutsSchedule(TypedDict): The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. Required and applicable only if `interval` is `weekly`. """ weekly_payout_days: NotRequired[ - List[Literal["friday", "monday", "thursday", "tuesday", "wednesday"]] + List[ + Union[ + Literal[ + "friday", "monday", "thursday", "tuesday", "wednesday" + ], + str, + ] + ] ] """ The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. diff --git a/stripe/params/_balance_settings_modify_params.py b/stripe/params/_balance_settings_modify_params.py index 1afc3480e..5094a23b5 100644 --- a/stripe/params/_balance_settings_modify_params.py +++ b/stripe/params/_balance_settings_modify_params.py @@ -27,7 +27,7 @@ class BalanceSettingsModifyParamsPayments(TypedDict): Settings specific to the account's payouts. """ settlement_currencies: NotRequired[ - "Dict[str, Literal['disabled', 'enabled']]|UntypedStripeObject[Literal['disabled', 'enabled']]" + "Dict[str, Union[Literal['disabled', 'enabled'], str]]|UntypedStripeObject[Union[Literal['disabled', 'enabled'], str]]" ] """ A hash of settlement currencies to update. Each key is an ISO 4217 currency code, and the value is either `enabled` or `disabled`. @@ -74,14 +74,16 @@ class BalanceSettingsModifyParamsPaymentsPayoutsAutomaticTransferRulesByCurrency """ The maximum amount in minor units to transfer to the FinancialAccount. Required and only applicable when `type` is `transfer_up_to_amount`. """ - type: Literal["transfer_all", "transfer_up_to_amount"] + type: Union[Literal["transfer_all", "transfer_up_to_amount"], str] """ The type of automatic transfer rule. """ class BalanceSettingsModifyParamsPaymentsPayoutsSchedule(TypedDict): - interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] + interval: NotRequired[ + "Literal['daily', 'manual', 'monthly', 'weekly']|str" + ] """ How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. """ @@ -90,7 +92,14 @@ class BalanceSettingsModifyParamsPaymentsPayoutsSchedule(TypedDict): The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. """ weekly_payout_days: NotRequired[ - List[Literal["friday", "monday", "thursday", "tuesday", "wednesday"]] + List[ + Union[ + Literal[ + "friday", "monday", "thursday", "tuesday", "wednesday" + ], + str, + ] + ] ] """ The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. diff --git a/stripe/params/_balance_settings_update_params.py b/stripe/params/_balance_settings_update_params.py index 80898dfd8..2404f0a2c 100644 --- a/stripe/params/_balance_settings_update_params.py +++ b/stripe/params/_balance_settings_update_params.py @@ -26,7 +26,7 @@ class BalanceSettingsUpdateParamsPayments(TypedDict): Settings specific to the account's payouts. """ settlement_currencies: NotRequired[ - "Dict[str, Literal['disabled', 'enabled']]|UntypedStripeObject[Literal['disabled', 'enabled']]" + "Dict[str, Union[Literal['disabled', 'enabled'], str]]|UntypedStripeObject[Union[Literal['disabled', 'enabled'], str]]" ] """ A hash of settlement currencies to update. Each key is an ISO 4217 currency code, and the value is either `enabled` or `disabled`. @@ -73,14 +73,16 @@ class BalanceSettingsUpdateParamsPaymentsPayoutsAutomaticTransferRulesByCurrency """ The maximum amount in minor units to transfer to the FinancialAccount. Required and only applicable when `type` is `transfer_up_to_amount`. """ - type: Literal["transfer_all", "transfer_up_to_amount"] + type: Union[Literal["transfer_all", "transfer_up_to_amount"], str] """ The type of automatic transfer rule. """ class BalanceSettingsUpdateParamsPaymentsPayoutsSchedule(TypedDict): - interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] + interval: NotRequired[ + "Literal['daily', 'manual', 'monthly', 'weekly']|str" + ] """ How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. """ @@ -89,7 +91,14 @@ class BalanceSettingsUpdateParamsPaymentsPayoutsSchedule(TypedDict): The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. """ weekly_payout_days: NotRequired[ - List[Literal["friday", "monday", "thursday", "tuesday", "wednesday"]] + List[ + Union[ + Literal[ + "friday", "monday", "thursday", "tuesday", "wednesday" + ], + str, + ] + ] ] """ The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. diff --git a/stripe/params/_balance_transfer_create_params.py b/stripe/params/_balance_transfer_create_params.py index 21d05b360..80cb407b0 100644 --- a/stripe/params/_balance_transfer_create_params.py +++ b/stripe/params/_balance_transfer_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -11,7 +11,7 @@ class BalanceTransferCreateParams(RequestOptions): """ A positive integer representing how much to transfer in the smallest currency unit. """ - currency: Literal["eur", "gbp", "usd"] + currency: Union[Literal["eur", "gbp", "usd"], str] """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ @@ -34,7 +34,7 @@ class BalanceTransferCreateParams(RequestOptions): class BalanceTransferCreateParamsDestinationBalance(TypedDict): - type: Literal["issuing", "payments"] + type: Union[Literal["issuing", "payments"], str] """ Destination balance type to push funds into for the Balance Transfer. """ @@ -44,7 +44,7 @@ class BalanceTransferCreateParamsSourceBalance(TypedDict): allocated_funds: NotRequired[ "BalanceTransferCreateParamsSourceBalanceAllocatedFunds" ] - type: Literal["allocated_funds", "issuing", "payments"] + type: Union[Literal["allocated_funds", "issuing", "payments"], str] """ Source balance type to pull funds from for the Balance Transfer. """ diff --git a/stripe/params/_charge_capture_params.py b/stripe/params/_charge_capture_params.py index ef5312c85..6efb47563 100644 --- a/stripe/params/_charge_capture_params.py +++ b/stripe/params/_charge_capture_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -160,12 +160,15 @@ class ChargeCaptureParamsPaymentDetailsCarRental(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", + Union[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ], + str, ] ] ] @@ -194,7 +197,7 @@ class ChargeCaptureParamsPaymentDetailsCarRental(TypedDict): """ Rental rate. """ - rate_interval: NotRequired[Literal["day", "month", "week"]] + rate_interval: NotRequired["Literal['day', 'month', 'week']|str"] """ The frequency at which the rate amount is applied. One of `day`, `week` or `month` """ @@ -234,7 +237,7 @@ class ChargeCaptureParamsPaymentDetailsCarRentalAffiliate(TypedDict): class ChargeCaptureParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -266,7 +269,7 @@ class ChargeCaptureParamsPaymentDetailsCarRentalDistance(TypedDict): """ Distance traveled. """ - unit: NotRequired[Literal["kilometers", "miles"]] + unit: NotRequired["Literal['kilometers', 'miles']|str"] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -426,7 +429,7 @@ class ChargeCaptureParamsPaymentDetailsCarRentalDatumDistance(TypedDict): """ Distance traveled. """ - unit: Literal["kilometers", "miles"] + unit: Union[Literal["kilometers", "miles"], str] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -525,13 +528,16 @@ class ChargeCaptureParamsPaymentDetailsCarRentalDatumInsurance(TypedDict): """ Name of the insurance company. """ - insurance_type: Literal[ - "liability_supplement", - "loss_damage_waiver", - "other", - "partial_damage_waiver", - "personal_accident", - "personal_effects", + insurance_type: Union[ + Literal[ + "liability_supplement", + "loss_damage_waiver", + "other", + "partial_damage_waiver", + "personal_accident", + "personal_effects", + ], + str, ] """ Type of insurance coverage. @@ -606,7 +612,7 @@ class ChargeCaptureParamsPaymentDetailsCarRentalDatumTotal(TypedDict): Rate per unit for the rental. """ rate_unit: NotRequired[ - Literal["days", "kilometers", "miles", "months", "weeks"] + "Literal['days', 'kilometers', 'miles', 'months', 'weeks']|str" ] """ Unit of measurement for the rate. @@ -639,17 +645,20 @@ class ChargeCaptureParamsPaymentDetailsCarRentalDatumTotalExtraCharge( """ Amount of the extra charge in cents. """ - type: Literal[ - "extra_mileage", - "gas", - "gps", - "late_charge", - "one_way_drop_off", - "other", - "parking", - "phone", - "regular_mileage", - "towing", + type: Union[ + Literal[ + "extra_mileage", + "gas", + "gps", + "late_charge", + "one_way_drop_off", + "other", + "parking", + "phone", + "regular_mileage", + "towing", + ], + str, ] """ Type of extra charge. @@ -698,48 +707,13 @@ class ChargeCaptureParamsPaymentDetailsCarRentalDatumVehicle(TypedDict): Odometer reading at the time of rental. """ type: NotRequired[ - Literal[ - "cargo_van", - "compact", - "economy", - "exotic", - "exotic_suv", - "fifteen_passenger_van", - "four_wheel_drive", - "full_size", - "intermediate", - "large_suv", - "large_truck", - "luxury", - "medium_suv", - "midsize", - "mini", - "minivan", - "miscellaneous", - "moped", - "moving_van", - "premium", - "regular", - "small_medium_truck", - "small_suv", - "special", - "standard", - "stretch", - "subcompact", - "taxi", - "twelve_foot_truck", - "twelve_passenger_van", - "twenty_foot_truck", - "twenty_four_foot_truck", - "twenty_six_foot_truck", - "unique", - ] + "Literal['cargo_van', 'compact', 'economy', 'exotic', 'exotic_suv', 'fifteen_passenger_van', 'four_wheel_drive', 'full_size', 'intermediate', 'large_suv', 'large_truck', 'luxury', 'medium_suv', 'midsize', 'mini', 'minivan', 'miscellaneous', 'moped', 'moving_van', 'premium', 'regular', 'small_medium_truck', 'small_suv', 'special', 'standard', 'stretch', 'subcompact', 'taxi', 'twelve_foot_truck', 'twelve_passenger_van', 'twenty_foot_truck', 'twenty_four_foot_truck', 'twenty_six_foot_truck', 'unique']|str" ] """ Type of the rental vehicle. """ vehicle_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Class of the rental vehicle. @@ -830,7 +804,7 @@ class ChargeCaptureParamsPaymentDetailsEventDetailsAffiliate(TypedDict): class ChargeCaptureParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -878,140 +852,7 @@ class ChargeCaptureParamsPaymentDetailsFleetDatum(TypedDict): class ChargeCaptureParamsPaymentDetailsFleetDatumPrimaryFuelFields(TypedDict): brand: NotRequired[ - Literal[ - "aafes", - "amerada_hess", - "amoco_canada", - "amoco_petroleum_products", - "arco_products", - "asda", - "ashland_oil", - "bfl", - "bp_mobil", - "bp_oil", - "burrnah_major", - "butler_arndale", - "canadian_tire", - "canadian_turbo", - "caseys_general_store", - "cenex", - "chevron_canada", - "chevron_usa", - "circle_k_stores", - "citgo_petroleum", - "clark_brands", - "conoco_canada", - "conoco_inc", - "crown_central_petroleum", - "diamond_shamrock_inc", - "discount_tire", - "domo_gas", - "elf", - "erickson_oil", - "esso", - "esso_canada", - "exxon", - "exxonmobil", - "family_express", - "fas_gas_oil", - "federated_coop_sonic", - "fina", - "fina_inc", - "fkg_oil", - "flare", - "flying_j_inc", - "gas_america", - "gate_petroleum", - "getty_petroleum", - "giant_eagle", - "grow_mark_inc", - "gulf", - "gulf_canada", - "gulf_chevron", - "handy_way_food", - "heron", - "holiday_stores", - "home_depot", - "husky", - "hyvees", - "irving", - "irving_oil", - "j_sainsbury", - "jet_conoco", - "krogers", - "kuwait", - "kwik_trip_inc", - "lassus", - "loves_country_stores", - "mapco_express_inc", - "marathon_oil", - "martin_bailey_inc_dba_hucks", - "maxol", - "meineke", - "mfa", - "mohawk", - "mr_gas", - "murco", - "murphy_oil_canada", - "murphy_oil_usa_inc", - "nexcom", - "nordstrom_oil", - "olco", - "pdq_store", - "pennzoil_products_inc", - "petro", - "petro_canada", - "petro_t", - "phillips", - "pilot", - "pioneer", - "pure_oil", - "quaker_state", - "quarles_oil", - "quiktrip", - "racetrac_petroleum_inc", - "raceway_petroleum", - "repsol", - "rudy", - "safeway", - "seven_eleven", - "sheetz", - "shell", - "shell_canada", - "shell_oil", - "sinclair_oil", - "southland_oil", - "spar", - "speedway", - "sun_company_inc", - "suncor_sunoco_canada", - "tempo", - "tesco", - "tesoro_alaska", - "texaco", - "the_pantry_inc", - "thornton_oil", - "tosco", - "total", - "travel_centers_of_america", - "uk", - "ultramar_canada", - "unbranded_or_unassigned", - "unbranded_unassigned", - "union_76", - "united_dairy_farmer", - "united_refining_kwikfill", - "us_oil", - "usa_petroleum", - "valvoline", - "vg", - "w_morrison", - "warren_equities", - "wawa", - "western_energetix", - "wilco", - "zions", - ] + "Literal['aafes', 'amerada_hess', 'amoco_canada', 'amoco_petroleum_products', 'arco_products', 'asda', 'ashland_oil', 'bfl', 'bp_mobil', 'bp_oil', 'burrnah_major', 'butler_arndale', 'canadian_tire', 'canadian_turbo', 'caseys_general_store', 'cenex', 'chevron_canada', 'chevron_usa', 'circle_k_stores', 'citgo_petroleum', 'clark_brands', 'conoco_canada', 'conoco_inc', 'crown_central_petroleum', 'diamond_shamrock_inc', 'discount_tire', 'domo_gas', 'elf', 'erickson_oil', 'esso', 'esso_canada', 'exxon', 'exxonmobil', 'family_express', 'fas_gas_oil', 'federated_coop_sonic', 'fina', 'fina_inc', 'fkg_oil', 'flare', 'flying_j_inc', 'gas_america', 'gate_petroleum', 'getty_petroleum', 'giant_eagle', 'grow_mark_inc', 'gulf', 'gulf_canada', 'gulf_chevron', 'handy_way_food', 'heron', 'holiday_stores', 'home_depot', 'husky', 'hyvees', 'irving', 'irving_oil', 'j_sainsbury', 'jet_conoco', 'krogers', 'kuwait', 'kwik_trip_inc', 'lassus', 'loves_country_stores', 'mapco_express_inc', 'marathon_oil', 'martin_bailey_inc_dba_hucks', 'maxol', 'meineke', 'mfa', 'mohawk', 'mr_gas', 'murco', 'murphy_oil_canada', 'murphy_oil_usa_inc', 'nexcom', 'nordstrom_oil', 'olco', 'pdq_store', 'pennzoil_products_inc', 'petro', 'petro_canada', 'petro_t', 'phillips', 'pilot', 'pioneer', 'pure_oil', 'quaker_state', 'quarles_oil', 'quiktrip', 'racetrac_petroleum_inc', 'raceway_petroleum', 'repsol', 'rudy', 'safeway', 'seven_eleven', 'sheetz', 'shell', 'shell_canada', 'shell_oil', 'sinclair_oil', 'southland_oil', 'spar', 'speedway', 'sun_company_inc', 'suncor_sunoco_canada', 'tempo', 'tesco', 'tesoro_alaska', 'texaco', 'the_pantry_inc', 'thornton_oil', 'tosco', 'total', 'travel_centers_of_america', 'uk', 'ultramar_canada', 'unbranded_or_unassigned', 'unbranded_unassigned', 'union_76', 'united_dairy_farmer', 'united_refining_kwikfill', 'us_oil', 'usa_petroleum', 'valvoline', 'vg', 'w_morrison', 'warren_equities', 'wawa', 'western_energetix', 'wilco', 'zions']|str" ] """ The fuel brand. @@ -1077,10 +918,13 @@ class ChargeCaptureParamsPaymentDetailsFleetDatumStationServiceLocation( class ChargeCaptureParamsPaymentDetailsFleetDatumVat(TypedDict): - iob_indicator: Literal[ - "issuer_to_iob", - "issuer_to_iob_and_incremental_certification", - "merchant_does_not_agree_to_iob", + iob_indicator: Union[ + Literal[ + "issuer_to_iob", + "issuer_to_iob_and_incremental_certification", + "merchant_does_not_agree_to_iob", + ], + str, ] """ Indicates the merchant's agreement for Invoice on Behalf (IOB) VAT processing. @@ -1132,7 +976,7 @@ class ChargeCaptureParamsPaymentDetailsFlightAffiliate(TypedDict): class ChargeCaptureParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1196,7 +1040,7 @@ class ChargeCaptureParamsPaymentDetailsFlightSegment(TypedDict): The flight number associated with the segment """ service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] + "Literal['business', 'economy', 'first', 'premium_economy']|str" ] """ The fare class for the segment. @@ -1247,9 +1091,7 @@ class ChargeCaptureParamsPaymentDetailsFlightDatum(TypedDict): Total cost breakdown. """ transaction_type: NotRequired[ - Literal[ - "exchange_ticket", "miscellaneous", "refund", "ticket_purchase" - ] + "Literal['exchange_ticket', 'miscellaneous', 'refund', 'ticket_purchase']|str" ] """ Type of flight transaction. @@ -1284,8 +1126,11 @@ class ChargeCaptureParamsPaymentDetailsFlightDatumInsurance(TypedDict): """ Insurance company name. """ - insurance_type: Literal[ - "baggage", "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal[ + "baggage", "bankruptcy", "cancelation", "emergency", "medical" + ], + str, ] """ Type of insurance. @@ -1348,8 +1193,8 @@ class ChargeCaptureParamsPaymentDetailsFlightDatumSegment(TypedDict): """ Refundable ticket indicator. """ - service_class: Literal[ - "business", "economy", "first_class", "premium_economy" + service_class: Union[ + Literal["business", "economy", "first_class", "premium_economy"], str ] """ Class of service. @@ -1408,13 +1253,7 @@ class ChargeCaptureParamsPaymentDetailsFlightDatumTotal(TypedDict): Total flight amount. """ credit_reason: NotRequired[ - Literal[ - "other", - "partial_ticket_refund", - "passenger_transport_ancillary_cancellation", - "ticket_and_ancillary_cancellation", - "ticket_cancellation", - ] + "Literal['other', 'partial_ticket_refund', 'passenger_transport_ancillary_cancellation', 'ticket_and_ancillary_cancellation', 'ticket_cancellation']|str" ] """ Reason for credit. @@ -1454,7 +1293,7 @@ class ChargeCaptureParamsPaymentDetailsFlightDatumTotalExtraCharge(TypedDict): Amount of additional charges. """ type: NotRequired[ - Literal["additional_fees", "ancillary_service_charges", "exchange_fee"] + "Literal['additional_fees', 'ancillary_service_charges', 'exchange_fee']|str" ] """ Type of additional charges. @@ -1502,7 +1341,7 @@ class ChargeCaptureParamsPaymentDetailsLodging(TypedDict): """ The booking number associated with the lodging reservation. """ - category: NotRequired[Literal["hotel", "vacation_rental"]] + category: NotRequired["Literal['hotel', 'vacation_rental']|str"] """ The lodging category """ @@ -1528,13 +1367,16 @@ class ChargeCaptureParamsPaymentDetailsLodging(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", + Union[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ], + str, ] ] ] @@ -1620,7 +1462,7 @@ class ChargeCaptureParamsPaymentDetailsLodgingAffiliate(TypedDict): class ChargeCaptureParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1723,16 +1565,7 @@ class ChargeCaptureParamsPaymentDetailsLodgingDatum(TypedDict): class ChargeCaptureParamsPaymentDetailsLodgingDatumAccommodation(TypedDict): accommodation_type: NotRequired[ - Literal[ - "apartment", - "cabana", - "house", - "penthouse", - "room", - "standard", - "suite", - "villa", - ] + "Literal['apartment', 'cabana', 'house', 'penthouse', 'room', 'standard', 'suite', 'villa']|str" ] """ Type of accommodation. @@ -1797,7 +1630,7 @@ class ChargeCaptureParamsPaymentDetailsLodgingDatumHost(TypedDict): Reference number for the host. """ host_type: NotRequired[ - Literal["hostel", "hotel", "owner", "rental_agency"] + "Literal['hostel', 'hotel', 'owner', 'rental_agency']|str" ] """ Type of host. @@ -1860,8 +1693,8 @@ class ChargeCaptureParamsPaymentDetailsLodgingDatumInsurance(TypedDict): """ Name of the insurance company. """ - insurance_type: Literal[ - "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal["bankruptcy", "cancelation", "emergency", "medical"], str ] """ Type of insurance coverage. @@ -1920,9 +1753,7 @@ class ChargeCaptureParamsPaymentDetailsLodgingDatumTotalExtraCharge(TypedDict): Amount of the extra charge in cents. """ type: NotRequired[ - Literal[ - "gift_shop", "laundry", "mini_bar", "other", "phone", "restaurant" - ] + "Literal['gift_shop', 'laundry', 'mini_bar', 'other', 'phone', 'restaurant']|str" ] """ Type of extra charge. @@ -2000,7 +1831,7 @@ class ChargeCaptureParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): """ The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. """ - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ diff --git a/stripe/params/_charge_modify_params.py b/stripe/params/_charge_modify_params.py index 000ed8fb0..3a88ecc68 100644 --- a/stripe/params/_charge_modify_params.py +++ b/stripe/params/_charge_modify_params.py @@ -164,12 +164,15 @@ class ChargeModifyParamsPaymentDetailsCarRental(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", + Union[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ], + str, ] ] ] @@ -198,7 +201,7 @@ class ChargeModifyParamsPaymentDetailsCarRental(TypedDict): """ Rental rate. """ - rate_interval: NotRequired[Literal["day", "month", "week"]] + rate_interval: NotRequired["Literal['day', 'month', 'week']|str"] """ The frequency at which the rate amount is applied. One of `day`, `week` or `month` """ @@ -238,7 +241,7 @@ class ChargeModifyParamsPaymentDetailsCarRentalAffiliate(TypedDict): class ChargeModifyParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -270,7 +273,7 @@ class ChargeModifyParamsPaymentDetailsCarRentalDistance(TypedDict): """ Distance traveled. """ - unit: NotRequired[Literal["kilometers", "miles"]] + unit: NotRequired["Literal['kilometers', 'miles']|str"] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -430,7 +433,7 @@ class ChargeModifyParamsPaymentDetailsCarRentalDatumDistance(TypedDict): """ Distance traveled. """ - unit: Literal["kilometers", "miles"] + unit: Union[Literal["kilometers", "miles"], str] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -529,13 +532,16 @@ class ChargeModifyParamsPaymentDetailsCarRentalDatumInsurance(TypedDict): """ Name of the insurance company. """ - insurance_type: Literal[ - "liability_supplement", - "loss_damage_waiver", - "other", - "partial_damage_waiver", - "personal_accident", - "personal_effects", + insurance_type: Union[ + Literal[ + "liability_supplement", + "loss_damage_waiver", + "other", + "partial_damage_waiver", + "personal_accident", + "personal_effects", + ], + str, ] """ Type of insurance coverage. @@ -610,7 +616,7 @@ class ChargeModifyParamsPaymentDetailsCarRentalDatumTotal(TypedDict): Rate per unit for the rental. """ rate_unit: NotRequired[ - Literal["days", "kilometers", "miles", "months", "weeks"] + "Literal['days', 'kilometers', 'miles', 'months', 'weeks']|str" ] """ Unit of measurement for the rate. @@ -643,17 +649,20 @@ class ChargeModifyParamsPaymentDetailsCarRentalDatumTotalExtraCharge( """ Amount of the extra charge in cents. """ - type: Literal[ - "extra_mileage", - "gas", - "gps", - "late_charge", - "one_way_drop_off", - "other", - "parking", - "phone", - "regular_mileage", - "towing", + type: Union[ + Literal[ + "extra_mileage", + "gas", + "gps", + "late_charge", + "one_way_drop_off", + "other", + "parking", + "phone", + "regular_mileage", + "towing", + ], + str, ] """ Type of extra charge. @@ -702,48 +711,13 @@ class ChargeModifyParamsPaymentDetailsCarRentalDatumVehicle(TypedDict): Odometer reading at the time of rental. """ type: NotRequired[ - Literal[ - "cargo_van", - "compact", - "economy", - "exotic", - "exotic_suv", - "fifteen_passenger_van", - "four_wheel_drive", - "full_size", - "intermediate", - "large_suv", - "large_truck", - "luxury", - "medium_suv", - "midsize", - "mini", - "minivan", - "miscellaneous", - "moped", - "moving_van", - "premium", - "regular", - "small_medium_truck", - "small_suv", - "special", - "standard", - "stretch", - "subcompact", - "taxi", - "twelve_foot_truck", - "twelve_passenger_van", - "twenty_foot_truck", - "twenty_four_foot_truck", - "twenty_six_foot_truck", - "unique", - ] + "Literal['cargo_van', 'compact', 'economy', 'exotic', 'exotic_suv', 'fifteen_passenger_van', 'four_wheel_drive', 'full_size', 'intermediate', 'large_suv', 'large_truck', 'luxury', 'medium_suv', 'midsize', 'mini', 'minivan', 'miscellaneous', 'moped', 'moving_van', 'premium', 'regular', 'small_medium_truck', 'small_suv', 'special', 'standard', 'stretch', 'subcompact', 'taxi', 'twelve_foot_truck', 'twelve_passenger_van', 'twenty_foot_truck', 'twenty_four_foot_truck', 'twenty_six_foot_truck', 'unique']|str" ] """ Type of the rental vehicle. """ vehicle_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Class of the rental vehicle. @@ -832,7 +806,7 @@ class ChargeModifyParamsPaymentDetailsEventDetailsAffiliate(TypedDict): class ChargeModifyParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -878,140 +852,7 @@ class ChargeModifyParamsPaymentDetailsFleetDatum(TypedDict): class ChargeModifyParamsPaymentDetailsFleetDatumPrimaryFuelFields(TypedDict): brand: NotRequired[ - Literal[ - "aafes", - "amerada_hess", - "amoco_canada", - "amoco_petroleum_products", - "arco_products", - "asda", - "ashland_oil", - "bfl", - "bp_mobil", - "bp_oil", - "burrnah_major", - "butler_arndale", - "canadian_tire", - "canadian_turbo", - "caseys_general_store", - "cenex", - "chevron_canada", - "chevron_usa", - "circle_k_stores", - "citgo_petroleum", - "clark_brands", - "conoco_canada", - "conoco_inc", - "crown_central_petroleum", - "diamond_shamrock_inc", - "discount_tire", - "domo_gas", - "elf", - "erickson_oil", - "esso", - "esso_canada", - "exxon", - "exxonmobil", - "family_express", - "fas_gas_oil", - "federated_coop_sonic", - "fina", - "fina_inc", - "fkg_oil", - "flare", - "flying_j_inc", - "gas_america", - "gate_petroleum", - "getty_petroleum", - "giant_eagle", - "grow_mark_inc", - "gulf", - "gulf_canada", - "gulf_chevron", - "handy_way_food", - "heron", - "holiday_stores", - "home_depot", - "husky", - "hyvees", - "irving", - "irving_oil", - "j_sainsbury", - "jet_conoco", - "krogers", - "kuwait", - "kwik_trip_inc", - "lassus", - "loves_country_stores", - "mapco_express_inc", - "marathon_oil", - "martin_bailey_inc_dba_hucks", - "maxol", - "meineke", - "mfa", - "mohawk", - "mr_gas", - "murco", - "murphy_oil_canada", - "murphy_oil_usa_inc", - "nexcom", - "nordstrom_oil", - "olco", - "pdq_store", - "pennzoil_products_inc", - "petro", - "petro_canada", - "petro_t", - "phillips", - "pilot", - "pioneer", - "pure_oil", - "quaker_state", - "quarles_oil", - "quiktrip", - "racetrac_petroleum_inc", - "raceway_petroleum", - "repsol", - "rudy", - "safeway", - "seven_eleven", - "sheetz", - "shell", - "shell_canada", - "shell_oil", - "sinclair_oil", - "southland_oil", - "spar", - "speedway", - "sun_company_inc", - "suncor_sunoco_canada", - "tempo", - "tesco", - "tesoro_alaska", - "texaco", - "the_pantry_inc", - "thornton_oil", - "tosco", - "total", - "travel_centers_of_america", - "uk", - "ultramar_canada", - "unbranded_or_unassigned", - "unbranded_unassigned", - "union_76", - "united_dairy_farmer", - "united_refining_kwikfill", - "us_oil", - "usa_petroleum", - "valvoline", - "vg", - "w_morrison", - "warren_equities", - "wawa", - "western_energetix", - "wilco", - "zions", - ] + "Literal['aafes', 'amerada_hess', 'amoco_canada', 'amoco_petroleum_products', 'arco_products', 'asda', 'ashland_oil', 'bfl', 'bp_mobil', 'bp_oil', 'burrnah_major', 'butler_arndale', 'canadian_tire', 'canadian_turbo', 'caseys_general_store', 'cenex', 'chevron_canada', 'chevron_usa', 'circle_k_stores', 'citgo_petroleum', 'clark_brands', 'conoco_canada', 'conoco_inc', 'crown_central_petroleum', 'diamond_shamrock_inc', 'discount_tire', 'domo_gas', 'elf', 'erickson_oil', 'esso', 'esso_canada', 'exxon', 'exxonmobil', 'family_express', 'fas_gas_oil', 'federated_coop_sonic', 'fina', 'fina_inc', 'fkg_oil', 'flare', 'flying_j_inc', 'gas_america', 'gate_petroleum', 'getty_petroleum', 'giant_eagle', 'grow_mark_inc', 'gulf', 'gulf_canada', 'gulf_chevron', 'handy_way_food', 'heron', 'holiday_stores', 'home_depot', 'husky', 'hyvees', 'irving', 'irving_oil', 'j_sainsbury', 'jet_conoco', 'krogers', 'kuwait', 'kwik_trip_inc', 'lassus', 'loves_country_stores', 'mapco_express_inc', 'marathon_oil', 'martin_bailey_inc_dba_hucks', 'maxol', 'meineke', 'mfa', 'mohawk', 'mr_gas', 'murco', 'murphy_oil_canada', 'murphy_oil_usa_inc', 'nexcom', 'nordstrom_oil', 'olco', 'pdq_store', 'pennzoil_products_inc', 'petro', 'petro_canada', 'petro_t', 'phillips', 'pilot', 'pioneer', 'pure_oil', 'quaker_state', 'quarles_oil', 'quiktrip', 'racetrac_petroleum_inc', 'raceway_petroleum', 'repsol', 'rudy', 'safeway', 'seven_eleven', 'sheetz', 'shell', 'shell_canada', 'shell_oil', 'sinclair_oil', 'southland_oil', 'spar', 'speedway', 'sun_company_inc', 'suncor_sunoco_canada', 'tempo', 'tesco', 'tesoro_alaska', 'texaco', 'the_pantry_inc', 'thornton_oil', 'tosco', 'total', 'travel_centers_of_america', 'uk', 'ultramar_canada', 'unbranded_or_unassigned', 'unbranded_unassigned', 'union_76', 'united_dairy_farmer', 'united_refining_kwikfill', 'us_oil', 'usa_petroleum', 'valvoline', 'vg', 'w_morrison', 'warren_equities', 'wawa', 'western_energetix', 'wilco', 'zions']|str" ] """ The fuel brand. @@ -1077,10 +918,13 @@ class ChargeModifyParamsPaymentDetailsFleetDatumStationServiceLocation( class ChargeModifyParamsPaymentDetailsFleetDatumVat(TypedDict): - iob_indicator: Literal[ - "issuer_to_iob", - "issuer_to_iob_and_incremental_certification", - "merchant_does_not_agree_to_iob", + iob_indicator: Union[ + Literal[ + "issuer_to_iob", + "issuer_to_iob_and_incremental_certification", + "merchant_does_not_agree_to_iob", + ], + str, ] """ Indicates the merchant's agreement for Invoice on Behalf (IOB) VAT processing. @@ -1132,7 +976,7 @@ class ChargeModifyParamsPaymentDetailsFlightAffiliate(TypedDict): class ChargeModifyParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1196,7 +1040,7 @@ class ChargeModifyParamsPaymentDetailsFlightSegment(TypedDict): The flight number associated with the segment """ service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] + "Literal['business', 'economy', 'first', 'premium_economy']|str" ] """ The fare class for the segment. @@ -1247,9 +1091,7 @@ class ChargeModifyParamsPaymentDetailsFlightDatum(TypedDict): Total cost breakdown. """ transaction_type: NotRequired[ - Literal[ - "exchange_ticket", "miscellaneous", "refund", "ticket_purchase" - ] + "Literal['exchange_ticket', 'miscellaneous', 'refund', 'ticket_purchase']|str" ] """ Type of flight transaction. @@ -1284,8 +1126,11 @@ class ChargeModifyParamsPaymentDetailsFlightDatumInsurance(TypedDict): """ Insurance company name. """ - insurance_type: Literal[ - "baggage", "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal[ + "baggage", "bankruptcy", "cancelation", "emergency", "medical" + ], + str, ] """ Type of insurance. @@ -1348,8 +1193,8 @@ class ChargeModifyParamsPaymentDetailsFlightDatumSegment(TypedDict): """ Refundable ticket indicator. """ - service_class: Literal[ - "business", "economy", "first_class", "premium_economy" + service_class: Union[ + Literal["business", "economy", "first_class", "premium_economy"], str ] """ Class of service. @@ -1408,13 +1253,7 @@ class ChargeModifyParamsPaymentDetailsFlightDatumTotal(TypedDict): Total flight amount. """ credit_reason: NotRequired[ - Literal[ - "other", - "partial_ticket_refund", - "passenger_transport_ancillary_cancellation", - "ticket_and_ancillary_cancellation", - "ticket_cancellation", - ] + "Literal['other', 'partial_ticket_refund', 'passenger_transport_ancillary_cancellation', 'ticket_and_ancillary_cancellation', 'ticket_cancellation']|str" ] """ Reason for credit. @@ -1454,7 +1293,7 @@ class ChargeModifyParamsPaymentDetailsFlightDatumTotalExtraCharge(TypedDict): Amount of additional charges. """ type: NotRequired[ - Literal["additional_fees", "ancillary_service_charges", "exchange_fee"] + "Literal['additional_fees', 'ancillary_service_charges', 'exchange_fee']|str" ] """ Type of additional charges. @@ -1502,7 +1341,7 @@ class ChargeModifyParamsPaymentDetailsLodging(TypedDict): """ The booking number associated with the lodging reservation. """ - category: NotRequired[Literal["hotel", "vacation_rental"]] + category: NotRequired["Literal['hotel', 'vacation_rental']|str"] """ The lodging category """ @@ -1528,13 +1367,16 @@ class ChargeModifyParamsPaymentDetailsLodging(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", + Union[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ], + str, ] ] ] @@ -1620,7 +1462,7 @@ class ChargeModifyParamsPaymentDetailsLodgingAffiliate(TypedDict): class ChargeModifyParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1723,16 +1565,7 @@ class ChargeModifyParamsPaymentDetailsLodgingDatum(TypedDict): class ChargeModifyParamsPaymentDetailsLodgingDatumAccommodation(TypedDict): accommodation_type: NotRequired[ - Literal[ - "apartment", - "cabana", - "house", - "penthouse", - "room", - "standard", - "suite", - "villa", - ] + "Literal['apartment', 'cabana', 'house', 'penthouse', 'room', 'standard', 'suite', 'villa']|str" ] """ Type of accommodation. @@ -1797,7 +1630,7 @@ class ChargeModifyParamsPaymentDetailsLodgingDatumHost(TypedDict): Reference number for the host. """ host_type: NotRequired[ - Literal["hostel", "hotel", "owner", "rental_agency"] + "Literal['hostel', 'hotel', 'owner', 'rental_agency']|str" ] """ Type of host. @@ -1860,8 +1693,8 @@ class ChargeModifyParamsPaymentDetailsLodgingDatumInsurance(TypedDict): """ Name of the insurance company. """ - insurance_type: Literal[ - "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal["bankruptcy", "cancelation", "emergency", "medical"], str ] """ Type of insurance coverage. @@ -1920,9 +1753,7 @@ class ChargeModifyParamsPaymentDetailsLodgingDatumTotalExtraCharge(TypedDict): Amount of the extra charge in cents. """ type: NotRequired[ - Literal[ - "gift_shop", "laundry", "mini_bar", "other", "phone", "restaurant" - ] + "Literal['gift_shop', 'laundry', 'mini_bar', 'other', 'phone', 'restaurant']|str" ] """ Type of extra charge. @@ -2000,7 +1831,7 @@ class ChargeModifyParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): """ The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. """ - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ diff --git a/stripe/params/_charge_update_params.py b/stripe/params/_charge_update_params.py index cbe4a4a75..474754318 100644 --- a/stripe/params/_charge_update_params.py +++ b/stripe/params/_charge_update_params.py @@ -163,12 +163,15 @@ class ChargeUpdateParamsPaymentDetailsCarRental(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", + Union[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ], + str, ] ] ] @@ -197,7 +200,7 @@ class ChargeUpdateParamsPaymentDetailsCarRental(TypedDict): """ Rental rate. """ - rate_interval: NotRequired[Literal["day", "month", "week"]] + rate_interval: NotRequired["Literal['day', 'month', 'week']|str"] """ The frequency at which the rate amount is applied. One of `day`, `week` or `month` """ @@ -237,7 +240,7 @@ class ChargeUpdateParamsPaymentDetailsCarRentalAffiliate(TypedDict): class ChargeUpdateParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -269,7 +272,7 @@ class ChargeUpdateParamsPaymentDetailsCarRentalDistance(TypedDict): """ Distance traveled. """ - unit: NotRequired[Literal["kilometers", "miles"]] + unit: NotRequired["Literal['kilometers', 'miles']|str"] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -429,7 +432,7 @@ class ChargeUpdateParamsPaymentDetailsCarRentalDatumDistance(TypedDict): """ Distance traveled. """ - unit: Literal["kilometers", "miles"] + unit: Union[Literal["kilometers", "miles"], str] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -528,13 +531,16 @@ class ChargeUpdateParamsPaymentDetailsCarRentalDatumInsurance(TypedDict): """ Name of the insurance company. """ - insurance_type: Literal[ - "liability_supplement", - "loss_damage_waiver", - "other", - "partial_damage_waiver", - "personal_accident", - "personal_effects", + insurance_type: Union[ + Literal[ + "liability_supplement", + "loss_damage_waiver", + "other", + "partial_damage_waiver", + "personal_accident", + "personal_effects", + ], + str, ] """ Type of insurance coverage. @@ -609,7 +615,7 @@ class ChargeUpdateParamsPaymentDetailsCarRentalDatumTotal(TypedDict): Rate per unit for the rental. """ rate_unit: NotRequired[ - Literal["days", "kilometers", "miles", "months", "weeks"] + "Literal['days', 'kilometers', 'miles', 'months', 'weeks']|str" ] """ Unit of measurement for the rate. @@ -642,17 +648,20 @@ class ChargeUpdateParamsPaymentDetailsCarRentalDatumTotalExtraCharge( """ Amount of the extra charge in cents. """ - type: Literal[ - "extra_mileage", - "gas", - "gps", - "late_charge", - "one_way_drop_off", - "other", - "parking", - "phone", - "regular_mileage", - "towing", + type: Union[ + Literal[ + "extra_mileage", + "gas", + "gps", + "late_charge", + "one_way_drop_off", + "other", + "parking", + "phone", + "regular_mileage", + "towing", + ], + str, ] """ Type of extra charge. @@ -701,48 +710,13 @@ class ChargeUpdateParamsPaymentDetailsCarRentalDatumVehicle(TypedDict): Odometer reading at the time of rental. """ type: NotRequired[ - Literal[ - "cargo_van", - "compact", - "economy", - "exotic", - "exotic_suv", - "fifteen_passenger_van", - "four_wheel_drive", - "full_size", - "intermediate", - "large_suv", - "large_truck", - "luxury", - "medium_suv", - "midsize", - "mini", - "minivan", - "miscellaneous", - "moped", - "moving_van", - "premium", - "regular", - "small_medium_truck", - "small_suv", - "special", - "standard", - "stretch", - "subcompact", - "taxi", - "twelve_foot_truck", - "twelve_passenger_van", - "twenty_foot_truck", - "twenty_four_foot_truck", - "twenty_six_foot_truck", - "unique", - ] + "Literal['cargo_van', 'compact', 'economy', 'exotic', 'exotic_suv', 'fifteen_passenger_van', 'four_wheel_drive', 'full_size', 'intermediate', 'large_suv', 'large_truck', 'luxury', 'medium_suv', 'midsize', 'mini', 'minivan', 'miscellaneous', 'moped', 'moving_van', 'premium', 'regular', 'small_medium_truck', 'small_suv', 'special', 'standard', 'stretch', 'subcompact', 'taxi', 'twelve_foot_truck', 'twelve_passenger_van', 'twenty_foot_truck', 'twenty_four_foot_truck', 'twenty_six_foot_truck', 'unique']|str" ] """ Type of the rental vehicle. """ vehicle_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Class of the rental vehicle. @@ -831,7 +805,7 @@ class ChargeUpdateParamsPaymentDetailsEventDetailsAffiliate(TypedDict): class ChargeUpdateParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -877,140 +851,7 @@ class ChargeUpdateParamsPaymentDetailsFleetDatum(TypedDict): class ChargeUpdateParamsPaymentDetailsFleetDatumPrimaryFuelFields(TypedDict): brand: NotRequired[ - Literal[ - "aafes", - "amerada_hess", - "amoco_canada", - "amoco_petroleum_products", - "arco_products", - "asda", - "ashland_oil", - "bfl", - "bp_mobil", - "bp_oil", - "burrnah_major", - "butler_arndale", - "canadian_tire", - "canadian_turbo", - "caseys_general_store", - "cenex", - "chevron_canada", - "chevron_usa", - "circle_k_stores", - "citgo_petroleum", - "clark_brands", - "conoco_canada", - "conoco_inc", - "crown_central_petroleum", - "diamond_shamrock_inc", - "discount_tire", - "domo_gas", - "elf", - "erickson_oil", - "esso", - "esso_canada", - "exxon", - "exxonmobil", - "family_express", - "fas_gas_oil", - "federated_coop_sonic", - "fina", - "fina_inc", - "fkg_oil", - "flare", - "flying_j_inc", - "gas_america", - "gate_petroleum", - "getty_petroleum", - "giant_eagle", - "grow_mark_inc", - "gulf", - "gulf_canada", - "gulf_chevron", - "handy_way_food", - "heron", - "holiday_stores", - "home_depot", - "husky", - "hyvees", - "irving", - "irving_oil", - "j_sainsbury", - "jet_conoco", - "krogers", - "kuwait", - "kwik_trip_inc", - "lassus", - "loves_country_stores", - "mapco_express_inc", - "marathon_oil", - "martin_bailey_inc_dba_hucks", - "maxol", - "meineke", - "mfa", - "mohawk", - "mr_gas", - "murco", - "murphy_oil_canada", - "murphy_oil_usa_inc", - "nexcom", - "nordstrom_oil", - "olco", - "pdq_store", - "pennzoil_products_inc", - "petro", - "petro_canada", - "petro_t", - "phillips", - "pilot", - "pioneer", - "pure_oil", - "quaker_state", - "quarles_oil", - "quiktrip", - "racetrac_petroleum_inc", - "raceway_petroleum", - "repsol", - "rudy", - "safeway", - "seven_eleven", - "sheetz", - "shell", - "shell_canada", - "shell_oil", - "sinclair_oil", - "southland_oil", - "spar", - "speedway", - "sun_company_inc", - "suncor_sunoco_canada", - "tempo", - "tesco", - "tesoro_alaska", - "texaco", - "the_pantry_inc", - "thornton_oil", - "tosco", - "total", - "travel_centers_of_america", - "uk", - "ultramar_canada", - "unbranded_or_unassigned", - "unbranded_unassigned", - "union_76", - "united_dairy_farmer", - "united_refining_kwikfill", - "us_oil", - "usa_petroleum", - "valvoline", - "vg", - "w_morrison", - "warren_equities", - "wawa", - "western_energetix", - "wilco", - "zions", - ] + "Literal['aafes', 'amerada_hess', 'amoco_canada', 'amoco_petroleum_products', 'arco_products', 'asda', 'ashland_oil', 'bfl', 'bp_mobil', 'bp_oil', 'burrnah_major', 'butler_arndale', 'canadian_tire', 'canadian_turbo', 'caseys_general_store', 'cenex', 'chevron_canada', 'chevron_usa', 'circle_k_stores', 'citgo_petroleum', 'clark_brands', 'conoco_canada', 'conoco_inc', 'crown_central_petroleum', 'diamond_shamrock_inc', 'discount_tire', 'domo_gas', 'elf', 'erickson_oil', 'esso', 'esso_canada', 'exxon', 'exxonmobil', 'family_express', 'fas_gas_oil', 'federated_coop_sonic', 'fina', 'fina_inc', 'fkg_oil', 'flare', 'flying_j_inc', 'gas_america', 'gate_petroleum', 'getty_petroleum', 'giant_eagle', 'grow_mark_inc', 'gulf', 'gulf_canada', 'gulf_chevron', 'handy_way_food', 'heron', 'holiday_stores', 'home_depot', 'husky', 'hyvees', 'irving', 'irving_oil', 'j_sainsbury', 'jet_conoco', 'krogers', 'kuwait', 'kwik_trip_inc', 'lassus', 'loves_country_stores', 'mapco_express_inc', 'marathon_oil', 'martin_bailey_inc_dba_hucks', 'maxol', 'meineke', 'mfa', 'mohawk', 'mr_gas', 'murco', 'murphy_oil_canada', 'murphy_oil_usa_inc', 'nexcom', 'nordstrom_oil', 'olco', 'pdq_store', 'pennzoil_products_inc', 'petro', 'petro_canada', 'petro_t', 'phillips', 'pilot', 'pioneer', 'pure_oil', 'quaker_state', 'quarles_oil', 'quiktrip', 'racetrac_petroleum_inc', 'raceway_petroleum', 'repsol', 'rudy', 'safeway', 'seven_eleven', 'sheetz', 'shell', 'shell_canada', 'shell_oil', 'sinclair_oil', 'southland_oil', 'spar', 'speedway', 'sun_company_inc', 'suncor_sunoco_canada', 'tempo', 'tesco', 'tesoro_alaska', 'texaco', 'the_pantry_inc', 'thornton_oil', 'tosco', 'total', 'travel_centers_of_america', 'uk', 'ultramar_canada', 'unbranded_or_unassigned', 'unbranded_unassigned', 'union_76', 'united_dairy_farmer', 'united_refining_kwikfill', 'us_oil', 'usa_petroleum', 'valvoline', 'vg', 'w_morrison', 'warren_equities', 'wawa', 'western_energetix', 'wilco', 'zions']|str" ] """ The fuel brand. @@ -1076,10 +917,13 @@ class ChargeUpdateParamsPaymentDetailsFleetDatumStationServiceLocation( class ChargeUpdateParamsPaymentDetailsFleetDatumVat(TypedDict): - iob_indicator: Literal[ - "issuer_to_iob", - "issuer_to_iob_and_incremental_certification", - "merchant_does_not_agree_to_iob", + iob_indicator: Union[ + Literal[ + "issuer_to_iob", + "issuer_to_iob_and_incremental_certification", + "merchant_does_not_agree_to_iob", + ], + str, ] """ Indicates the merchant's agreement for Invoice on Behalf (IOB) VAT processing. @@ -1131,7 +975,7 @@ class ChargeUpdateParamsPaymentDetailsFlightAffiliate(TypedDict): class ChargeUpdateParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1195,7 +1039,7 @@ class ChargeUpdateParamsPaymentDetailsFlightSegment(TypedDict): The flight number associated with the segment """ service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] + "Literal['business', 'economy', 'first', 'premium_economy']|str" ] """ The fare class for the segment. @@ -1246,9 +1090,7 @@ class ChargeUpdateParamsPaymentDetailsFlightDatum(TypedDict): Total cost breakdown. """ transaction_type: NotRequired[ - Literal[ - "exchange_ticket", "miscellaneous", "refund", "ticket_purchase" - ] + "Literal['exchange_ticket', 'miscellaneous', 'refund', 'ticket_purchase']|str" ] """ Type of flight transaction. @@ -1283,8 +1125,11 @@ class ChargeUpdateParamsPaymentDetailsFlightDatumInsurance(TypedDict): """ Insurance company name. """ - insurance_type: Literal[ - "baggage", "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal[ + "baggage", "bankruptcy", "cancelation", "emergency", "medical" + ], + str, ] """ Type of insurance. @@ -1347,8 +1192,8 @@ class ChargeUpdateParamsPaymentDetailsFlightDatumSegment(TypedDict): """ Refundable ticket indicator. """ - service_class: Literal[ - "business", "economy", "first_class", "premium_economy" + service_class: Union[ + Literal["business", "economy", "first_class", "premium_economy"], str ] """ Class of service. @@ -1407,13 +1252,7 @@ class ChargeUpdateParamsPaymentDetailsFlightDatumTotal(TypedDict): Total flight amount. """ credit_reason: NotRequired[ - Literal[ - "other", - "partial_ticket_refund", - "passenger_transport_ancillary_cancellation", - "ticket_and_ancillary_cancellation", - "ticket_cancellation", - ] + "Literal['other', 'partial_ticket_refund', 'passenger_transport_ancillary_cancellation', 'ticket_and_ancillary_cancellation', 'ticket_cancellation']|str" ] """ Reason for credit. @@ -1453,7 +1292,7 @@ class ChargeUpdateParamsPaymentDetailsFlightDatumTotalExtraCharge(TypedDict): Amount of additional charges. """ type: NotRequired[ - Literal["additional_fees", "ancillary_service_charges", "exchange_fee"] + "Literal['additional_fees', 'ancillary_service_charges', 'exchange_fee']|str" ] """ Type of additional charges. @@ -1501,7 +1340,7 @@ class ChargeUpdateParamsPaymentDetailsLodging(TypedDict): """ The booking number associated with the lodging reservation. """ - category: NotRequired[Literal["hotel", "vacation_rental"]] + category: NotRequired["Literal['hotel', 'vacation_rental']|str"] """ The lodging category """ @@ -1527,13 +1366,16 @@ class ChargeUpdateParamsPaymentDetailsLodging(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", + Union[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ], + str, ] ] ] @@ -1619,7 +1461,7 @@ class ChargeUpdateParamsPaymentDetailsLodgingAffiliate(TypedDict): class ChargeUpdateParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1722,16 +1564,7 @@ class ChargeUpdateParamsPaymentDetailsLodgingDatum(TypedDict): class ChargeUpdateParamsPaymentDetailsLodgingDatumAccommodation(TypedDict): accommodation_type: NotRequired[ - Literal[ - "apartment", - "cabana", - "house", - "penthouse", - "room", - "standard", - "suite", - "villa", - ] + "Literal['apartment', 'cabana', 'house', 'penthouse', 'room', 'standard', 'suite', 'villa']|str" ] """ Type of accommodation. @@ -1796,7 +1629,7 @@ class ChargeUpdateParamsPaymentDetailsLodgingDatumHost(TypedDict): Reference number for the host. """ host_type: NotRequired[ - Literal["hostel", "hotel", "owner", "rental_agency"] + "Literal['hostel', 'hotel', 'owner', 'rental_agency']|str" ] """ Type of host. @@ -1859,8 +1692,8 @@ class ChargeUpdateParamsPaymentDetailsLodgingDatumInsurance(TypedDict): """ Name of the insurance company. """ - insurance_type: Literal[ - "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal["bankruptcy", "cancelation", "emergency", "medical"], str ] """ Type of insurance coverage. @@ -1919,9 +1752,7 @@ class ChargeUpdateParamsPaymentDetailsLodgingDatumTotalExtraCharge(TypedDict): Amount of the extra charge in cents. """ type: NotRequired[ - Literal[ - "gift_shop", "laundry", "mini_bar", "other", "phone", "restaurant" - ] + "Literal['gift_shop', 'laundry', 'mini_bar', 'other', 'phone', 'restaurant']|str" ] """ Type of extra charge. @@ -1999,7 +1830,7 @@ class ChargeUpdateParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): """ The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. """ - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py index bf4dc4dc5..5af4014f2 100644 --- a/stripe/params/_confirmation_token_create_params.py +++ b/stripe/params/_confirmation_token_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -31,7 +31,7 @@ class ConfirmationTokenCreateParams(RequestOptions): """ Return URL used to confirm the Intent. """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + setup_future_usage: NotRequired["Literal['off_session', 'on_session']|str"] """ Indicates that you intend to make future payments with this ConfirmationToken's payment method. @@ -64,7 +64,9 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -364,69 +366,72 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -693,7 +698,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataGrabpay(TypedDict): class ConfirmationTokenCreateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: NotRequired["Literal['bca', 'bni', 'bri', 'cimb', 'permata']|str"] """ Bank where the account is held. """ @@ -784,7 +789,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataMultibanco(TypedDict): class ConfirmationTokenCreateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] + funding: NotRequired["Literal['card', 'points']|str"] """ Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ @@ -820,34 +825,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataOxxo(TypedDict): class ConfirmationTokenCreateParamsPaymentMethodDataP24(TypedDict): bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']|str" ] """ The customer's bank. @@ -958,7 +936,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataShopeepay(TypedDict): class ConfirmationTokenCreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ Two-letter ISO code representing the country the bank account is located in. """ @@ -1003,7 +981,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataUpiMandateOptions( """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1018,7 +996,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataUpiMandateOptions( class ConfirmationTokenCreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -1026,7 +1004,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataUsBankAccount(TypedDict): """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -1088,7 +1066,7 @@ class ConfirmationTokenCreateParamsPaymentMethodOptionsCardInstallmentsPlan( For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[Literal["bonus", "fixed_count", "revolving"], str] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ diff --git a/stripe/params/_coupon_create_params.py b/stripe/params/_coupon_create_params.py index eb169eccc..5eaff264a 100644 --- a/stripe/params/_coupon_create_params.py +++ b/stripe/params/_coupon_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Any, Dict, List +from typing import Any, Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -26,7 +26,7 @@ class CouponCreateParams(RequestOptions): Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). """ duration: NotRequired[ - Literal["forever", "once", "repeating", "service_period"] + "Literal['forever', 'once', 'repeating', 'service_period']|str" ] """ Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. @@ -120,7 +120,7 @@ class CouponCreateParamsServicePeriodIterations(TypedDict): """ The number of iterations the service period will repeat for. Only used when type is `count`, defaults to 1. """ - type: Literal["count", "forever"] + type: Union[Literal["count", "forever"], str] """ The type of iterations, defaults to `count` if omitted. """ diff --git a/stripe/params/_credit_note_create_params.py b/stripe/params/_credit_note_create_params.py index 5ce43d56b..e1b14e9d4 100644 --- a/stripe/params/_credit_note_create_params.py +++ b/stripe/params/_credit_note_create_params.py @@ -20,7 +20,7 @@ class CreditNoteCreateParams(RequestOptions): """ The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. """ - email_type: NotRequired[Literal["credit_note", "none"]] + email_type: NotRequired["Literal['credit_note', 'none']|str"] """ Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. """ @@ -49,9 +49,7 @@ class CreditNoteCreateParams(RequestOptions): The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. """ reason: NotRequired[ - Literal[ - "duplicate", "fraudulent", "order_change", "product_unsatisfactory" - ] + "Literal['duplicate', 'fraudulent', 'order_change', 'product_unsatisfactory']|str" ] """ Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` @@ -145,7 +143,7 @@ class CreditNoteCreateParamsRefund(TypedDict): """ ID of an existing refund to link this credit note to. Required when `type` is `refund`. """ - type: NotRequired[Literal["payment_record_refund", "refund"]] + type: NotRequired["Literal['payment_record_refund', 'refund']|str"] """ Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. """ diff --git a/stripe/params/_credit_note_preview_lines_list_params.py b/stripe/params/_credit_note_preview_lines_list_params.py index e14ea097f..e13d69e05 100644 --- a/stripe/params/_credit_note_preview_lines_list_params.py +++ b/stripe/params/_credit_note_preview_lines_list_params.py @@ -19,7 +19,7 @@ class CreditNotePreviewLinesListParams(TypedDict): """ The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. """ - email_type: NotRequired[Literal["credit_note", "none"]] + email_type: NotRequired["Literal['credit_note', 'none']|str"] """ Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. """ @@ -56,9 +56,7 @@ class CreditNotePreviewLinesListParams(TypedDict): The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. """ reason: NotRequired[ - Literal[ - "duplicate", "fraudulent", "order_change", "product_unsatisfactory" - ] + "Literal['duplicate', 'fraudulent', 'order_change', 'product_unsatisfactory']|str" ] """ Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` @@ -156,7 +154,7 @@ class CreditNotePreviewLinesListParamsRefund(TypedDict): """ ID of an existing refund to link this credit note to. Required when `type` is `refund`. """ - type: NotRequired[Literal["payment_record_refund", "refund"]] + type: NotRequired["Literal['payment_record_refund', 'refund']|str"] """ Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. """ diff --git a/stripe/params/_credit_note_preview_lines_params.py b/stripe/params/_credit_note_preview_lines_params.py index d8974086f..ca760649a 100644 --- a/stripe/params/_credit_note_preview_lines_params.py +++ b/stripe/params/_credit_note_preview_lines_params.py @@ -20,7 +20,7 @@ class CreditNotePreviewLinesParams(RequestOptions): """ The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. """ - email_type: NotRequired[Literal["credit_note", "none"]] + email_type: NotRequired["Literal['credit_note', 'none']|str"] """ Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. """ @@ -57,9 +57,7 @@ class CreditNotePreviewLinesParams(RequestOptions): The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. """ reason: NotRequired[ - Literal[ - "duplicate", "fraudulent", "order_change", "product_unsatisfactory" - ] + "Literal['duplicate', 'fraudulent', 'order_change', 'product_unsatisfactory']|str" ] """ Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` @@ -157,7 +155,7 @@ class CreditNotePreviewLinesParamsRefund(TypedDict): """ ID of an existing refund to link this credit note to. Required when `type` is `refund`. """ - type: NotRequired[Literal["payment_record_refund", "refund"]] + type: NotRequired["Literal['payment_record_refund', 'refund']|str"] """ Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. """ diff --git a/stripe/params/_credit_note_preview_params.py b/stripe/params/_credit_note_preview_params.py index ec7be34e9..4488307aa 100644 --- a/stripe/params/_credit_note_preview_params.py +++ b/stripe/params/_credit_note_preview_params.py @@ -20,7 +20,7 @@ class CreditNotePreviewParams(RequestOptions): """ The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. """ - email_type: NotRequired[Literal["credit_note", "none"]] + email_type: NotRequired["Literal['credit_note', 'none']|str"] """ Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. """ @@ -49,9 +49,7 @@ class CreditNotePreviewParams(RequestOptions): The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. """ reason: NotRequired[ - Literal[ - "duplicate", "fraudulent", "order_change", "product_unsatisfactory" - ] + "Literal['duplicate', 'fraudulent', 'order_change', 'product_unsatisfactory']|str" ] """ Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` @@ -145,7 +143,7 @@ class CreditNotePreviewParamsRefund(TypedDict): """ ID of an existing refund to link this credit note to. Required when `type` is `refund`. """ - type: NotRequired[Literal["payment_record_refund", "refund"]] + type: NotRequired["Literal['payment_record_refund', 'refund']|str"] """ Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. """ diff --git a/stripe/params/_customer_create_funding_instructions_params.py b/stripe/params/_customer_create_funding_instructions_params.py index 5550d52b7..f3dc9c9ea 100644 --- a/stripe/params/_customer_create_funding_instructions_params.py +++ b/stripe/params/_customer_create_funding_instructions_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -32,19 +32,22 @@ class CustomerCreateFundingInstructionsParamsBankTransfer(TypedDict): Configuration for eu_bank_transfer funding type. """ requested_address_types: NotRequired[ - List[Literal["iban", "sort_code", "spei", "zengin"]] + List[Union[Literal["iban", "sort_code", "spei", "zengin"], str]] ] """ List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ The type of the `bank_transfer` diff --git a/stripe/params/_customer_create_params.py b/stripe/params/_customer_create_params.py index 98a962541..1347134fa 100644 --- a/stripe/params/_customer_create_params.py +++ b/stripe/params/_customer_create_params.py @@ -232,7 +232,7 @@ class CustomerCreateParamsTax(TypedDict): """ A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. """ - validate_location: NotRequired[Literal["deferred", "immediately"]] + validate_location: NotRequired["Literal['deferred', 'immediately']|str"] """ A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. """ diff --git a/stripe/params/_customer_funding_instructions_create_params.py b/stripe/params/_customer_funding_instructions_create_params.py index 1c455bea5..c968821c0 100644 --- a/stripe/params/_customer_funding_instructions_create_params.py +++ b/stripe/params/_customer_funding_instructions_create_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -31,19 +31,22 @@ class CustomerFundingInstructionsCreateParamsBankTransfer(TypedDict): Configuration for eu_bank_transfer funding type. """ requested_address_types: NotRequired[ - List[Literal["iban", "sort_code", "spei", "zengin"]] + List[Union[Literal["iban", "sort_code", "spei", "zengin"], str]] ] """ List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ The type of the `bank_transfer` diff --git a/stripe/params/_customer_list_payment_methods_params.py b/stripe/params/_customer_list_payment_methods_params.py index 94d5b592e..ef8a53d13 100644 --- a/stripe/params/_customer_list_payment_methods_params.py +++ b/stripe/params/_customer_list_payment_methods_params.py @@ -6,7 +6,9 @@ class CustomerListPaymentMethodsParams(RequestOptions): - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. """ @@ -27,72 +29,7 @@ class CustomerListPaymentMethodsParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ type: NotRequired[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "custom", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", - ] + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" ] """ An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. diff --git a/stripe/params/_customer_modify_params.py b/stripe/params/_customer_modify_params.py index 284f7454f..253b346af 100644 --- a/stripe/params/_customer_modify_params.py +++ b/stripe/params/_customer_modify_params.py @@ -231,7 +231,9 @@ class CustomerModifyParamsTax(TypedDict): """ A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. """ - validate_location: NotRequired[Literal["auto", "deferred", "immediately"]] + validate_location: NotRequired[ + "Literal['auto', 'deferred', 'immediately']|str" + ] """ A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`. """ diff --git a/stripe/params/_customer_payment_method_list_params.py b/stripe/params/_customer_payment_method_list_params.py index d7982dd68..c277360d9 100644 --- a/stripe/params/_customer_payment_method_list_params.py +++ b/stripe/params/_customer_payment_method_list_params.py @@ -5,7 +5,9 @@ class CustomerPaymentMethodListParams(TypedDict): - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. """ @@ -26,72 +28,7 @@ class CustomerPaymentMethodListParams(TypedDict): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ type: NotRequired[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "custom", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", - ] + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" ] """ An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. diff --git a/stripe/params/_customer_session_create_params.py b/stripe/params/_customer_session_create_params.py index d2009922d..7ef261f5c 100644 --- a/stripe/params/_customer_session_create_params.py +++ b/stripe/params/_customer_session_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -83,14 +83,14 @@ class CustomerSessionCreateParamsComponentsCustomerSheet(TypedDict): class CustomerSessionCreateParamsComponentsCustomerSheetFeatures(TypedDict): payment_method_allow_redisplay_filters: NotRequired[ - List[Literal["always", "limited", "unspecified"]] + List[Union[Literal["always", "limited", "unspecified"], str]] ] """ A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the customer sheet displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. """ - payment_method_remove: NotRequired[Literal["disabled", "enabled"]] + payment_method_remove: NotRequired["Literal['disabled', 'enabled']|str"] """ Controls whether the customer sheet displays the option to remove a saved payment method." @@ -115,31 +115,31 @@ class CustomerSessionCreateParamsComponentsMobilePaymentElementFeatures( TypedDict, ): payment_method_allow_redisplay_filters: NotRequired[ - List[Literal["always", "limited", "unspecified"]] + List[Union[Literal["always", "limited", "unspecified"], str]] ] """ A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the mobile payment element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. """ - payment_method_redisplay: NotRequired[Literal["disabled", "enabled"]] + payment_method_redisplay: NotRequired["Literal['disabled', 'enabled']|str"] """ Controls whether or not the mobile payment element shows saved payment methods. """ - payment_method_remove: NotRequired[Literal["disabled", "enabled"]] + payment_method_remove: NotRequired["Literal['disabled', 'enabled']|str"] """ Controls whether the mobile payment element displays the option to remove a saved payment method." Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). """ - payment_method_save: NotRequired[Literal["disabled", "enabled"]] + payment_method_save: NotRequired["Literal['disabled', 'enabled']|str"] """ Controls whether the mobile payment element displays a checkbox offering to save a new payment method. If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. """ payment_method_save_allow_redisplay_override: NotRequired[ - Literal["always", "limited", "unspecified"] + "Literal['always', 'limited', 'unspecified']|str" ] """ Allows overriding the value of allow_override when saving a new payment method when payment_method_save is set to disabled. Use values: "always", "limited", or "unspecified". @@ -163,14 +163,14 @@ class CustomerSessionCreateParamsComponentsPaymentElement(TypedDict): class CustomerSessionCreateParamsComponentsPaymentElementFeatures(TypedDict): payment_method_allow_redisplay_filters: NotRequired[ - List[Literal["always", "limited", "unspecified"]] + List[Union[Literal["always", "limited", "unspecified"], str]] ] """ A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. """ - payment_method_redisplay: NotRequired[Literal["disabled", "enabled"]] + payment_method_redisplay: NotRequired["Literal['disabled', 'enabled']|str"] """ Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. """ @@ -178,20 +178,20 @@ class CustomerSessionCreateParamsComponentsPaymentElementFeatures(TypedDict): """ Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. """ - payment_method_remove: NotRequired[Literal["disabled", "enabled"]] + payment_method_remove: NotRequired["Literal['disabled', 'enabled']|str"] """ Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). """ - payment_method_save: NotRequired[Literal["disabled", "enabled"]] + payment_method_save: NotRequired["Literal['disabled', 'enabled']|str"] """ Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. """ payment_method_save_usage: NotRequired[ - Literal["off_session", "on_session"] + "Literal['off_session', 'on_session']|str" ] """ When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. @@ -221,13 +221,13 @@ class CustomerSessionCreateParamsComponentsTaxIdElement(TypedDict): class CustomerSessionCreateParamsComponentsTaxIdElementFeatures(TypedDict): - tax_id_redisplay: NotRequired[Literal["disabled", "enabled"]] + tax_id_redisplay: NotRequired["Literal['disabled', 'enabled']|str"] """ Controls whether the Tax ID Element displays saved tax IDs for the customer. This parameter defaults to `disabled`. When enabled, the Tax ID Element will show existing tax IDs associated with the customer, allowing them to select from previously saved tax identification numbers. """ - tax_id_save: NotRequired[Literal["disabled", "enabled"]] + tax_id_save: NotRequired["Literal['disabled', 'enabled']|str"] """ Controls whether the Tax ID Element allows merchants to save new tax IDs for their customer. This parameter defaults to `disabled`. diff --git a/stripe/params/_customer_update_params.py b/stripe/params/_customer_update_params.py index 56f942429..77499d1e7 100644 --- a/stripe/params/_customer_update_params.py +++ b/stripe/params/_customer_update_params.py @@ -230,7 +230,9 @@ class CustomerUpdateParamsTax(TypedDict): """ A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. """ - validate_location: NotRequired[Literal["auto", "deferred", "immediately"]] + validate_location: NotRequired[ + "Literal['auto', 'deferred', 'immediately']|str" + ] """ A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`. """ diff --git a/stripe/params/_dispute_modify_params.py b/stripe/params/_dispute_modify_params.py index c9c872f0a..94b7e4ad8 100644 --- a/stripe/params/_dispute_modify_params.py +++ b/stripe/params/_dispute_modify_params.py @@ -231,7 +231,9 @@ class DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3Disputed """ The IP address that the customer used when making the purchase. """ - merchandise_or_services: NotRequired[Literal["merchandise", "services"]] + merchandise_or_services: NotRequired[ + "Literal['merchandise', 'services']|str" + ] """ Categorization of disputed payment. """ diff --git a/stripe/params/_dispute_update_params.py b/stripe/params/_dispute_update_params.py index fdb72deb2..7c14e2dcd 100644 --- a/stripe/params/_dispute_update_params.py +++ b/stripe/params/_dispute_update_params.py @@ -230,7 +230,9 @@ class DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3Disputed """ The IP address that the customer used when making the purchase. """ - merchandise_or_services: NotRequired[Literal["merchandise", "services"]] + merchandise_or_services: NotRequired[ + "Literal['merchandise', 'services']|str" + ] """ Categorization of disputed payment. """ diff --git a/stripe/params/_file_create_params.py b/stripe/params/_file_create_params.py index 4e6dc5da0..9105b6868 100644 --- a/stripe/params/_file_create_params.py +++ b/stripe/params/_file_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Any, Dict, List +from typing import Any, Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -19,22 +19,25 @@ class FileCreateParams(RequestOptions): """ Optional parameters that automatically create a [file link](https://api.stripe.com#file_links) for the newly created file. """ - purpose: Literal[ - "account_requirement", - "additional_verification", - "business_icon", - "business_logo", - "customer_signature", - "dispute_evidence", - "identity_document", - "issuing_regulatory_reporting", - "pci_document", - "platform_terms_of_service", - "tax_document_user_upload", - "terminal_android_apk", - "terminal_reader_splashscreen", - "terminal_wifi_certificate", - "terminal_wifi_private_key", + purpose: Union[ + Literal[ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "identity_document", + "issuing_regulatory_reporting", + "pci_document", + "platform_terms_of_service", + "tax_document_user_upload", + "terminal_android_apk", + "terminal_reader_splashscreen", + "terminal_wifi_certificate", + "terminal_wifi_private_key", + ], + str, ] """ The [purpose](https://docs.stripe.com/file-upload#uploading-a-file) of the uploaded file. diff --git a/stripe/params/_fx_quote_create_params.py b/stripe/params/_fx_quote_create_params.py index c47eb4308..a6163d467 100644 --- a/stripe/params/_fx_quote_create_params.py +++ b/stripe/params/_fx_quote_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -14,7 +14,7 @@ class FxQuoteCreateParams(RequestOptions): """ A list of three letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be [supported currencies](https://stripe.com/docs/currencies). """ - lock_duration: Literal["day", "five_minutes", "hour", "none"] + lock_duration: Union[Literal["day", "five_minutes", "hour", "none"], str] """ The duration that you wish the quote to be locked for. The quote will be usable for the duration specified. The default is `none`. The maximum is 1 day. """ @@ -37,7 +37,7 @@ class FxQuoteCreateParamsUsage(TypedDict): """ The transfer transaction details that are intended for the FX Quote. """ - type: Literal["payment", "transfer"] + type: Union[Literal["payment", "transfer"], str] """ Which transaction the FX Quote will be used for diff --git a/stripe/params/_invoice_add_lines_params.py b/stripe/params/_invoice_add_lines_params.py index a358afa03..1fe465f1e 100644 --- a/stripe/params/_invoice_add_lines_params.py +++ b/stripe/params/_invoice_add_lines_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -119,14 +119,14 @@ class InvoiceAddLinesParamsLineDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class InvoiceAddLinesParamsLineDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -237,23 +237,7 @@ class InvoiceAddLinesParamsLineTaxAmount(TypedDict): Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. """ taxability_reason: NotRequired[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", - ] + "Literal['customer_exempt', 'not_collecting', 'not_subject_to_tax', 'not_supported', 'portion_product_exempt', 'portion_reduced_rated', 'portion_standard_rated', 'product_exempt', 'product_exempt_holiday', 'proportionally_rated', 'reduced_rated', 'reverse_charge', 'standard_rated', 'taxable_basis_reduced', 'zero_rated']|str" ] """ The reasoning behind this tax, for example, if the product is tax exempt. @@ -286,7 +270,7 @@ class InvoiceAddLinesParamsLineTaxAmountTaxRateData(TypedDict): The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. """ jurisdiction_level: NotRequired[ - Literal["city", "country", "county", "district", "multiple", "state"] + "Literal['city', 'country', 'county', 'district', 'multiple', 'state']|str" ] """ The level of the jurisdiction that imposes this tax rate. diff --git a/stripe/params/_invoice_create_params.py b/stripe/params/_invoice_create_params.py index 526a3e0f5..1364484b8 100644 --- a/stripe/params/_invoice_create_params.py +++ b/stripe/params/_invoice_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -125,7 +125,9 @@ class InvoiceCreateParams(RequestOptions): """ Configuration settings for the PaymentIntent that is generated when the invoice is finalized. """ - pending_invoice_items_behavior: NotRequired[Literal["exclude", "include"]] + pending_invoice_items_behavior: NotRequired[ + "Literal['exclude', 'include']|str" + ] """ How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted. """ @@ -190,7 +192,7 @@ class InvoiceCreateParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -235,14 +237,14 @@ class InvoiceCreateParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class InvoiceCreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -268,7 +270,7 @@ class InvoiceCreateParamsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -286,7 +288,7 @@ class InvoiceCreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -396,7 +398,7 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -406,7 +408,7 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -415,7 +417,7 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOpti class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -439,7 +441,7 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): For more information, see the [installments integration guide](https://docs.stripe.com/payments/installments). """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -474,7 +476,7 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[Literal["bonus", "fixed_count", "revolving"], str] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ @@ -552,19 +554,7 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions( The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit. """ purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] + "Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -572,7 +562,7 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions( class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ @@ -604,7 +594,7 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -628,7 +618,7 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( Additional fields for Financial Connections Session creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -654,8 +644,14 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -667,7 +663,9 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( TypedDict, ): - account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + account_subcategories: NotRequired[ + List[Union[Literal["checking", "savings"], str]] + ] """ The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. """ @@ -788,7 +786,7 @@ class InvoiceCreateParamsShippingCostShippingRateDataDeliveryEstimate( class InvoiceCreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -801,7 +799,7 @@ class InvoiceCreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( class InvoiceCreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index 325cbd36e..353e5bf25 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -54,7 +54,7 @@ class InvoiceCreatePreviewParams(RequestOptions): """ The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://docs.stripe.com/billing/invoices/connect) documentation for details. """ - preview_mode: NotRequired[Literal["next", "recurring"]] + preview_mode: NotRequired["Literal['next', 'recurring']|str"] """ Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. """ @@ -94,7 +94,7 @@ class InvoiceCreatePreviewParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -367,14 +367,14 @@ class InvoiceCreatePreviewParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class InvoiceCreatePreviewParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -392,7 +392,7 @@ class InvoiceCreatePreviewParamsDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "now"] + "Literal['current_period_end', 'current_period_start', 'now']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted. @@ -408,7 +408,9 @@ class InvoiceCreatePreviewParamsDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "subscription_service_cycle_anchor"]] + type: NotRequired[ + "Literal['custom', 'subscription_service_cycle_anchor']|str" + ] """ The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted. """ @@ -546,7 +548,7 @@ class InvoiceCreatePreviewParamsInvoiceItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -555,7 +557,7 @@ class InvoiceCreatePreviewParamsInvoiceItemDiscountDiscountEnd(TypedDict): class InvoiceCreatePreviewParamsInvoiceItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -604,7 +606,7 @@ class InvoiceCreatePreviewParamsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -656,7 +658,7 @@ class InvoiceCreatePreviewParamsScheduleDetails(TypedDict): Provide any time periods to bill in advance. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. @@ -676,7 +678,9 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendment(TypedDict): """ Details to identify the earliest timestamp where the proposed change should take effect. """ - billing_cycle_anchor: NotRequired[Literal["amendment_start", "automatic"]] + billing_cycle_anchor: NotRequired[ + "Literal['amendment_start', 'automatic']|str" + ] """ For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. """ @@ -697,7 +701,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendment(TypedDict): Changes to the coupons being redeemed or discounts being applied during the amendment time span. """ effective_at: NotRequired[ - Literal["amendment_start", "billing_period_start"] + "Literal['amendment_start', 'billing_period_start']|str" ] """ Configures how the subscription schedule handles billing for phase transitions. @@ -717,7 +721,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendment(TypedDict): Instructions for how to modify phase metadata """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. @@ -728,7 +732,9 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendment(TypedDict): """ Defines how to pause collection for the underlying subscription throughout the duration of the amendment. """ - set_schedule_end: NotRequired[Literal["amendment_end", "amendment_start"]] + set_schedule_end: NotRequired[ + "Literal['amendment_end', 'amendment_start']|str" + ] """ Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. """ @@ -759,14 +765,17 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentEnd( """ A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. """ - type: Literal[ - "discount_end", - "duration", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", + type: Union[ + Literal[ + "discount_end", + "duration", + "schedule_end", + "timestamp", + "trial_end", + "trial_start", + "upcoming_invoice", + ], + str, ] """ Select one of three ways to pass the `amendment_end`. @@ -785,7 +794,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDiscountEnd( class InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -814,15 +823,18 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentStart( """ A precise Unix timestamp for the amendment to start. """ - type: Literal[ - "amendment_end", - "discount_end", - "now", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", + type: Union[ + Literal[ + "amendment_end", + "discount_end", + "now", + "schedule_end", + "timestamp", + "trial_end", + "trial_start", + "upcoming_invoice", + ], + str, ] """ Select one of three ways to pass the `amendment_start`. @@ -858,7 +870,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentBillingSchedulesAction( """ Specify which subscription items the billing schedule applies to. """ - type: Literal["remove", "set"] + type: Union[Literal["remove", "set"], str] """ Select the action. """ @@ -898,7 +910,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountAction( """ Details of the discount to replace the existing discounts with. """ - type: Literal["add", "remove", "set"] + type: Union[Literal["add", "remove", "set"], str] """ Determines the type of discount action. """ @@ -956,9 +968,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionAddSetting Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal[ - "amendment_start", "current_period_end", "current_period_start" - ] + "Literal['amendment_start', 'current_period_end', 'current_period_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted. @@ -974,7 +984,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionAddSetting """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -1055,9 +1065,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionSetSetting Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal[ - "amendment_start", "current_period_end", "current_period_start" - ] + "Literal['amendment_start', 'current_period_end', 'current_period_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted. @@ -1073,7 +1081,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionSetSetting """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -1123,7 +1131,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemAction(TypedDict): """ Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. """ - type: Literal["add", "remove", "set"] + type: Union[Literal["add", "remove", "set"], str] """ Determines the type of item action. """ @@ -1210,7 +1218,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDis """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -1219,7 +1227,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDis class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1239,9 +1247,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountSet Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal[ - "amendment_start", "current_period_end", "current_period_start" - ] + "Literal['amendment_start', 'current_period_end', 'current_period_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted. @@ -1257,7 +1263,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountSet """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -1295,7 +1301,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddTrial( """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -1391,7 +1397,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDis """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -1400,7 +1406,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDis class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1420,9 +1426,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountSet Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal[ - "amendment_start", "current_period_end", "current_period_start" - ] + "Literal['amendment_start', 'current_period_end', 'current_period_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted. @@ -1438,7 +1442,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountSet """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -1476,7 +1480,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetTrial( """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -1497,7 +1501,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentMetadataAction( """ Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. """ - type: Literal["add", "remove", "set"] + type: Union[Literal["add", "remove", "set"], str] """ Select one of three ways to update phase-level `metadata` on subscription schedules. """ @@ -1512,7 +1516,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentSetPauseCollection( """ Details of the pause_collection behavior to apply to the amendment. """ - type: Literal["remove", "set"] + type: Union[Literal["remove", "set"], str] """ Determines the type of the pause_collection amendment. """ @@ -1521,7 +1525,9 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentSetPauseCollection( class InvoiceCreatePreviewParamsScheduleDetailsAmendmentSetPauseCollectionSet( TypedDict, ): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -1541,7 +1547,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentTrialSettings( class InvoiceCreatePreviewParamsScheduleDetailsAmendmentTrialSettingsEndBehavior( TypedDict, ): - prorate_up_front: NotRequired[Literal["defer", "include"]] + prorate_up_front: NotRequired["Literal['defer', 'include']|str"] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -1554,7 +1560,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsBillingMode(TypedDict): """ Configure behavior for flexible billing mode. """ - type: Literal["classic", "flexible"] + type: Union[Literal["classic", "flexible"], str] """ Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. """ @@ -1614,7 +1620,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsBillingScheduleBillUntil( """ The end date of the billing schedule. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -1736,7 +1742,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhase(TypedDict): If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment). """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. @@ -1755,7 +1761,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhase(TypedDict): """ If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. """ - trial_continuation: NotRequired[Literal["continue", "none"]] + trial_continuation: NotRequired["Literal['continue', 'none']|str"] """ Specify trial behavior when crossing phase boundaries """ @@ -1850,7 +1856,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscou """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -1859,7 +1865,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscou class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1891,7 +1897,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodEnd( """ A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. """ - type: Literal["min_item_period_end", "phase_end", "timestamp"] + type: Union[Literal["min_item_period_end", "phase_end", "timestamp"], str] """ Select how to calculate the end of the invoice item period. """ @@ -1904,7 +1910,9 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodStart( """ A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. """ - type: Literal["max_item_period_start", "phase_start", "timestamp"] + type: Union[ + Literal["max_item_period_start", "phase_start", "timestamp"], str + ] """ Select how to calculate the start of the invoice item period. """ @@ -1955,7 +1963,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseAutomaticTaxLiability( """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -2014,7 +2022,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEnd( """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -2023,7 +2031,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEnd( class InvoiceCreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -2043,7 +2051,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseDiscountSettings( Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "phase_start"] + "Literal['current_period_end', 'current_period_start', 'phase_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `phase_start` if omitted. @@ -2059,7 +2067,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseDiscountSettingsServicePerio """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -2125,7 +2133,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseInvoiceSettingsIssuer( """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -2231,7 +2239,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEnd( """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -2240,7 +2248,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEnd( class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -2260,7 +2268,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemDiscountSettings( Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "phase_start"] + "Literal['current_period_end', 'current_period_start', 'phase_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `phase_start` if omitted. @@ -2276,7 +2284,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemDiscountSettingsServiceP """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -2354,14 +2362,16 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ class InvoiceCreatePreviewParamsScheduleDetailsPhasePauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -2390,7 +2400,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseTrialSettings(TypedDict): class InvoiceCreatePreviewParamsScheduleDetailsPhaseTrialSettingsEndBehavior( TypedDict, ): - prorate_up_front: NotRequired[Literal["defer", "include"]] + prorate_up_front: NotRequired["Literal['defer', 'include']|str"] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -2426,7 +2436,9 @@ class InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntil(TypedDict): """ End the prebilled period at a precise integer timestamp, starting from the Unix epoch. """ - type: Literal["amendment_end", "duration", "schedule_end", "timestamp"] + type: Union[ + Literal["amendment_end", "duration", "schedule_end", "timestamp"], str + ] """ Select one of several ways to pass the `bill_until` value. """ @@ -2444,7 +2456,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntilAmendmentEnd( class InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -2472,7 +2484,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetails(TypedDict): Sets the billing schedules for the subscription. """ cancel_at: NotRequired[ - "Literal['']|int|Literal['max_billed_until', 'max_period_end', 'min_period_end']" + "Literal['']|int|Literal['max_billed_until', 'max_period_end', 'min_period_end']|str" ] """ A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. @@ -2510,7 +2522,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetails(TypedDict): The pre-billing to apply to the subscription as a preview. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. @@ -2540,7 +2552,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsBillingMode(TypedDict): """ Configure behavior for flexible billing mode. """ - type: Literal["classic", "flexible"] + type: Union[Literal["classic", "flexible"], str] """ Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. """ @@ -2602,7 +2614,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntil( """ The end date of the billing schedule. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -2742,7 +2754,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEnd( """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -2751,7 +2763,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEnd( class InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -2771,7 +2783,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountSettings( Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "now"] + "Literal['current_period_end', 'current_period_start', 'now']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted. @@ -2787,7 +2799,9 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountSettingsServicePe """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "subscription_service_cycle_anchor"]] + type: NotRequired[ + "Literal['custom', 'subscription_service_cycle_anchor']|str" + ] """ The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted. """ @@ -2867,7 +2881,9 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsPause(TypedDict): """ Controls what to bill for when pausing the subscription. """ - invoicing_behavior: NotRequired[Literal["invoice", "pending_invoice_item"]] + invoicing_behavior: NotRequired[ + "Literal['invoice', 'pending_invoice_item']|str" + ] """ Determines how to handle debits and credits when pausing. Defaults to `pending_invoice_item`. """ diff --git a/stripe/params/_invoice_item_create_params.py b/stripe/params/_invoice_item_create_params.py index 581af1fd4..d167a1630 100644 --- a/stripe/params/_invoice_item_create_params.py +++ b/stripe/params/_invoice_item_create_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -124,14 +124,14 @@ class InvoiceItemCreateParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class InvoiceItemCreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ diff --git a/stripe/params/_invoice_item_modify_params.py b/stripe/params/_invoice_item_modify_params.py index 7a160a435..d8040b73c 100644 --- a/stripe/params/_invoice_item_modify_params.py +++ b/stripe/params/_invoice_item_modify_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -104,14 +104,14 @@ class InvoiceItemModifyParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class InvoiceItemModifyParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ diff --git a/stripe/params/_invoice_item_update_params.py b/stripe/params/_invoice_item_update_params.py index cc4be96b8..f31edc898 100644 --- a/stripe/params/_invoice_item_update_params.py +++ b/stripe/params/_invoice_item_update_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -103,14 +103,14 @@ class InvoiceItemUpdateParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class InvoiceItemUpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ diff --git a/stripe/params/_invoice_line_item_update_params.py b/stripe/params/_invoice_line_item_update_params.py index ce15ea30f..50acf16f6 100644 --- a/stripe/params/_invoice_line_item_update_params.py +++ b/stripe/params/_invoice_line_item_update_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -101,14 +101,14 @@ class InvoiceLineItemUpdateParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class InvoiceLineItemUpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -221,23 +221,7 @@ class InvoiceLineItemUpdateParamsTaxAmount(TypedDict): Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. """ taxability_reason: NotRequired[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", - ] + "Literal['customer_exempt', 'not_collecting', 'not_subject_to_tax', 'not_supported', 'portion_product_exempt', 'portion_reduced_rated', 'portion_standard_rated', 'product_exempt', 'product_exempt_holiday', 'proportionally_rated', 'reduced_rated', 'reverse_charge', 'standard_rated', 'taxable_basis_reduced', 'zero_rated']|str" ] """ The reasoning behind this tax, for example, if the product is tax exempt. @@ -270,7 +254,7 @@ class InvoiceLineItemUpdateParamsTaxAmountTaxRateData(TypedDict): The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. """ jurisdiction_level: NotRequired[ - Literal["city", "country", "county", "district", "multiple", "state"] + "Literal['city', 'country', 'county', 'district', 'multiple', 'state']|str" ] """ The level of the jurisdiction that imposes this tax rate. diff --git a/stripe/params/_invoice_list_params.py b/stripe/params/_invoice_list_params.py index 68aded1b4..3f7d0393f 100644 --- a/stripe/params/_invoice_list_params.py +++ b/stripe/params/_invoice_list_params.py @@ -46,7 +46,7 @@ class InvoiceListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ status: NotRequired[ - Literal["draft", "open", "paid", "uncollectible", "void"] + "Literal['draft', 'open', 'paid', 'uncollectible', 'void']|str" ] """ The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://docs.stripe.com/billing/invoices/workflow#workflow-overview) diff --git a/stripe/params/_invoice_modify_params.py b/stripe/params/_invoice_modify_params.py index a0f2484d4..66ebab487 100644 --- a/stripe/params/_invoice_modify_params.py +++ b/stripe/params/_invoice_modify_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -168,7 +168,7 @@ class InvoiceModifyParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -213,14 +213,14 @@ class InvoiceModifyParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class InvoiceModifyParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -235,7 +235,7 @@ class InvoiceModifyParamsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -253,7 +253,7 @@ class InvoiceModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -363,7 +363,7 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -373,7 +373,7 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -382,7 +382,7 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOpti class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -406,7 +406,7 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): For more information, see the [installments integration guide](https://docs.stripe.com/payments/installments). """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -441,7 +441,7 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[Literal["bonus", "fixed_count", "revolving"], str] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ @@ -519,19 +519,7 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions( The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit. """ purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] + "Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -539,7 +527,7 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions( class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ @@ -571,7 +559,7 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -595,7 +583,7 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( Additional fields for Financial Connections Session creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -621,8 +609,14 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -634,7 +628,9 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( TypedDict, ): - account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + account_subcategories: NotRequired[ + List[Union[Literal["checking", "savings"], str]] + ] """ The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. """ @@ -755,7 +751,7 @@ class InvoiceModifyParamsShippingCostShippingRateDataDeliveryEstimate( class InvoiceModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -768,7 +764,7 @@ class InvoiceModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum( class InvoiceModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ diff --git a/stripe/params/_invoice_payment_list_params.py b/stripe/params/_invoice_payment_list_params.py index 80bc1acf4..f74fb7c0a 100644 --- a/stripe/params/_invoice_payment_list_params.py +++ b/stripe/params/_invoice_payment_list_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -34,7 +34,7 @@ class InvoicePaymentListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["canceled", "open", "paid"]] + status: NotRequired["Literal['canceled', 'open', 'paid']|str"] """ The status of the invoice payments to return. """ @@ -68,7 +68,7 @@ class InvoicePaymentListParamsPayment(TypedDict): """ Only return invoice payments associated by this payment record ID. """ - type: Literal["payment_intent", "payment_record"] + type: Union[Literal["payment_intent", "payment_record"], str] """ Only return invoice payments associated by this payment type. """ diff --git a/stripe/params/_invoice_remove_lines_params.py b/stripe/params/_invoice_remove_lines_params.py index 4221d0c4a..4dfea7feb 100644 --- a/stripe/params/_invoice_remove_lines_params.py +++ b/stripe/params/_invoice_remove_lines_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -24,7 +24,7 @@ class InvoiceRemoveLinesParams(RequestOptions): class InvoiceRemoveLinesParamsLine(TypedDict): - behavior: Literal["delete", "unassign"] + behavior: Union[Literal["delete", "unassign"], str] """ Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice. """ diff --git a/stripe/params/_invoice_update_lines_params.py b/stripe/params/_invoice_update_lines_params.py index aa685c50a..1c176ed4d 100644 --- a/stripe/params/_invoice_update_lines_params.py +++ b/stripe/params/_invoice_update_lines_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -121,14 +121,14 @@ class InvoiceUpdateLinesParamsLineDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class InvoiceUpdateLinesParamsLineDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -241,23 +241,7 @@ class InvoiceUpdateLinesParamsLineTaxAmount(TypedDict): Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. """ taxability_reason: NotRequired[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", - ] + "Literal['customer_exempt', 'not_collecting', 'not_subject_to_tax', 'not_supported', 'portion_product_exempt', 'portion_reduced_rated', 'portion_standard_rated', 'product_exempt', 'product_exempt_holiday', 'proportionally_rated', 'reduced_rated', 'reverse_charge', 'standard_rated', 'taxable_basis_reduced', 'zero_rated']|str" ] """ The reasoning behind this tax, for example, if the product is tax exempt. @@ -290,7 +274,7 @@ class InvoiceUpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. """ jurisdiction_level: NotRequired[ - Literal["city", "country", "county", "district", "multiple", "state"] + "Literal['city', 'country', 'county', 'district', 'multiple', 'state']|str" ] """ The level of the jurisdiction that imposes this tax rate. diff --git a/stripe/params/_invoice_update_params.py b/stripe/params/_invoice_update_params.py index e34f1594b..8b99e067f 100644 --- a/stripe/params/_invoice_update_params.py +++ b/stripe/params/_invoice_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -167,7 +167,7 @@ class InvoiceUpdateParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -212,14 +212,14 @@ class InvoiceUpdateParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class InvoiceUpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -234,7 +234,7 @@ class InvoiceUpdateParamsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -252,7 +252,7 @@ class InvoiceUpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to the invoice's PaymentIntent. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). @@ -362,7 +362,7 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -372,7 +372,7 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -381,7 +381,7 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOpti class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -405,7 +405,7 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): For more information, see the [installments integration guide](https://docs.stripe.com/payments/installments). """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -440,7 +440,7 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[Literal["bonus", "fixed_count", "revolving"], str] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ @@ -518,19 +518,7 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions( The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit. """ purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] + "Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -538,7 +526,7 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions( class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ @@ -570,7 +558,7 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -594,7 +582,7 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( Additional fields for Financial Connections Session creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -620,8 +608,14 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -633,7 +627,9 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinanci class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( TypedDict, ): - account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + account_subcategories: NotRequired[ + List[Union[Literal["checking", "savings"], str]] + ] """ The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. """ @@ -754,7 +750,7 @@ class InvoiceUpdateParamsShippingCostShippingRateDataDeliveryEstimate( class InvoiceUpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -767,7 +763,7 @@ class InvoiceUpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( class InvoiceUpdateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ diff --git a/stripe/params/_mandate_list_params.py b/stripe/params/_mandate_list_params.py index 69bc69f1a..23b190f1b 100644 --- a/stripe/params/_mandate_list_params.py +++ b/stripe/params/_mandate_list_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired @@ -27,7 +27,7 @@ class MandateListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: Literal["active", "inactive", "pending"] + status: Union[Literal["active", "inactive", "pending"], str] """ The status of the mandates to retrieve. Status indicates whether or not you can use it to initiate a payment, and can have a value of `active`, `pending`, or `inactive`. """ diff --git a/stripe/params/_order_create_params.py b/stripe/params/_order_create_params.py index da8402879..d6f0ce849 100644 --- a/stripe/params/_order_create_params.py +++ b/stripe/params/_order_create_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -340,28 +340,31 @@ class OrderCreateParamsPaymentSettings(TypedDict): """ payment_method_types: NotRequired[ List[ - Literal[ - "acss_debit", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "card", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "link", - "oxxo", - "p24", - "paypal", - "sepa_debit", - "sofort", - "wechat_pay", + Union[ + Literal[ + "acss_debit", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "link", + "oxxo", + "p24", + "paypal", + "sepa_debit", + "sofort", + "wechat_pay", + ], + str, ] ] ] @@ -485,7 +488,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -503,7 +506,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -523,11 +526,13 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOption """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -537,7 +542,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( TypedDict, ): capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds are captured from the customer's account. @@ -564,7 +569,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( class OrderCreateParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -582,12 +587,12 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): class OrderCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict ): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -604,13 +609,13 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( class OrderCreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds will be captured from the customer's account. """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with the payment method. @@ -661,8 +666,17 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTra """ requested_address_types: NotRequired[ List[ - Literal[ - "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + Union[ + Literal[ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -671,12 +685,15 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTra Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. @@ -694,7 +711,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTra class OrderCreateParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -725,60 +742,13 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): On-demand details if setting up or charging an on-demand payment. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-RO', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'sv-FI', 'sv-SE']|str" ] """ Preferred language of the Klarna authorization page that the customer is redirected to """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -820,7 +790,9 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( """ The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + purchase_interval: NotRequired[ + "Literal['day', 'month', 'week', 'year']|str" + ] """ Interval at which the customer is making purchases """ @@ -833,7 +805,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -971,7 +943,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1082,7 +1054,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1136,16 +1108,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the event. """ event_type: NotRequired[ - Literal[ - "concert", - "conference", - "digital_education", - "expo", - "festival", - "in_person_education", - "sport", - "tour", - ] + "Literal['concert', 'conference', 'digital_education', 'expo', 'festival', 'in_person_education', 'sport', 'tour']|str" ] """ Type of the event. @@ -1209,7 +1172,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1268,7 +1231,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1379,7 +1342,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1415,7 +1378,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance @@ -1452,42 +1415,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur The number of transactions the sub-seller completed in the last 12 months. """ product_category: NotRequired[ - Literal[ - "accessories", - "appliances", - "apps_and_games", - "arts_crafts_and_sewing", - "automotive", - "baby", - "baby_clothing", - "bags_and_purses", - "beauty", - "books", - "cds_and_vinyl", - "cell_phones_and_accessories", - "collectibles_and_fine_arts", - "digital_music", - "electronics", - "grocery_and_gourmet_food", - "handmade", - "health_and_personal_care", - "home_and_kitchen", - "industrial_and_scientific", - "luggage_and_travel_gear", - "magazine_subscriptions", - "men_clothing", - "musical_instruments", - "office_products", - "patio_lawn_and_garden", - "pet_supplies", - "shoes", - "software", - "sports_and_outdoors", - "tools_and_home_improvement", - "toys_and_games", - "video_games", - "women_clothing", - ] + "Literal['accessories', 'appliances', 'apps_and_games', 'arts_crafts_and_sewing', 'automotive', 'baby', 'baby_clothing', 'bags_and_purses', 'beauty', 'books', 'cds_and_vinyl', 'cell_phones_and_accessories', 'collectibles_and_fine_arts', 'digital_music', 'electronics', 'grocery_and_gourmet_food', 'handmade', 'health_and_personal_care', 'home_and_kitchen', 'industrial_and_scientific', 'luggage_and_travel_gear', 'magazine_subscriptions', 'men_clothing', 'musical_instruments', 'office_products', 'patio_lawn_and_garden', 'pet_supplies', 'shoes', 'software', 'sports_and_outdoors', 'tools_and_home_improvement', 'toys_and_games', 'video_games', 'women_clothing']|str" ] """ The category of the product. @@ -1497,7 +1425,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur The date when the seller's account with the marketplace was last logged in. """ seller_rating: NotRequired[ - Literal["high", "low", "medium", "very_high", "very_low"] + "Literal['high', 'low', 'medium', 'very_high', 'very_low']|str" ] """ The current rating of the marketplace seller. If the marketplace uses numeric ranking, map these to the enum values. @@ -1597,7 +1525,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1708,7 +1636,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1780,7 +1708,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1891,7 +1819,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1939,13 +1867,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur The name or reference to identify the voucher. """ voucher_type: NotRequired[ - Literal[ - "digital_product", - "discount", - "gift_card", - "physical_product", - "services", - ] + "Literal['digital_product', 'discount', 'gift_card', 'physical_product', 'services']|str" ] """ The type of this voucher. @@ -1966,7 +1888,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): [Deprecated] This is a legacy parameter that no longer has any function. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2033,29 +1955,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): The line items purchased by the customer. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']|str" ] """ [Preferred locale](https://docs.stripe.com/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. @@ -2073,7 +1973,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): The risk correlation ID for an on-session payment using a saved PayPal payment method. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2096,7 +1996,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem( TypedDict, ): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -2140,7 +2040,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax( """ The tax for a single unit of the line item in minor units. Cannot be a negative number. """ - behavior: Literal["exclusive", "inclusive"] + behavior: Union[Literal["exclusive", "inclusive"], str] """ The tax behavior for the line item. """ @@ -2154,7 +2054,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2184,13 +2084,13 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOption class OrderCreateParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|str" ] """ Language shown to the payer on redirect. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2214,7 +2114,7 @@ class OrderCreateParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): """ The unique buyer ID for the app ID registered with WeChat Pay. Only required when client is mini_program. """ - client: NotRequired[Literal["android", "ios", "mini_program", "web"]] + client: NotRequired["Literal['android', 'ios', 'mini_program', 'web']|str"] """ The client type that the end customer will pay from """ @@ -2309,7 +2209,7 @@ class OrderCreateParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): class OrderCreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -2322,7 +2222,7 @@ class OrderCreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( class OrderCreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ diff --git a/stripe/params/_order_modify_params.py b/stripe/params/_order_modify_params.py index a48e4724a..3ccc4f418 100644 --- a/stripe/params/_order_modify_params.py +++ b/stripe/params/_order_modify_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -346,28 +346,31 @@ class OrderModifyParamsPaymentSettings(TypedDict): """ payment_method_types: NotRequired[ List[ - Literal[ - "acss_debit", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "card", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "link", - "oxxo", - "p24", - "paypal", - "sepa_debit", - "sofort", - "wechat_pay", + Union[ + Literal[ + "acss_debit", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "link", + "oxxo", + "p24", + "paypal", + "sepa_debit", + "sofort", + "wechat_pay", + ], + str, ] ] ] @@ -495,7 +498,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -513,7 +516,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -533,11 +536,13 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOption """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -547,7 +552,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( TypedDict, ): capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds are captured from the customer's account. @@ -574,7 +579,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( class OrderModifyParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -592,12 +597,12 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): class OrderModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict ): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -614,13 +619,13 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( class OrderModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds will be captured from the customer's account. """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with the payment method. @@ -671,8 +676,17 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTra """ requested_address_types: NotRequired[ List[ - Literal[ - "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + Union[ + Literal[ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -681,12 +695,15 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTra Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. @@ -704,7 +721,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTra class OrderModifyParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -735,60 +752,13 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): On-demand details if setting up or charging an on-demand payment. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-RO', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'sv-FI', 'sv-SE']|str" ] """ Preferred language of the Klarna authorization page that the customer is redirected to """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -830,7 +800,9 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( """ The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + purchase_interval: NotRequired[ + "Literal['day', 'month', 'week', 'year']|str" + ] """ Interval at which the customer is making purchases """ @@ -843,7 +815,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -981,7 +953,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1092,7 +1064,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1146,16 +1118,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the event. """ event_type: NotRequired[ - Literal[ - "concert", - "conference", - "digital_education", - "expo", - "festival", - "in_person_education", - "sport", - "tour", - ] + "Literal['concert', 'conference', 'digital_education', 'expo', 'festival', 'in_person_education', 'sport', 'tour']|str" ] """ Type of the event. @@ -1219,7 +1182,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1278,7 +1241,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1389,7 +1352,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1425,7 +1388,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance @@ -1462,42 +1425,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur The number of transactions the sub-seller completed in the last 12 months. """ product_category: NotRequired[ - Literal[ - "accessories", - "appliances", - "apps_and_games", - "arts_crafts_and_sewing", - "automotive", - "baby", - "baby_clothing", - "bags_and_purses", - "beauty", - "books", - "cds_and_vinyl", - "cell_phones_and_accessories", - "collectibles_and_fine_arts", - "digital_music", - "electronics", - "grocery_and_gourmet_food", - "handmade", - "health_and_personal_care", - "home_and_kitchen", - "industrial_and_scientific", - "luggage_and_travel_gear", - "magazine_subscriptions", - "men_clothing", - "musical_instruments", - "office_products", - "patio_lawn_and_garden", - "pet_supplies", - "shoes", - "software", - "sports_and_outdoors", - "tools_and_home_improvement", - "toys_and_games", - "video_games", - "women_clothing", - ] + "Literal['accessories', 'appliances', 'apps_and_games', 'arts_crafts_and_sewing', 'automotive', 'baby', 'baby_clothing', 'bags_and_purses', 'beauty', 'books', 'cds_and_vinyl', 'cell_phones_and_accessories', 'collectibles_and_fine_arts', 'digital_music', 'electronics', 'grocery_and_gourmet_food', 'handmade', 'health_and_personal_care', 'home_and_kitchen', 'industrial_and_scientific', 'luggage_and_travel_gear', 'magazine_subscriptions', 'men_clothing', 'musical_instruments', 'office_products', 'patio_lawn_and_garden', 'pet_supplies', 'shoes', 'software', 'sports_and_outdoors', 'tools_and_home_improvement', 'toys_and_games', 'video_games', 'women_clothing']|str" ] """ The category of the product. @@ -1507,7 +1435,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur The date when the seller's account with the marketplace was last logged in. """ seller_rating: NotRequired[ - Literal["high", "low", "medium", "very_high", "very_low"] + "Literal['high', 'low', 'medium', 'very_high', 'very_low']|str" ] """ The current rating of the marketplace seller. If the marketplace uses numeric ranking, map these to the enum values. @@ -1607,7 +1535,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1718,7 +1646,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1790,7 +1718,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1901,7 +1829,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1949,13 +1877,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur The name or reference to identify the voucher. """ voucher_type: NotRequired[ - Literal[ - "digital_product", - "discount", - "gift_card", - "physical_product", - "services", - ] + "Literal['digital_product', 'discount', 'gift_card', 'physical_product', 'services']|str" ] """ The type of this voucher. @@ -1976,7 +1898,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): [Deprecated] This is a legacy parameter that no longer has any function. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2043,29 +1965,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): The line items purchased by the customer. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']|str" ] """ [Preferred locale](https://docs.stripe.com/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. @@ -2083,7 +1983,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): The risk correlation ID for an on-session payment using a saved PayPal payment method. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2106,7 +2006,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem( TypedDict, ): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -2150,7 +2050,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax( """ The tax for a single unit of the line item in minor units. Cannot be a negative number. """ - behavior: Literal["exclusive", "inclusive"] + behavior: Union[Literal["exclusive", "inclusive"], str] """ The tax behavior for the line item. """ @@ -2164,7 +2064,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2194,13 +2094,13 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOption class OrderModifyParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|str" ] """ Language shown to the payer on redirect. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2224,7 +2124,7 @@ class OrderModifyParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): """ The unique buyer ID for the app ID registered with WeChat Pay. Only required when client is mini_program. """ - client: NotRequired[Literal["android", "ios", "mini_program", "web"]] + client: NotRequired["Literal['android', 'ios', 'mini_program', 'web']|str"] """ The client type that the end customer will pay from """ @@ -2319,7 +2219,7 @@ class OrderModifyParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): class OrderModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -2332,7 +2232,7 @@ class OrderModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum( class OrderModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ diff --git a/stripe/params/_order_update_params.py b/stripe/params/_order_update_params.py index 801caa1f3..3a16dd380 100644 --- a/stripe/params/_order_update_params.py +++ b/stripe/params/_order_update_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -345,28 +345,31 @@ class OrderUpdateParamsPaymentSettings(TypedDict): """ payment_method_types: NotRequired[ List[ - Literal[ - "acss_debit", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "card", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "link", - "oxxo", - "p24", - "paypal", - "sepa_debit", - "sofort", - "wechat_pay", + Union[ + Literal[ + "acss_debit", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "link", + "oxxo", + "p24", + "paypal", + "sepa_debit", + "sofort", + "wechat_pay", + ], + str, ] ] ] @@ -494,7 +497,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -512,7 +515,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -532,11 +535,13 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOption """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -546,7 +551,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( TypedDict, ): capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds are captured from the customer's account. @@ -573,7 +578,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -591,12 +596,12 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict ): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -613,13 +618,13 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds will be captured from the customer's account. """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with the payment method. @@ -670,8 +675,17 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTra """ requested_address_types: NotRequired[ List[ - Literal[ - "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + Union[ + Literal[ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -680,12 +694,15 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTra Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. @@ -703,7 +720,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTra class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -734,60 +751,13 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): On-demand details if setting up or charging an on-demand payment. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-RO', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'sv-FI', 'sv-SE']|str" ] """ Preferred language of the Klarna authorization page that the customer is redirected to """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -829,7 +799,9 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( """ The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + purchase_interval: NotRequired[ + "Literal['day', 'month', 'week', 'year']|str" + ] """ Interval at which the customer is making purchases """ @@ -842,7 +814,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -980,7 +952,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1091,7 +1063,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1145,16 +1117,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the event. """ event_type: NotRequired[ - Literal[ - "concert", - "conference", - "digital_education", - "expo", - "festival", - "in_person_education", - "sport", - "tour", - ] + "Literal['concert', 'conference', 'digital_education', 'expo', 'festival', 'in_person_education', 'sport', 'tour']|str" ] """ Type of the event. @@ -1218,7 +1181,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1277,7 +1240,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1388,7 +1351,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1424,7 +1387,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance @@ -1461,42 +1424,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur The number of transactions the sub-seller completed in the last 12 months. """ product_category: NotRequired[ - Literal[ - "accessories", - "appliances", - "apps_and_games", - "arts_crafts_and_sewing", - "automotive", - "baby", - "baby_clothing", - "bags_and_purses", - "beauty", - "books", - "cds_and_vinyl", - "cell_phones_and_accessories", - "collectibles_and_fine_arts", - "digital_music", - "electronics", - "grocery_and_gourmet_food", - "handmade", - "health_and_personal_care", - "home_and_kitchen", - "industrial_and_scientific", - "luggage_and_travel_gear", - "magazine_subscriptions", - "men_clothing", - "musical_instruments", - "office_products", - "patio_lawn_and_garden", - "pet_supplies", - "shoes", - "software", - "sports_and_outdoors", - "tools_and_home_improvement", - "toys_and_games", - "video_games", - "women_clothing", - ] + "Literal['accessories', 'appliances', 'apps_and_games', 'arts_crafts_and_sewing', 'automotive', 'baby', 'baby_clothing', 'bags_and_purses', 'beauty', 'books', 'cds_and_vinyl', 'cell_phones_and_accessories', 'collectibles_and_fine_arts', 'digital_music', 'electronics', 'grocery_and_gourmet_food', 'handmade', 'health_and_personal_care', 'home_and_kitchen', 'industrial_and_scientific', 'luggage_and_travel_gear', 'magazine_subscriptions', 'men_clothing', 'musical_instruments', 'office_products', 'patio_lawn_and_garden', 'pet_supplies', 'shoes', 'software', 'sports_and_outdoors', 'tools_and_home_improvement', 'toys_and_games', 'video_games', 'women_clothing']|str" ] """ The category of the product. @@ -1506,7 +1434,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur The date when the seller's account with the marketplace was last logged in. """ seller_rating: NotRequired[ - Literal["high", "low", "medium", "very_high", "very_low"] + "Literal['high', 'low', 'medium', 'very_high', 'very_low']|str" ] """ The current rating of the marketplace seller. If the marketplace uses numeric ranking, map these to the enum values. @@ -1606,7 +1534,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1717,7 +1645,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1789,7 +1717,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -1900,7 +1828,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -1948,13 +1876,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSupplementaryPur The name or reference to identify the voucher. """ voucher_type: NotRequired[ - Literal[ - "digital_product", - "discount", - "gift_card", - "physical_product", - "services", - ] + "Literal['digital_product', 'discount', 'gift_card', 'physical_product', 'services']|str" ] """ The type of this voucher. @@ -1975,7 +1897,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): [Deprecated] This is a legacy parameter that no longer has any function. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2042,29 +1964,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): The line items purchased by the customer. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']|str" ] """ [Preferred locale](https://docs.stripe.com/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. @@ -2082,7 +1982,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): The risk correlation ID for an on-session payment using a saved PayPal payment method. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2105,7 +2005,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem( TypedDict, ): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -2149,7 +2049,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax( """ The tax for a single unit of the line item in minor units. Cannot be a negative number. """ - behavior: Literal["exclusive", "inclusive"] + behavior: Union[Literal["exclusive", "inclusive"], str] """ The tax behavior for the line item. """ @@ -2163,7 +2063,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2193,13 +2093,13 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOption class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|str" ] """ Language shown to the payer on redirect. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2223,7 +2123,7 @@ class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): """ The unique buyer ID for the app ID registered with WeChat Pay. Only required when client is mini_program. """ - client: NotRequired[Literal["android", "ios", "mini_program", "web"]] + client: NotRequired["Literal['android', 'ios', 'mini_program', 'web']|str"] """ The client type that the end customer will pay from """ @@ -2318,7 +2218,7 @@ class OrderUpdateParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): class OrderUpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -2331,7 +2231,7 @@ class OrderUpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( class OrderUpdateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ diff --git a/stripe/params/_payment_attempt_record_report_early_fraud_warning_params.py b/stripe/params/_payment_attempt_record_report_early_fraud_warning_params.py index 60ba03b93..4046f826a 100644 --- a/stripe/params/_payment_attempt_record_report_early_fraud_warning_params.py +++ b/stripe/params/_payment_attempt_record_report_early_fraud_warning_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired @@ -11,11 +11,14 @@ class PaymentAttemptRecordReportEarlyFraudWarningParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - fraud_type: Literal[ - "made_with_lost_card", - "made_with_stolen_card", - "other", - "unauthorized_use_of_card", + fraud_type: Union[ + Literal[ + "made_with_lost_card", + "made_with_stolen_card", + "other", + "unauthorized_use_of_card", + ], + str, ] """ The type of fraud reported in the early fraud warning. diff --git a/stripe/params/_payment_attempt_record_report_failed_params.py b/stripe/params/_payment_attempt_record_report_failed_params.py index 295692e3b..94a0aef5d 100644 --- a/stripe/params/_payment_attempt_record_report_failed_params.py +++ b/stripe/params/_payment_attempt_record_report_failed_params.py @@ -16,10 +16,7 @@ class PaymentAttemptRecordReportFailedParams(RequestOptions): When the reported payment failed. Measured in seconds since the Unix epoch. """ failure_code: NotRequired[ - Literal[ - "payment_method_customer_decline", - "payment_method_provider_unknown_outcome", - ] + "Literal['payment_method_customer_decline', 'payment_method_provider_unknown_outcome']|str" ] """ The failure code for this payment attempt. Must be one of `payment_method_customer_decline` or `payment_method_provider_unknown_outcome`. @@ -76,18 +73,20 @@ class PaymentAttemptRecordReportFailedParamsPaymentMethodDetailsCardChecks( TypedDict, ): address_line1_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's address line 1. """ address_postal_code_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's postal code. """ - cvc_check: NotRequired[Literal["fail", "pass", "unavailable", "unchecked"]] + cvc_check: NotRequired[ + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" + ] """ The result of the check on the card's CVC. """ diff --git a/stripe/params/_payment_attempt_record_report_guaranteed_params.py b/stripe/params/_payment_attempt_record_report_guaranteed_params.py index dff691759..e997fbd5e 100644 --- a/stripe/params/_payment_attempt_record_report_guaranteed_params.py +++ b/stripe/params/_payment_attempt_record_report_guaranteed_params.py @@ -69,18 +69,20 @@ class PaymentAttemptRecordReportGuaranteedParamsPaymentMethodDetailsCardChecks( TypedDict, ): address_line1_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's address line 1. """ address_postal_code_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's postal code. """ - cvc_check: NotRequired[Literal["fail", "pass", "unavailable", "unchecked"]] + cvc_check: NotRequired[ + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" + ] """ The result of the check on the card's CVC. """ diff --git a/stripe/params/_payment_attempt_record_report_refund_params.py b/stripe/params/_payment_attempt_record_report_refund_params.py index 685b5208f..4d28bcd75 100644 --- a/stripe/params/_payment_attempt_record_report_refund_params.py +++ b/stripe/params/_payment_attempt_record_report_refund_params.py @@ -29,7 +29,7 @@ class PaymentAttemptRecordReportRefundParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - outcome: NotRequired[Literal["failed", "refunded"]] + outcome: NotRequired["Literal['failed', 'refunded']|str"] """ The outcome of the reported refund. """ @@ -38,7 +38,7 @@ class PaymentAttemptRecordReportRefundParams(RequestOptions): Processor information for this refund. """ reason: NotRequired[ - Literal["duplicate", "fraudulent", "requested_by_customer"] + "Literal['duplicate', 'fraudulent', 'requested_by_customer']|str" ] """ The reason for the refund. One of `duplicate`, `fraudulent`, or `requested_by_customer`. @@ -70,15 +70,7 @@ class PaymentAttemptRecordReportRefundParamsFailed(TypedDict): When the reported refund failed. Measured in seconds since the Unix epoch. """ failure_reason: NotRequired[ - Literal[ - "charge_for_pending_refund_disputed", - "declined", - "expired_or_canceled_card", - "insufficient_funds", - "lost_or_stolen_card", - "merchant_request", - "unknown", - ] + "Literal['charge_for_pending_refund_disputed', 'declined', 'expired_or_canceled_card', 'insufficient_funds', 'lost_or_stolen_card', 'merchant_request', 'unknown']|str" ] """ Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. diff --git a/stripe/params/_payment_intent_capture_params.py b/stripe/params/_payment_intent_capture_params.py index 87c0bf634..64e10562a 100644 --- a/stripe/params/_payment_intent_capture_params.py +++ b/stripe/params/_payment_intent_capture_params.py @@ -195,59 +195,57 @@ class PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard( class PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardFleetData( TypedDict, ): - product_type: Literal[ - "air_conditioning_service", - "alcohol", - "aviation_fuel_premium", - "aviation_fuel_regular", - "car_care_detailing", - "compressed_natural_gas", - "deli", - "food_service", - "green_gasoline_mid_plus", - "green_gasoline_premium_super", - "green_gasoline_regular", - "grocery", - "liquid_natural_gas", - "liquid_propane_gas", - "lodging", - "marine_diesel", - "marine_fuel", - "merchandise", - "mid_plus", - "mid_plus_ethanol", - "miscellaneous_aviation_products_services", - "miscellaneous_fuel", - "miscellaneous_marine_products_services", - "miscellaneous_vehicle_products_services", - "packaged_beverage", - "premium_diesel", - "premium_super", - "premium_super_ethanol", - "preventative_maintenance", - "regular", - "regular_diesel", - "regular_ethanol", - "repairs", - "self_service_car_wash", - "shower", - "store_service", - "tobacco", - "vehicle_accessories", - "vehicle_parking", - "vehicle_parts", - "wash_out", + product_type: Union[ + Literal[ + "air_conditioning_service", + "alcohol", + "aviation_fuel_premium", + "aviation_fuel_regular", + "car_care_detailing", + "compressed_natural_gas", + "deli", + "food_service", + "green_gasoline_mid_plus", + "green_gasoline_premium_super", + "green_gasoline_regular", + "grocery", + "liquid_natural_gas", + "liquid_propane_gas", + "lodging", + "marine_diesel", + "marine_fuel", + "merchandise", + "mid_plus", + "mid_plus_ethanol", + "miscellaneous_aviation_products_services", + "miscellaneous_fuel", + "miscellaneous_marine_products_services", + "miscellaneous_vehicle_products_services", + "packaged_beverage", + "premium_diesel", + "premium_super", + "premium_super_ethanol", + "preventative_maintenance", + "regular", + "regular_diesel", + "regular_ethanol", + "repairs", + "self_service_car_wash", + "shower", + "store_service", + "tobacco", + "vehicle_accessories", + "vehicle_parking", + "vehicle_parts", + "wash_out", + ], + str, ] """ The type of product being purchased at this line item. """ service_type: NotRequired[ - Literal[ - "full_service", - "high_speed_diesel", - "non_fuel_only", - "self_service", - ] + "Literal['full_service', 'high_speed_diesel', 'non_fuel_only', 'self_service']|str" ] """ The type of service received at the acceptor location. @@ -288,7 +286,7 @@ class PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( TypedDict, ): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -333,7 +331,7 @@ class PaymentIntentCaptureParamsAmountDetailsSurcharge(TypedDict): Portion of the amount that corresponds to a surcharge. """ enforce_validation: NotRequired[ - "Literal['']|Literal['automatic', 'disabled', 'enabled']" + "Literal['']|Literal['automatic', 'disabled', 'enabled']|str" ] """ Indicate whether to enforce validations on the surcharge amount. @@ -497,12 +495,15 @@ class PaymentIntentCaptureParamsPaymentDetailsCarRental(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", + Union[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ], + str, ] ] ] @@ -531,7 +532,7 @@ class PaymentIntentCaptureParamsPaymentDetailsCarRental(TypedDict): """ Rental rate. """ - rate_interval: NotRequired[Literal["day", "month", "week"]] + rate_interval: NotRequired["Literal['day', 'month', 'week']|str"] """ The frequency at which the rate amount is applied. One of `day`, `week` or `month` """ @@ -571,7 +572,7 @@ class PaymentIntentCaptureParamsPaymentDetailsCarRentalAffiliate(TypedDict): class PaymentIntentCaptureParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -605,7 +606,7 @@ class PaymentIntentCaptureParamsPaymentDetailsCarRentalDistance(TypedDict): """ Distance traveled. """ - unit: NotRequired[Literal["kilometers", "miles"]] + unit: NotRequired["Literal['kilometers', 'miles']|str"] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -773,7 +774,7 @@ class PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumDistance( """ Distance traveled. """ - unit: Literal["kilometers", "miles"] + unit: Union[Literal["kilometers", "miles"], str] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -878,13 +879,16 @@ class PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumInsurance( """ Name of the insurance company. """ - insurance_type: Literal[ - "liability_supplement", - "loss_damage_waiver", - "other", - "partial_damage_waiver", - "personal_accident", - "personal_effects", + insurance_type: Union[ + Literal[ + "liability_supplement", + "loss_damage_waiver", + "other", + "partial_damage_waiver", + "personal_accident", + "personal_effects", + ], + str, ] """ Type of insurance coverage. @@ -965,7 +969,7 @@ class PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotal(TypedDict): Rate per unit for the rental. """ rate_unit: NotRequired[ - Literal["days", "kilometers", "miles", "months", "weeks"] + "Literal['days', 'kilometers', 'miles', 'months', 'weeks']|str" ] """ Unit of measurement for the rate. @@ -1002,17 +1006,20 @@ class PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumTotalExtraCharge( """ Amount of the extra charge in cents. """ - type: Literal[ - "extra_mileage", - "gas", - "gps", - "late_charge", - "one_way_drop_off", - "other", - "parking", - "phone", - "regular_mileage", - "towing", + type: Union[ + Literal[ + "extra_mileage", + "gas", + "gps", + "late_charge", + "one_way_drop_off", + "other", + "parking", + "phone", + "regular_mileage", + "towing", + ], + str, ] """ Type of extra charge. @@ -1067,48 +1074,13 @@ class PaymentIntentCaptureParamsPaymentDetailsCarRentalDatumVehicle(TypedDict): Odometer reading at the time of rental. """ type: NotRequired[ - Literal[ - "cargo_van", - "compact", - "economy", - "exotic", - "exotic_suv", - "fifteen_passenger_van", - "four_wheel_drive", - "full_size", - "intermediate", - "large_suv", - "large_truck", - "luxury", - "medium_suv", - "midsize", - "mini", - "minivan", - "miscellaneous", - "moped", - "moving_van", - "premium", - "regular", - "small_medium_truck", - "small_suv", - "special", - "standard", - "stretch", - "subcompact", - "taxi", - "twelve_foot_truck", - "twelve_passenger_van", - "twenty_foot_truck", - "twenty_four_foot_truck", - "twenty_six_foot_truck", - "unique", - ] + "Literal['cargo_van', 'compact', 'economy', 'exotic', 'exotic_suv', 'fifteen_passenger_van', 'four_wheel_drive', 'full_size', 'intermediate', 'large_suv', 'large_truck', 'luxury', 'medium_suv', 'midsize', 'mini', 'minivan', 'miscellaneous', 'moped', 'moving_van', 'premium', 'regular', 'small_medium_truck', 'small_suv', 'special', 'standard', 'stretch', 'subcompact', 'taxi', 'twelve_foot_truck', 'twelve_passenger_van', 'twenty_foot_truck', 'twenty_four_foot_truck', 'twenty_six_foot_truck', 'unique']|str" ] """ Type of the rental vehicle. """ vehicle_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Class of the rental vehicle. @@ -1199,7 +1171,7 @@ class PaymentIntentCaptureParamsPaymentDetailsEventDetailsAffiliate(TypedDict): class PaymentIntentCaptureParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1251,140 +1223,7 @@ class PaymentIntentCaptureParamsPaymentDetailsFleetDatumPrimaryFuelFields( TypedDict, ): brand: NotRequired[ - Literal[ - "aafes", - "amerada_hess", - "amoco_canada", - "amoco_petroleum_products", - "arco_products", - "asda", - "ashland_oil", - "bfl", - "bp_mobil", - "bp_oil", - "burrnah_major", - "butler_arndale", - "canadian_tire", - "canadian_turbo", - "caseys_general_store", - "cenex", - "chevron_canada", - "chevron_usa", - "circle_k_stores", - "citgo_petroleum", - "clark_brands", - "conoco_canada", - "conoco_inc", - "crown_central_petroleum", - "diamond_shamrock_inc", - "discount_tire", - "domo_gas", - "elf", - "erickson_oil", - "esso", - "esso_canada", - "exxon", - "exxonmobil", - "family_express", - "fas_gas_oil", - "federated_coop_sonic", - "fina", - "fina_inc", - "fkg_oil", - "flare", - "flying_j_inc", - "gas_america", - "gate_petroleum", - "getty_petroleum", - "giant_eagle", - "grow_mark_inc", - "gulf", - "gulf_canada", - "gulf_chevron", - "handy_way_food", - "heron", - "holiday_stores", - "home_depot", - "husky", - "hyvees", - "irving", - "irving_oil", - "j_sainsbury", - "jet_conoco", - "krogers", - "kuwait", - "kwik_trip_inc", - "lassus", - "loves_country_stores", - "mapco_express_inc", - "marathon_oil", - "martin_bailey_inc_dba_hucks", - "maxol", - "meineke", - "mfa", - "mohawk", - "mr_gas", - "murco", - "murphy_oil_canada", - "murphy_oil_usa_inc", - "nexcom", - "nordstrom_oil", - "olco", - "pdq_store", - "pennzoil_products_inc", - "petro", - "petro_canada", - "petro_t", - "phillips", - "pilot", - "pioneer", - "pure_oil", - "quaker_state", - "quarles_oil", - "quiktrip", - "racetrac_petroleum_inc", - "raceway_petroleum", - "repsol", - "rudy", - "safeway", - "seven_eleven", - "sheetz", - "shell", - "shell_canada", - "shell_oil", - "sinclair_oil", - "southland_oil", - "spar", - "speedway", - "sun_company_inc", - "suncor_sunoco_canada", - "tempo", - "tesco", - "tesoro_alaska", - "texaco", - "the_pantry_inc", - "thornton_oil", - "tosco", - "total", - "travel_centers_of_america", - "uk", - "ultramar_canada", - "unbranded_or_unassigned", - "unbranded_unassigned", - "union_76", - "united_dairy_farmer", - "united_refining_kwikfill", - "us_oil", - "usa_petroleum", - "valvoline", - "vg", - "w_morrison", - "warren_equities", - "wawa", - "western_energetix", - "wilco", - "zions", - ] + "Literal['aafes', 'amerada_hess', 'amoco_canada', 'amoco_petroleum_products', 'arco_products', 'asda', 'ashland_oil', 'bfl', 'bp_mobil', 'bp_oil', 'burrnah_major', 'butler_arndale', 'canadian_tire', 'canadian_turbo', 'caseys_general_store', 'cenex', 'chevron_canada', 'chevron_usa', 'circle_k_stores', 'citgo_petroleum', 'clark_brands', 'conoco_canada', 'conoco_inc', 'crown_central_petroleum', 'diamond_shamrock_inc', 'discount_tire', 'domo_gas', 'elf', 'erickson_oil', 'esso', 'esso_canada', 'exxon', 'exxonmobil', 'family_express', 'fas_gas_oil', 'federated_coop_sonic', 'fina', 'fina_inc', 'fkg_oil', 'flare', 'flying_j_inc', 'gas_america', 'gate_petroleum', 'getty_petroleum', 'giant_eagle', 'grow_mark_inc', 'gulf', 'gulf_canada', 'gulf_chevron', 'handy_way_food', 'heron', 'holiday_stores', 'home_depot', 'husky', 'hyvees', 'irving', 'irving_oil', 'j_sainsbury', 'jet_conoco', 'krogers', 'kuwait', 'kwik_trip_inc', 'lassus', 'loves_country_stores', 'mapco_express_inc', 'marathon_oil', 'martin_bailey_inc_dba_hucks', 'maxol', 'meineke', 'mfa', 'mohawk', 'mr_gas', 'murco', 'murphy_oil_canada', 'murphy_oil_usa_inc', 'nexcom', 'nordstrom_oil', 'olco', 'pdq_store', 'pennzoil_products_inc', 'petro', 'petro_canada', 'petro_t', 'phillips', 'pilot', 'pioneer', 'pure_oil', 'quaker_state', 'quarles_oil', 'quiktrip', 'racetrac_petroleum_inc', 'raceway_petroleum', 'repsol', 'rudy', 'safeway', 'seven_eleven', 'sheetz', 'shell', 'shell_canada', 'shell_oil', 'sinclair_oil', 'southland_oil', 'spar', 'speedway', 'sun_company_inc', 'suncor_sunoco_canada', 'tempo', 'tesco', 'tesoro_alaska', 'texaco', 'the_pantry_inc', 'thornton_oil', 'tosco', 'total', 'travel_centers_of_america', 'uk', 'ultramar_canada', 'unbranded_or_unassigned', 'unbranded_unassigned', 'union_76', 'united_dairy_farmer', 'united_refining_kwikfill', 'us_oil', 'usa_petroleum', 'valvoline', 'vg', 'w_morrison', 'warren_equities', 'wawa', 'western_energetix', 'wilco', 'zions']|str" ] """ The fuel brand. @@ -1450,10 +1289,13 @@ class PaymentIntentCaptureParamsPaymentDetailsFleetDatumStationServiceLocation( class PaymentIntentCaptureParamsPaymentDetailsFleetDatumVat(TypedDict): - iob_indicator: Literal[ - "issuer_to_iob", - "issuer_to_iob_and_incremental_certification", - "merchant_does_not_agree_to_iob", + iob_indicator: Union[ + Literal[ + "issuer_to_iob", + "issuer_to_iob_and_incremental_certification", + "merchant_does_not_agree_to_iob", + ], + str, ] """ Indicates the merchant's agreement for Invoice on Behalf (IOB) VAT processing. @@ -1509,7 +1351,7 @@ class PaymentIntentCaptureParamsPaymentDetailsFlightAffiliate(TypedDict): class PaymentIntentCaptureParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1575,7 +1417,7 @@ class PaymentIntentCaptureParamsPaymentDetailsFlightSegment(TypedDict): The flight number associated with the segment """ service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] + "Literal['business', 'economy', 'first', 'premium_economy']|str" ] """ The fare class for the segment. @@ -1628,9 +1470,7 @@ class PaymentIntentCaptureParamsPaymentDetailsFlightDatum(TypedDict): Total cost breakdown. """ transaction_type: NotRequired[ - Literal[ - "exchange_ticket", "miscellaneous", "refund", "ticket_purchase" - ] + "Literal['exchange_ticket', 'miscellaneous', 'refund', 'ticket_purchase']|str" ] """ Type of flight transaction. @@ -1665,8 +1505,11 @@ class PaymentIntentCaptureParamsPaymentDetailsFlightDatumInsurance(TypedDict): """ Insurance company name. """ - insurance_type: Literal[ - "baggage", "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal[ + "baggage", "bankruptcy", "cancelation", "emergency", "medical" + ], + str, ] """ Type of insurance. @@ -1733,8 +1576,8 @@ class PaymentIntentCaptureParamsPaymentDetailsFlightDatumSegment(TypedDict): """ Refundable ticket indicator. """ - service_class: Literal[ - "business", "economy", "first_class", "premium_economy" + service_class: Union[ + Literal["business", "economy", "first_class", "premium_economy"], str ] """ Class of service. @@ -1797,13 +1640,7 @@ class PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotal(TypedDict): Total flight amount. """ credit_reason: NotRequired[ - Literal[ - "other", - "partial_ticket_refund", - "passenger_transport_ancillary_cancellation", - "ticket_and_ancillary_cancellation", - "ticket_cancellation", - ] + "Literal['other', 'partial_ticket_refund', 'passenger_transport_ancillary_cancellation', 'ticket_and_ancillary_cancellation', 'ticket_cancellation']|str" ] """ Reason for credit. @@ -1851,7 +1688,7 @@ class PaymentIntentCaptureParamsPaymentDetailsFlightDatumTotalExtraCharge( Amount of additional charges. """ type: NotRequired[ - Literal["additional_fees", "ancillary_service_charges", "exchange_fee"] + "Literal['additional_fees', 'ancillary_service_charges', 'exchange_fee']|str" ] """ Type of additional charges. @@ -1905,7 +1742,7 @@ class PaymentIntentCaptureParamsPaymentDetailsLodging(TypedDict): """ The booking number associated with the lodging reservation. """ - category: NotRequired[Literal["hotel", "vacation_rental"]] + category: NotRequired["Literal['hotel', 'vacation_rental']|str"] """ The lodging category """ @@ -1933,13 +1770,16 @@ class PaymentIntentCaptureParamsPaymentDetailsLodging(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", + Union[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ], + str, ] ] ] @@ -2025,7 +1865,7 @@ class PaymentIntentCaptureParamsPaymentDetailsLodgingAffiliate(TypedDict): class PaymentIntentCaptureParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -2134,16 +1974,7 @@ class PaymentIntentCaptureParamsPaymentDetailsLodgingDatumAccommodation( TypedDict, ): accommodation_type: NotRequired[ - Literal[ - "apartment", - "cabana", - "house", - "penthouse", - "room", - "standard", - "suite", - "villa", - ] + "Literal['apartment', 'cabana', 'house', 'penthouse', 'room', 'standard', 'suite', 'villa']|str" ] """ Type of accommodation. @@ -2208,7 +2039,7 @@ class PaymentIntentCaptureParamsPaymentDetailsLodgingDatumHost(TypedDict): Reference number for the host. """ host_type: NotRequired[ - Literal["hostel", "hotel", "owner", "rental_agency"] + "Literal['hostel', 'hotel', 'owner', 'rental_agency']|str" ] """ Type of host. @@ -2273,8 +2104,8 @@ class PaymentIntentCaptureParamsPaymentDetailsLodgingDatumInsurance(TypedDict): """ Name of the insurance company. """ - insurance_type: Literal[ - "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal["bankruptcy", "cancelation", "emergency", "medical"], str ] """ Type of insurance coverage. @@ -2341,9 +2172,7 @@ class PaymentIntentCaptureParamsPaymentDetailsLodgingDatumTotalExtraCharge( Amount of the extra charge in cents. """ type: NotRequired[ - Literal[ - "gift_shop", "laundry", "mini_bar", "other", "phone", "restaurant" - ] + "Literal['gift_shop', 'laundry', 'mini_bar', 'other', 'phone', 'restaurant']|str" ] """ Type of extra charge. @@ -2425,7 +2254,7 @@ class PaymentIntentCaptureParamsPaymentDetailsSubscriptionBillingInterval( """ The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. """ - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 2d307950c..c1927ae06 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -13,103 +13,106 @@ class PaymentIntentConfirmParams(RequestOptions): """ allowed_payment_method_types: NotRequired[ List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boku_promptpay", - "boleto", - "capchase_pay", - "card", - "cashapp", - "check_scan", - "click_to_pay", - "crypto", - "customer_balance", - "demo_pay", - "duitnow", - "dummy_auth_push", - "dummy_passthrough_card", - "edenred", - "eps", - "fpx", - "gcash", - "getbalance", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "knet", - "konbini", - "kr_card", - "kr_market", - "kriya", - "link", - "mb_way", - "mobilepay", - "momo", - "mondu", - "multibanco", - "naver_pay", - "netbanking", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "nz_bank_account", - "octopus", - "oxxo", - "p24", - "paper_check", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "shop_pay", - "shopeepay", - "sofort", - "south_korea_market", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "test_pay", - "truemoney", - "twint", - "upi", - "us_bank_account", - "us_cash_voucher", - "vipps", - "wechat_pay", - "wero", - "zip", + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boku_promptpay", + "boleto", + "capchase_pay", + "card", + "cashapp", + "check_scan", + "click_to_pay", + "crypto", + "customer_balance", + "demo_pay", + "duitnow", + "dummy_auth_push", + "dummy_passthrough_card", + "edenred", + "eps", + "fpx", + "gcash", + "getbalance", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "knet", + "konbini", + "kr_card", + "kr_market", + "kriya", + "link", + "mb_way", + "mobilepay", + "momo", + "mondu", + "multibanco", + "naver_pay", + "netbanking", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "nz_bank_account", + "octopus", + "oxxo", + "p24", + "paper_check", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "shop_pay", + "shopeepay", + "sofort", + "south_korea_market", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "test_pay", + "truemoney", + "twint", + "upi", + "us_bank_account", + "us_cash_voucher", + "vipps", + "wechat_pay", + "wero", + "zip", + ], + str, ] ] ] @@ -131,7 +134,7 @@ class PaymentIntentConfirmParams(RequestOptions): The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://docs.stripe.com/payments/connected-accounts). """ capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds will be captured from the customer's account. @@ -147,7 +150,7 @@ class PaymentIntentConfirmParams(RequestOptions): Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://docs.stripe.com/payments/save-card-without-authentication). """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this payment. @@ -219,7 +222,7 @@ class PaymentIntentConfirmParams(RequestOptions): This parameter is only used for cards and other redirect-based payment methods. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['off_session', 'on_session']" + "Literal['']|Literal['off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -384,59 +387,57 @@ class PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard( class PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardFleetData( TypedDict, ): - product_type: Literal[ - "air_conditioning_service", - "alcohol", - "aviation_fuel_premium", - "aviation_fuel_regular", - "car_care_detailing", - "compressed_natural_gas", - "deli", - "food_service", - "green_gasoline_mid_plus", - "green_gasoline_premium_super", - "green_gasoline_regular", - "grocery", - "liquid_natural_gas", - "liquid_propane_gas", - "lodging", - "marine_diesel", - "marine_fuel", - "merchandise", - "mid_plus", - "mid_plus_ethanol", - "miscellaneous_aviation_products_services", - "miscellaneous_fuel", - "miscellaneous_marine_products_services", - "miscellaneous_vehicle_products_services", - "packaged_beverage", - "premium_diesel", - "premium_super", - "premium_super_ethanol", - "preventative_maintenance", - "regular", - "regular_diesel", - "regular_ethanol", - "repairs", - "self_service_car_wash", - "shower", - "store_service", - "tobacco", - "vehicle_accessories", - "vehicle_parking", - "vehicle_parts", - "wash_out", + product_type: Union[ + Literal[ + "air_conditioning_service", + "alcohol", + "aviation_fuel_premium", + "aviation_fuel_regular", + "car_care_detailing", + "compressed_natural_gas", + "deli", + "food_service", + "green_gasoline_mid_plus", + "green_gasoline_premium_super", + "green_gasoline_regular", + "grocery", + "liquid_natural_gas", + "liquid_propane_gas", + "lodging", + "marine_diesel", + "marine_fuel", + "merchandise", + "mid_plus", + "mid_plus_ethanol", + "miscellaneous_aviation_products_services", + "miscellaneous_fuel", + "miscellaneous_marine_products_services", + "miscellaneous_vehicle_products_services", + "packaged_beverage", + "premium_diesel", + "premium_super", + "premium_super_ethanol", + "preventative_maintenance", + "regular", + "regular_diesel", + "regular_ethanol", + "repairs", + "self_service_car_wash", + "shower", + "store_service", + "tobacco", + "vehicle_accessories", + "vehicle_parking", + "vehicle_parts", + "wash_out", + ], + str, ] """ The type of product being purchased at this line item. """ service_type: NotRequired[ - Literal[ - "full_service", - "high_speed_diesel", - "non_fuel_only", - "self_service", - ] + "Literal['full_service', 'high_speed_diesel', 'non_fuel_only', 'self_service']|str" ] """ The type of service received at the acceptor location. @@ -477,7 +478,7 @@ class PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( TypedDict, ): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -522,7 +523,7 @@ class PaymentIntentConfirmParamsAmountDetailsSurcharge(TypedDict): Portion of the amount that corresponds to a surcharge. """ enforce_validation: NotRequired[ - "Literal['']|Literal['automatic', 'disabled', 'enabled']" + "Literal['']|Literal['automatic', 'disabled', 'enabled']|str" ] """ Indicate whether to enforce validations on the surcharge amount. @@ -704,7 +705,9 @@ class PaymentIntentConfirmParamsPaymentDetailsBenefit(TypedDict): class PaymentIntentConfirmParamsPaymentDetailsBenefitFrMealVoucher(TypedDict): - enabled: NotRequired[Literal["if_payment_method_is_eligible", "never"]] + enabled: NotRequired[ + "Literal['if_payment_method_is_eligible', 'never']|str" + ] """ Whether to enable meal voucher benefit for this payment. """ @@ -769,12 +772,15 @@ class PaymentIntentConfirmParamsPaymentDetailsCarRental(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", + Union[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ], + str, ] ] ] @@ -803,7 +809,7 @@ class PaymentIntentConfirmParamsPaymentDetailsCarRental(TypedDict): """ Rental rate. """ - rate_interval: NotRequired[Literal["day", "month", "week"]] + rate_interval: NotRequired["Literal['day', 'month', 'week']|str"] """ The frequency at which the rate amount is applied. One of `day`, `week` or `month` """ @@ -843,7 +849,7 @@ class PaymentIntentConfirmParamsPaymentDetailsCarRentalAffiliate(TypedDict): class PaymentIntentConfirmParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -877,7 +883,7 @@ class PaymentIntentConfirmParamsPaymentDetailsCarRentalDistance(TypedDict): """ Distance traveled. """ - unit: NotRequired[Literal["kilometers", "miles"]] + unit: NotRequired["Literal['kilometers', 'miles']|str"] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -1045,7 +1051,7 @@ class PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumDistance( """ Distance traveled. """ - unit: Literal["kilometers", "miles"] + unit: Union[Literal["kilometers", "miles"], str] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -1150,13 +1156,16 @@ class PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumInsurance( """ Name of the insurance company. """ - insurance_type: Literal[ - "liability_supplement", - "loss_damage_waiver", - "other", - "partial_damage_waiver", - "personal_accident", - "personal_effects", + insurance_type: Union[ + Literal[ + "liability_supplement", + "loss_damage_waiver", + "other", + "partial_damage_waiver", + "personal_accident", + "personal_effects", + ], + str, ] """ Type of insurance coverage. @@ -1237,7 +1246,7 @@ class PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotal(TypedDict): Rate per unit for the rental. """ rate_unit: NotRequired[ - Literal["days", "kilometers", "miles", "months", "weeks"] + "Literal['days', 'kilometers', 'miles', 'months', 'weeks']|str" ] """ Unit of measurement for the rate. @@ -1274,17 +1283,20 @@ class PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumTotalExtraCharge( """ Amount of the extra charge in cents. """ - type: Literal[ - "extra_mileage", - "gas", - "gps", - "late_charge", - "one_way_drop_off", - "other", - "parking", - "phone", - "regular_mileage", - "towing", + type: Union[ + Literal[ + "extra_mileage", + "gas", + "gps", + "late_charge", + "one_way_drop_off", + "other", + "parking", + "phone", + "regular_mileage", + "towing", + ], + str, ] """ Type of extra charge. @@ -1339,48 +1351,13 @@ class PaymentIntentConfirmParamsPaymentDetailsCarRentalDatumVehicle(TypedDict): Odometer reading at the time of rental. """ type: NotRequired[ - Literal[ - "cargo_van", - "compact", - "economy", - "exotic", - "exotic_suv", - "fifteen_passenger_van", - "four_wheel_drive", - "full_size", - "intermediate", - "large_suv", - "large_truck", - "luxury", - "medium_suv", - "midsize", - "mini", - "minivan", - "miscellaneous", - "moped", - "moving_van", - "premium", - "regular", - "small_medium_truck", - "small_suv", - "special", - "standard", - "stretch", - "subcompact", - "taxi", - "twelve_foot_truck", - "twelve_passenger_van", - "twenty_foot_truck", - "twenty_four_foot_truck", - "twenty_six_foot_truck", - "unique", - ] + "Literal['cargo_van', 'compact', 'economy', 'exotic', 'exotic_suv', 'fifteen_passenger_van', 'four_wheel_drive', 'full_size', 'intermediate', 'large_suv', 'large_truck', 'luxury', 'medium_suv', 'midsize', 'mini', 'minivan', 'miscellaneous', 'moped', 'moving_van', 'premium', 'regular', 'small_medium_truck', 'small_suv', 'special', 'standard', 'stretch', 'subcompact', 'taxi', 'twelve_foot_truck', 'twelve_passenger_van', 'twenty_foot_truck', 'twenty_four_foot_truck', 'twenty_six_foot_truck', 'unique']|str" ] """ Type of the rental vehicle. """ vehicle_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Class of the rental vehicle. @@ -1471,7 +1448,7 @@ class PaymentIntentConfirmParamsPaymentDetailsEventDetailsAffiliate(TypedDict): class PaymentIntentConfirmParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1523,140 +1500,7 @@ class PaymentIntentConfirmParamsPaymentDetailsFleetDatumPrimaryFuelFields( TypedDict, ): brand: NotRequired[ - Literal[ - "aafes", - "amerada_hess", - "amoco_canada", - "amoco_petroleum_products", - "arco_products", - "asda", - "ashland_oil", - "bfl", - "bp_mobil", - "bp_oil", - "burrnah_major", - "butler_arndale", - "canadian_tire", - "canadian_turbo", - "caseys_general_store", - "cenex", - "chevron_canada", - "chevron_usa", - "circle_k_stores", - "citgo_petroleum", - "clark_brands", - "conoco_canada", - "conoco_inc", - "crown_central_petroleum", - "diamond_shamrock_inc", - "discount_tire", - "domo_gas", - "elf", - "erickson_oil", - "esso", - "esso_canada", - "exxon", - "exxonmobil", - "family_express", - "fas_gas_oil", - "federated_coop_sonic", - "fina", - "fina_inc", - "fkg_oil", - "flare", - "flying_j_inc", - "gas_america", - "gate_petroleum", - "getty_petroleum", - "giant_eagle", - "grow_mark_inc", - "gulf", - "gulf_canada", - "gulf_chevron", - "handy_way_food", - "heron", - "holiday_stores", - "home_depot", - "husky", - "hyvees", - "irving", - "irving_oil", - "j_sainsbury", - "jet_conoco", - "krogers", - "kuwait", - "kwik_trip_inc", - "lassus", - "loves_country_stores", - "mapco_express_inc", - "marathon_oil", - "martin_bailey_inc_dba_hucks", - "maxol", - "meineke", - "mfa", - "mohawk", - "mr_gas", - "murco", - "murphy_oil_canada", - "murphy_oil_usa_inc", - "nexcom", - "nordstrom_oil", - "olco", - "pdq_store", - "pennzoil_products_inc", - "petro", - "petro_canada", - "petro_t", - "phillips", - "pilot", - "pioneer", - "pure_oil", - "quaker_state", - "quarles_oil", - "quiktrip", - "racetrac_petroleum_inc", - "raceway_petroleum", - "repsol", - "rudy", - "safeway", - "seven_eleven", - "sheetz", - "shell", - "shell_canada", - "shell_oil", - "sinclair_oil", - "southland_oil", - "spar", - "speedway", - "sun_company_inc", - "suncor_sunoco_canada", - "tempo", - "tesco", - "tesoro_alaska", - "texaco", - "the_pantry_inc", - "thornton_oil", - "tosco", - "total", - "travel_centers_of_america", - "uk", - "ultramar_canada", - "unbranded_or_unassigned", - "unbranded_unassigned", - "union_76", - "united_dairy_farmer", - "united_refining_kwikfill", - "us_oil", - "usa_petroleum", - "valvoline", - "vg", - "w_morrison", - "warren_equities", - "wawa", - "western_energetix", - "wilco", - "zions", - ] + "Literal['aafes', 'amerada_hess', 'amoco_canada', 'amoco_petroleum_products', 'arco_products', 'asda', 'ashland_oil', 'bfl', 'bp_mobil', 'bp_oil', 'burrnah_major', 'butler_arndale', 'canadian_tire', 'canadian_turbo', 'caseys_general_store', 'cenex', 'chevron_canada', 'chevron_usa', 'circle_k_stores', 'citgo_petroleum', 'clark_brands', 'conoco_canada', 'conoco_inc', 'crown_central_petroleum', 'diamond_shamrock_inc', 'discount_tire', 'domo_gas', 'elf', 'erickson_oil', 'esso', 'esso_canada', 'exxon', 'exxonmobil', 'family_express', 'fas_gas_oil', 'federated_coop_sonic', 'fina', 'fina_inc', 'fkg_oil', 'flare', 'flying_j_inc', 'gas_america', 'gate_petroleum', 'getty_petroleum', 'giant_eagle', 'grow_mark_inc', 'gulf', 'gulf_canada', 'gulf_chevron', 'handy_way_food', 'heron', 'holiday_stores', 'home_depot', 'husky', 'hyvees', 'irving', 'irving_oil', 'j_sainsbury', 'jet_conoco', 'krogers', 'kuwait', 'kwik_trip_inc', 'lassus', 'loves_country_stores', 'mapco_express_inc', 'marathon_oil', 'martin_bailey_inc_dba_hucks', 'maxol', 'meineke', 'mfa', 'mohawk', 'mr_gas', 'murco', 'murphy_oil_canada', 'murphy_oil_usa_inc', 'nexcom', 'nordstrom_oil', 'olco', 'pdq_store', 'pennzoil_products_inc', 'petro', 'petro_canada', 'petro_t', 'phillips', 'pilot', 'pioneer', 'pure_oil', 'quaker_state', 'quarles_oil', 'quiktrip', 'racetrac_petroleum_inc', 'raceway_petroleum', 'repsol', 'rudy', 'safeway', 'seven_eleven', 'sheetz', 'shell', 'shell_canada', 'shell_oil', 'sinclair_oil', 'southland_oil', 'spar', 'speedway', 'sun_company_inc', 'suncor_sunoco_canada', 'tempo', 'tesco', 'tesoro_alaska', 'texaco', 'the_pantry_inc', 'thornton_oil', 'tosco', 'total', 'travel_centers_of_america', 'uk', 'ultramar_canada', 'unbranded_or_unassigned', 'unbranded_unassigned', 'union_76', 'united_dairy_farmer', 'united_refining_kwikfill', 'us_oil', 'usa_petroleum', 'valvoline', 'vg', 'w_morrison', 'warren_equities', 'wawa', 'western_energetix', 'wilco', 'zions']|str" ] """ The fuel brand. @@ -1722,10 +1566,13 @@ class PaymentIntentConfirmParamsPaymentDetailsFleetDatumStationServiceLocation( class PaymentIntentConfirmParamsPaymentDetailsFleetDatumVat(TypedDict): - iob_indicator: Literal[ - "issuer_to_iob", - "issuer_to_iob_and_incremental_certification", - "merchant_does_not_agree_to_iob", + iob_indicator: Union[ + Literal[ + "issuer_to_iob", + "issuer_to_iob_and_incremental_certification", + "merchant_does_not_agree_to_iob", + ], + str, ] """ Indicates the merchant's agreement for Invoice on Behalf (IOB) VAT processing. @@ -1781,7 +1628,7 @@ class PaymentIntentConfirmParamsPaymentDetailsFlightAffiliate(TypedDict): class PaymentIntentConfirmParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1847,7 +1694,7 @@ class PaymentIntentConfirmParamsPaymentDetailsFlightSegment(TypedDict): The flight number associated with the segment """ service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] + "Literal['business', 'economy', 'first', 'premium_economy']|str" ] """ The fare class for the segment. @@ -1900,9 +1747,7 @@ class PaymentIntentConfirmParamsPaymentDetailsFlightDatum(TypedDict): Total cost breakdown. """ transaction_type: NotRequired[ - Literal[ - "exchange_ticket", "miscellaneous", "refund", "ticket_purchase" - ] + "Literal['exchange_ticket', 'miscellaneous', 'refund', 'ticket_purchase']|str" ] """ Type of flight transaction. @@ -1937,8 +1782,11 @@ class PaymentIntentConfirmParamsPaymentDetailsFlightDatumInsurance(TypedDict): """ Insurance company name. """ - insurance_type: Literal[ - "baggage", "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal[ + "baggage", "bankruptcy", "cancelation", "emergency", "medical" + ], + str, ] """ Type of insurance. @@ -2005,8 +1853,8 @@ class PaymentIntentConfirmParamsPaymentDetailsFlightDatumSegment(TypedDict): """ Refundable ticket indicator. """ - service_class: Literal[ - "business", "economy", "first_class", "premium_economy" + service_class: Union[ + Literal["business", "economy", "first_class", "premium_economy"], str ] """ Class of service. @@ -2069,13 +1917,7 @@ class PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotal(TypedDict): Total flight amount. """ credit_reason: NotRequired[ - Literal[ - "other", - "partial_ticket_refund", - "passenger_transport_ancillary_cancellation", - "ticket_and_ancillary_cancellation", - "ticket_cancellation", - ] + "Literal['other', 'partial_ticket_refund', 'passenger_transport_ancillary_cancellation', 'ticket_and_ancillary_cancellation', 'ticket_cancellation']|str" ] """ Reason for credit. @@ -2123,7 +1965,7 @@ class PaymentIntentConfirmParamsPaymentDetailsFlightDatumTotalExtraCharge( Amount of additional charges. """ type: NotRequired[ - Literal["additional_fees", "ancillary_service_charges", "exchange_fee"] + "Literal['additional_fees', 'ancillary_service_charges', 'exchange_fee']|str" ] """ Type of additional charges. @@ -2177,7 +2019,7 @@ class PaymentIntentConfirmParamsPaymentDetailsLodging(TypedDict): """ The booking number associated with the lodging reservation. """ - category: NotRequired[Literal["hotel", "vacation_rental"]] + category: NotRequired["Literal['hotel', 'vacation_rental']|str"] """ The lodging category """ @@ -2205,13 +2047,16 @@ class PaymentIntentConfirmParamsPaymentDetailsLodging(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", + Union[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ], + str, ] ] ] @@ -2297,7 +2142,7 @@ class PaymentIntentConfirmParamsPaymentDetailsLodgingAffiliate(TypedDict): class PaymentIntentConfirmParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -2406,16 +2251,7 @@ class PaymentIntentConfirmParamsPaymentDetailsLodgingDatumAccommodation( TypedDict, ): accommodation_type: NotRequired[ - Literal[ - "apartment", - "cabana", - "house", - "penthouse", - "room", - "standard", - "suite", - "villa", - ] + "Literal['apartment', 'cabana', 'house', 'penthouse', 'room', 'standard', 'suite', 'villa']|str" ] """ Type of accommodation. @@ -2480,7 +2316,7 @@ class PaymentIntentConfirmParamsPaymentDetailsLodgingDatumHost(TypedDict): Reference number for the host. """ host_type: NotRequired[ - Literal["hostel", "hotel", "owner", "rental_agency"] + "Literal['hostel', 'hotel', 'owner', 'rental_agency']|str" ] """ Type of host. @@ -2545,8 +2381,8 @@ class PaymentIntentConfirmParamsPaymentDetailsLodgingDatumInsurance(TypedDict): """ Name of the insurance company. """ - insurance_type: Literal[ - "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal["bankruptcy", "cancelation", "emergency", "medical"], str ] """ Type of insurance coverage. @@ -2613,9 +2449,7 @@ class PaymentIntentConfirmParamsPaymentDetailsLodgingDatumTotalExtraCharge( Amount of the extra charge in cents. """ type: NotRequired[ - Literal[ - "gift_shop", "laundry", "mini_bar", "other", "phone", "restaurant" - ] + "Literal['gift_shop', 'laundry', 'mini_bar', 'other', 'phone', 'restaurant']|str" ] """ Type of extra charge. @@ -2666,7 +2500,7 @@ class PaymentIntentConfirmParamsPaymentDetailsMoneyServices(TypedDict): Inline identity details for the beneficiary of this transaction. """ transaction_type: NotRequired[ - "Literal['']|Literal['account_funding', 'debt_repayment']" + "Literal['']|Literal['account_funding', 'debt_repayment']|str" ] """ The type of money services transaction. @@ -2891,7 +2725,7 @@ class PaymentIntentConfirmParamsPaymentDetailsSubscriptionBillingInterval( """ The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. """ - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -2918,7 +2752,9 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -3208,69 +3044,72 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): """ If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -3535,7 +3374,7 @@ class PaymentIntentConfirmParamsPaymentMethodDataGrabpay(TypedDict): class PaymentIntentConfirmParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: NotRequired["Literal['bca', 'bni', 'bri', 'cimb', 'permata']|str"] """ Bank where the account is held. """ @@ -3626,7 +3465,7 @@ class PaymentIntentConfirmParamsPaymentMethodDataMultibanco(TypedDict): class PaymentIntentConfirmParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] + funding: NotRequired["Literal['card', 'points']|str"] """ Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ @@ -3662,34 +3501,7 @@ class PaymentIntentConfirmParamsPaymentMethodDataOxxo(TypedDict): class PaymentIntentConfirmParamsPaymentMethodDataP24(TypedDict): bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']|str" ] """ The customer's bank. @@ -3800,7 +3612,7 @@ class PaymentIntentConfirmParamsPaymentMethodDataShopeepay(TypedDict): class PaymentIntentConfirmParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ Two-letter ISO code representing the country the bank account is located in. """ @@ -3843,7 +3655,7 @@ class PaymentIntentConfirmParamsPaymentMethodDataUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -3858,7 +3670,7 @@ class PaymentIntentConfirmParamsPaymentMethodDataUpiMandateOptions(TypedDict): class PaymentIntentConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -3866,7 +3678,7 @@ class PaymentIntentConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -4283,7 +4095,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4301,7 +4113,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -4321,11 +4133,13 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions( """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -4390,7 +4204,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsAfterpayClearpay( class PaymentIntentConfirmParamsPaymentMethodOptionsAlipay(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4426,7 +4240,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4441,7 +4255,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4468,7 +4282,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4497,12 +4311,12 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions( class PaymentIntentConfirmParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4557,7 +4371,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsBoleto(TypedDict): The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4590,7 +4404,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. """ capture_method: NotRequired[ - "Literal['']|Literal['automatic_delayed', 'manual']" + "Literal['']|Literal['automatic_delayed', 'manual']|str" ] """ Controls when the funds are captured from the customer's account. @@ -4650,43 +4464,45 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): Payment details for payment method specific funding fields. """ request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [decrement the authorization](https://docs.stripe.com/payments/decremental-authorization) for this PaymentIntent. """ request_extended_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this PaymentIntent. """ request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this PaymentIntent. """ - request_multicapture: NotRequired[Literal["if_available", "never"]] + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. """ - request_overcapture: NotRequired[Literal["if_available", "never"]] + request_overcapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to [overcapture](https://docs.stripe.com/payments/overcapture) for this PaymentIntent. """ request_partial_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request partial authorization on this PaymentIntent. """ - request_reauthorization: NotRequired[Literal["if_available", "never"]] + request_reauthorization: NotRequired[ + "Literal['if_available', 'never']|str" + ] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -4696,7 +4512,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4769,7 +4585,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallmentsPlan( For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[Literal["bonus", "fixed_count", "revolving"], str] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ @@ -4842,7 +4658,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServi TypedDict, ): digital_asset_category: NotRequired[ - Literal["blockchain_native", "nft", "other_non_fiat", "stablecoin"] + "Literal['blockchain_native', 'nft', 'other_non_fiat', 'stablecoin']|str" ] """ The category of digital asset being acquired through this account funding transaction. @@ -4896,7 +4712,9 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardStatementDetailsAddress( class PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure( TypedDict ): - ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + ares_trans_status: NotRequired[ + "Literal['A', 'C', 'I', 'N', 'R', 'U', 'Y']|str" + ] """ The `transStatus` returned from the card Issuer's ACS in the ARes. """ @@ -4908,13 +4726,13 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure( is what you should specify here.) """ electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] + "Literal['01', '02', '05', '06', '07']|str" ] """ The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and indicates what degree of authentication was performed. """ - exemption_indicator: NotRequired[Literal["low_risk", "none"]] + exemption_indicator: NotRequired["Literal['low_risk', 'none']|str"] """ The exemption requested via 3DS and accepted by the issuer at authentication time. """ @@ -4936,7 +4754,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure( For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID (dsTransID). """ - version: Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"] + version: Union[Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"], str] """ The version of 3D Secure that was performed. """ @@ -4956,7 +4774,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptio class PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( TypedDict, ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + cb_avalgo: Union[Literal["0", "1", "2", "3", "4", "A"], str] """ The cryptogram calculation algorithm used by the card Issuer's ACS to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -5017,11 +4835,13 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support. """ - request_multicapture: NotRequired[Literal["if_available", "never"]] + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. """ - request_reauthorization: NotRequired[Literal["if_available", "never"]] + request_reauthorization: NotRequired[ + "Literal['if_available', 'never']|str" + ] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. """ @@ -5066,7 +4886,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMon TypedDict, ): digital_asset_category: NotRequired[ - Literal["blockchain_native", "nft", "other_non_fiat", "stablecoin"] + "Literal['blockchain_native', 'nft', 'other_non_fiat', 'stablecoin']|str" ] """ The category of digital asset being acquired through this account funding transaction. @@ -5076,7 +4896,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMon class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentRouting( TypedDict, ): - requested_priority: NotRequired[Literal["domestic", "international"]] + requested_priority: NotRequired["Literal['domestic', 'international']|str"] """ Routing requested priority """ @@ -5092,7 +4912,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCashapp(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5121,7 +4941,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCrypto(TypedDict): Specific configuration for this PaymentIntent when the mode is `deposit`. """ mode: NotRequired[ - Literal["default", "deposit", "transaction_verification"] + "Literal['default', 'deposit', 'transaction_verification']|str" ] """ The mode of the crypto payment. @@ -5158,7 +4978,9 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCryptoAmountReconciliation( class PaymentIntentConfirmParamsPaymentMethodOptionsCryptoDepositOptions( TypedDict, ): - networks: List[Literal["base", "ethereum", "polygon", "solana", "tempo"]] + networks: List[ + Union[Literal["base", "ethereum", "polygon", "solana", "tempo"], str] + ] """ The blockchain networks to support for deposits. Learn more about [supported networks and tokens](https://docs.stripe.com/payments/deposit-mode-stablecoin-payments#token-and-network-support). """ @@ -5171,7 +4993,9 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCryptoDepositOptions( class PaymentIntentConfirmParamsPaymentMethodOptionsCryptoTransactionVerificationOptions( TypedDict, ): - network: Literal["base", "ethereum", "polygon", "solana", "tempo"] + network: Union[ + Literal["base", "ethereum", "polygon", "solana", "tempo"], str + ] """ The network on which the transaction was submitted. """ @@ -5217,8 +5041,17 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( """ requested_address_types: NotRequired[ List[ - Literal[ - "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + Union[ + Literal[ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -5227,12 +5060,15 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. @@ -5288,7 +5124,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsGiftCard(TypedDict): Set to `yes` to ignore transfer data on the PaymentIntent when redeeming this gift card. """ request_partial_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request partial authorization on this PaymentIntent. @@ -5311,7 +5147,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsGiropay(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5365,7 +5201,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsIdBankTransfer(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsIdeal(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5394,7 +5230,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKakaoPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5423,60 +5259,13 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarna(TypedDict): On-demand details if setting up or charging an on-demand payment. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-RO', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'sv-FI', 'sv-SE']|str" ] """ Preferred language of the Klarna authorization page that the customer is redirected to """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5516,7 +5305,9 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): """ The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + purchase_interval: NotRequired[ + "Literal['day', 'month', 'week', 'year']|str" + ] """ Interval at which the customer is making purchases """ @@ -5529,7 +5320,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSubscription( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -5667,7 +5458,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -5778,7 +5569,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -5832,16 +5623,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD Name of the event. """ event_type: NotRequired[ - Literal[ - "concert", - "conference", - "digital_education", - "expo", - "festival", - "in_person_education", - "sport", - "tour", - ] + "Literal['concert', 'conference', 'digital_education', 'expo', 'festival', 'in_person_education', 'sport', 'tour']|str" ] """ Type of the event. @@ -5905,7 +5687,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -5964,7 +5746,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6075,7 +5857,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6111,7 +5893,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance @@ -6148,42 +5930,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD The number of transactions the sub-seller completed in the last 12 months. """ product_category: NotRequired[ - Literal[ - "accessories", - "appliances", - "apps_and_games", - "arts_crafts_and_sewing", - "automotive", - "baby", - "baby_clothing", - "bags_and_purses", - "beauty", - "books", - "cds_and_vinyl", - "cell_phones_and_accessories", - "collectibles_and_fine_arts", - "digital_music", - "electronics", - "grocery_and_gourmet_food", - "handmade", - "health_and_personal_care", - "home_and_kitchen", - "industrial_and_scientific", - "luggage_and_travel_gear", - "magazine_subscriptions", - "men_clothing", - "musical_instruments", - "office_products", - "patio_lawn_and_garden", - "pet_supplies", - "shoes", - "software", - "sports_and_outdoors", - "tools_and_home_improvement", - "toys_and_games", - "video_games", - "women_clothing", - ] + "Literal['accessories', 'appliances', 'apps_and_games', 'arts_crafts_and_sewing', 'automotive', 'baby', 'baby_clothing', 'bags_and_purses', 'beauty', 'books', 'cds_and_vinyl', 'cell_phones_and_accessories', 'collectibles_and_fine_arts', 'digital_music', 'electronics', 'grocery_and_gourmet_food', 'handmade', 'health_and_personal_care', 'home_and_kitchen', 'industrial_and_scientific', 'luggage_and_travel_gear', 'magazine_subscriptions', 'men_clothing', 'musical_instruments', 'office_products', 'patio_lawn_and_garden', 'pet_supplies', 'shoes', 'software', 'sports_and_outdoors', 'tools_and_home_improvement', 'toys_and_games', 'video_games', 'women_clothing']|str" ] """ The category of the product. @@ -6193,7 +5940,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD The date when the seller's account with the marketplace was last logged in. """ seller_rating: NotRequired[ - Literal["high", "low", "medium", "very_high", "very_low"] + "Literal['high', 'low', 'medium', 'very_high', 'very_low']|str" ] """ The current rating of the marketplace seller. If the marketplace uses numeric ranking, map these to the enum values. @@ -6293,7 +6040,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6404,7 +6151,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6476,7 +6223,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6587,7 +6334,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6635,13 +6382,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseD The name or reference to identify the voucher. """ voucher_type: NotRequired[ - Literal[ - "digital_product", - "discount", - "gift_card", - "physical_product", - "services", - ] + "Literal['digital_product', 'discount', 'gift_card', 'physical_product', 'services']|str" ] """ The type of this voucher. @@ -6689,7 +6430,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsKrCard(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6716,7 +6457,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsLink(TypedDict): [Deprecated] This is a legacy parameter that no longer has any function. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6794,7 +6535,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsNaverPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6809,7 +6550,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsNaverPay(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsNzBankAccount(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6908,29 +6649,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaypal(TypedDict): The line items purchased by the customer. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']|str" ] """ [Preferred locale](https://docs.stripe.com/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. @@ -6948,7 +6667,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaypal(TypedDict): The risk correlation ID for an on-session payment using a saved PayPal payment method. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6969,7 +6688,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaypal(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsPaypalLineItem(TypedDict): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -7013,7 +6732,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaypalLineItemTax( """ The tax for a single unit of the line item in minor units. Cannot be a negative number. """ - behavior: Literal["exclusive", "inclusive"] + behavior: Union[Literal["exclusive", "inclusive"], str] """ The tax behavior for the line item. """ @@ -7029,7 +6748,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaypay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7050,7 +6769,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPayto(TypedDict): Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7072,7 +6791,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions( """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']"] + amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']|str"] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -7081,7 +6800,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions( Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: NotRequired[ - "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']" + "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']|str" ] """ The periodicity at which payments will be collected. Defaults to `adhoc`. @@ -7091,7 +6810,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions( The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: NotRequired[ - "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']" + "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -7099,7 +6818,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions( class PaymentIntentConfirmParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ @@ -7117,7 +6836,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPix(TypedDict): """ Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7136,11 +6855,11 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPixMandateOptions( """ Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ Type of amount. Defaults to `maximum`. """ @@ -7153,7 +6872,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsPixMandateOptions( Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to `monthly`. @@ -7246,7 +6965,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsSatispay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7278,7 +6997,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7323,13 +7042,13 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsShopeepay(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|str" ] """ Language shown to the payer on redirect. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7352,7 +7071,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalance(TypedDict): Additional fields for mandate creation. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7417,7 +7136,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsSwish(TypedDict): class PaymentIntentConfirmParamsPaymentMethodOptionsTwint(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7439,7 +7158,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsUpi(TypedDict): Configuration options for setting up an eMandate """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -7450,7 +7169,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsUpiMandateOptions( """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -7484,7 +7203,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): Additional fields for network related functions """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7502,13 +7221,13 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ transaction_purpose: NotRequired[ - "Literal['']|Literal['goods', 'other', 'services', 'unspecified']" + "Literal['']|Literal['goods', 'other', 'services', 'unspecified']|str" ] """ The purpose of the transaction. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -7540,8 +7259,14 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnec """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -7570,7 +7295,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnec class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): - mode: Literal["automatic", "custom"] + mode: Union[Literal["automatic", "custom"], str] """ Settings for configuring manual entry of account details. """ @@ -7603,7 +7328,7 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): """ The unique buyer ID for the app ID registered with WeChat Pay. Only required when client is mini_program. """ - client: NotRequired[Literal["android", "ios", "mini_program", "web"]] + client: NotRequired["Literal['android', 'ios', 'mini_program', 'web']|str"] """ The client type that the end customer will pay from """ diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 66d3e0d47..87cab642a 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -13,103 +13,106 @@ class PaymentIntentCreateParams(RequestOptions): """ allowed_payment_method_types: NotRequired[ List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boku_promptpay", - "boleto", - "capchase_pay", - "card", - "cashapp", - "check_scan", - "click_to_pay", - "crypto", - "customer_balance", - "demo_pay", - "duitnow", - "dummy_auth_push", - "dummy_passthrough_card", - "edenred", - "eps", - "fpx", - "gcash", - "getbalance", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "knet", - "konbini", - "kr_card", - "kr_market", - "kriya", - "link", - "mb_way", - "mobilepay", - "momo", - "mondu", - "multibanco", - "naver_pay", - "netbanking", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "nz_bank_account", - "octopus", - "oxxo", - "p24", - "paper_check", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "shop_pay", - "shopeepay", - "sofort", - "south_korea_market", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "test_pay", - "truemoney", - "twint", - "upi", - "us_bank_account", - "us_cash_voucher", - "vipps", - "wechat_pay", - "wero", - "zip", + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boku_promptpay", + "boleto", + "capchase_pay", + "card", + "cashapp", + "check_scan", + "click_to_pay", + "crypto", + "customer_balance", + "demo_pay", + "duitnow", + "dummy_auth_push", + "dummy_passthrough_card", + "edenred", + "eps", + "fpx", + "gcash", + "getbalance", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "knet", + "konbini", + "kr_card", + "kr_market", + "kriya", + "link", + "mb_way", + "mobilepay", + "momo", + "mondu", + "multibanco", + "naver_pay", + "netbanking", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "nz_bank_account", + "octopus", + "oxxo", + "p24", + "paper_check", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "shop_pay", + "shopeepay", + "sofort", + "south_korea_market", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "test_pay", + "truemoney", + "twint", + "upi", + "us_bank_account", + "us_cash_voucher", + "vipps", + "wechat_pay", + "wero", + "zip", + ], + str, ] ] ] @@ -135,7 +138,7 @@ class PaymentIntentCreateParams(RequestOptions): When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. """ capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds will be captured from the customer's account. @@ -144,7 +147,7 @@ class PaymentIntentCreateParams(RequestOptions): """ Set to `true` to attempt to [confirm this PaymentIntent](https://docs.stripe.com/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://docs.stripe.com/api/payment_intents/confirm). """ - confirmation_method: NotRequired[Literal["automatic", "manual"]] + confirmation_method: NotRequired["Literal['automatic', 'manual']|str"] """ Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. """ @@ -184,69 +187,72 @@ class PaymentIntentCreateParams(RequestOptions): """ excluded_payment_method_types: NotRequired[ List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] ] ] @@ -339,11 +345,11 @@ class PaymentIntentCreateParams(RequestOptions): """ The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm). """ - secret_key_confirmation: NotRequired[Literal["optional", "required"]] + secret_key_confirmation: NotRequired["Literal['optional', 'required']|str"] """ Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + setup_future_usage: NotRequired["Literal['off_session', 'on_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -524,59 +530,57 @@ class PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsCard( class PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsCardFleetData( TypedDict, ): - product_type: Literal[ - "air_conditioning_service", - "alcohol", - "aviation_fuel_premium", - "aviation_fuel_regular", - "car_care_detailing", - "compressed_natural_gas", - "deli", - "food_service", - "green_gasoline_mid_plus", - "green_gasoline_premium_super", - "green_gasoline_regular", - "grocery", - "liquid_natural_gas", - "liquid_propane_gas", - "lodging", - "marine_diesel", - "marine_fuel", - "merchandise", - "mid_plus", - "mid_plus_ethanol", - "miscellaneous_aviation_products_services", - "miscellaneous_fuel", - "miscellaneous_marine_products_services", - "miscellaneous_vehicle_products_services", - "packaged_beverage", - "premium_diesel", - "premium_super", - "premium_super_ethanol", - "preventative_maintenance", - "regular", - "regular_diesel", - "regular_ethanol", - "repairs", - "self_service_car_wash", - "shower", - "store_service", - "tobacco", - "vehicle_accessories", - "vehicle_parking", - "vehicle_parts", - "wash_out", + product_type: Union[ + Literal[ + "air_conditioning_service", + "alcohol", + "aviation_fuel_premium", + "aviation_fuel_regular", + "car_care_detailing", + "compressed_natural_gas", + "deli", + "food_service", + "green_gasoline_mid_plus", + "green_gasoline_premium_super", + "green_gasoline_regular", + "grocery", + "liquid_natural_gas", + "liquid_propane_gas", + "lodging", + "marine_diesel", + "marine_fuel", + "merchandise", + "mid_plus", + "mid_plus_ethanol", + "miscellaneous_aviation_products_services", + "miscellaneous_fuel", + "miscellaneous_marine_products_services", + "miscellaneous_vehicle_products_services", + "packaged_beverage", + "premium_diesel", + "premium_super", + "premium_super_ethanol", + "preventative_maintenance", + "regular", + "regular_diesel", + "regular_ethanol", + "repairs", + "self_service_car_wash", + "shower", + "store_service", + "tobacco", + "vehicle_accessories", + "vehicle_parking", + "vehicle_parts", + "wash_out", + ], + str, ] """ The type of product being purchased at this line item. """ service_type: NotRequired[ - Literal[ - "full_service", - "high_speed_diesel", - "non_fuel_only", - "self_service", - ] + "Literal['full_service', 'high_speed_diesel', 'non_fuel_only', 'self_service']|str" ] """ The type of service received at the acceptor location. @@ -617,7 +621,7 @@ class PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( TypedDict, ): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -662,7 +666,7 @@ class PaymentIntentCreateParamsAmountDetailsSurcharge(TypedDict): Portion of the amount that corresponds to a surcharge. """ enforce_validation: NotRequired[ - "Literal['']|Literal['automatic', 'disabled', 'enabled']" + "Literal['']|Literal['automatic', 'disabled', 'enabled']|str" ] """ Indicate whether to enforce validations on the surcharge amount. @@ -686,7 +690,7 @@ class PaymentIntentCreateParamsAmountDetailsTip(TypedDict): class PaymentIntentCreateParamsAutomaticPaymentMethods(TypedDict): - allow_redirects: NotRequired[Literal["always", "never"]] + allow_redirects: NotRequired["Literal['always', 'never']|str"] """ Controls whether this PaymentIntent will accept redirect-based payment methods. @@ -853,7 +857,9 @@ class PaymentIntentCreateParamsPaymentDetailsBenefit(TypedDict): class PaymentIntentCreateParamsPaymentDetailsBenefitFrMealVoucher(TypedDict): - enabled: NotRequired[Literal["if_payment_method_is_eligible", "never"]] + enabled: NotRequired[ + "Literal['if_payment_method_is_eligible', 'never']|str" + ] """ Whether to enable meal voucher benefit for this payment. """ @@ -918,12 +924,15 @@ class PaymentIntentCreateParamsPaymentDetailsCarRental(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", + Union[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ], + str, ] ] ] @@ -952,7 +961,7 @@ class PaymentIntentCreateParamsPaymentDetailsCarRental(TypedDict): """ Rental rate. """ - rate_interval: NotRequired[Literal["day", "month", "week"]] + rate_interval: NotRequired["Literal['day', 'month', 'week']|str"] """ The frequency at which the rate amount is applied. One of `day`, `week` or `month` """ @@ -992,7 +1001,7 @@ class PaymentIntentCreateParamsPaymentDetailsCarRentalAffiliate(TypedDict): class PaymentIntentCreateParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1026,7 +1035,7 @@ class PaymentIntentCreateParamsPaymentDetailsCarRentalDistance(TypedDict): """ Distance traveled. """ - unit: NotRequired[Literal["kilometers", "miles"]] + unit: NotRequired["Literal['kilometers', 'miles']|str"] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -1188,7 +1197,7 @@ class PaymentIntentCreateParamsPaymentDetailsCarRentalDatumDistance(TypedDict): """ Distance traveled. """ - unit: Literal["kilometers", "miles"] + unit: Union[Literal["kilometers", "miles"], str] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -1293,13 +1302,16 @@ class PaymentIntentCreateParamsPaymentDetailsCarRentalDatumInsurance( """ Name of the insurance company. """ - insurance_type: Literal[ - "liability_supplement", - "loss_damage_waiver", - "other", - "partial_damage_waiver", - "personal_accident", - "personal_effects", + insurance_type: Union[ + Literal[ + "liability_supplement", + "loss_damage_waiver", + "other", + "partial_damage_waiver", + "personal_accident", + "personal_effects", + ], + str, ] """ Type of insurance coverage. @@ -1380,7 +1392,7 @@ class PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotal(TypedDict): Rate per unit for the rental. """ rate_unit: NotRequired[ - Literal["days", "kilometers", "miles", "months", "weeks"] + "Literal['days', 'kilometers', 'miles', 'months', 'weeks']|str" ] """ Unit of measurement for the rate. @@ -1417,17 +1429,20 @@ class PaymentIntentCreateParamsPaymentDetailsCarRentalDatumTotalExtraCharge( """ Amount of the extra charge in cents. """ - type: Literal[ - "extra_mileage", - "gas", - "gps", - "late_charge", - "one_way_drop_off", - "other", - "parking", - "phone", - "regular_mileage", - "towing", + type: Union[ + Literal[ + "extra_mileage", + "gas", + "gps", + "late_charge", + "one_way_drop_off", + "other", + "parking", + "phone", + "regular_mileage", + "towing", + ], + str, ] """ Type of extra charge. @@ -1480,48 +1495,13 @@ class PaymentIntentCreateParamsPaymentDetailsCarRentalDatumVehicle(TypedDict): Odometer reading at the time of rental. """ type: NotRequired[ - Literal[ - "cargo_van", - "compact", - "economy", - "exotic", - "exotic_suv", - "fifteen_passenger_van", - "four_wheel_drive", - "full_size", - "intermediate", - "large_suv", - "large_truck", - "luxury", - "medium_suv", - "midsize", - "mini", - "minivan", - "miscellaneous", - "moped", - "moving_van", - "premium", - "regular", - "small_medium_truck", - "small_suv", - "special", - "standard", - "stretch", - "subcompact", - "taxi", - "twelve_foot_truck", - "twelve_passenger_van", - "twenty_foot_truck", - "twenty_four_foot_truck", - "twenty_six_foot_truck", - "unique", - ] + "Literal['cargo_van', 'compact', 'economy', 'exotic', 'exotic_suv', 'fifteen_passenger_van', 'four_wheel_drive', 'full_size', 'intermediate', 'large_suv', 'large_truck', 'luxury', 'medium_suv', 'midsize', 'mini', 'minivan', 'miscellaneous', 'moped', 'moving_van', 'premium', 'regular', 'small_medium_truck', 'small_suv', 'special', 'standard', 'stretch', 'subcompact', 'taxi', 'twelve_foot_truck', 'twelve_passenger_van', 'twenty_foot_truck', 'twenty_four_foot_truck', 'twenty_six_foot_truck', 'unique']|str" ] """ Type of the rental vehicle. """ vehicle_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Class of the rental vehicle. @@ -1612,7 +1592,7 @@ class PaymentIntentCreateParamsPaymentDetailsEventDetailsAffiliate(TypedDict): class PaymentIntentCreateParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1664,140 +1644,7 @@ class PaymentIntentCreateParamsPaymentDetailsFleetDatumPrimaryFuelFields( TypedDict, ): brand: NotRequired[ - Literal[ - "aafes", - "amerada_hess", - "amoco_canada", - "amoco_petroleum_products", - "arco_products", - "asda", - "ashland_oil", - "bfl", - "bp_mobil", - "bp_oil", - "burrnah_major", - "butler_arndale", - "canadian_tire", - "canadian_turbo", - "caseys_general_store", - "cenex", - "chevron_canada", - "chevron_usa", - "circle_k_stores", - "citgo_petroleum", - "clark_brands", - "conoco_canada", - "conoco_inc", - "crown_central_petroleum", - "diamond_shamrock_inc", - "discount_tire", - "domo_gas", - "elf", - "erickson_oil", - "esso", - "esso_canada", - "exxon", - "exxonmobil", - "family_express", - "fas_gas_oil", - "federated_coop_sonic", - "fina", - "fina_inc", - "fkg_oil", - "flare", - "flying_j_inc", - "gas_america", - "gate_petroleum", - "getty_petroleum", - "giant_eagle", - "grow_mark_inc", - "gulf", - "gulf_canada", - "gulf_chevron", - "handy_way_food", - "heron", - "holiday_stores", - "home_depot", - "husky", - "hyvees", - "irving", - "irving_oil", - "j_sainsbury", - "jet_conoco", - "krogers", - "kuwait", - "kwik_trip_inc", - "lassus", - "loves_country_stores", - "mapco_express_inc", - "marathon_oil", - "martin_bailey_inc_dba_hucks", - "maxol", - "meineke", - "mfa", - "mohawk", - "mr_gas", - "murco", - "murphy_oil_canada", - "murphy_oil_usa_inc", - "nexcom", - "nordstrom_oil", - "olco", - "pdq_store", - "pennzoil_products_inc", - "petro", - "petro_canada", - "petro_t", - "phillips", - "pilot", - "pioneer", - "pure_oil", - "quaker_state", - "quarles_oil", - "quiktrip", - "racetrac_petroleum_inc", - "raceway_petroleum", - "repsol", - "rudy", - "safeway", - "seven_eleven", - "sheetz", - "shell", - "shell_canada", - "shell_oil", - "sinclair_oil", - "southland_oil", - "spar", - "speedway", - "sun_company_inc", - "suncor_sunoco_canada", - "tempo", - "tesco", - "tesoro_alaska", - "texaco", - "the_pantry_inc", - "thornton_oil", - "tosco", - "total", - "travel_centers_of_america", - "uk", - "ultramar_canada", - "unbranded_or_unassigned", - "unbranded_unassigned", - "union_76", - "united_dairy_farmer", - "united_refining_kwikfill", - "us_oil", - "usa_petroleum", - "valvoline", - "vg", - "w_morrison", - "warren_equities", - "wawa", - "western_energetix", - "wilco", - "zions", - ] + "Literal['aafes', 'amerada_hess', 'amoco_canada', 'amoco_petroleum_products', 'arco_products', 'asda', 'ashland_oil', 'bfl', 'bp_mobil', 'bp_oil', 'burrnah_major', 'butler_arndale', 'canadian_tire', 'canadian_turbo', 'caseys_general_store', 'cenex', 'chevron_canada', 'chevron_usa', 'circle_k_stores', 'citgo_petroleum', 'clark_brands', 'conoco_canada', 'conoco_inc', 'crown_central_petroleum', 'diamond_shamrock_inc', 'discount_tire', 'domo_gas', 'elf', 'erickson_oil', 'esso', 'esso_canada', 'exxon', 'exxonmobil', 'family_express', 'fas_gas_oil', 'federated_coop_sonic', 'fina', 'fina_inc', 'fkg_oil', 'flare', 'flying_j_inc', 'gas_america', 'gate_petroleum', 'getty_petroleum', 'giant_eagle', 'grow_mark_inc', 'gulf', 'gulf_canada', 'gulf_chevron', 'handy_way_food', 'heron', 'holiday_stores', 'home_depot', 'husky', 'hyvees', 'irving', 'irving_oil', 'j_sainsbury', 'jet_conoco', 'krogers', 'kuwait', 'kwik_trip_inc', 'lassus', 'loves_country_stores', 'mapco_express_inc', 'marathon_oil', 'martin_bailey_inc_dba_hucks', 'maxol', 'meineke', 'mfa', 'mohawk', 'mr_gas', 'murco', 'murphy_oil_canada', 'murphy_oil_usa_inc', 'nexcom', 'nordstrom_oil', 'olco', 'pdq_store', 'pennzoil_products_inc', 'petro', 'petro_canada', 'petro_t', 'phillips', 'pilot', 'pioneer', 'pure_oil', 'quaker_state', 'quarles_oil', 'quiktrip', 'racetrac_petroleum_inc', 'raceway_petroleum', 'repsol', 'rudy', 'safeway', 'seven_eleven', 'sheetz', 'shell', 'shell_canada', 'shell_oil', 'sinclair_oil', 'southland_oil', 'spar', 'speedway', 'sun_company_inc', 'suncor_sunoco_canada', 'tempo', 'tesco', 'tesoro_alaska', 'texaco', 'the_pantry_inc', 'thornton_oil', 'tosco', 'total', 'travel_centers_of_america', 'uk', 'ultramar_canada', 'unbranded_or_unassigned', 'unbranded_unassigned', 'union_76', 'united_dairy_farmer', 'united_refining_kwikfill', 'us_oil', 'usa_petroleum', 'valvoline', 'vg', 'w_morrison', 'warren_equities', 'wawa', 'western_energetix', 'wilco', 'zions']|str" ] """ The fuel brand. @@ -1863,10 +1710,13 @@ class PaymentIntentCreateParamsPaymentDetailsFleetDatumStationServiceLocation( class PaymentIntentCreateParamsPaymentDetailsFleetDatumVat(TypedDict): - iob_indicator: Literal[ - "issuer_to_iob", - "issuer_to_iob_and_incremental_certification", - "merchant_does_not_agree_to_iob", + iob_indicator: Union[ + Literal[ + "issuer_to_iob", + "issuer_to_iob_and_incremental_certification", + "merchant_does_not_agree_to_iob", + ], + str, ] """ Indicates the merchant's agreement for Invoice on Behalf (IOB) VAT processing. @@ -1922,7 +1772,7 @@ class PaymentIntentCreateParamsPaymentDetailsFlightAffiliate(TypedDict): class PaymentIntentCreateParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1988,7 +1838,7 @@ class PaymentIntentCreateParamsPaymentDetailsFlightSegment(TypedDict): The flight number associated with the segment """ service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] + "Literal['business', 'economy', 'first', 'premium_economy']|str" ] """ The fare class for the segment. @@ -2039,9 +1889,7 @@ class PaymentIntentCreateParamsPaymentDetailsFlightDatum(TypedDict): Total cost breakdown. """ transaction_type: NotRequired[ - Literal[ - "exchange_ticket", "miscellaneous", "refund", "ticket_purchase" - ] + "Literal['exchange_ticket', 'miscellaneous', 'refund', 'ticket_purchase']|str" ] """ Type of flight transaction. @@ -2076,8 +1924,11 @@ class PaymentIntentCreateParamsPaymentDetailsFlightDatumInsurance(TypedDict): """ Insurance company name. """ - insurance_type: Literal[ - "baggage", "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal[ + "baggage", "bankruptcy", "cancelation", "emergency", "medical" + ], + str, ] """ Type of insurance. @@ -2142,8 +1993,8 @@ class PaymentIntentCreateParamsPaymentDetailsFlightDatumSegment(TypedDict): """ Refundable ticket indicator. """ - service_class: Literal[ - "business", "economy", "first_class", "premium_economy" + service_class: Union[ + Literal["business", "economy", "first_class", "premium_economy"], str ] """ Class of service. @@ -2206,13 +2057,7 @@ class PaymentIntentCreateParamsPaymentDetailsFlightDatumTotal(TypedDict): Total flight amount. """ credit_reason: NotRequired[ - Literal[ - "other", - "partial_ticket_refund", - "passenger_transport_ancillary_cancellation", - "ticket_and_ancillary_cancellation", - "ticket_cancellation", - ] + "Literal['other', 'partial_ticket_refund', 'passenger_transport_ancillary_cancellation', 'ticket_and_ancillary_cancellation', 'ticket_cancellation']|str" ] """ Reason for credit. @@ -2260,7 +2105,7 @@ class PaymentIntentCreateParamsPaymentDetailsFlightDatumTotalExtraCharge( Amount of additional charges. """ type: NotRequired[ - Literal["additional_fees", "ancillary_service_charges", "exchange_fee"] + "Literal['additional_fees', 'ancillary_service_charges', 'exchange_fee']|str" ] """ Type of additional charges. @@ -2312,7 +2157,7 @@ class PaymentIntentCreateParamsPaymentDetailsLodging(TypedDict): """ The booking number associated with the lodging reservation. """ - category: NotRequired[Literal["hotel", "vacation_rental"]] + category: NotRequired["Literal['hotel', 'vacation_rental']|str"] """ The lodging category """ @@ -2340,13 +2185,16 @@ class PaymentIntentCreateParamsPaymentDetailsLodging(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", + Union[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ], + str, ] ] ] @@ -2432,7 +2280,7 @@ class PaymentIntentCreateParamsPaymentDetailsLodgingAffiliate(TypedDict): class PaymentIntentCreateParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -2541,16 +2389,7 @@ class PaymentIntentCreateParamsPaymentDetailsLodgingDatumAccommodation( TypedDict, ): accommodation_type: NotRequired[ - Literal[ - "apartment", - "cabana", - "house", - "penthouse", - "room", - "standard", - "suite", - "villa", - ] + "Literal['apartment', 'cabana', 'house', 'penthouse', 'room', 'standard', 'suite', 'villa']|str" ] """ Type of accommodation. @@ -2615,7 +2454,7 @@ class PaymentIntentCreateParamsPaymentDetailsLodgingDatumHost(TypedDict): Reference number for the host. """ host_type: NotRequired[ - Literal["hostel", "hotel", "owner", "rental_agency"] + "Literal['hostel', 'hotel', 'owner', 'rental_agency']|str" ] """ Type of host. @@ -2680,8 +2519,8 @@ class PaymentIntentCreateParamsPaymentDetailsLodgingDatumInsurance(TypedDict): """ Name of the insurance company. """ - insurance_type: Literal[ - "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal["bankruptcy", "cancelation", "emergency", "medical"], str ] """ Type of insurance coverage. @@ -2748,9 +2587,7 @@ class PaymentIntentCreateParamsPaymentDetailsLodgingDatumTotalExtraCharge( Amount of the extra charge in cents. """ type: NotRequired[ - Literal[ - "gift_shop", "laundry", "mini_bar", "other", "phone", "restaurant" - ] + "Literal['gift_shop', 'laundry', 'mini_bar', 'other', 'phone', 'restaurant']|str" ] """ Type of extra charge. @@ -2801,7 +2638,7 @@ class PaymentIntentCreateParamsPaymentDetailsMoneyServices(TypedDict): Inline identity details for the beneficiary of this transaction. """ transaction_type: NotRequired[ - "Literal['']|Literal['account_funding', 'debt_repayment']" + "Literal['']|Literal['account_funding', 'debt_repayment']|str" ] """ The type of money services transaction. @@ -3026,7 +2863,7 @@ class PaymentIntentCreateParamsPaymentDetailsSubscriptionBillingInterval( """ The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. """ - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -3053,7 +2890,9 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -3337,69 +3176,72 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): """ If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -3664,7 +3506,7 @@ class PaymentIntentCreateParamsPaymentMethodDataGrabpay(TypedDict): class PaymentIntentCreateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: NotRequired["Literal['bca', 'bni', 'bri', 'cimb', 'permata']|str"] """ Bank where the account is held. """ @@ -3755,7 +3597,7 @@ class PaymentIntentCreateParamsPaymentMethodDataMultibanco(TypedDict): class PaymentIntentCreateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] + funding: NotRequired["Literal['card', 'points']|str"] """ Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ @@ -3791,34 +3633,7 @@ class PaymentIntentCreateParamsPaymentMethodDataOxxo(TypedDict): class PaymentIntentCreateParamsPaymentMethodDataP24(TypedDict): bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']|str" ] """ The customer's bank. @@ -3929,7 +3744,7 @@ class PaymentIntentCreateParamsPaymentMethodDataShopeepay(TypedDict): class PaymentIntentCreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ Two-letter ISO code representing the country the bank account is located in. """ @@ -3972,7 +3787,7 @@ class PaymentIntentCreateParamsPaymentMethodDataUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -3987,7 +3802,7 @@ class PaymentIntentCreateParamsPaymentMethodDataUpiMandateOptions(TypedDict): class PaymentIntentCreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -3995,7 +3810,7 @@ class PaymentIntentCreateParamsPaymentMethodDataUsBankAccount(TypedDict): """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -4412,7 +4227,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4430,7 +4245,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -4450,11 +4265,13 @@ class PaymentIntentCreateParamsPaymentMethodOptionsAcssDebitMandateOptions( """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -4517,7 +4334,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsAlipay(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4553,7 +4370,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsAmazonPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4568,7 +4385,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsAmazonPay(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4595,7 +4412,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsBacsDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4624,12 +4441,12 @@ class PaymentIntentCreateParamsPaymentMethodOptionsBacsDebitMandateOptions( class PaymentIntentCreateParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4684,7 +4501,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsBoleto(TypedDict): The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4717,7 +4534,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCard(TypedDict): You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. """ capture_method: NotRequired[ - "Literal['']|Literal['automatic_delayed', 'manual']" + "Literal['']|Literal['automatic_delayed', 'manual']|str" ] """ Controls when the funds are captured from the customer's account. @@ -4777,43 +4594,45 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCard(TypedDict): Payment details for payment method specific funding fields. """ request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [decrement the authorization](https://docs.stripe.com/payments/decremental-authorization) for this PaymentIntent. """ request_extended_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this PaymentIntent. """ request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this PaymentIntent. """ - request_multicapture: NotRequired[Literal["if_available", "never"]] + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. """ - request_overcapture: NotRequired[Literal["if_available", "never"]] + request_overcapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to [overcapture](https://docs.stripe.com/payments/overcapture) for this PaymentIntent. """ request_partial_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request partial authorization on this PaymentIntent. """ - request_reauthorization: NotRequired[Literal["if_available", "never"]] + request_reauthorization: NotRequired[ + "Literal['if_available', 'never']|str" + ] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -4823,7 +4642,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCard(TypedDict): When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4892,7 +4711,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardInstallmentsPlan( For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[Literal["bonus", "fixed_count", "revolving"], str] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ @@ -4965,7 +4784,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServic TypedDict, ): digital_asset_category: NotRequired[ - Literal["blockchain_native", "nft", "other_non_fiat", "stablecoin"] + "Literal['blockchain_native', 'nft', 'other_non_fiat', 'stablecoin']|str" ] """ The category of digital asset being acquired through this account funding transaction. @@ -5017,7 +4836,9 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardStatementDetailsAddress( class PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + ares_trans_status: NotRequired[ + "Literal['A', 'C', 'I', 'N', 'R', 'U', 'Y']|str" + ] """ The `transStatus` returned from the card Issuer's ACS in the ARes. """ @@ -5029,13 +4850,13 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): is what you should specify here.) """ electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] + "Literal['01', '02', '05', '06', '07']|str" ] """ The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and indicates what degree of authentication was performed. """ - exemption_indicator: NotRequired[Literal["low_risk", "none"]] + exemption_indicator: NotRequired["Literal['low_risk', 'none']|str"] """ The exemption requested via 3DS and accepted by the issuer at authentication time. """ @@ -5057,7 +4878,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID (dsTransID). """ - version: Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"] + version: Union[Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"], str] """ The version of 3D Secure that was performed. """ @@ -5077,7 +4898,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOption class PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( TypedDict, ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + cb_avalgo: Union[Literal["0", "1", "2", "3", "4", "A"], str] """ The cryptogram calculation algorithm used by the card Issuer's ACS to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -5138,11 +4959,13 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support. """ - request_multicapture: NotRequired[Literal["if_available", "never"]] + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. """ - request_reauthorization: NotRequired[Literal["if_available", "never"]] + request_reauthorization: NotRequired[ + "Literal['if_available', 'never']|str" + ] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. """ @@ -5187,7 +5010,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMone TypedDict, ): digital_asset_category: NotRequired[ - Literal["blockchain_native", "nft", "other_non_fiat", "stablecoin"] + "Literal['blockchain_native', 'nft', 'other_non_fiat', 'stablecoin']|str" ] """ The category of digital asset being acquired through this account funding transaction. @@ -5197,7 +5020,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMone class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentRouting( TypedDict, ): - requested_priority: NotRequired[Literal["domestic", "international"]] + requested_priority: NotRequired["Literal['domestic', 'international']|str"] """ Routing requested priority """ @@ -5213,7 +5036,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCashapp(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5242,7 +5065,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCrypto(TypedDict): Specific configuration for this PaymentIntent when the mode is `deposit`. """ mode: NotRequired[ - Literal["default", "deposit", "transaction_verification"] + "Literal['default', 'deposit', 'transaction_verification']|str" ] """ The mode of the crypto payment. @@ -5279,7 +5102,9 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCryptoAmountReconciliation( class PaymentIntentCreateParamsPaymentMethodOptionsCryptoDepositOptions( TypedDict, ): - networks: List[Literal["base", "ethereum", "polygon", "solana", "tempo"]] + networks: List[ + Union[Literal["base", "ethereum", "polygon", "solana", "tempo"], str] + ] """ The blockchain networks to support for deposits. Learn more about [supported networks and tokens](https://docs.stripe.com/payments/deposit-mode-stablecoin-payments#token-and-network-support). """ @@ -5292,7 +5117,9 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCryptoDepositOptions( class PaymentIntentCreateParamsPaymentMethodOptionsCryptoTransactionVerificationOptions( TypedDict, ): - network: Literal["base", "ethereum", "polygon", "solana", "tempo"] + network: Union[ + Literal["base", "ethereum", "polygon", "solana", "tempo"], str + ] """ The network on which the transaction was submitted. """ @@ -5338,8 +5165,17 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( """ requested_address_types: NotRequired[ List[ - Literal[ - "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + Union[ + Literal[ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -5348,12 +5184,15 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. @@ -5409,7 +5248,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsGiftCard(TypedDict): Set to `yes` to ignore transfer data on the PaymentIntent when redeeming this gift card. """ request_partial_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request partial authorization on this PaymentIntent. @@ -5432,7 +5271,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsGiropay(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5486,7 +5325,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsIdBankTransfer(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsIdeal(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5515,7 +5354,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKakaoPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5544,60 +5383,13 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarna(TypedDict): On-demand details if setting up or charging an on-demand payment. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-RO', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'sv-FI', 'sv-SE']|str" ] """ Preferred language of the Klarna authorization page that the customer is redirected to """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5637,7 +5429,9 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): """ The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + purchase_interval: NotRequired[ + "Literal['day', 'month', 'week', 'year']|str" + ] """ Interval at which the customer is making purchases """ @@ -5650,7 +5444,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSubscription( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -5788,7 +5582,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -5899,7 +5693,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -5953,16 +5747,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the event. """ event_type: NotRequired[ - Literal[ - "concert", - "conference", - "digital_education", - "expo", - "festival", - "in_person_education", - "sport", - "tour", - ] + "Literal['concert', 'conference', 'digital_education', 'expo', 'festival', 'in_person_education', 'sport', 'tour']|str" ] """ Type of the event. @@ -6026,7 +5811,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6085,7 +5870,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6196,7 +5981,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6232,7 +6017,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance @@ -6269,42 +6054,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa The number of transactions the sub-seller completed in the last 12 months. """ product_category: NotRequired[ - Literal[ - "accessories", - "appliances", - "apps_and_games", - "arts_crafts_and_sewing", - "automotive", - "baby", - "baby_clothing", - "bags_and_purses", - "beauty", - "books", - "cds_and_vinyl", - "cell_phones_and_accessories", - "collectibles_and_fine_arts", - "digital_music", - "electronics", - "grocery_and_gourmet_food", - "handmade", - "health_and_personal_care", - "home_and_kitchen", - "industrial_and_scientific", - "luggage_and_travel_gear", - "magazine_subscriptions", - "men_clothing", - "musical_instruments", - "office_products", - "patio_lawn_and_garden", - "pet_supplies", - "shoes", - "software", - "sports_and_outdoors", - "tools_and_home_improvement", - "toys_and_games", - "video_games", - "women_clothing", - ] + "Literal['accessories', 'appliances', 'apps_and_games', 'arts_crafts_and_sewing', 'automotive', 'baby', 'baby_clothing', 'bags_and_purses', 'beauty', 'books', 'cds_and_vinyl', 'cell_phones_and_accessories', 'collectibles_and_fine_arts', 'digital_music', 'electronics', 'grocery_and_gourmet_food', 'handmade', 'health_and_personal_care', 'home_and_kitchen', 'industrial_and_scientific', 'luggage_and_travel_gear', 'magazine_subscriptions', 'men_clothing', 'musical_instruments', 'office_products', 'patio_lawn_and_garden', 'pet_supplies', 'shoes', 'software', 'sports_and_outdoors', 'tools_and_home_improvement', 'toys_and_games', 'video_games', 'women_clothing']|str" ] """ The category of the product. @@ -6314,7 +6064,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa The date when the seller's account with the marketplace was last logged in. """ seller_rating: NotRequired[ - Literal["high", "low", "medium", "very_high", "very_low"] + "Literal['high', 'low', 'medium', 'very_high', 'very_low']|str" ] """ The current rating of the marketplace seller. If the marketplace uses numeric ranking, map these to the enum values. @@ -6414,7 +6164,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6525,7 +6275,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6597,7 +6347,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6708,7 +6458,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6756,13 +6506,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa The name or reference to identify the voucher. """ voucher_type: NotRequired[ - Literal[ - "digital_product", - "discount", - "gift_card", - "physical_product", - "services", - ] + "Literal['digital_product', 'discount', 'gift_card', 'physical_product', 'services']|str" ] """ The type of this voucher. @@ -6810,7 +6554,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsKrCard(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6837,7 +6581,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsLink(TypedDict): [Deprecated] This is a legacy parameter that no longer has any function. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6915,7 +6659,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsNaverPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6930,7 +6674,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsNaverPay(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsNzBankAccount(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7029,29 +6773,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaypal(TypedDict): The line items purchased by the customer. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']|str" ] """ [Preferred locale](https://docs.stripe.com/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. @@ -7069,7 +6791,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaypal(TypedDict): The risk correlation ID for an on-session payment using a saved PayPal payment method. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7090,7 +6812,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaypal(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsPaypalLineItem(TypedDict): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -7134,7 +6856,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaypalLineItemTax( """ The tax for a single unit of the line item in minor units. Cannot be a negative number. """ - behavior: Literal["exclusive", "inclusive"] + behavior: Union[Literal["exclusive", "inclusive"], str] """ The tax behavior for the line item. """ @@ -7150,7 +6872,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaypay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7171,7 +6893,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPayto(TypedDict): Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7193,7 +6915,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions( """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']"] + amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']|str"] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -7202,7 +6924,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions( Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: NotRequired[ - "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']" + "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']|str" ] """ The periodicity at which payments will be collected. Defaults to `adhoc`. @@ -7212,7 +6934,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions( The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: NotRequired[ - "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']" + "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -7220,7 +6942,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions( class PaymentIntentCreateParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ @@ -7238,7 +6960,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPix(TypedDict): """ Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7257,11 +6979,11 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPixMandateOptions( """ Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ Type of amount. Defaults to `maximum`. """ @@ -7274,7 +6996,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsPixMandateOptions( Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to `monthly`. @@ -7367,7 +7089,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsSatispay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7399,7 +7121,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsSepaDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7444,13 +7166,13 @@ class PaymentIntentCreateParamsPaymentMethodOptionsShopeepay(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|str" ] """ Language shown to the payer on redirect. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7473,7 +7195,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsStripeBalance(TypedDict): Additional fields for mandate creation. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7538,7 +7260,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsSwish(TypedDict): class PaymentIntentCreateParamsPaymentMethodOptionsTwint(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7560,7 +7282,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsUpi(TypedDict): Configuration options for setting up an eMandate """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -7571,7 +7293,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsUpiMandateOptions( """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -7605,7 +7327,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): Additional fields for network related functions """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7623,13 +7345,13 @@ class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ transaction_purpose: NotRequired[ - "Literal['']|Literal['goods', 'other', 'services', 'unspecified']" + "Literal['']|Literal['goods', 'other', 'services', 'unspecified']|str" ] """ The purpose of the transaction. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -7661,8 +7383,14 @@ class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnect """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -7691,7 +7419,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnect class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): - mode: Literal["automatic", "custom"] + mode: Union[Literal["automatic", "custom"], str] """ Settings for configuring manual entry of account details. """ @@ -7724,7 +7452,7 @@ class PaymentIntentCreateParamsPaymentMethodOptionsWechatPay(TypedDict): """ The unique buyer ID for the app ID registered with WeChat Pay. Only required when client is mini_program. """ - client: NotRequired[Literal["android", "ios", "mini_program", "web"]] + client: NotRequired["Literal['android', 'ios', 'mini_program', 'web']|str"] """ The client type that the end customer will pay from """ diff --git a/stripe/params/_payment_intent_decrement_authorization_params.py b/stripe/params/_payment_intent_decrement_authorization_params.py index c6a26fa59..5cc631c91 100644 --- a/stripe/params/_payment_intent_decrement_authorization_params.py +++ b/stripe/params/_payment_intent_decrement_authorization_params.py @@ -195,59 +195,57 @@ class PaymentIntentDecrementAuthorizationParamsAmountDetailsLineItemPaymentMetho class PaymentIntentDecrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCardFleetData( TypedDict, ): - product_type: Literal[ - "air_conditioning_service", - "alcohol", - "aviation_fuel_premium", - "aviation_fuel_regular", - "car_care_detailing", - "compressed_natural_gas", - "deli", - "food_service", - "green_gasoline_mid_plus", - "green_gasoline_premium_super", - "green_gasoline_regular", - "grocery", - "liquid_natural_gas", - "liquid_propane_gas", - "lodging", - "marine_diesel", - "marine_fuel", - "merchandise", - "mid_plus", - "mid_plus_ethanol", - "miscellaneous_aviation_products_services", - "miscellaneous_fuel", - "miscellaneous_marine_products_services", - "miscellaneous_vehicle_products_services", - "packaged_beverage", - "premium_diesel", - "premium_super", - "premium_super_ethanol", - "preventative_maintenance", - "regular", - "regular_diesel", - "regular_ethanol", - "repairs", - "self_service_car_wash", - "shower", - "store_service", - "tobacco", - "vehicle_accessories", - "vehicle_parking", - "vehicle_parts", - "wash_out", + product_type: Union[ + Literal[ + "air_conditioning_service", + "alcohol", + "aviation_fuel_premium", + "aviation_fuel_regular", + "car_care_detailing", + "compressed_natural_gas", + "deli", + "food_service", + "green_gasoline_mid_plus", + "green_gasoline_premium_super", + "green_gasoline_regular", + "grocery", + "liquid_natural_gas", + "liquid_propane_gas", + "lodging", + "marine_diesel", + "marine_fuel", + "merchandise", + "mid_plus", + "mid_plus_ethanol", + "miscellaneous_aviation_products_services", + "miscellaneous_fuel", + "miscellaneous_marine_products_services", + "miscellaneous_vehicle_products_services", + "packaged_beverage", + "premium_diesel", + "premium_super", + "premium_super_ethanol", + "preventative_maintenance", + "regular", + "regular_diesel", + "regular_ethanol", + "repairs", + "self_service_car_wash", + "shower", + "store_service", + "tobacco", + "vehicle_accessories", + "vehicle_parking", + "vehicle_parts", + "wash_out", + ], + str, ] """ The type of product being purchased at this line item. """ service_type: NotRequired[ - Literal[ - "full_service", - "high_speed_diesel", - "non_fuel_only", - "self_service", - ] + "Literal['full_service', 'high_speed_diesel', 'non_fuel_only', 'self_service']|str" ] """ The type of service received at the acceptor location. @@ -288,7 +286,7 @@ class PaymentIntentDecrementAuthorizationParamsAmountDetailsLineItemPaymentMetho TypedDict, ): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -339,7 +337,7 @@ class PaymentIntentDecrementAuthorizationParamsAmountDetailsSurcharge( Portion of the amount that corresponds to a surcharge. """ enforce_validation: NotRequired[ - "Literal['']|Literal['automatic', 'disabled', 'enabled']" + "Literal['']|Literal['automatic', 'disabled', 'enabled']|str" ] """ Indicate whether to enforce validations on the surcharge amount. diff --git a/stripe/params/_payment_intent_increment_authorization_params.py b/stripe/params/_payment_intent_increment_authorization_params.py index eff57cb69..8a40a4606 100644 --- a/stripe/params/_payment_intent_increment_authorization_params.py +++ b/stripe/params/_payment_intent_increment_authorization_params.py @@ -205,59 +205,57 @@ class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMetho class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCardFleetData( TypedDict, ): - product_type: Literal[ - "air_conditioning_service", - "alcohol", - "aviation_fuel_premium", - "aviation_fuel_regular", - "car_care_detailing", - "compressed_natural_gas", - "deli", - "food_service", - "green_gasoline_mid_plus", - "green_gasoline_premium_super", - "green_gasoline_regular", - "grocery", - "liquid_natural_gas", - "liquid_propane_gas", - "lodging", - "marine_diesel", - "marine_fuel", - "merchandise", - "mid_plus", - "mid_plus_ethanol", - "miscellaneous_aviation_products_services", - "miscellaneous_fuel", - "miscellaneous_marine_products_services", - "miscellaneous_vehicle_products_services", - "packaged_beverage", - "premium_diesel", - "premium_super", - "premium_super_ethanol", - "preventative_maintenance", - "regular", - "regular_diesel", - "regular_ethanol", - "repairs", - "self_service_car_wash", - "shower", - "store_service", - "tobacco", - "vehicle_accessories", - "vehicle_parking", - "vehicle_parts", - "wash_out", + product_type: Union[ + Literal[ + "air_conditioning_service", + "alcohol", + "aviation_fuel_premium", + "aviation_fuel_regular", + "car_care_detailing", + "compressed_natural_gas", + "deli", + "food_service", + "green_gasoline_mid_plus", + "green_gasoline_premium_super", + "green_gasoline_regular", + "grocery", + "liquid_natural_gas", + "liquid_propane_gas", + "lodging", + "marine_diesel", + "marine_fuel", + "merchandise", + "mid_plus", + "mid_plus_ethanol", + "miscellaneous_aviation_products_services", + "miscellaneous_fuel", + "miscellaneous_marine_products_services", + "miscellaneous_vehicle_products_services", + "packaged_beverage", + "premium_diesel", + "premium_super", + "premium_super_ethanol", + "preventative_maintenance", + "regular", + "regular_diesel", + "regular_ethanol", + "repairs", + "self_service_car_wash", + "shower", + "store_service", + "tobacco", + "vehicle_accessories", + "vehicle_parking", + "vehicle_parts", + "wash_out", + ], + str, ] """ The type of product being purchased at this line item. """ service_type: NotRequired[ - Literal[ - "full_service", - "high_speed_diesel", - "non_fuel_only", - "self_service", - ] + "Literal['full_service', 'high_speed_diesel', 'non_fuel_only', 'self_service']|str" ] """ The type of service received at the acceptor location. @@ -298,7 +296,7 @@ class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMetho TypedDict, ): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -349,7 +347,7 @@ class PaymentIntentIncrementAuthorizationParamsAmountDetailsSurcharge( Portion of the amount that corresponds to a surcharge. """ enforce_validation: NotRequired[ - "Literal['']|Literal['automatic', 'disabled', 'enabled']" + "Literal['']|Literal['automatic', 'disabled', 'enabled']|str" ] """ Indicate whether to enforce validations on the surcharge amount. @@ -421,7 +419,7 @@ class PaymentIntentIncrementAuthorizationParamsPaymentMethodOptionsCard( TypedDict, ): request_partial_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request partial authorization on this PaymentIntent. diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index 74fba27e2..0b13bd2e2 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -13,103 +13,106 @@ class PaymentIntentModifyParams(RequestOptions): """ allowed_payment_method_types: NotRequired[ List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boku_promptpay", - "boleto", - "capchase_pay", - "card", - "cashapp", - "check_scan", - "click_to_pay", - "crypto", - "customer_balance", - "demo_pay", - "duitnow", - "dummy_auth_push", - "dummy_passthrough_card", - "edenred", - "eps", - "fpx", - "gcash", - "getbalance", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "knet", - "konbini", - "kr_card", - "kr_market", - "kriya", - "link", - "mb_way", - "mobilepay", - "momo", - "mondu", - "multibanco", - "naver_pay", - "netbanking", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "nz_bank_account", - "octopus", - "oxxo", - "p24", - "paper_check", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "shop_pay", - "shopeepay", - "sofort", - "south_korea_market", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "test_pay", - "truemoney", - "twint", - "upi", - "us_bank_account", - "us_cash_voucher", - "vipps", - "wechat_pay", - "wero", - "zip", + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boku_promptpay", + "boleto", + "capchase_pay", + "card", + "cashapp", + "check_scan", + "click_to_pay", + "crypto", + "customer_balance", + "demo_pay", + "duitnow", + "dummy_auth_push", + "dummy_passthrough_card", + "edenred", + "eps", + "fpx", + "gcash", + "getbalance", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "knet", + "konbini", + "kr_card", + "kr_market", + "kriya", + "link", + "mb_way", + "mobilepay", + "momo", + "mondu", + "multibanco", + "naver_pay", + "netbanking", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "nz_bank_account", + "octopus", + "oxxo", + "p24", + "paper_check", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "shop_pay", + "shopeepay", + "sofort", + "south_korea_market", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "test_pay", + "truemoney", + "twint", + "upi", + "us_bank_account", + "us_cash_voucher", + "vipps", + "wechat_pay", + "wero", + "zip", + ], + str, ] ] ] @@ -131,7 +134,7 @@ class PaymentIntentModifyParams(RequestOptions): The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://docs.stripe.com/payments/connected-accounts). """ capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds will be captured from the customer's account. @@ -161,7 +164,7 @@ class PaymentIntentModifyParams(RequestOptions): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this payment. @@ -222,7 +225,7 @@ class PaymentIntentModifyParams(RequestOptions): Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). """ setup_future_usage: NotRequired[ - "Literal['']|Literal['off_session', 'on_session']" + "Literal['']|Literal['off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -401,59 +404,57 @@ class PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsCard( class PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsCardFleetData( TypedDict, ): - product_type: Literal[ - "air_conditioning_service", - "alcohol", - "aviation_fuel_premium", - "aviation_fuel_regular", - "car_care_detailing", - "compressed_natural_gas", - "deli", - "food_service", - "green_gasoline_mid_plus", - "green_gasoline_premium_super", - "green_gasoline_regular", - "grocery", - "liquid_natural_gas", - "liquid_propane_gas", - "lodging", - "marine_diesel", - "marine_fuel", - "merchandise", - "mid_plus", - "mid_plus_ethanol", - "miscellaneous_aviation_products_services", - "miscellaneous_fuel", - "miscellaneous_marine_products_services", - "miscellaneous_vehicle_products_services", - "packaged_beverage", - "premium_diesel", - "premium_super", - "premium_super_ethanol", - "preventative_maintenance", - "regular", - "regular_diesel", - "regular_ethanol", - "repairs", - "self_service_car_wash", - "shower", - "store_service", - "tobacco", - "vehicle_accessories", - "vehicle_parking", - "vehicle_parts", - "wash_out", + product_type: Union[ + Literal[ + "air_conditioning_service", + "alcohol", + "aviation_fuel_premium", + "aviation_fuel_regular", + "car_care_detailing", + "compressed_natural_gas", + "deli", + "food_service", + "green_gasoline_mid_plus", + "green_gasoline_premium_super", + "green_gasoline_regular", + "grocery", + "liquid_natural_gas", + "liquid_propane_gas", + "lodging", + "marine_diesel", + "marine_fuel", + "merchandise", + "mid_plus", + "mid_plus_ethanol", + "miscellaneous_aviation_products_services", + "miscellaneous_fuel", + "miscellaneous_marine_products_services", + "miscellaneous_vehicle_products_services", + "packaged_beverage", + "premium_diesel", + "premium_super", + "premium_super_ethanol", + "preventative_maintenance", + "regular", + "regular_diesel", + "regular_ethanol", + "repairs", + "self_service_car_wash", + "shower", + "store_service", + "tobacco", + "vehicle_accessories", + "vehicle_parking", + "vehicle_parts", + "wash_out", + ], + str, ] """ The type of product being purchased at this line item. """ service_type: NotRequired[ - Literal[ - "full_service", - "high_speed_diesel", - "non_fuel_only", - "self_service", - ] + "Literal['full_service', 'high_speed_diesel', 'non_fuel_only', 'self_service']|str" ] """ The type of service received at the acceptor location. @@ -494,7 +495,7 @@ class PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( TypedDict, ): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -539,7 +540,7 @@ class PaymentIntentModifyParamsAmountDetailsSurcharge(TypedDict): Portion of the amount that corresponds to a surcharge. """ enforce_validation: NotRequired[ - "Literal['']|Literal['automatic', 'disabled', 'enabled']" + "Literal['']|Literal['automatic', 'disabled', 'enabled']|str" ] """ Indicate whether to enforce validations on the surcharge amount. @@ -701,7 +702,9 @@ class PaymentIntentModifyParamsPaymentDetailsBenefit(TypedDict): class PaymentIntentModifyParamsPaymentDetailsBenefitFrMealVoucher(TypedDict): - enabled: NotRequired[Literal["if_payment_method_is_eligible", "never"]] + enabled: NotRequired[ + "Literal['if_payment_method_is_eligible', 'never']|str" + ] """ Whether to enable meal voucher benefit for this payment. """ @@ -766,12 +769,15 @@ class PaymentIntentModifyParamsPaymentDetailsCarRental(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", + Union[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ], + str, ] ] ] @@ -800,7 +806,7 @@ class PaymentIntentModifyParamsPaymentDetailsCarRental(TypedDict): """ Rental rate. """ - rate_interval: NotRequired[Literal["day", "month", "week"]] + rate_interval: NotRequired["Literal['day', 'month', 'week']|str"] """ The frequency at which the rate amount is applied. One of `day`, `week` or `month` """ @@ -840,7 +846,7 @@ class PaymentIntentModifyParamsPaymentDetailsCarRentalAffiliate(TypedDict): class PaymentIntentModifyParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -874,7 +880,7 @@ class PaymentIntentModifyParamsPaymentDetailsCarRentalDistance(TypedDict): """ Distance traveled. """ - unit: NotRequired[Literal["kilometers", "miles"]] + unit: NotRequired["Literal['kilometers', 'miles']|str"] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -1036,7 +1042,7 @@ class PaymentIntentModifyParamsPaymentDetailsCarRentalDatumDistance(TypedDict): """ Distance traveled. """ - unit: Literal["kilometers", "miles"] + unit: Union[Literal["kilometers", "miles"], str] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -1141,13 +1147,16 @@ class PaymentIntentModifyParamsPaymentDetailsCarRentalDatumInsurance( """ Name of the insurance company. """ - insurance_type: Literal[ - "liability_supplement", - "loss_damage_waiver", - "other", - "partial_damage_waiver", - "personal_accident", - "personal_effects", + insurance_type: Union[ + Literal[ + "liability_supplement", + "loss_damage_waiver", + "other", + "partial_damage_waiver", + "personal_accident", + "personal_effects", + ], + str, ] """ Type of insurance coverage. @@ -1228,7 +1237,7 @@ class PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotal(TypedDict): Rate per unit for the rental. """ rate_unit: NotRequired[ - Literal["days", "kilometers", "miles", "months", "weeks"] + "Literal['days', 'kilometers', 'miles', 'months', 'weeks']|str" ] """ Unit of measurement for the rate. @@ -1265,17 +1274,20 @@ class PaymentIntentModifyParamsPaymentDetailsCarRentalDatumTotalExtraCharge( """ Amount of the extra charge in cents. """ - type: Literal[ - "extra_mileage", - "gas", - "gps", - "late_charge", - "one_way_drop_off", - "other", - "parking", - "phone", - "regular_mileage", - "towing", + type: Union[ + Literal[ + "extra_mileage", + "gas", + "gps", + "late_charge", + "one_way_drop_off", + "other", + "parking", + "phone", + "regular_mileage", + "towing", + ], + str, ] """ Type of extra charge. @@ -1328,48 +1340,13 @@ class PaymentIntentModifyParamsPaymentDetailsCarRentalDatumVehicle(TypedDict): Odometer reading at the time of rental. """ type: NotRequired[ - Literal[ - "cargo_van", - "compact", - "economy", - "exotic", - "exotic_suv", - "fifteen_passenger_van", - "four_wheel_drive", - "full_size", - "intermediate", - "large_suv", - "large_truck", - "luxury", - "medium_suv", - "midsize", - "mini", - "minivan", - "miscellaneous", - "moped", - "moving_van", - "premium", - "regular", - "small_medium_truck", - "small_suv", - "special", - "standard", - "stretch", - "subcompact", - "taxi", - "twelve_foot_truck", - "twelve_passenger_van", - "twenty_foot_truck", - "twenty_four_foot_truck", - "twenty_six_foot_truck", - "unique", - ] + "Literal['cargo_van', 'compact', 'economy', 'exotic', 'exotic_suv', 'fifteen_passenger_van', 'four_wheel_drive', 'full_size', 'intermediate', 'large_suv', 'large_truck', 'luxury', 'medium_suv', 'midsize', 'mini', 'minivan', 'miscellaneous', 'moped', 'moving_van', 'premium', 'regular', 'small_medium_truck', 'small_suv', 'special', 'standard', 'stretch', 'subcompact', 'taxi', 'twelve_foot_truck', 'twelve_passenger_van', 'twenty_foot_truck', 'twenty_four_foot_truck', 'twenty_six_foot_truck', 'unique']|str" ] """ Type of the rental vehicle. """ vehicle_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Class of the rental vehicle. @@ -1460,7 +1437,7 @@ class PaymentIntentModifyParamsPaymentDetailsEventDetailsAffiliate(TypedDict): class PaymentIntentModifyParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1512,140 +1489,7 @@ class PaymentIntentModifyParamsPaymentDetailsFleetDatumPrimaryFuelFields( TypedDict, ): brand: NotRequired[ - Literal[ - "aafes", - "amerada_hess", - "amoco_canada", - "amoco_petroleum_products", - "arco_products", - "asda", - "ashland_oil", - "bfl", - "bp_mobil", - "bp_oil", - "burrnah_major", - "butler_arndale", - "canadian_tire", - "canadian_turbo", - "caseys_general_store", - "cenex", - "chevron_canada", - "chevron_usa", - "circle_k_stores", - "citgo_petroleum", - "clark_brands", - "conoco_canada", - "conoco_inc", - "crown_central_petroleum", - "diamond_shamrock_inc", - "discount_tire", - "domo_gas", - "elf", - "erickson_oil", - "esso", - "esso_canada", - "exxon", - "exxonmobil", - "family_express", - "fas_gas_oil", - "federated_coop_sonic", - "fina", - "fina_inc", - "fkg_oil", - "flare", - "flying_j_inc", - "gas_america", - "gate_petroleum", - "getty_petroleum", - "giant_eagle", - "grow_mark_inc", - "gulf", - "gulf_canada", - "gulf_chevron", - "handy_way_food", - "heron", - "holiday_stores", - "home_depot", - "husky", - "hyvees", - "irving", - "irving_oil", - "j_sainsbury", - "jet_conoco", - "krogers", - "kuwait", - "kwik_trip_inc", - "lassus", - "loves_country_stores", - "mapco_express_inc", - "marathon_oil", - "martin_bailey_inc_dba_hucks", - "maxol", - "meineke", - "mfa", - "mohawk", - "mr_gas", - "murco", - "murphy_oil_canada", - "murphy_oil_usa_inc", - "nexcom", - "nordstrom_oil", - "olco", - "pdq_store", - "pennzoil_products_inc", - "petro", - "petro_canada", - "petro_t", - "phillips", - "pilot", - "pioneer", - "pure_oil", - "quaker_state", - "quarles_oil", - "quiktrip", - "racetrac_petroleum_inc", - "raceway_petroleum", - "repsol", - "rudy", - "safeway", - "seven_eleven", - "sheetz", - "shell", - "shell_canada", - "shell_oil", - "sinclair_oil", - "southland_oil", - "spar", - "speedway", - "sun_company_inc", - "suncor_sunoco_canada", - "tempo", - "tesco", - "tesoro_alaska", - "texaco", - "the_pantry_inc", - "thornton_oil", - "tosco", - "total", - "travel_centers_of_america", - "uk", - "ultramar_canada", - "unbranded_or_unassigned", - "unbranded_unassigned", - "union_76", - "united_dairy_farmer", - "united_refining_kwikfill", - "us_oil", - "usa_petroleum", - "valvoline", - "vg", - "w_morrison", - "warren_equities", - "wawa", - "western_energetix", - "wilco", - "zions", - ] + "Literal['aafes', 'amerada_hess', 'amoco_canada', 'amoco_petroleum_products', 'arco_products', 'asda', 'ashland_oil', 'bfl', 'bp_mobil', 'bp_oil', 'burrnah_major', 'butler_arndale', 'canadian_tire', 'canadian_turbo', 'caseys_general_store', 'cenex', 'chevron_canada', 'chevron_usa', 'circle_k_stores', 'citgo_petroleum', 'clark_brands', 'conoco_canada', 'conoco_inc', 'crown_central_petroleum', 'diamond_shamrock_inc', 'discount_tire', 'domo_gas', 'elf', 'erickson_oil', 'esso', 'esso_canada', 'exxon', 'exxonmobil', 'family_express', 'fas_gas_oil', 'federated_coop_sonic', 'fina', 'fina_inc', 'fkg_oil', 'flare', 'flying_j_inc', 'gas_america', 'gate_petroleum', 'getty_petroleum', 'giant_eagle', 'grow_mark_inc', 'gulf', 'gulf_canada', 'gulf_chevron', 'handy_way_food', 'heron', 'holiday_stores', 'home_depot', 'husky', 'hyvees', 'irving', 'irving_oil', 'j_sainsbury', 'jet_conoco', 'krogers', 'kuwait', 'kwik_trip_inc', 'lassus', 'loves_country_stores', 'mapco_express_inc', 'marathon_oil', 'martin_bailey_inc_dba_hucks', 'maxol', 'meineke', 'mfa', 'mohawk', 'mr_gas', 'murco', 'murphy_oil_canada', 'murphy_oil_usa_inc', 'nexcom', 'nordstrom_oil', 'olco', 'pdq_store', 'pennzoil_products_inc', 'petro', 'petro_canada', 'petro_t', 'phillips', 'pilot', 'pioneer', 'pure_oil', 'quaker_state', 'quarles_oil', 'quiktrip', 'racetrac_petroleum_inc', 'raceway_petroleum', 'repsol', 'rudy', 'safeway', 'seven_eleven', 'sheetz', 'shell', 'shell_canada', 'shell_oil', 'sinclair_oil', 'southland_oil', 'spar', 'speedway', 'sun_company_inc', 'suncor_sunoco_canada', 'tempo', 'tesco', 'tesoro_alaska', 'texaco', 'the_pantry_inc', 'thornton_oil', 'tosco', 'total', 'travel_centers_of_america', 'uk', 'ultramar_canada', 'unbranded_or_unassigned', 'unbranded_unassigned', 'union_76', 'united_dairy_farmer', 'united_refining_kwikfill', 'us_oil', 'usa_petroleum', 'valvoline', 'vg', 'w_morrison', 'warren_equities', 'wawa', 'western_energetix', 'wilco', 'zions']|str" ] """ The fuel brand. @@ -1711,10 +1555,13 @@ class PaymentIntentModifyParamsPaymentDetailsFleetDatumStationServiceLocation( class PaymentIntentModifyParamsPaymentDetailsFleetDatumVat(TypedDict): - iob_indicator: Literal[ - "issuer_to_iob", - "issuer_to_iob_and_incremental_certification", - "merchant_does_not_agree_to_iob", + iob_indicator: Union[ + Literal[ + "issuer_to_iob", + "issuer_to_iob_and_incremental_certification", + "merchant_does_not_agree_to_iob", + ], + str, ] """ Indicates the merchant's agreement for Invoice on Behalf (IOB) VAT processing. @@ -1770,7 +1617,7 @@ class PaymentIntentModifyParamsPaymentDetailsFlightAffiliate(TypedDict): class PaymentIntentModifyParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1836,7 +1683,7 @@ class PaymentIntentModifyParamsPaymentDetailsFlightSegment(TypedDict): The flight number associated with the segment """ service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] + "Literal['business', 'economy', 'first', 'premium_economy']|str" ] """ The fare class for the segment. @@ -1887,9 +1734,7 @@ class PaymentIntentModifyParamsPaymentDetailsFlightDatum(TypedDict): Total cost breakdown. """ transaction_type: NotRequired[ - Literal[ - "exchange_ticket", "miscellaneous", "refund", "ticket_purchase" - ] + "Literal['exchange_ticket', 'miscellaneous', 'refund', 'ticket_purchase']|str" ] """ Type of flight transaction. @@ -1924,8 +1769,11 @@ class PaymentIntentModifyParamsPaymentDetailsFlightDatumInsurance(TypedDict): """ Insurance company name. """ - insurance_type: Literal[ - "baggage", "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal[ + "baggage", "bankruptcy", "cancelation", "emergency", "medical" + ], + str, ] """ Type of insurance. @@ -1990,8 +1838,8 @@ class PaymentIntentModifyParamsPaymentDetailsFlightDatumSegment(TypedDict): """ Refundable ticket indicator. """ - service_class: Literal[ - "business", "economy", "first_class", "premium_economy" + service_class: Union[ + Literal["business", "economy", "first_class", "premium_economy"], str ] """ Class of service. @@ -2054,13 +1902,7 @@ class PaymentIntentModifyParamsPaymentDetailsFlightDatumTotal(TypedDict): Total flight amount. """ credit_reason: NotRequired[ - Literal[ - "other", - "partial_ticket_refund", - "passenger_transport_ancillary_cancellation", - "ticket_and_ancillary_cancellation", - "ticket_cancellation", - ] + "Literal['other', 'partial_ticket_refund', 'passenger_transport_ancillary_cancellation', 'ticket_and_ancillary_cancellation', 'ticket_cancellation']|str" ] """ Reason for credit. @@ -2108,7 +1950,7 @@ class PaymentIntentModifyParamsPaymentDetailsFlightDatumTotalExtraCharge( Amount of additional charges. """ type: NotRequired[ - Literal["additional_fees", "ancillary_service_charges", "exchange_fee"] + "Literal['additional_fees', 'ancillary_service_charges', 'exchange_fee']|str" ] """ Type of additional charges. @@ -2160,7 +2002,7 @@ class PaymentIntentModifyParamsPaymentDetailsLodging(TypedDict): """ The booking number associated with the lodging reservation. """ - category: NotRequired[Literal["hotel", "vacation_rental"]] + category: NotRequired["Literal['hotel', 'vacation_rental']|str"] """ The lodging category """ @@ -2188,13 +2030,16 @@ class PaymentIntentModifyParamsPaymentDetailsLodging(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", + Union[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ], + str, ] ] ] @@ -2280,7 +2125,7 @@ class PaymentIntentModifyParamsPaymentDetailsLodgingAffiliate(TypedDict): class PaymentIntentModifyParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -2389,16 +2234,7 @@ class PaymentIntentModifyParamsPaymentDetailsLodgingDatumAccommodation( TypedDict, ): accommodation_type: NotRequired[ - Literal[ - "apartment", - "cabana", - "house", - "penthouse", - "room", - "standard", - "suite", - "villa", - ] + "Literal['apartment', 'cabana', 'house', 'penthouse', 'room', 'standard', 'suite', 'villa']|str" ] """ Type of accommodation. @@ -2463,7 +2299,7 @@ class PaymentIntentModifyParamsPaymentDetailsLodgingDatumHost(TypedDict): Reference number for the host. """ host_type: NotRequired[ - Literal["hostel", "hotel", "owner", "rental_agency"] + "Literal['hostel', 'hotel', 'owner', 'rental_agency']|str" ] """ Type of host. @@ -2528,8 +2364,8 @@ class PaymentIntentModifyParamsPaymentDetailsLodgingDatumInsurance(TypedDict): """ Name of the insurance company. """ - insurance_type: Literal[ - "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal["bankruptcy", "cancelation", "emergency", "medical"], str ] """ Type of insurance coverage. @@ -2596,9 +2432,7 @@ class PaymentIntentModifyParamsPaymentDetailsLodgingDatumTotalExtraCharge( Amount of the extra charge in cents. """ type: NotRequired[ - Literal[ - "gift_shop", "laundry", "mini_bar", "other", "phone", "restaurant" - ] + "Literal['gift_shop', 'laundry', 'mini_bar', 'other', 'phone', 'restaurant']|str" ] """ Type of extra charge. @@ -2649,7 +2483,7 @@ class PaymentIntentModifyParamsPaymentDetailsMoneyServices(TypedDict): Inline identity details for the beneficiary of this transaction. """ transaction_type: NotRequired[ - "Literal['']|Literal['account_funding', 'debt_repayment']" + "Literal['']|Literal['account_funding', 'debt_repayment']|str" ] """ The type of money services transaction. @@ -2874,7 +2708,7 @@ class PaymentIntentModifyParamsPaymentDetailsSubscriptionBillingInterval( """ The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. """ - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -2901,7 +2735,9 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -3185,69 +3021,72 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): """ If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -3512,7 +3351,7 @@ class PaymentIntentModifyParamsPaymentMethodDataGrabpay(TypedDict): class PaymentIntentModifyParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: NotRequired["Literal['bca', 'bni', 'bri', 'cimb', 'permata']|str"] """ Bank where the account is held. """ @@ -3603,7 +3442,7 @@ class PaymentIntentModifyParamsPaymentMethodDataMultibanco(TypedDict): class PaymentIntentModifyParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] + funding: NotRequired["Literal['card', 'points']|str"] """ Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ @@ -3639,34 +3478,7 @@ class PaymentIntentModifyParamsPaymentMethodDataOxxo(TypedDict): class PaymentIntentModifyParamsPaymentMethodDataP24(TypedDict): bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']|str" ] """ The customer's bank. @@ -3777,7 +3589,7 @@ class PaymentIntentModifyParamsPaymentMethodDataShopeepay(TypedDict): class PaymentIntentModifyParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ Two-letter ISO code representing the country the bank account is located in. """ @@ -3820,7 +3632,7 @@ class PaymentIntentModifyParamsPaymentMethodDataUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -3835,7 +3647,7 @@ class PaymentIntentModifyParamsPaymentMethodDataUpiMandateOptions(TypedDict): class PaymentIntentModifyParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -3843,7 +3655,7 @@ class PaymentIntentModifyParamsPaymentMethodDataUsBankAccount(TypedDict): """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -4260,7 +4072,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4278,7 +4090,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -4298,11 +4110,13 @@ class PaymentIntentModifyParamsPaymentMethodOptionsAcssDebitMandateOptions( """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -4365,7 +4179,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsAlipay(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4401,7 +4215,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4416,7 +4230,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4443,7 +4257,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4472,12 +4286,12 @@ class PaymentIntentModifyParamsPaymentMethodOptionsBacsDebitMandateOptions( class PaymentIntentModifyParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4532,7 +4346,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsBoleto(TypedDict): The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4565,7 +4379,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCard(TypedDict): You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. """ capture_method: NotRequired[ - "Literal['']|Literal['automatic_delayed', 'manual']" + "Literal['']|Literal['automatic_delayed', 'manual']|str" ] """ Controls when the funds are captured from the customer's account. @@ -4625,43 +4439,45 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCard(TypedDict): Payment details for payment method specific funding fields. """ request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [decrement the authorization](https://docs.stripe.com/payments/decremental-authorization) for this PaymentIntent. """ request_extended_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this PaymentIntent. """ request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this PaymentIntent. """ - request_multicapture: NotRequired[Literal["if_available", "never"]] + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. """ - request_overcapture: NotRequired[Literal["if_available", "never"]] + request_overcapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to [overcapture](https://docs.stripe.com/payments/overcapture) for this PaymentIntent. """ request_partial_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request partial authorization on this PaymentIntent. """ - request_reauthorization: NotRequired[Literal["if_available", "never"]] + request_reauthorization: NotRequired[ + "Literal['if_available', 'never']|str" + ] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -4671,7 +4487,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCard(TypedDict): When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4740,7 +4556,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardInstallmentsPlan( For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[Literal["bonus", "fixed_count", "revolving"], str] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ @@ -4813,7 +4629,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServic TypedDict, ): digital_asset_category: NotRequired[ - Literal["blockchain_native", "nft", "other_non_fiat", "stablecoin"] + "Literal['blockchain_native', 'nft', 'other_non_fiat', 'stablecoin']|str" ] """ The category of digital asset being acquired through this account funding transaction. @@ -4865,7 +4681,9 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardStatementDetailsAddress( class PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + ares_trans_status: NotRequired[ + "Literal['A', 'C', 'I', 'N', 'R', 'U', 'Y']|str" + ] """ The `transStatus` returned from the card Issuer's ACS in the ARes. """ @@ -4877,13 +4695,13 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): is what you should specify here.) """ electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] + "Literal['01', '02', '05', '06', '07']|str" ] """ The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and indicates what degree of authentication was performed. """ - exemption_indicator: NotRequired[Literal["low_risk", "none"]] + exemption_indicator: NotRequired["Literal['low_risk', 'none']|str"] """ The exemption requested via 3DS and accepted by the issuer at authentication time. """ @@ -4905,7 +4723,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID (dsTransID). """ - version: Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"] + version: Union[Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"], str] """ The version of 3D Secure that was performed. """ @@ -4925,7 +4743,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOption class PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( TypedDict, ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + cb_avalgo: Union[Literal["0", "1", "2", "3", "4", "A"], str] """ The cryptogram calculation algorithm used by the card Issuer's ACS to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -4986,11 +4804,13 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support. """ - request_multicapture: NotRequired[Literal["if_available", "never"]] + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. """ - request_reauthorization: NotRequired[Literal["if_available", "never"]] + request_reauthorization: NotRequired[ + "Literal['if_available', 'never']|str" + ] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. """ @@ -5035,7 +4855,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMone TypedDict, ): digital_asset_category: NotRequired[ - Literal["blockchain_native", "nft", "other_non_fiat", "stablecoin"] + "Literal['blockchain_native', 'nft', 'other_non_fiat', 'stablecoin']|str" ] """ The category of digital asset being acquired through this account funding transaction. @@ -5045,7 +4865,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMone class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentRouting( TypedDict, ): - requested_priority: NotRequired[Literal["domestic", "international"]] + requested_priority: NotRequired["Literal['domestic', 'international']|str"] """ Routing requested priority """ @@ -5061,7 +4881,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCashapp(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5090,7 +4910,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCrypto(TypedDict): Specific configuration for this PaymentIntent when the mode is `deposit`. """ mode: NotRequired[ - Literal["default", "deposit", "transaction_verification"] + "Literal['default', 'deposit', 'transaction_verification']|str" ] """ The mode of the crypto payment. @@ -5127,7 +4947,9 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCryptoAmountReconciliation( class PaymentIntentModifyParamsPaymentMethodOptionsCryptoDepositOptions( TypedDict, ): - networks: List[Literal["base", "ethereum", "polygon", "solana", "tempo"]] + networks: List[ + Union[Literal["base", "ethereum", "polygon", "solana", "tempo"], str] + ] """ The blockchain networks to support for deposits. Learn more about [supported networks and tokens](https://docs.stripe.com/payments/deposit-mode-stablecoin-payments#token-and-network-support). """ @@ -5140,7 +4962,9 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCryptoDepositOptions( class PaymentIntentModifyParamsPaymentMethodOptionsCryptoTransactionVerificationOptions( TypedDict, ): - network: Literal["base", "ethereum", "polygon", "solana", "tempo"] + network: Union[ + Literal["base", "ethereum", "polygon", "solana", "tempo"], str + ] """ The network on which the transaction was submitted. """ @@ -5186,8 +5010,17 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer( """ requested_address_types: NotRequired[ List[ - Literal[ - "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + Union[ + Literal[ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -5196,12 +5029,15 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer( Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. @@ -5257,7 +5093,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsGiftCard(TypedDict): Set to `yes` to ignore transfer data on the PaymentIntent when redeeming this gift card. """ request_partial_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request partial authorization on this PaymentIntent. @@ -5280,7 +5116,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsGiropay(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5334,7 +5170,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsIdBankTransfer(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsIdeal(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5363,7 +5199,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKakaoPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5392,60 +5228,13 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarna(TypedDict): On-demand details if setting up or charging an on-demand payment. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-RO', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'sv-FI', 'sv-SE']|str" ] """ Preferred language of the Klarna authorization page that the customer is redirected to """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5485,7 +5274,9 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): """ The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + purchase_interval: NotRequired[ + "Literal['day', 'month', 'week', 'year']|str" + ] """ Interval at which the customer is making purchases """ @@ -5498,7 +5289,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSubscription( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -5636,7 +5427,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -5747,7 +5538,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -5801,16 +5592,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the event. """ event_type: NotRequired[ - Literal[ - "concert", - "conference", - "digital_education", - "expo", - "festival", - "in_person_education", - "sport", - "tour", - ] + "Literal['concert', 'conference', 'digital_education', 'expo', 'festival', 'in_person_education', 'sport', 'tour']|str" ] """ Type of the event. @@ -5874,7 +5656,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -5933,7 +5715,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6044,7 +5826,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6080,7 +5862,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance @@ -6117,42 +5899,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa The number of transactions the sub-seller completed in the last 12 months. """ product_category: NotRequired[ - Literal[ - "accessories", - "appliances", - "apps_and_games", - "arts_crafts_and_sewing", - "automotive", - "baby", - "baby_clothing", - "bags_and_purses", - "beauty", - "books", - "cds_and_vinyl", - "cell_phones_and_accessories", - "collectibles_and_fine_arts", - "digital_music", - "electronics", - "grocery_and_gourmet_food", - "handmade", - "health_and_personal_care", - "home_and_kitchen", - "industrial_and_scientific", - "luggage_and_travel_gear", - "magazine_subscriptions", - "men_clothing", - "musical_instruments", - "office_products", - "patio_lawn_and_garden", - "pet_supplies", - "shoes", - "software", - "sports_and_outdoors", - "tools_and_home_improvement", - "toys_and_games", - "video_games", - "women_clothing", - ] + "Literal['accessories', 'appliances', 'apps_and_games', 'arts_crafts_and_sewing', 'automotive', 'baby', 'baby_clothing', 'bags_and_purses', 'beauty', 'books', 'cds_and_vinyl', 'cell_phones_and_accessories', 'collectibles_and_fine_arts', 'digital_music', 'electronics', 'grocery_and_gourmet_food', 'handmade', 'health_and_personal_care', 'home_and_kitchen', 'industrial_and_scientific', 'luggage_and_travel_gear', 'magazine_subscriptions', 'men_clothing', 'musical_instruments', 'office_products', 'patio_lawn_and_garden', 'pet_supplies', 'shoes', 'software', 'sports_and_outdoors', 'tools_and_home_improvement', 'toys_and_games', 'video_games', 'women_clothing']|str" ] """ The category of the product. @@ -6162,7 +5909,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa The date when the seller's account with the marketplace was last logged in. """ seller_rating: NotRequired[ - Literal["high", "low", "medium", "very_high", "very_low"] + "Literal['high', 'low', 'medium', 'very_high', 'very_low']|str" ] """ The current rating of the marketplace seller. If the marketplace uses numeric ranking, map these to the enum values. @@ -6262,7 +6009,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6373,7 +6120,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6445,7 +6192,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6556,7 +6303,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6604,13 +6351,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa The name or reference to identify the voucher. """ voucher_type: NotRequired[ - Literal[ - "digital_product", - "discount", - "gift_card", - "physical_product", - "services", - ] + "Literal['digital_product', 'discount', 'gift_card', 'physical_product', 'services']|str" ] """ The type of this voucher. @@ -6658,7 +6399,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsKrCard(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6685,7 +6426,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsLink(TypedDict): [Deprecated] This is a legacy parameter that no longer has any function. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6763,7 +6504,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsNaverPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6778,7 +6519,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsNaverPay(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsNzBankAccount(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6877,29 +6618,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaypal(TypedDict): The line items purchased by the customer. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']|str" ] """ [Preferred locale](https://docs.stripe.com/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. @@ -6917,7 +6636,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaypal(TypedDict): The risk correlation ID for an on-session payment using a saved PayPal payment method. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6938,7 +6657,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaypal(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsPaypalLineItem(TypedDict): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -6982,7 +6701,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaypalLineItemTax( """ The tax for a single unit of the line item in minor units. Cannot be a negative number. """ - behavior: Literal["exclusive", "inclusive"] + behavior: Union[Literal["exclusive", "inclusive"], str] """ The tax behavior for the line item. """ @@ -6998,7 +6717,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaypay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7019,7 +6738,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPayto(TypedDict): Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7041,7 +6760,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions( """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']"] + amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']|str"] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -7050,7 +6769,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions( Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: NotRequired[ - "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']" + "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']|str" ] """ The periodicity at which payments will be collected. Defaults to `adhoc`. @@ -7060,7 +6779,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions( The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: NotRequired[ - "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']" + "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -7068,7 +6787,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions( class PaymentIntentModifyParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ @@ -7086,7 +6805,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPix(TypedDict): """ Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7105,11 +6824,11 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPixMandateOptions( """ Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ Type of amount. Defaults to `maximum`. """ @@ -7122,7 +6841,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsPixMandateOptions( Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to `monthly`. @@ -7215,7 +6934,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsSatispay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7247,7 +6966,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7292,13 +7011,13 @@ class PaymentIntentModifyParamsPaymentMethodOptionsShopeepay(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|str" ] """ Language shown to the payer on redirect. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7321,7 +7040,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsStripeBalance(TypedDict): Additional fields for mandate creation. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7386,7 +7105,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsSwish(TypedDict): class PaymentIntentModifyParamsPaymentMethodOptionsTwint(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7408,7 +7127,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsUpi(TypedDict): Configuration options for setting up an eMandate """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -7419,7 +7138,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsUpiMandateOptions( """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -7453,7 +7172,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): Additional fields for network related functions """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7471,13 +7190,13 @@ class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ transaction_purpose: NotRequired[ - "Literal['']|Literal['goods', 'other', 'services', 'unspecified']" + "Literal['']|Literal['goods', 'other', 'services', 'unspecified']|str" ] """ The purpose of the transaction. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -7509,8 +7228,14 @@ class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnect """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -7539,7 +7264,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnect class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): - mode: Literal["automatic", "custom"] + mode: Union[Literal["automatic", "custom"], str] """ Settings for configuring manual entry of account details. """ @@ -7572,7 +7297,7 @@ class PaymentIntentModifyParamsPaymentMethodOptionsWechatPay(TypedDict): """ The unique buyer ID for the app ID registered with WeChat Pay. Only required when client is mini_program. """ - client: NotRequired[Literal["android", "ios", "mini_program", "web"]] + client: NotRequired["Literal['android', 'ios', 'mini_program', 'web']|str"] """ The client type that the end customer will pay from """ diff --git a/stripe/params/_payment_intent_simulate_crypto_deposit_params.py b/stripe/params/_payment_intent_simulate_crypto_deposit_params.py index bf2bf33da..f4dc89ae0 100644 --- a/stripe/params/_payment_intent_simulate_crypto_deposit_params.py +++ b/stripe/params/_payment_intent_simulate_crypto_deposit_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired @@ -14,7 +14,9 @@ class PaymentIntentSimulateCryptoDepositParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - network: Literal["base", "ethereum", "polygon", "solana", "tempo"] + network: Union[ + Literal["base", "ethereum", "polygon", "solana", "tempo"], str + ] """ The blockchain network of the simulated crypto deposit. """ diff --git a/stripe/params/_payment_intent_trigger_action_params.py b/stripe/params/_payment_intent_trigger_action_params.py index 0ed2bd9af..6e69ba521 100644 --- a/stripe/params/_payment_intent_trigger_action_params.py +++ b/stripe/params/_payment_intent_trigger_action_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -14,14 +14,14 @@ class PaymentIntentTriggerActionParams(RequestOptions): """ True to simulate success, false to simulate failure. """ - type: Literal["expire", "fund"] + type: Union[Literal["expire", "fund"], str] """ The type of action to be simulated. """ class PaymentIntentTriggerActionParamsScanQrCode(TypedDict): - result: NotRequired[Literal["failure", "success"]] + result: NotRequired["Literal['failure', 'success']|str"] """ Whether the QR Code scan's payment should succeed or fail. """ diff --git a/stripe/params/_payment_intent_update_crypto_refund_address_params.py b/stripe/params/_payment_intent_update_crypto_refund_address_params.py index b3306117e..0c9a5ef7a 100644 --- a/stripe/params/_payment_intent_update_crypto_refund_address_params.py +++ b/stripe/params/_payment_intent_update_crypto_refund_address_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired @@ -10,7 +10,9 @@ class PaymentIntentUpdateCryptoRefundAddressParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - network: Literal["base", "ethereum", "polygon", "solana", "sui", "tempo"] + network: Union[ + Literal["base", "ethereum", "polygon", "solana", "sui", "tempo"], str + ] """ The blockchain network for the refund address. """ diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index a2e24b3fb..939b699c1 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -12,103 +12,106 @@ class PaymentIntentUpdateParams(TypedDict): """ allowed_payment_method_types: NotRequired[ List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boku_promptpay", - "boleto", - "capchase_pay", - "card", - "cashapp", - "check_scan", - "click_to_pay", - "crypto", - "customer_balance", - "demo_pay", - "duitnow", - "dummy_auth_push", - "dummy_passthrough_card", - "edenred", - "eps", - "fpx", - "gcash", - "getbalance", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "knet", - "konbini", - "kr_card", - "kr_market", - "kriya", - "link", - "mb_way", - "mobilepay", - "momo", - "mondu", - "multibanco", - "naver_pay", - "netbanking", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "nz_bank_account", - "octopus", - "oxxo", - "p24", - "paper_check", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "shop_pay", - "shopeepay", - "sofort", - "south_korea_market", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "test_pay", - "truemoney", - "twint", - "upi", - "us_bank_account", - "us_cash_voucher", - "vipps", - "wechat_pay", - "wero", - "zip", + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boku_promptpay", + "boleto", + "capchase_pay", + "card", + "cashapp", + "check_scan", + "click_to_pay", + "crypto", + "customer_balance", + "demo_pay", + "duitnow", + "dummy_auth_push", + "dummy_passthrough_card", + "edenred", + "eps", + "fpx", + "gcash", + "getbalance", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "knet", + "konbini", + "kr_card", + "kr_market", + "kriya", + "link", + "mb_way", + "mobilepay", + "momo", + "mondu", + "multibanco", + "naver_pay", + "netbanking", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "nz_bank_account", + "octopus", + "oxxo", + "p24", + "paper_check", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "shop_pay", + "shopeepay", + "sofort", + "south_korea_market", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "test_pay", + "truemoney", + "twint", + "upi", + "us_bank_account", + "us_cash_voucher", + "vipps", + "wechat_pay", + "wero", + "zip", + ], + str, ] ] ] @@ -130,7 +133,7 @@ class PaymentIntentUpdateParams(TypedDict): The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://docs.stripe.com/payments/connected-accounts). """ capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds will be captured from the customer's account. @@ -160,7 +163,7 @@ class PaymentIntentUpdateParams(TypedDict): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this payment. @@ -221,7 +224,7 @@ class PaymentIntentUpdateParams(TypedDict): Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). """ setup_future_usage: NotRequired[ - "Literal['']|Literal['off_session', 'on_session']" + "Literal['']|Literal['off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -400,59 +403,57 @@ class PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsCard( class PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsCardFleetData( TypedDict, ): - product_type: Literal[ - "air_conditioning_service", - "alcohol", - "aviation_fuel_premium", - "aviation_fuel_regular", - "car_care_detailing", - "compressed_natural_gas", - "deli", - "food_service", - "green_gasoline_mid_plus", - "green_gasoline_premium_super", - "green_gasoline_regular", - "grocery", - "liquid_natural_gas", - "liquid_propane_gas", - "lodging", - "marine_diesel", - "marine_fuel", - "merchandise", - "mid_plus", - "mid_plus_ethanol", - "miscellaneous_aviation_products_services", - "miscellaneous_fuel", - "miscellaneous_marine_products_services", - "miscellaneous_vehicle_products_services", - "packaged_beverage", - "premium_diesel", - "premium_super", - "premium_super_ethanol", - "preventative_maintenance", - "regular", - "regular_diesel", - "regular_ethanol", - "repairs", - "self_service_car_wash", - "shower", - "store_service", - "tobacco", - "vehicle_accessories", - "vehicle_parking", - "vehicle_parts", - "wash_out", + product_type: Union[ + Literal[ + "air_conditioning_service", + "alcohol", + "aviation_fuel_premium", + "aviation_fuel_regular", + "car_care_detailing", + "compressed_natural_gas", + "deli", + "food_service", + "green_gasoline_mid_plus", + "green_gasoline_premium_super", + "green_gasoline_regular", + "grocery", + "liquid_natural_gas", + "liquid_propane_gas", + "lodging", + "marine_diesel", + "marine_fuel", + "merchandise", + "mid_plus", + "mid_plus_ethanol", + "miscellaneous_aviation_products_services", + "miscellaneous_fuel", + "miscellaneous_marine_products_services", + "miscellaneous_vehicle_products_services", + "packaged_beverage", + "premium_diesel", + "premium_super", + "premium_super_ethanol", + "preventative_maintenance", + "regular", + "regular_diesel", + "regular_ethanol", + "repairs", + "self_service_car_wash", + "shower", + "store_service", + "tobacco", + "vehicle_accessories", + "vehicle_parking", + "vehicle_parts", + "wash_out", + ], + str, ] """ The type of product being purchased at this line item. """ service_type: NotRequired[ - Literal[ - "full_service", - "high_speed_diesel", - "non_fuel_only", - "self_service", - ] + "Literal['full_service', 'high_speed_diesel', 'non_fuel_only', 'self_service']|str" ] """ The type of service received at the acceptor location. @@ -493,7 +494,7 @@ class PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( TypedDict, ): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -538,7 +539,7 @@ class PaymentIntentUpdateParamsAmountDetailsSurcharge(TypedDict): Portion of the amount that corresponds to a surcharge. """ enforce_validation: NotRequired[ - "Literal['']|Literal['automatic', 'disabled', 'enabled']" + "Literal['']|Literal['automatic', 'disabled', 'enabled']|str" ] """ Indicate whether to enforce validations on the surcharge amount. @@ -700,7 +701,9 @@ class PaymentIntentUpdateParamsPaymentDetailsBenefit(TypedDict): class PaymentIntentUpdateParamsPaymentDetailsBenefitFrMealVoucher(TypedDict): - enabled: NotRequired[Literal["if_payment_method_is_eligible", "never"]] + enabled: NotRequired[ + "Literal['if_payment_method_is_eligible', 'never']|str" + ] """ Whether to enable meal voucher benefit for this payment. """ @@ -765,12 +768,15 @@ class PaymentIntentUpdateParamsPaymentDetailsCarRental(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", + Union[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ], + str, ] ] ] @@ -799,7 +805,7 @@ class PaymentIntentUpdateParamsPaymentDetailsCarRental(TypedDict): """ Rental rate. """ - rate_interval: NotRequired[Literal["day", "month", "week"]] + rate_interval: NotRequired["Literal['day', 'month', 'week']|str"] """ The frequency at which the rate amount is applied. One of `day`, `week` or `month` """ @@ -839,7 +845,7 @@ class PaymentIntentUpdateParamsPaymentDetailsCarRentalAffiliate(TypedDict): class PaymentIntentUpdateParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -873,7 +879,7 @@ class PaymentIntentUpdateParamsPaymentDetailsCarRentalDistance(TypedDict): """ Distance traveled. """ - unit: NotRequired[Literal["kilometers", "miles"]] + unit: NotRequired["Literal['kilometers', 'miles']|str"] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -1035,7 +1041,7 @@ class PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumDistance(TypedDict): """ Distance traveled. """ - unit: Literal["kilometers", "miles"] + unit: Union[Literal["kilometers", "miles"], str] """ Unit of measurement for the distance traveled. One of `miles` or `kilometers`. """ @@ -1140,13 +1146,16 @@ class PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumInsurance( """ Name of the insurance company. """ - insurance_type: Literal[ - "liability_supplement", - "loss_damage_waiver", - "other", - "partial_damage_waiver", - "personal_accident", - "personal_effects", + insurance_type: Union[ + Literal[ + "liability_supplement", + "loss_damage_waiver", + "other", + "partial_damage_waiver", + "personal_accident", + "personal_effects", + ], + str, ] """ Type of insurance coverage. @@ -1227,7 +1236,7 @@ class PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotal(TypedDict): Rate per unit for the rental. """ rate_unit: NotRequired[ - Literal["days", "kilometers", "miles", "months", "weeks"] + "Literal['days', 'kilometers', 'miles', 'months', 'weeks']|str" ] """ Unit of measurement for the rate. @@ -1264,17 +1273,20 @@ class PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumTotalExtraCharge( """ Amount of the extra charge in cents. """ - type: Literal[ - "extra_mileage", - "gas", - "gps", - "late_charge", - "one_way_drop_off", - "other", - "parking", - "phone", - "regular_mileage", - "towing", + type: Union[ + Literal[ + "extra_mileage", + "gas", + "gps", + "late_charge", + "one_way_drop_off", + "other", + "parking", + "phone", + "regular_mileage", + "towing", + ], + str, ] """ Type of extra charge. @@ -1327,48 +1339,13 @@ class PaymentIntentUpdateParamsPaymentDetailsCarRentalDatumVehicle(TypedDict): Odometer reading at the time of rental. """ type: NotRequired[ - Literal[ - "cargo_van", - "compact", - "economy", - "exotic", - "exotic_suv", - "fifteen_passenger_van", - "four_wheel_drive", - "full_size", - "intermediate", - "large_suv", - "large_truck", - "luxury", - "medium_suv", - "midsize", - "mini", - "minivan", - "miscellaneous", - "moped", - "moving_van", - "premium", - "regular", - "small_medium_truck", - "small_suv", - "special", - "standard", - "stretch", - "subcompact", - "taxi", - "twelve_foot_truck", - "twelve_passenger_van", - "twenty_foot_truck", - "twenty_four_foot_truck", - "twenty_six_foot_truck", - "unique", - ] + "Literal['cargo_van', 'compact', 'economy', 'exotic', 'exotic_suv', 'fifteen_passenger_van', 'four_wheel_drive', 'full_size', 'intermediate', 'large_suv', 'large_truck', 'luxury', 'medium_suv', 'midsize', 'mini', 'minivan', 'miscellaneous', 'moped', 'moving_van', 'premium', 'regular', 'small_medium_truck', 'small_suv', 'special', 'standard', 'stretch', 'subcompact', 'taxi', 'twelve_foot_truck', 'twelve_passenger_van', 'twenty_foot_truck', 'twenty_four_foot_truck', 'twenty_six_foot_truck', 'unique']|str" ] """ Type of the rental vehicle. """ vehicle_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Class of the rental vehicle. @@ -1459,7 +1436,7 @@ class PaymentIntentUpdateParamsPaymentDetailsEventDetailsAffiliate(TypedDict): class PaymentIntentUpdateParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1511,140 +1488,7 @@ class PaymentIntentUpdateParamsPaymentDetailsFleetDatumPrimaryFuelFields( TypedDict, ): brand: NotRequired[ - Literal[ - "aafes", - "amerada_hess", - "amoco_canada", - "amoco_petroleum_products", - "arco_products", - "asda", - "ashland_oil", - "bfl", - "bp_mobil", - "bp_oil", - "burrnah_major", - "butler_arndale", - "canadian_tire", - "canadian_turbo", - "caseys_general_store", - "cenex", - "chevron_canada", - "chevron_usa", - "circle_k_stores", - "citgo_petroleum", - "clark_brands", - "conoco_canada", - "conoco_inc", - "crown_central_petroleum", - "diamond_shamrock_inc", - "discount_tire", - "domo_gas", - "elf", - "erickson_oil", - "esso", - "esso_canada", - "exxon", - "exxonmobil", - "family_express", - "fas_gas_oil", - "federated_coop_sonic", - "fina", - "fina_inc", - "fkg_oil", - "flare", - "flying_j_inc", - "gas_america", - "gate_petroleum", - "getty_petroleum", - "giant_eagle", - "grow_mark_inc", - "gulf", - "gulf_canada", - "gulf_chevron", - "handy_way_food", - "heron", - "holiday_stores", - "home_depot", - "husky", - "hyvees", - "irving", - "irving_oil", - "j_sainsbury", - "jet_conoco", - "krogers", - "kuwait", - "kwik_trip_inc", - "lassus", - "loves_country_stores", - "mapco_express_inc", - "marathon_oil", - "martin_bailey_inc_dba_hucks", - "maxol", - "meineke", - "mfa", - "mohawk", - "mr_gas", - "murco", - "murphy_oil_canada", - "murphy_oil_usa_inc", - "nexcom", - "nordstrom_oil", - "olco", - "pdq_store", - "pennzoil_products_inc", - "petro", - "petro_canada", - "petro_t", - "phillips", - "pilot", - "pioneer", - "pure_oil", - "quaker_state", - "quarles_oil", - "quiktrip", - "racetrac_petroleum_inc", - "raceway_petroleum", - "repsol", - "rudy", - "safeway", - "seven_eleven", - "sheetz", - "shell", - "shell_canada", - "shell_oil", - "sinclair_oil", - "southland_oil", - "spar", - "speedway", - "sun_company_inc", - "suncor_sunoco_canada", - "tempo", - "tesco", - "tesoro_alaska", - "texaco", - "the_pantry_inc", - "thornton_oil", - "tosco", - "total", - "travel_centers_of_america", - "uk", - "ultramar_canada", - "unbranded_or_unassigned", - "unbranded_unassigned", - "union_76", - "united_dairy_farmer", - "united_refining_kwikfill", - "us_oil", - "usa_petroleum", - "valvoline", - "vg", - "w_morrison", - "warren_equities", - "wawa", - "western_energetix", - "wilco", - "zions", - ] + "Literal['aafes', 'amerada_hess', 'amoco_canada', 'amoco_petroleum_products', 'arco_products', 'asda', 'ashland_oil', 'bfl', 'bp_mobil', 'bp_oil', 'burrnah_major', 'butler_arndale', 'canadian_tire', 'canadian_turbo', 'caseys_general_store', 'cenex', 'chevron_canada', 'chevron_usa', 'circle_k_stores', 'citgo_petroleum', 'clark_brands', 'conoco_canada', 'conoco_inc', 'crown_central_petroleum', 'diamond_shamrock_inc', 'discount_tire', 'domo_gas', 'elf', 'erickson_oil', 'esso', 'esso_canada', 'exxon', 'exxonmobil', 'family_express', 'fas_gas_oil', 'federated_coop_sonic', 'fina', 'fina_inc', 'fkg_oil', 'flare', 'flying_j_inc', 'gas_america', 'gate_petroleum', 'getty_petroleum', 'giant_eagle', 'grow_mark_inc', 'gulf', 'gulf_canada', 'gulf_chevron', 'handy_way_food', 'heron', 'holiday_stores', 'home_depot', 'husky', 'hyvees', 'irving', 'irving_oil', 'j_sainsbury', 'jet_conoco', 'krogers', 'kuwait', 'kwik_trip_inc', 'lassus', 'loves_country_stores', 'mapco_express_inc', 'marathon_oil', 'martin_bailey_inc_dba_hucks', 'maxol', 'meineke', 'mfa', 'mohawk', 'mr_gas', 'murco', 'murphy_oil_canada', 'murphy_oil_usa_inc', 'nexcom', 'nordstrom_oil', 'olco', 'pdq_store', 'pennzoil_products_inc', 'petro', 'petro_canada', 'petro_t', 'phillips', 'pilot', 'pioneer', 'pure_oil', 'quaker_state', 'quarles_oil', 'quiktrip', 'racetrac_petroleum_inc', 'raceway_petroleum', 'repsol', 'rudy', 'safeway', 'seven_eleven', 'sheetz', 'shell', 'shell_canada', 'shell_oil', 'sinclair_oil', 'southland_oil', 'spar', 'speedway', 'sun_company_inc', 'suncor_sunoco_canada', 'tempo', 'tesco', 'tesoro_alaska', 'texaco', 'the_pantry_inc', 'thornton_oil', 'tosco', 'total', 'travel_centers_of_america', 'uk', 'ultramar_canada', 'unbranded_or_unassigned', 'unbranded_unassigned', 'union_76', 'united_dairy_farmer', 'united_refining_kwikfill', 'us_oil', 'usa_petroleum', 'valvoline', 'vg', 'w_morrison', 'warren_equities', 'wawa', 'western_energetix', 'wilco', 'zions']|str" ] """ The fuel brand. @@ -1710,10 +1554,13 @@ class PaymentIntentUpdateParamsPaymentDetailsFleetDatumStationServiceLocation( class PaymentIntentUpdateParamsPaymentDetailsFleetDatumVat(TypedDict): - iob_indicator: Literal[ - "issuer_to_iob", - "issuer_to_iob_and_incremental_certification", - "merchant_does_not_agree_to_iob", + iob_indicator: Union[ + Literal[ + "issuer_to_iob", + "issuer_to_iob_and_incremental_certification", + "merchant_does_not_agree_to_iob", + ], + str, ] """ Indicates the merchant's agreement for Invoice on Behalf (IOB) VAT processing. @@ -1769,7 +1616,7 @@ class PaymentIntentUpdateParamsPaymentDetailsFlightAffiliate(TypedDict): class PaymentIntentUpdateParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -1835,7 +1682,7 @@ class PaymentIntentUpdateParamsPaymentDetailsFlightSegment(TypedDict): The flight number associated with the segment """ service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] + "Literal['business', 'economy', 'first', 'premium_economy']|str" ] """ The fare class for the segment. @@ -1886,9 +1733,7 @@ class PaymentIntentUpdateParamsPaymentDetailsFlightDatum(TypedDict): Total cost breakdown. """ transaction_type: NotRequired[ - Literal[ - "exchange_ticket", "miscellaneous", "refund", "ticket_purchase" - ] + "Literal['exchange_ticket', 'miscellaneous', 'refund', 'ticket_purchase']|str" ] """ Type of flight transaction. @@ -1923,8 +1768,11 @@ class PaymentIntentUpdateParamsPaymentDetailsFlightDatumInsurance(TypedDict): """ Insurance company name. """ - insurance_type: Literal[ - "baggage", "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal[ + "baggage", "bankruptcy", "cancelation", "emergency", "medical" + ], + str, ] """ Type of insurance. @@ -1989,8 +1837,8 @@ class PaymentIntentUpdateParamsPaymentDetailsFlightDatumSegment(TypedDict): """ Refundable ticket indicator. """ - service_class: Literal[ - "business", "economy", "first_class", "premium_economy" + service_class: Union[ + Literal["business", "economy", "first_class", "premium_economy"], str ] """ Class of service. @@ -2053,13 +1901,7 @@ class PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotal(TypedDict): Total flight amount. """ credit_reason: NotRequired[ - Literal[ - "other", - "partial_ticket_refund", - "passenger_transport_ancillary_cancellation", - "ticket_and_ancillary_cancellation", - "ticket_cancellation", - ] + "Literal['other', 'partial_ticket_refund', 'passenger_transport_ancillary_cancellation', 'ticket_and_ancillary_cancellation', 'ticket_cancellation']|str" ] """ Reason for credit. @@ -2107,7 +1949,7 @@ class PaymentIntentUpdateParamsPaymentDetailsFlightDatumTotalExtraCharge( Amount of additional charges. """ type: NotRequired[ - Literal["additional_fees", "ancillary_service_charges", "exchange_fee"] + "Literal['additional_fees', 'ancillary_service_charges', 'exchange_fee']|str" ] """ Type of additional charges. @@ -2159,7 +2001,7 @@ class PaymentIntentUpdateParamsPaymentDetailsLodging(TypedDict): """ The booking number associated with the lodging reservation. """ - category: NotRequired[Literal["hotel", "vacation_rental"]] + category: NotRequired["Literal['hotel', 'vacation_rental']|str"] """ The lodging category """ @@ -2187,13 +2029,16 @@ class PaymentIntentUpdateParamsPaymentDetailsLodging(TypedDict): """ extra_charges: NotRequired[ List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", + Union[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ], + str, ] ] ] @@ -2279,7 +2124,7 @@ class PaymentIntentUpdateParamsPaymentDetailsLodgingAffiliate(TypedDict): class PaymentIntentUpdateParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + mode: NotRequired["Literal['email', 'phone', 'pickup', 'post']|str"] """ The delivery method for the payment """ @@ -2388,16 +2233,7 @@ class PaymentIntentUpdateParamsPaymentDetailsLodgingDatumAccommodation( TypedDict, ): accommodation_type: NotRequired[ - Literal[ - "apartment", - "cabana", - "house", - "penthouse", - "room", - "standard", - "suite", - "villa", - ] + "Literal['apartment', 'cabana', 'house', 'penthouse', 'room', 'standard', 'suite', 'villa']|str" ] """ Type of accommodation. @@ -2462,7 +2298,7 @@ class PaymentIntentUpdateParamsPaymentDetailsLodgingDatumHost(TypedDict): Reference number for the host. """ host_type: NotRequired[ - Literal["hostel", "hotel", "owner", "rental_agency"] + "Literal['hostel', 'hotel', 'owner', 'rental_agency']|str" ] """ Type of host. @@ -2527,8 +2363,8 @@ class PaymentIntentUpdateParamsPaymentDetailsLodgingDatumInsurance(TypedDict): """ Name of the insurance company. """ - insurance_type: Literal[ - "bankruptcy", "cancelation", "emergency", "medical" + insurance_type: Union[ + Literal["bankruptcy", "cancelation", "emergency", "medical"], str ] """ Type of insurance coverage. @@ -2595,9 +2431,7 @@ class PaymentIntentUpdateParamsPaymentDetailsLodgingDatumTotalExtraCharge( Amount of the extra charge in cents. """ type: NotRequired[ - Literal[ - "gift_shop", "laundry", "mini_bar", "other", "phone", "restaurant" - ] + "Literal['gift_shop', 'laundry', 'mini_bar', 'other', 'phone', 'restaurant']|str" ] """ Type of extra charge. @@ -2648,7 +2482,7 @@ class PaymentIntentUpdateParamsPaymentDetailsMoneyServices(TypedDict): Inline identity details for the beneficiary of this transaction. """ transaction_type: NotRequired[ - "Literal['']|Literal['account_funding', 'debt_repayment']" + "Literal['']|Literal['account_funding', 'debt_repayment']|str" ] """ The type of money services transaction. @@ -2873,7 +2707,7 @@ class PaymentIntentUpdateParamsPaymentDetailsSubscriptionBillingInterval( """ The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. """ - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -2900,7 +2734,9 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -3184,69 +3020,72 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): """ If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -3511,7 +3350,7 @@ class PaymentIntentUpdateParamsPaymentMethodDataGrabpay(TypedDict): class PaymentIntentUpdateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: NotRequired["Literal['bca', 'bni', 'bri', 'cimb', 'permata']|str"] """ Bank where the account is held. """ @@ -3602,7 +3441,7 @@ class PaymentIntentUpdateParamsPaymentMethodDataMultibanco(TypedDict): class PaymentIntentUpdateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] + funding: NotRequired["Literal['card', 'points']|str"] """ Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ @@ -3638,34 +3477,7 @@ class PaymentIntentUpdateParamsPaymentMethodDataOxxo(TypedDict): class PaymentIntentUpdateParamsPaymentMethodDataP24(TypedDict): bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']|str" ] """ The customer's bank. @@ -3776,7 +3588,7 @@ class PaymentIntentUpdateParamsPaymentMethodDataShopeepay(TypedDict): class PaymentIntentUpdateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ Two-letter ISO code representing the country the bank account is located in. """ @@ -3819,7 +3631,7 @@ class PaymentIntentUpdateParamsPaymentMethodDataUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -3834,7 +3646,7 @@ class PaymentIntentUpdateParamsPaymentMethodDataUpiMandateOptions(TypedDict): class PaymentIntentUpdateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -3842,7 +3654,7 @@ class PaymentIntentUpdateParamsPaymentMethodDataUsBankAccount(TypedDict): """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -4259,7 +4071,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4277,7 +4089,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -4297,11 +4109,13 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsAcssDebitMandateOptions( """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -4364,7 +4178,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsAlipay(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4400,7 +4214,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4415,7 +4229,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4442,7 +4256,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4471,12 +4285,12 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsBacsDebitMandateOptions( class PaymentIntentUpdateParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4531,7 +4345,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsBoleto(TypedDict): The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4564,7 +4378,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): You can only set this if `capture_method` is `automatic_delayed` and `capture_by` is `target_delay`. """ capture_method: NotRequired[ - "Literal['']|Literal['automatic_delayed', 'manual']" + "Literal['']|Literal['automatic_delayed', 'manual']|str" ] """ Controls when the funds are captured from the customer's account. @@ -4624,43 +4438,45 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): Payment details for payment method specific funding fields. """ request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [decrement the authorization](https://docs.stripe.com/payments/decremental-authorization) for this PaymentIntent. """ request_extended_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this PaymentIntent. """ request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this PaymentIntent. """ - request_multicapture: NotRequired[Literal["if_available", "never"]] + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. """ - request_overcapture: NotRequired[Literal["if_available", "never"]] + request_overcapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to [overcapture](https://docs.stripe.com/payments/overcapture) for this PaymentIntent. """ request_partial_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request partial authorization on this PaymentIntent. """ - request_reauthorization: NotRequired[Literal["if_available", "never"]] + request_reauthorization: NotRequired[ + "Literal['if_available', 'never']|str" + ] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -4670,7 +4486,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -4739,7 +4555,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallmentsPlan( For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[Literal["bonus", "fixed_count", "revolving"], str] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ @@ -4812,7 +4628,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServic TypedDict, ): digital_asset_category: NotRequired[ - Literal["blockchain_native", "nft", "other_non_fiat", "stablecoin"] + "Literal['blockchain_native', 'nft', 'other_non_fiat', 'stablecoin']|str" ] """ The category of digital asset being acquired through this account funding transaction. @@ -4864,7 +4680,9 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardStatementDetailsAddress( class PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + ares_trans_status: NotRequired[ + "Literal['A', 'C', 'I', 'N', 'R', 'U', 'Y']|str" + ] """ The `transStatus` returned from the card Issuer's ACS in the ARes. """ @@ -4876,13 +4694,13 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): is what you should specify here.) """ electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] + "Literal['01', '02', '05', '06', '07']|str" ] """ The Electronic Commerce Indicator (ECI) is returned by your 3D Secure provider and indicates what degree of authentication was performed. """ - exemption_indicator: NotRequired[Literal["low_risk", "none"]] + exemption_indicator: NotRequired["Literal['low_risk', 'none']|str"] """ The exemption requested via 3DS and accepted by the issuer at authentication time. """ @@ -4904,7 +4722,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID (dsTransID). """ - version: Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"] + version: Union[Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"], str] """ The version of 3D Secure that was performed. """ @@ -4924,7 +4742,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOption class PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( TypedDict, ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + cb_avalgo: Union[Literal["0", "1", "2", "3", "4", "A"], str] """ The cryptogram calculation algorithm used by the card Issuer's ACS to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -4985,11 +4803,13 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent(TypedDict): """ Request ability to [increment](https://docs.stripe.com/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://docs.stripe.com/api/payment_intents/confirm) response to verify support. """ - request_multicapture: NotRequired[Literal["if_available", "never"]] + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this PaymentIntent. """ - request_reauthorization: NotRequired[Literal["if_available", "never"]] + request_reauthorization: NotRequired[ + "Literal['if_available', 'never']|str" + ] """ Request ability to [reauthorize](https://docs.stripe.com/payments/reauthorization) for this PaymentIntent. """ @@ -5034,7 +4854,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMone TypedDict, ): digital_asset_category: NotRequired[ - Literal["blockchain_native", "nft", "other_non_fiat", "stablecoin"] + "Literal['blockchain_native', 'nft', 'other_non_fiat', 'stablecoin']|str" ] """ The category of digital asset being acquired through this account funding transaction. @@ -5044,7 +4864,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMone class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentRouting( TypedDict, ): - requested_priority: NotRequired[Literal["domestic", "international"]] + requested_priority: NotRequired["Literal['domestic', 'international']|str"] """ Routing requested priority """ @@ -5060,7 +4880,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCashapp(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5089,7 +4909,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCrypto(TypedDict): Specific configuration for this PaymentIntent when the mode is `deposit`. """ mode: NotRequired[ - Literal["default", "deposit", "transaction_verification"] + "Literal['default', 'deposit', 'transaction_verification']|str" ] """ The mode of the crypto payment. @@ -5126,7 +4946,9 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCryptoAmountReconciliation( class PaymentIntentUpdateParamsPaymentMethodOptionsCryptoDepositOptions( TypedDict, ): - networks: List[Literal["base", "ethereum", "polygon", "solana", "tempo"]] + networks: List[ + Union[Literal["base", "ethereum", "polygon", "solana", "tempo"], str] + ] """ The blockchain networks to support for deposits. Learn more about [supported networks and tokens](https://docs.stripe.com/payments/deposit-mode-stablecoin-payments#token-and-network-support). """ @@ -5139,7 +4961,9 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCryptoDepositOptions( class PaymentIntentUpdateParamsPaymentMethodOptionsCryptoTransactionVerificationOptions( TypedDict, ): - network: Literal["base", "ethereum", "polygon", "solana", "tempo"] + network: Union[ + Literal["base", "ethereum", "polygon", "solana", "tempo"], str + ] """ The network on which the transaction was submitted. """ @@ -5185,8 +5009,17 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( """ requested_address_types: NotRequired[ List[ - Literal[ - "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + Union[ + Literal[ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -5195,12 +5028,15 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. @@ -5256,7 +5092,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsGiftCard(TypedDict): Set to `yes` to ignore transfer data on the PaymentIntent when redeeming this gift card. """ request_partial_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request partial authorization on this PaymentIntent. @@ -5279,7 +5115,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsGiropay(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5333,7 +5169,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsIdBankTransfer(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsIdeal(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5362,7 +5198,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKakaoPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5391,60 +5227,13 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarna(TypedDict): On-demand details if setting up or charging an on-demand payment. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-RO', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'sv-FI', 'sv-SE']|str" ] """ Preferred language of the Klarna authorization page that the customer is redirected to """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -5484,7 +5273,9 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): """ The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + purchase_interval: NotRequired[ + "Literal['day', 'month', 'week', 'year']|str" + ] """ Interval at which the customer is making purchases """ @@ -5497,7 +5288,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSubscription( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -5635,7 +5426,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -5746,7 +5537,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -5800,16 +5591,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the event. """ event_type: NotRequired[ - Literal[ - "concert", - "conference", - "digital_education", - "expo", - "festival", - "in_person_education", - "sport", - "tour", - ] + "Literal['concert', 'conference', 'digital_education', 'expo', 'festival', 'in_person_education', 'sport', 'tour']|str" ] """ Type of the event. @@ -5873,7 +5655,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -5932,7 +5714,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6043,7 +5825,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6079,7 +5861,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["bankruptcy", "cancelation", "emergency", "medical"] + "Literal['bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance @@ -6116,42 +5898,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa The number of transactions the sub-seller completed in the last 12 months. """ product_category: NotRequired[ - Literal[ - "accessories", - "appliances", - "apps_and_games", - "arts_crafts_and_sewing", - "automotive", - "baby", - "baby_clothing", - "bags_and_purses", - "beauty", - "books", - "cds_and_vinyl", - "cell_phones_and_accessories", - "collectibles_and_fine_arts", - "digital_music", - "electronics", - "grocery_and_gourmet_food", - "handmade", - "health_and_personal_care", - "home_and_kitchen", - "industrial_and_scientific", - "luggage_and_travel_gear", - "magazine_subscriptions", - "men_clothing", - "musical_instruments", - "office_products", - "patio_lawn_and_garden", - "pet_supplies", - "shoes", - "software", - "sports_and_outdoors", - "tools_and_home_improvement", - "toys_and_games", - "video_games", - "women_clothing", - ] + "Literal['accessories', 'appliances', 'apps_and_games', 'arts_crafts_and_sewing', 'automotive', 'baby', 'baby_clothing', 'bags_and_purses', 'beauty', 'books', 'cds_and_vinyl', 'cell_phones_and_accessories', 'collectibles_and_fine_arts', 'digital_music', 'electronics', 'grocery_and_gourmet_food', 'handmade', 'health_and_personal_care', 'home_and_kitchen', 'industrial_and_scientific', 'luggage_and_travel_gear', 'magazine_subscriptions', 'men_clothing', 'musical_instruments', 'office_products', 'patio_lawn_and_garden', 'pet_supplies', 'shoes', 'software', 'sports_and_outdoors', 'tools_and_home_improvement', 'toys_and_games', 'video_games', 'women_clothing']|str" ] """ The category of the product. @@ -6161,7 +5908,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa The date when the seller's account with the marketplace was last logged in. """ seller_rating: NotRequired[ - Literal["high", "low", "medium", "very_high", "very_low"] + "Literal['high', 'low', 'medium', 'very_high', 'very_low']|str" ] """ The current rating of the marketplace seller. If the marketplace uses numeric ranking, map these to the enum values. @@ -6261,7 +6008,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6372,7 +6119,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6444,7 +6191,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Price in cents. """ ticket_class: NotRequired[ - Literal["business", "economy", "first_class", "premium_economy"] + "Literal['business', 'economy', 'first_class', 'premium_economy']|str" ] """ Ticket class. @@ -6555,7 +6302,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa Name of the company providing the insurance. """ insurance_type: NotRequired[ - Literal["baggage", "bankruptcy", "cancelation", "emergency", "medical"] + "Literal['baggage', 'bankruptcy', 'cancelation', 'emergency', 'medical']|str" ] """ Type of insurance. @@ -6603,13 +6350,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSupplementaryPurchaseDa The name or reference to identify the voucher. """ voucher_type: NotRequired[ - Literal[ - "digital_product", - "discount", - "gift_card", - "physical_product", - "services", - ] + "Literal['digital_product', 'discount', 'gift_card', 'physical_product', 'services']|str" ] """ The type of this voucher. @@ -6657,7 +6398,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsKrCard(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6684,7 +6425,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsLink(TypedDict): [Deprecated] This is a legacy parameter that no longer has any function. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6762,7 +6503,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsNaverPay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6777,7 +6518,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsNaverPay(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsNzBankAccount(TypedDict): setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6876,29 +6617,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaypal(TypedDict): The line items purchased by the customer. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']|str" ] """ [Preferred locale](https://docs.stripe.com/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. @@ -6916,7 +6635,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaypal(TypedDict): The risk correlation ID for an on-session payment using a saved PayPal payment method. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -6937,7 +6656,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaypal(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsPaypalLineItem(TypedDict): category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] + "Literal['digital_goods', 'donation', 'physical_goods']|str" ] """ Type of the line item. @@ -6981,7 +6700,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaypalLineItemTax( """ The tax for a single unit of the line item in minor units. Cannot be a negative number. """ - behavior: Literal["exclusive", "inclusive"] + behavior: Union[Literal["exclusive", "inclusive"], str] """ The tax behavior for the line item. """ @@ -6997,7 +6716,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaypay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7018,7 +6737,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPayto(TypedDict): Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7040,7 +6759,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions( """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']"] + amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']|str"] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -7049,7 +6768,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions( Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: NotRequired[ - "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']" + "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']|str" ] """ The periodicity at which payments will be collected. Defaults to `adhoc`. @@ -7059,7 +6778,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions( The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: NotRequired[ - "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']" + "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -7067,7 +6786,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions( class PaymentIntentUpdateParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ @@ -7085,7 +6804,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPix(TypedDict): """ Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7104,11 +6823,11 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPixMandateOptions( """ Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ Type of amount. Defaults to `maximum`. """ @@ -7121,7 +6840,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsPixMandateOptions( Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to `monthly`. @@ -7214,7 +6933,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsSatispay(TypedDict): If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7246,7 +6965,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7291,13 +7010,13 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsShopeepay(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsSofort(TypedDict): preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']|str" ] """ Language shown to the payer on redirect. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7320,7 +7039,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalance(TypedDict): Additional fields for mandate creation. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7385,7 +7104,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsSwish(TypedDict): class PaymentIntentUpdateParamsPaymentMethodOptionsTwint(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7407,7 +7126,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsUpi(TypedDict): Configuration options for setting up an eMandate """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -7418,7 +7137,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsUpiMandateOptions( """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -7452,7 +7171,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): Additional fields for network related functions """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -7470,13 +7189,13 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ transaction_purpose: NotRequired[ - "Literal['']|Literal['goods', 'other', 'services', 'unspecified']" + "Literal['']|Literal['goods', 'other', 'services', 'unspecified']|str" ] """ The purpose of the transaction. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -7508,8 +7227,14 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnect """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -7538,7 +7263,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnect class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): - mode: Literal["automatic", "custom"] + mode: Union[Literal["automatic", "custom"], str] """ Settings for configuring manual entry of account details. """ @@ -7571,7 +7296,7 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsWechatPay(TypedDict): """ The unique buyer ID for the app ID registered with WeChat Pay. Only required when client is mini_program. """ - client: NotRequired[Literal["android", "ios", "mini_program", "web"]] + client: NotRequired["Literal['android', 'ios', 'mini_program', 'web']|str"] """ The client type that the end customer will pay from """ diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py index d64d00676..5e268f62a 100644 --- a/stripe/params/_payment_link_create_params.py +++ b/stripe/params/_payment_link_create_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -34,7 +34,7 @@ class PaymentLinkCreateParams(RequestOptions): """ Configuration for automatic tax collection. """ - billing_address_collection: NotRequired[Literal["auto", "required"]] + billing_address_collection: NotRequired["Literal['auto', 'required']|str"] """ Configuration for collecting the customer's billing address. Defaults to `auto`. """ @@ -54,7 +54,7 @@ class PaymentLinkCreateParams(RequestOptions): """ Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `custom`. """ - customer_creation: NotRequired[Literal["always", "if_required"]] + customer_creation: NotRequired["Literal['always', 'if_required']|str"] """ Configures whether [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link create a [Customer](https://docs.stripe.com/api/customers). """ @@ -102,7 +102,9 @@ class PaymentLinkCreateParams(RequestOptions): """ A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. """ - payment_method_collection: NotRequired[Literal["always", "if_required"]] + payment_method_collection: NotRequired[ + "Literal['always', 'if_required']|str" + ] """ Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. @@ -118,54 +120,57 @@ class PaymentLinkCreateParams(RequestOptions): """ payment_method_types: NotRequired[ List[ - Literal[ - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "ideal", - "klarna", - "konbini", - "link", - "mb_way", - "mobilepay", - "multibanco", - "oxxo", - "p24", - "pay_by_bank", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + Union[ + Literal[ + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "mb_way", + "mobilepay", + "multibanco", + "oxxo", + "p24", + "pay_by_bank", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] ] ] @@ -197,7 +202,7 @@ class PaymentLinkCreateParams(RequestOptions): The shipping rate options to apply to [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link. """ submit_type: NotRequired[ - Literal["auto", "book", "donate", "pay", "subscribe"] + "Literal['auto', 'book', 'donate', 'pay', 'subscribe']|str" ] """ Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://docs.stripe.com/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). @@ -227,7 +232,7 @@ class PaymentLinkCreateParamsAfterCompletion(TypedDict): """ Configuration when `type=redirect`. """ - type: Literal["hosted_confirmation", "redirect"] + type: Union[Literal["hosted_confirmation", "redirect"], str] """ The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. """ @@ -282,7 +287,7 @@ class PaymentLinkCreateParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -295,13 +300,13 @@ class PaymentLinkCreateParamsConsentCollection(TypedDict): """ Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. """ - promotions: NotRequired[Literal["auto", "none"]] + promotions: NotRequired["Literal['auto', 'none']|str"] """ If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer's locale. Only available to US merchants and US customers. """ - terms_of_service: NotRequired[Literal["none", "required"]] + terms_of_service: NotRequired["Literal['none', 'required']|str"] """ If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). @@ -311,7 +316,7 @@ class PaymentLinkCreateParamsConsentCollection(TypedDict): class PaymentLinkCreateParamsConsentCollectionPaymentMethodReuseAgreement( TypedDict, ): - position: Literal["auto", "hidden"] + position: Union[Literal["auto", "hidden"], str] """ Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. @@ -343,7 +348,7 @@ class PaymentLinkCreateParamsCustomField(TypedDict): """ Configuration for `type=text` fields. """ - type: Literal["dropdown", "numeric", "text"] + type: Union[Literal["dropdown", "numeric", "text"], str] """ The type of the field. """ @@ -533,7 +538,7 @@ class PaymentLinkCreateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -752,7 +757,7 @@ class PaymentLinkCreateParamsOptionalItemAdjustableQuantity(TypedDict): class PaymentLinkCreateParamsPaymentIntentData(TypedDict): capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds will be captured from the customer's account. @@ -765,7 +770,7 @@ class PaymentLinkCreateParamsPaymentIntentData(TypedDict): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will declaratively set metadata on [Payment Intents](https://docs.stripe.com/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + setup_future_usage: NotRequired["Literal['off_session', 'on_session']|str"] """ Indicates that you intend to [make future payments](https://docs.stripe.com/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. @@ -814,11 +819,14 @@ class PaymentLinkCreateParamsPaymentMethodOptionsCard(TypedDict): class PaymentLinkCreateParamsPaymentMethodOptionsCardRestrictions(TypedDict): brands_blocked: NotRequired[ List[ - Literal[ - "american_express", - "discover_global_network", - "mastercard", - "visa", + Union[ + Literal[ + "american_express", + "discover_global_network", + "mastercard", + "visa", + ], + str, ] ] ] @@ -850,245 +858,248 @@ class PaymentLinkCreateParamsRestrictionsCompletedSessions(TypedDict): class PaymentLinkCreateParamsShippingAddressCollection(TypedDict): allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", + Union[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", + ], + str, ] ] """ @@ -1145,7 +1156,7 @@ class PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -1163,7 +1174,9 @@ class PaymentLinkCreateParamsSubscriptionDataTrialSettings(TypedDict): class PaymentLinkCreateParamsSubscriptionDataTrialSettingsEndBehavior( TypedDict, ): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] + missing_payment_method: Union[ + Literal["cancel", "create_invoice", "pause"], str + ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. """ @@ -1174,7 +1187,7 @@ class PaymentLinkCreateParamsTaxIdCollection(TypedDict): """ Enable tax ID collection during checkout. Defaults to `false`. """ - required: NotRequired[Literal["if_supported", "never"]] + required: NotRequired["Literal['if_supported', 'never']|str"] """ Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `custom`. """ diff --git a/stripe/params/_payment_link_modify_params.py b/stripe/params/_payment_link_modify_params.py index 4f5276f27..fce1554f8 100644 --- a/stripe/params/_payment_link_modify_params.py +++ b/stripe/params/_payment_link_modify_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -23,7 +23,7 @@ class PaymentLinkModifyParams(RequestOptions): """ Configuration for automatic tax collection. """ - billing_address_collection: NotRequired[Literal["auto", "required"]] + billing_address_collection: NotRequired["Literal['auto', 'required']|str"] """ Configuration for collecting the customer's billing address. Defaults to `auto`. """ @@ -37,7 +37,7 @@ class PaymentLinkModifyParams(RequestOptions): """ Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `custom`. """ - customer_creation: NotRequired[Literal["always", "if_required"]] + customer_creation: NotRequired["Literal['always', 'if_required']|str"] """ Configures whether [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link create a [Customer](https://docs.stripe.com/api/customers). """ @@ -81,7 +81,9 @@ class PaymentLinkModifyParams(RequestOptions): """ A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. """ - payment_method_collection: NotRequired[Literal["always", "if_required"]] + payment_method_collection: NotRequired[ + "Literal['always', 'if_required']|str" + ] """ Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. @@ -96,7 +98,7 @@ class PaymentLinkModifyParams(RequestOptions): Payment-method-specific configuration. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Union[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ 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). @@ -122,7 +124,7 @@ class PaymentLinkModifyParams(RequestOptions): Configuration for collecting the customer's shipping address. """ submit_type: NotRequired[ - Literal["auto", "book", "donate", "pay", "subscribe"] + "Literal['auto', 'book', 'donate', 'pay', 'subscribe']|str" ] """ Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://docs.stripe.com/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). @@ -148,7 +150,7 @@ class PaymentLinkModifyParamsAfterCompletion(TypedDict): """ Configuration when `type=redirect`. """ - type: Literal["hosted_confirmation", "redirect"] + type: Union[Literal["hosted_confirmation", "redirect"], str] """ The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. """ @@ -186,7 +188,7 @@ class PaymentLinkModifyParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -217,7 +219,7 @@ class PaymentLinkModifyParamsCustomField(TypedDict): """ Configuration for `type=text` fields. """ - type: Literal["dropdown", "numeric", "text"] + type: Union[Literal["dropdown", "numeric", "text"], str] """ The type of the field. """ @@ -407,7 +409,7 @@ class PaymentLinkModifyParamsInvoiceCreationInvoiceDataIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -572,7 +574,7 @@ class PaymentLinkModifyParamsPaymentMethodOptionsCard(TypedDict): class PaymentLinkModifyParamsPaymentMethodOptionsCardRestrictions(TypedDict): brands_blocked: NotRequired[ - "Literal['']|List[Literal['american_express', 'discover_global_network', 'mastercard', 'visa']]" + "Literal['']|List[Union[Literal['american_express', 'discover_global_network', 'mastercard', 'visa'], str]]" ] """ The card brands to block. If a customer enters or selects a card belonging to a blocked brand, they can't complete the payment. @@ -602,245 +604,248 @@ class PaymentLinkModifyParamsRestrictionsCompletedSessions(TypedDict): class PaymentLinkModifyParamsShippingAddressCollection(TypedDict): allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", + Union[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", + ], + str, ] ] """ @@ -888,7 +893,7 @@ class PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -906,7 +911,9 @@ class PaymentLinkModifyParamsSubscriptionDataTrialSettings(TypedDict): class PaymentLinkModifyParamsSubscriptionDataTrialSettingsEndBehavior( TypedDict, ): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] + missing_payment_method: Union[ + Literal["cancel", "create_invoice", "pause"], str + ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. """ @@ -917,7 +924,7 @@ class PaymentLinkModifyParamsTaxIdCollection(TypedDict): """ Enable tax ID collection during checkout. Defaults to `false`. """ - required: NotRequired[Literal["if_supported", "never"]] + required: NotRequired["Literal['if_supported', 'never']|str"] """ Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `custom`. """ diff --git a/stripe/params/_payment_link_update_params.py b/stripe/params/_payment_link_update_params.py index 8b8d5b760..7d573695a 100644 --- a/stripe/params/_payment_link_update_params.py +++ b/stripe/params/_payment_link_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -22,7 +22,7 @@ class PaymentLinkUpdateParams(TypedDict): """ Configuration for automatic tax collection. """ - billing_address_collection: NotRequired[Literal["auto", "required"]] + billing_address_collection: NotRequired["Literal['auto', 'required']|str"] """ Configuration for collecting the customer's billing address. Defaults to `auto`. """ @@ -36,7 +36,7 @@ class PaymentLinkUpdateParams(TypedDict): """ Display additional text for your customers using custom text. You can't set this parameter if `ui_mode` is `custom`. """ - customer_creation: NotRequired[Literal["always", "if_required"]] + customer_creation: NotRequired["Literal['always', 'if_required']|str"] """ Configures whether [checkout sessions](https://docs.stripe.com/api/checkout/sessions) created by this payment link create a [Customer](https://docs.stripe.com/api/customers). """ @@ -80,7 +80,9 @@ class PaymentLinkUpdateParams(TypedDict): """ A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. """ - payment_method_collection: NotRequired[Literal["always", "if_required"]] + payment_method_collection: NotRequired[ + "Literal['always', 'if_required']|str" + ] """ Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. @@ -95,7 +97,7 @@ class PaymentLinkUpdateParams(TypedDict): Payment-method-specific configuration. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Union[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'sunbit', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ 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). @@ -121,7 +123,7 @@ class PaymentLinkUpdateParams(TypedDict): Configuration for collecting the customer's shipping address. """ submit_type: NotRequired[ - Literal["auto", "book", "donate", "pay", "subscribe"] + "Literal['auto', 'book', 'donate', 'pay', 'subscribe']|str" ] """ Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://docs.stripe.com/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). @@ -147,7 +149,7 @@ class PaymentLinkUpdateParamsAfterCompletion(TypedDict): """ Configuration when `type=redirect`. """ - type: Literal["hosted_confirmation", "redirect"] + type: Union[Literal["hosted_confirmation", "redirect"], str] """ The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. """ @@ -185,7 +187,7 @@ class PaymentLinkUpdateParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -216,7 +218,7 @@ class PaymentLinkUpdateParamsCustomField(TypedDict): """ Configuration for `type=text` fields. """ - type: Literal["dropdown", "numeric", "text"] + type: Union[Literal["dropdown", "numeric", "text"], str] """ The type of the field. """ @@ -406,7 +408,7 @@ class PaymentLinkUpdateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -571,7 +573,7 @@ class PaymentLinkUpdateParamsPaymentMethodOptionsCard(TypedDict): class PaymentLinkUpdateParamsPaymentMethodOptionsCardRestrictions(TypedDict): brands_blocked: NotRequired[ - "Literal['']|List[Literal['american_express', 'discover_global_network', 'mastercard', 'visa']]" + "Literal['']|List[Union[Literal['american_express', 'discover_global_network', 'mastercard', 'visa'], str]]" ] """ The card brands to block. If a customer enters or selects a card belonging to a blocked brand, they can't complete the payment. @@ -601,245 +603,248 @@ class PaymentLinkUpdateParamsRestrictionsCompletedSessions(TypedDict): class PaymentLinkUpdateParamsShippingAddressCollection(TypedDict): allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", + Union[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", + ], + str, ] ] """ @@ -887,7 +892,7 @@ class PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -905,7 +910,9 @@ class PaymentLinkUpdateParamsSubscriptionDataTrialSettings(TypedDict): class PaymentLinkUpdateParamsSubscriptionDataTrialSettingsEndBehavior( TypedDict, ): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] + missing_payment_method: Union[ + Literal["cancel", "create_invoice", "pause"], str + ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. """ @@ -916,7 +923,7 @@ class PaymentLinkUpdateParamsTaxIdCollection(TypedDict): """ Enable tax ID collection during checkout. Defaults to `false`. """ - required: NotRequired[Literal["if_supported", "never"]] + required: NotRequired["Literal['if_supported', 'never']|str"] """ Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `custom`. """ diff --git a/stripe/params/_payment_method_configuration_create_params.py b/stripe/params/_payment_method_configuration_create_params.py index ad51bec9f..9a1e4e1b7 100644 --- a/stripe/params/_payment_method_configuration_create_params.py +++ b/stripe/params/_payment_method_configuration_create_params.py @@ -314,7 +314,7 @@ class PaymentMethodConfigurationCreateParamsAcssDebit(TypedDict): class PaymentMethodConfigurationCreateParamsAcssDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -330,7 +330,7 @@ class PaymentMethodConfigurationCreateParamsAffirm(TypedDict): class PaymentMethodConfigurationCreateParamsAffirmDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -348,7 +348,7 @@ class PaymentMethodConfigurationCreateParamsAfterpayClearpay(TypedDict): class PaymentMethodConfigurationCreateParamsAfterpayClearpayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -364,7 +364,7 @@ class PaymentMethodConfigurationCreateParamsAlipay(TypedDict): class PaymentMethodConfigurationCreateParamsAlipayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -380,7 +380,7 @@ class PaymentMethodConfigurationCreateParamsAlma(TypedDict): class PaymentMethodConfigurationCreateParamsAlmaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -398,7 +398,7 @@ class PaymentMethodConfigurationCreateParamsAmazonPay(TypedDict): class PaymentMethodConfigurationCreateParamsAmazonPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -416,7 +416,7 @@ class PaymentMethodConfigurationCreateParamsApplePay(TypedDict): class PaymentMethodConfigurationCreateParamsApplePayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -434,7 +434,7 @@ class PaymentMethodConfigurationCreateParamsApplePayLater(TypedDict): class PaymentMethodConfigurationCreateParamsApplePayLaterDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -452,7 +452,7 @@ class PaymentMethodConfigurationCreateParamsAuBecsDebit(TypedDict): class PaymentMethodConfigurationCreateParamsAuBecsDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -470,7 +470,7 @@ class PaymentMethodConfigurationCreateParamsBacsDebit(TypedDict): class PaymentMethodConfigurationCreateParamsBacsDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -488,7 +488,7 @@ class PaymentMethodConfigurationCreateParamsBancontact(TypedDict): class PaymentMethodConfigurationCreateParamsBancontactDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -504,7 +504,7 @@ class PaymentMethodConfigurationCreateParamsBillie(TypedDict): class PaymentMethodConfigurationCreateParamsBillieDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -520,7 +520,7 @@ class PaymentMethodConfigurationCreateParamsBizum(TypedDict): class PaymentMethodConfigurationCreateParamsBizumDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -536,7 +536,7 @@ class PaymentMethodConfigurationCreateParamsBlik(TypedDict): class PaymentMethodConfigurationCreateParamsBlikDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -552,7 +552,7 @@ class PaymentMethodConfigurationCreateParamsBoleto(TypedDict): class PaymentMethodConfigurationCreateParamsBoletoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -568,7 +568,7 @@ class PaymentMethodConfigurationCreateParamsCard(TypedDict): class PaymentMethodConfigurationCreateParamsCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -586,7 +586,7 @@ class PaymentMethodConfigurationCreateParamsCartesBancaires(TypedDict): class PaymentMethodConfigurationCreateParamsCartesBancairesDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -604,7 +604,7 @@ class PaymentMethodConfigurationCreateParamsCashapp(TypedDict): class PaymentMethodConfigurationCreateParamsCashappDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -620,7 +620,7 @@ class PaymentMethodConfigurationCreateParamsCrypto(TypedDict): class PaymentMethodConfigurationCreateParamsCryptoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -638,7 +638,7 @@ class PaymentMethodConfigurationCreateParamsCustomerBalance(TypedDict): class PaymentMethodConfigurationCreateParamsCustomerBalanceDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -654,7 +654,7 @@ class PaymentMethodConfigurationCreateParamsEps(TypedDict): class PaymentMethodConfigurationCreateParamsEpsDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -670,7 +670,7 @@ class PaymentMethodConfigurationCreateParamsFpx(TypedDict): class PaymentMethodConfigurationCreateParamsFpxDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -688,7 +688,7 @@ class PaymentMethodConfigurationCreateParamsFrMealVoucherConecs(TypedDict): class PaymentMethodConfigurationCreateParamsFrMealVoucherConecsDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -706,7 +706,7 @@ class PaymentMethodConfigurationCreateParamsGiropay(TypedDict): class PaymentMethodConfigurationCreateParamsGiropayDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -724,7 +724,7 @@ class PaymentMethodConfigurationCreateParamsGooglePay(TypedDict): class PaymentMethodConfigurationCreateParamsGooglePayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -740,7 +740,7 @@ class PaymentMethodConfigurationCreateParamsGopay(TypedDict): class PaymentMethodConfigurationCreateParamsGopayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -758,7 +758,7 @@ class PaymentMethodConfigurationCreateParamsGrabpay(TypedDict): class PaymentMethodConfigurationCreateParamsGrabpayDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -776,7 +776,7 @@ class PaymentMethodConfigurationCreateParamsIdBankTransfer(TypedDict): class PaymentMethodConfigurationCreateParamsIdBankTransferDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -792,7 +792,7 @@ class PaymentMethodConfigurationCreateParamsIdeal(TypedDict): class PaymentMethodConfigurationCreateParamsIdealDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -808,7 +808,7 @@ class PaymentMethodConfigurationCreateParamsJcb(TypedDict): class PaymentMethodConfigurationCreateParamsJcbDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -826,7 +826,7 @@ class PaymentMethodConfigurationCreateParamsKakaoPay(TypedDict): class PaymentMethodConfigurationCreateParamsKakaoPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -842,7 +842,7 @@ class PaymentMethodConfigurationCreateParamsKlarna(TypedDict): class PaymentMethodConfigurationCreateParamsKlarnaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -860,7 +860,7 @@ class PaymentMethodConfigurationCreateParamsKonbini(TypedDict): class PaymentMethodConfigurationCreateParamsKonbiniDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -876,7 +876,7 @@ class PaymentMethodConfigurationCreateParamsKrCard(TypedDict): class PaymentMethodConfigurationCreateParamsKrCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -892,7 +892,7 @@ class PaymentMethodConfigurationCreateParamsLink(TypedDict): class PaymentMethodConfigurationCreateParamsLinkDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -908,7 +908,7 @@ class PaymentMethodConfigurationCreateParamsMbWay(TypedDict): class PaymentMethodConfigurationCreateParamsMbWayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -926,7 +926,7 @@ class PaymentMethodConfigurationCreateParamsMobilepay(TypedDict): class PaymentMethodConfigurationCreateParamsMobilepayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -944,7 +944,7 @@ class PaymentMethodConfigurationCreateParamsMultibanco(TypedDict): class PaymentMethodConfigurationCreateParamsMultibancoDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -962,7 +962,7 @@ class PaymentMethodConfigurationCreateParamsNaverPay(TypedDict): class PaymentMethodConfigurationCreateParamsNaverPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -980,7 +980,7 @@ class PaymentMethodConfigurationCreateParamsNzBankAccount(TypedDict): class PaymentMethodConfigurationCreateParamsNzBankAccountDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -996,7 +996,7 @@ class PaymentMethodConfigurationCreateParamsOxxo(TypedDict): class PaymentMethodConfigurationCreateParamsOxxoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1012,7 +1012,7 @@ class PaymentMethodConfigurationCreateParamsP24(TypedDict): class PaymentMethodConfigurationCreateParamsP24DisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1030,7 +1030,7 @@ class PaymentMethodConfigurationCreateParamsPayByBank(TypedDict): class PaymentMethodConfigurationCreateParamsPayByBankDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1046,7 +1046,7 @@ class PaymentMethodConfigurationCreateParamsPayco(TypedDict): class PaymentMethodConfigurationCreateParamsPaycoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1062,7 +1062,7 @@ class PaymentMethodConfigurationCreateParamsPaynow(TypedDict): class PaymentMethodConfigurationCreateParamsPaynowDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1078,7 +1078,7 @@ class PaymentMethodConfigurationCreateParamsPaypal(TypedDict): class PaymentMethodConfigurationCreateParamsPaypalDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1094,7 +1094,7 @@ class PaymentMethodConfigurationCreateParamsPaypay(TypedDict): class PaymentMethodConfigurationCreateParamsPaypayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1110,7 +1110,7 @@ class PaymentMethodConfigurationCreateParamsPayto(TypedDict): class PaymentMethodConfigurationCreateParamsPaytoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1126,7 +1126,7 @@ class PaymentMethodConfigurationCreateParamsPix(TypedDict): class PaymentMethodConfigurationCreateParamsPixDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1144,7 +1144,7 @@ class PaymentMethodConfigurationCreateParamsPromptpay(TypedDict): class PaymentMethodConfigurationCreateParamsPromptpayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1160,7 +1160,7 @@ class PaymentMethodConfigurationCreateParamsQris(TypedDict): class PaymentMethodConfigurationCreateParamsQrisDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1178,7 +1178,7 @@ class PaymentMethodConfigurationCreateParamsRevolutPay(TypedDict): class PaymentMethodConfigurationCreateParamsRevolutPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1196,7 +1196,7 @@ class PaymentMethodConfigurationCreateParamsSamsungPay(TypedDict): class PaymentMethodConfigurationCreateParamsSamsungPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1214,7 +1214,7 @@ class PaymentMethodConfigurationCreateParamsSatispay(TypedDict): class PaymentMethodConfigurationCreateParamsSatispayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1232,7 +1232,7 @@ class PaymentMethodConfigurationCreateParamsScalapay(TypedDict): class PaymentMethodConfigurationCreateParamsScalapayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1250,7 +1250,7 @@ class PaymentMethodConfigurationCreateParamsSepaDebit(TypedDict): class PaymentMethodConfigurationCreateParamsSepaDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1268,7 +1268,7 @@ class PaymentMethodConfigurationCreateParamsShopeepay(TypedDict): class PaymentMethodConfigurationCreateParamsShopeepayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1284,7 +1284,7 @@ class PaymentMethodConfigurationCreateParamsSofort(TypedDict): class PaymentMethodConfigurationCreateParamsSofortDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1300,7 +1300,7 @@ class PaymentMethodConfigurationCreateParamsSunbit(TypedDict): class PaymentMethodConfigurationCreateParamsSunbitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1316,7 +1316,7 @@ class PaymentMethodConfigurationCreateParamsSwish(TypedDict): class PaymentMethodConfigurationCreateParamsSwishDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1332,7 +1332,7 @@ class PaymentMethodConfigurationCreateParamsTwint(TypedDict): class PaymentMethodConfigurationCreateParamsTwintDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1348,7 +1348,7 @@ class PaymentMethodConfigurationCreateParamsUpi(TypedDict): class PaymentMethodConfigurationCreateParamsUpiDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1366,7 +1366,7 @@ class PaymentMethodConfigurationCreateParamsUsBankAccount(TypedDict): class PaymentMethodConfigurationCreateParamsUsBankAccountDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1384,7 +1384,7 @@ class PaymentMethodConfigurationCreateParamsWechatPay(TypedDict): class PaymentMethodConfigurationCreateParamsWechatPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1400,7 +1400,7 @@ class PaymentMethodConfigurationCreateParamsZip(TypedDict): class PaymentMethodConfigurationCreateParamsZipDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ diff --git a/stripe/params/_payment_method_configuration_modify_params.py b/stripe/params/_payment_method_configuration_modify_params.py index 7a3680b3b..b965969a0 100644 --- a/stripe/params/_payment_method_configuration_modify_params.py +++ b/stripe/params/_payment_method_configuration_modify_params.py @@ -314,7 +314,7 @@ class PaymentMethodConfigurationModifyParamsAcssDebit(TypedDict): class PaymentMethodConfigurationModifyParamsAcssDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -330,7 +330,7 @@ class PaymentMethodConfigurationModifyParamsAffirm(TypedDict): class PaymentMethodConfigurationModifyParamsAffirmDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -348,7 +348,7 @@ class PaymentMethodConfigurationModifyParamsAfterpayClearpay(TypedDict): class PaymentMethodConfigurationModifyParamsAfterpayClearpayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -364,7 +364,7 @@ class PaymentMethodConfigurationModifyParamsAlipay(TypedDict): class PaymentMethodConfigurationModifyParamsAlipayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -380,7 +380,7 @@ class PaymentMethodConfigurationModifyParamsAlma(TypedDict): class PaymentMethodConfigurationModifyParamsAlmaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -398,7 +398,7 @@ class PaymentMethodConfigurationModifyParamsAmazonPay(TypedDict): class PaymentMethodConfigurationModifyParamsAmazonPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -416,7 +416,7 @@ class PaymentMethodConfigurationModifyParamsApplePay(TypedDict): class PaymentMethodConfigurationModifyParamsApplePayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -434,7 +434,7 @@ class PaymentMethodConfigurationModifyParamsApplePayLater(TypedDict): class PaymentMethodConfigurationModifyParamsApplePayLaterDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -452,7 +452,7 @@ class PaymentMethodConfigurationModifyParamsAuBecsDebit(TypedDict): class PaymentMethodConfigurationModifyParamsAuBecsDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -470,7 +470,7 @@ class PaymentMethodConfigurationModifyParamsBacsDebit(TypedDict): class PaymentMethodConfigurationModifyParamsBacsDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -488,7 +488,7 @@ class PaymentMethodConfigurationModifyParamsBancontact(TypedDict): class PaymentMethodConfigurationModifyParamsBancontactDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -504,7 +504,7 @@ class PaymentMethodConfigurationModifyParamsBillie(TypedDict): class PaymentMethodConfigurationModifyParamsBillieDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -520,7 +520,7 @@ class PaymentMethodConfigurationModifyParamsBizum(TypedDict): class PaymentMethodConfigurationModifyParamsBizumDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -536,7 +536,7 @@ class PaymentMethodConfigurationModifyParamsBlik(TypedDict): class PaymentMethodConfigurationModifyParamsBlikDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -552,7 +552,7 @@ class PaymentMethodConfigurationModifyParamsBoleto(TypedDict): class PaymentMethodConfigurationModifyParamsBoletoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -568,7 +568,7 @@ class PaymentMethodConfigurationModifyParamsCard(TypedDict): class PaymentMethodConfigurationModifyParamsCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -586,7 +586,7 @@ class PaymentMethodConfigurationModifyParamsCartesBancaires(TypedDict): class PaymentMethodConfigurationModifyParamsCartesBancairesDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -604,7 +604,7 @@ class PaymentMethodConfigurationModifyParamsCashapp(TypedDict): class PaymentMethodConfigurationModifyParamsCashappDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -620,7 +620,7 @@ class PaymentMethodConfigurationModifyParamsCrypto(TypedDict): class PaymentMethodConfigurationModifyParamsCryptoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -638,7 +638,7 @@ class PaymentMethodConfigurationModifyParamsCustomerBalance(TypedDict): class PaymentMethodConfigurationModifyParamsCustomerBalanceDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -654,7 +654,7 @@ class PaymentMethodConfigurationModifyParamsEps(TypedDict): class PaymentMethodConfigurationModifyParamsEpsDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -670,7 +670,7 @@ class PaymentMethodConfigurationModifyParamsFpx(TypedDict): class PaymentMethodConfigurationModifyParamsFpxDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -688,7 +688,7 @@ class PaymentMethodConfigurationModifyParamsFrMealVoucherConecs(TypedDict): class PaymentMethodConfigurationModifyParamsFrMealVoucherConecsDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -706,7 +706,7 @@ class PaymentMethodConfigurationModifyParamsGiropay(TypedDict): class PaymentMethodConfigurationModifyParamsGiropayDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -724,7 +724,7 @@ class PaymentMethodConfigurationModifyParamsGooglePay(TypedDict): class PaymentMethodConfigurationModifyParamsGooglePayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -740,7 +740,7 @@ class PaymentMethodConfigurationModifyParamsGopay(TypedDict): class PaymentMethodConfigurationModifyParamsGopayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -758,7 +758,7 @@ class PaymentMethodConfigurationModifyParamsGrabpay(TypedDict): class PaymentMethodConfigurationModifyParamsGrabpayDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -776,7 +776,7 @@ class PaymentMethodConfigurationModifyParamsIdBankTransfer(TypedDict): class PaymentMethodConfigurationModifyParamsIdBankTransferDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -792,7 +792,7 @@ class PaymentMethodConfigurationModifyParamsIdeal(TypedDict): class PaymentMethodConfigurationModifyParamsIdealDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -808,7 +808,7 @@ class PaymentMethodConfigurationModifyParamsJcb(TypedDict): class PaymentMethodConfigurationModifyParamsJcbDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -826,7 +826,7 @@ class PaymentMethodConfigurationModifyParamsKakaoPay(TypedDict): class PaymentMethodConfigurationModifyParamsKakaoPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -842,7 +842,7 @@ class PaymentMethodConfigurationModifyParamsKlarna(TypedDict): class PaymentMethodConfigurationModifyParamsKlarnaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -860,7 +860,7 @@ class PaymentMethodConfigurationModifyParamsKonbini(TypedDict): class PaymentMethodConfigurationModifyParamsKonbiniDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -876,7 +876,7 @@ class PaymentMethodConfigurationModifyParamsKrCard(TypedDict): class PaymentMethodConfigurationModifyParamsKrCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -892,7 +892,7 @@ class PaymentMethodConfigurationModifyParamsLink(TypedDict): class PaymentMethodConfigurationModifyParamsLinkDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -908,7 +908,7 @@ class PaymentMethodConfigurationModifyParamsMbWay(TypedDict): class PaymentMethodConfigurationModifyParamsMbWayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -926,7 +926,7 @@ class PaymentMethodConfigurationModifyParamsMobilepay(TypedDict): class PaymentMethodConfigurationModifyParamsMobilepayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -944,7 +944,7 @@ class PaymentMethodConfigurationModifyParamsMultibanco(TypedDict): class PaymentMethodConfigurationModifyParamsMultibancoDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -962,7 +962,7 @@ class PaymentMethodConfigurationModifyParamsNaverPay(TypedDict): class PaymentMethodConfigurationModifyParamsNaverPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -980,7 +980,7 @@ class PaymentMethodConfigurationModifyParamsNzBankAccount(TypedDict): class PaymentMethodConfigurationModifyParamsNzBankAccountDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -996,7 +996,7 @@ class PaymentMethodConfigurationModifyParamsOxxo(TypedDict): class PaymentMethodConfigurationModifyParamsOxxoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1012,7 +1012,7 @@ class PaymentMethodConfigurationModifyParamsP24(TypedDict): class PaymentMethodConfigurationModifyParamsP24DisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1030,7 +1030,7 @@ class PaymentMethodConfigurationModifyParamsPayByBank(TypedDict): class PaymentMethodConfigurationModifyParamsPayByBankDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1046,7 +1046,7 @@ class PaymentMethodConfigurationModifyParamsPayco(TypedDict): class PaymentMethodConfigurationModifyParamsPaycoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1062,7 +1062,7 @@ class PaymentMethodConfigurationModifyParamsPaynow(TypedDict): class PaymentMethodConfigurationModifyParamsPaynowDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1078,7 +1078,7 @@ class PaymentMethodConfigurationModifyParamsPaypal(TypedDict): class PaymentMethodConfigurationModifyParamsPaypalDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1094,7 +1094,7 @@ class PaymentMethodConfigurationModifyParamsPaypay(TypedDict): class PaymentMethodConfigurationModifyParamsPaypayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1110,7 +1110,7 @@ class PaymentMethodConfigurationModifyParamsPayto(TypedDict): class PaymentMethodConfigurationModifyParamsPaytoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1126,7 +1126,7 @@ class PaymentMethodConfigurationModifyParamsPix(TypedDict): class PaymentMethodConfigurationModifyParamsPixDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1144,7 +1144,7 @@ class PaymentMethodConfigurationModifyParamsPromptpay(TypedDict): class PaymentMethodConfigurationModifyParamsPromptpayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1160,7 +1160,7 @@ class PaymentMethodConfigurationModifyParamsQris(TypedDict): class PaymentMethodConfigurationModifyParamsQrisDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1178,7 +1178,7 @@ class PaymentMethodConfigurationModifyParamsRevolutPay(TypedDict): class PaymentMethodConfigurationModifyParamsRevolutPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1196,7 +1196,7 @@ class PaymentMethodConfigurationModifyParamsSamsungPay(TypedDict): class PaymentMethodConfigurationModifyParamsSamsungPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1214,7 +1214,7 @@ class PaymentMethodConfigurationModifyParamsSatispay(TypedDict): class PaymentMethodConfigurationModifyParamsSatispayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1232,7 +1232,7 @@ class PaymentMethodConfigurationModifyParamsScalapay(TypedDict): class PaymentMethodConfigurationModifyParamsScalapayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1250,7 +1250,7 @@ class PaymentMethodConfigurationModifyParamsSepaDebit(TypedDict): class PaymentMethodConfigurationModifyParamsSepaDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1268,7 +1268,7 @@ class PaymentMethodConfigurationModifyParamsShopeepay(TypedDict): class PaymentMethodConfigurationModifyParamsShopeepayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1284,7 +1284,7 @@ class PaymentMethodConfigurationModifyParamsSofort(TypedDict): class PaymentMethodConfigurationModifyParamsSofortDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1300,7 +1300,7 @@ class PaymentMethodConfigurationModifyParamsSunbit(TypedDict): class PaymentMethodConfigurationModifyParamsSunbitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1316,7 +1316,7 @@ class PaymentMethodConfigurationModifyParamsSwish(TypedDict): class PaymentMethodConfigurationModifyParamsSwishDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1332,7 +1332,7 @@ class PaymentMethodConfigurationModifyParamsTwint(TypedDict): class PaymentMethodConfigurationModifyParamsTwintDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1348,7 +1348,7 @@ class PaymentMethodConfigurationModifyParamsUpi(TypedDict): class PaymentMethodConfigurationModifyParamsUpiDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1366,7 +1366,7 @@ class PaymentMethodConfigurationModifyParamsUsBankAccount(TypedDict): class PaymentMethodConfigurationModifyParamsUsBankAccountDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1384,7 +1384,7 @@ class PaymentMethodConfigurationModifyParamsWechatPay(TypedDict): class PaymentMethodConfigurationModifyParamsWechatPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1400,7 +1400,7 @@ class PaymentMethodConfigurationModifyParamsZip(TypedDict): class PaymentMethodConfigurationModifyParamsZipDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ diff --git a/stripe/params/_payment_method_configuration_update_params.py b/stripe/params/_payment_method_configuration_update_params.py index d9d192595..361635803 100644 --- a/stripe/params/_payment_method_configuration_update_params.py +++ b/stripe/params/_payment_method_configuration_update_params.py @@ -313,7 +313,7 @@ class PaymentMethodConfigurationUpdateParamsAcssDebit(TypedDict): class PaymentMethodConfigurationUpdateParamsAcssDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -329,7 +329,7 @@ class PaymentMethodConfigurationUpdateParamsAffirm(TypedDict): class PaymentMethodConfigurationUpdateParamsAffirmDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -347,7 +347,7 @@ class PaymentMethodConfigurationUpdateParamsAfterpayClearpay(TypedDict): class PaymentMethodConfigurationUpdateParamsAfterpayClearpayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -363,7 +363,7 @@ class PaymentMethodConfigurationUpdateParamsAlipay(TypedDict): class PaymentMethodConfigurationUpdateParamsAlipayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -379,7 +379,7 @@ class PaymentMethodConfigurationUpdateParamsAlma(TypedDict): class PaymentMethodConfigurationUpdateParamsAlmaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -397,7 +397,7 @@ class PaymentMethodConfigurationUpdateParamsAmazonPay(TypedDict): class PaymentMethodConfigurationUpdateParamsAmazonPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -415,7 +415,7 @@ class PaymentMethodConfigurationUpdateParamsApplePay(TypedDict): class PaymentMethodConfigurationUpdateParamsApplePayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -433,7 +433,7 @@ class PaymentMethodConfigurationUpdateParamsApplePayLater(TypedDict): class PaymentMethodConfigurationUpdateParamsApplePayLaterDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -451,7 +451,7 @@ class PaymentMethodConfigurationUpdateParamsAuBecsDebit(TypedDict): class PaymentMethodConfigurationUpdateParamsAuBecsDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -469,7 +469,7 @@ class PaymentMethodConfigurationUpdateParamsBacsDebit(TypedDict): class PaymentMethodConfigurationUpdateParamsBacsDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -487,7 +487,7 @@ class PaymentMethodConfigurationUpdateParamsBancontact(TypedDict): class PaymentMethodConfigurationUpdateParamsBancontactDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -503,7 +503,7 @@ class PaymentMethodConfigurationUpdateParamsBillie(TypedDict): class PaymentMethodConfigurationUpdateParamsBillieDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -519,7 +519,7 @@ class PaymentMethodConfigurationUpdateParamsBizum(TypedDict): class PaymentMethodConfigurationUpdateParamsBizumDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -535,7 +535,7 @@ class PaymentMethodConfigurationUpdateParamsBlik(TypedDict): class PaymentMethodConfigurationUpdateParamsBlikDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -551,7 +551,7 @@ class PaymentMethodConfigurationUpdateParamsBoleto(TypedDict): class PaymentMethodConfigurationUpdateParamsBoletoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -567,7 +567,7 @@ class PaymentMethodConfigurationUpdateParamsCard(TypedDict): class PaymentMethodConfigurationUpdateParamsCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -585,7 +585,7 @@ class PaymentMethodConfigurationUpdateParamsCartesBancaires(TypedDict): class PaymentMethodConfigurationUpdateParamsCartesBancairesDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -603,7 +603,7 @@ class PaymentMethodConfigurationUpdateParamsCashapp(TypedDict): class PaymentMethodConfigurationUpdateParamsCashappDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -619,7 +619,7 @@ class PaymentMethodConfigurationUpdateParamsCrypto(TypedDict): class PaymentMethodConfigurationUpdateParamsCryptoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -637,7 +637,7 @@ class PaymentMethodConfigurationUpdateParamsCustomerBalance(TypedDict): class PaymentMethodConfigurationUpdateParamsCustomerBalanceDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -653,7 +653,7 @@ class PaymentMethodConfigurationUpdateParamsEps(TypedDict): class PaymentMethodConfigurationUpdateParamsEpsDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -669,7 +669,7 @@ class PaymentMethodConfigurationUpdateParamsFpx(TypedDict): class PaymentMethodConfigurationUpdateParamsFpxDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -687,7 +687,7 @@ class PaymentMethodConfigurationUpdateParamsFrMealVoucherConecs(TypedDict): class PaymentMethodConfigurationUpdateParamsFrMealVoucherConecsDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -705,7 +705,7 @@ class PaymentMethodConfigurationUpdateParamsGiropay(TypedDict): class PaymentMethodConfigurationUpdateParamsGiropayDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -723,7 +723,7 @@ class PaymentMethodConfigurationUpdateParamsGooglePay(TypedDict): class PaymentMethodConfigurationUpdateParamsGooglePayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -739,7 +739,7 @@ class PaymentMethodConfigurationUpdateParamsGopay(TypedDict): class PaymentMethodConfigurationUpdateParamsGopayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -757,7 +757,7 @@ class PaymentMethodConfigurationUpdateParamsGrabpay(TypedDict): class PaymentMethodConfigurationUpdateParamsGrabpayDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -775,7 +775,7 @@ class PaymentMethodConfigurationUpdateParamsIdBankTransfer(TypedDict): class PaymentMethodConfigurationUpdateParamsIdBankTransferDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -791,7 +791,7 @@ class PaymentMethodConfigurationUpdateParamsIdeal(TypedDict): class PaymentMethodConfigurationUpdateParamsIdealDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -807,7 +807,7 @@ class PaymentMethodConfigurationUpdateParamsJcb(TypedDict): class PaymentMethodConfigurationUpdateParamsJcbDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -825,7 +825,7 @@ class PaymentMethodConfigurationUpdateParamsKakaoPay(TypedDict): class PaymentMethodConfigurationUpdateParamsKakaoPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -841,7 +841,7 @@ class PaymentMethodConfigurationUpdateParamsKlarna(TypedDict): class PaymentMethodConfigurationUpdateParamsKlarnaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -859,7 +859,7 @@ class PaymentMethodConfigurationUpdateParamsKonbini(TypedDict): class PaymentMethodConfigurationUpdateParamsKonbiniDisplayPreference( TypedDict ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -875,7 +875,7 @@ class PaymentMethodConfigurationUpdateParamsKrCard(TypedDict): class PaymentMethodConfigurationUpdateParamsKrCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -891,7 +891,7 @@ class PaymentMethodConfigurationUpdateParamsLink(TypedDict): class PaymentMethodConfigurationUpdateParamsLinkDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -907,7 +907,7 @@ class PaymentMethodConfigurationUpdateParamsMbWay(TypedDict): class PaymentMethodConfigurationUpdateParamsMbWayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -925,7 +925,7 @@ class PaymentMethodConfigurationUpdateParamsMobilepay(TypedDict): class PaymentMethodConfigurationUpdateParamsMobilepayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -943,7 +943,7 @@ class PaymentMethodConfigurationUpdateParamsMultibanco(TypedDict): class PaymentMethodConfigurationUpdateParamsMultibancoDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -961,7 +961,7 @@ class PaymentMethodConfigurationUpdateParamsNaverPay(TypedDict): class PaymentMethodConfigurationUpdateParamsNaverPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -979,7 +979,7 @@ class PaymentMethodConfigurationUpdateParamsNzBankAccount(TypedDict): class PaymentMethodConfigurationUpdateParamsNzBankAccountDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -995,7 +995,7 @@ class PaymentMethodConfigurationUpdateParamsOxxo(TypedDict): class PaymentMethodConfigurationUpdateParamsOxxoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1011,7 +1011,7 @@ class PaymentMethodConfigurationUpdateParamsP24(TypedDict): class PaymentMethodConfigurationUpdateParamsP24DisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1029,7 +1029,7 @@ class PaymentMethodConfigurationUpdateParamsPayByBank(TypedDict): class PaymentMethodConfigurationUpdateParamsPayByBankDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1045,7 +1045,7 @@ class PaymentMethodConfigurationUpdateParamsPayco(TypedDict): class PaymentMethodConfigurationUpdateParamsPaycoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1061,7 +1061,7 @@ class PaymentMethodConfigurationUpdateParamsPaynow(TypedDict): class PaymentMethodConfigurationUpdateParamsPaynowDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1077,7 +1077,7 @@ class PaymentMethodConfigurationUpdateParamsPaypal(TypedDict): class PaymentMethodConfigurationUpdateParamsPaypalDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1093,7 +1093,7 @@ class PaymentMethodConfigurationUpdateParamsPaypay(TypedDict): class PaymentMethodConfigurationUpdateParamsPaypayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1109,7 +1109,7 @@ class PaymentMethodConfigurationUpdateParamsPayto(TypedDict): class PaymentMethodConfigurationUpdateParamsPaytoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1125,7 +1125,7 @@ class PaymentMethodConfigurationUpdateParamsPix(TypedDict): class PaymentMethodConfigurationUpdateParamsPixDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1143,7 +1143,7 @@ class PaymentMethodConfigurationUpdateParamsPromptpay(TypedDict): class PaymentMethodConfigurationUpdateParamsPromptpayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1159,7 +1159,7 @@ class PaymentMethodConfigurationUpdateParamsQris(TypedDict): class PaymentMethodConfigurationUpdateParamsQrisDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1177,7 +1177,7 @@ class PaymentMethodConfigurationUpdateParamsRevolutPay(TypedDict): class PaymentMethodConfigurationUpdateParamsRevolutPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1195,7 +1195,7 @@ class PaymentMethodConfigurationUpdateParamsSamsungPay(TypedDict): class PaymentMethodConfigurationUpdateParamsSamsungPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1213,7 +1213,7 @@ class PaymentMethodConfigurationUpdateParamsSatispay(TypedDict): class PaymentMethodConfigurationUpdateParamsSatispayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1231,7 +1231,7 @@ class PaymentMethodConfigurationUpdateParamsScalapay(TypedDict): class PaymentMethodConfigurationUpdateParamsScalapayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1249,7 +1249,7 @@ class PaymentMethodConfigurationUpdateParamsSepaDebit(TypedDict): class PaymentMethodConfigurationUpdateParamsSepaDebitDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1267,7 +1267,7 @@ class PaymentMethodConfigurationUpdateParamsShopeepay(TypedDict): class PaymentMethodConfigurationUpdateParamsShopeepayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1283,7 +1283,7 @@ class PaymentMethodConfigurationUpdateParamsSofort(TypedDict): class PaymentMethodConfigurationUpdateParamsSofortDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1299,7 +1299,7 @@ class PaymentMethodConfigurationUpdateParamsSunbit(TypedDict): class PaymentMethodConfigurationUpdateParamsSunbitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1315,7 +1315,7 @@ class PaymentMethodConfigurationUpdateParamsSwish(TypedDict): class PaymentMethodConfigurationUpdateParamsSwishDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1331,7 +1331,7 @@ class PaymentMethodConfigurationUpdateParamsTwint(TypedDict): class PaymentMethodConfigurationUpdateParamsTwintDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1347,7 +1347,7 @@ class PaymentMethodConfigurationUpdateParamsUpi(TypedDict): class PaymentMethodConfigurationUpdateParamsUpiDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1365,7 +1365,7 @@ class PaymentMethodConfigurationUpdateParamsUsBankAccount(TypedDict): class PaymentMethodConfigurationUpdateParamsUsBankAccountDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1383,7 +1383,7 @@ class PaymentMethodConfigurationUpdateParamsWechatPay(TypedDict): class PaymentMethodConfigurationUpdateParamsWechatPayDisplayPreference( TypedDict, ): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ @@ -1399,7 +1399,7 @@ class PaymentMethodConfigurationUpdateParamsZip(TypedDict): class PaymentMethodConfigurationUpdateParamsZipDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] + preference: NotRequired["Literal['none', 'off', 'on']|str"] """ The account's preference for whether or not to display this payment method. """ diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index 6549a3e80..cbd91e9f9 100644 --- a/stripe/params/_payment_method_create_params.py +++ b/stripe/params/_payment_method_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -23,7 +23,9 @@ class PaymentMethodCreateParams(RequestOptions): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -280,72 +282,7 @@ class PaymentMethodCreateParams(RequestOptions): If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ type: NotRequired[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "custom", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", - ] + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -528,7 +465,9 @@ class PaymentMethodCreateParamsCard(TypedDict): class PaymentMethodCreateParamsCardNetworks(TypedDict): - preferred: NotRequired[Literal["cartes_bancaires", "mastercard", "visa"]] + preferred: NotRequired[ + "Literal['cartes_bancaires', 'mastercard', 'visa']|str" + ] """ The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. """ @@ -645,7 +584,7 @@ class PaymentMethodCreateParamsGrabpay(TypedDict): class PaymentMethodCreateParamsIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: NotRequired["Literal['bca', 'bni', 'bri', 'cimb', 'permata']|str"] """ Bank where the account is held. """ @@ -736,7 +675,7 @@ class PaymentMethodCreateParamsMultibanco(TypedDict): class PaymentMethodCreateParamsNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] + funding: NotRequired["Literal['card', 'points']|str"] """ Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ @@ -772,34 +711,7 @@ class PaymentMethodCreateParamsOxxo(TypedDict): class PaymentMethodCreateParamsP24(TypedDict): bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']|str" ] """ The customer's bank. @@ -910,7 +822,7 @@ class PaymentMethodCreateParamsShopeepay(TypedDict): class PaymentMethodCreateParamsSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ Two-letter ISO code representing the country the bank account is located in. """ @@ -951,7 +863,7 @@ class PaymentMethodCreateParamsUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -966,7 +878,7 @@ class PaymentMethodCreateParamsUpiMandateOptions(TypedDict): class PaymentMethodCreateParamsUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -974,7 +886,7 @@ class PaymentMethodCreateParamsUsBankAccount(TypedDict): """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ diff --git a/stripe/params/_payment_method_list_params.py b/stripe/params/_payment_method_list_params.py index 6ee7970cd..869a9d355 100644 --- a/stripe/params/_payment_method_list_params.py +++ b/stripe/params/_payment_method_list_params.py @@ -6,7 +6,9 @@ class PaymentMethodListParams(RequestOptions): - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. """ @@ -35,72 +37,7 @@ class PaymentMethodListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ type: NotRequired[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "custom", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", - ] + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']|str" ] """ Filters the list by the object `type` field. Unfiltered, the list returns all payment method types except `custom`. If your integration expects only one type of payment method in the response, specify that type value in the request to reduce your payload. diff --git a/stripe/params/_payment_method_modify_params.py b/stripe/params/_payment_method_modify_params.py index e6efa9a6e..0ea1fa8ac 100644 --- a/stripe/params/_payment_method_modify_params.py +++ b/stripe/params/_payment_method_modify_params.py @@ -7,7 +7,9 @@ class PaymentMethodModifyParams(RequestOptions): - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -112,7 +114,7 @@ class PaymentMethodModifyParamsCard(TypedDict): class PaymentMethodModifyParamsCardNetworks(TypedDict): preferred: NotRequired[ - "Literal['']|Literal['cartes_bancaires', 'mastercard', 'visa']" + "Literal['']|Literal['cartes_bancaires', 'mastercard', 'visa']|str" ] """ The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. @@ -146,11 +148,11 @@ class PaymentMethodModifyParamsPayto(TypedDict): class PaymentMethodModifyParamsUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Bank account holder type. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Bank account type. """ diff --git a/stripe/params/_payment_method_update_params.py b/stripe/params/_payment_method_update_params.py index c050a70f3..4867ebd10 100644 --- a/stripe/params/_payment_method_update_params.py +++ b/stripe/params/_payment_method_update_params.py @@ -6,7 +6,9 @@ class PaymentMethodUpdateParams(TypedDict): - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -111,7 +113,7 @@ class PaymentMethodUpdateParamsCard(TypedDict): class PaymentMethodUpdateParamsCardNetworks(TypedDict): preferred: NotRequired[ - "Literal['']|Literal['cartes_bancaires', 'mastercard', 'visa']" + "Literal['']|Literal['cartes_bancaires', 'mastercard', 'visa']|str" ] """ The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. @@ -145,11 +147,11 @@ class PaymentMethodUpdateParamsPayto(TypedDict): class PaymentMethodUpdateParamsUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Bank account holder type. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Bank account type. """ diff --git a/stripe/params/_payment_record_create_params.py b/stripe/params/_payment_record_create_params.py index 3a0c5835c..37f86dcea 100644 --- a/stripe/params/_payment_record_create_params.py +++ b/stripe/params/_payment_record_create_params.py @@ -38,23 +38,7 @@ class PaymentRecordCreateParams(RequestOptions): Processor information for this payment. """ reason: NotRequired[ - Literal[ - "bank_cannot_process", - "check_returned", - "credit_not_processed", - "customer_initiated", - "debit_not_authorized", - "duplicate", - "fraudulent", - "general", - "incorrect_account_details", - "insufficient_funds", - "noncompliant", - "product_not_received", - "product_unacceptable", - "subscription_canceled", - "unrecognized", - ] + "Literal['bank_cannot_process', 'check_returned', 'credit_not_processed', 'customer_initiated', 'debit_not_authorized', 'duplicate', 'fraudulent', 'general', 'incorrect_account_details', 'insufficient_funds', 'noncompliant', 'product_not_received', 'product_unacceptable', 'subscription_canceled', 'unrecognized']|str" ] """ The reason the payment was disputed. diff --git a/stripe/params/_payment_record_report_payment_attempt_failed_params.py b/stripe/params/_payment_record_report_payment_attempt_failed_params.py index 13c1012a8..1816b3abb 100644 --- a/stripe/params/_payment_record_report_payment_attempt_failed_params.py +++ b/stripe/params/_payment_record_report_payment_attempt_failed_params.py @@ -16,10 +16,7 @@ class PaymentRecordReportPaymentAttemptFailedParams(RequestOptions): When the reported payment failed. Measured in seconds since the Unix epoch. """ failure_code: NotRequired[ - Literal[ - "payment_method_customer_decline", - "payment_method_provider_unknown_outcome", - ] + "Literal['payment_method_customer_decline', 'payment_method_provider_unknown_outcome']|str" ] """ The failure code for this payment attempt. Must be one of `payment_method_customer_decline` or `payment_method_provider_unknown_outcome`. @@ -78,18 +75,20 @@ class PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetailsCardCheck TypedDict, ): address_line1_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's address line 1. """ address_postal_code_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's postal code. """ - cvc_check: NotRequired[Literal["fail", "pass", "unavailable", "unchecked"]] + cvc_check: NotRequired[ + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" + ] """ The result of the check on the card's CVC. """ diff --git a/stripe/params/_payment_record_report_payment_attempt_guaranteed_params.py b/stripe/params/_payment_record_report_payment_attempt_guaranteed_params.py index a27beb46d..bb2b36d9a 100644 --- a/stripe/params/_payment_record_report_payment_attempt_guaranteed_params.py +++ b/stripe/params/_payment_record_report_payment_attempt_guaranteed_params.py @@ -69,18 +69,20 @@ class PaymentRecordReportPaymentAttemptGuaranteedParamsPaymentMethodDetailsCardC TypedDict, ): address_line1_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's address line 1. """ address_postal_code_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's postal code. """ - cvc_check: NotRequired[Literal["fail", "pass", "unavailable", "unchecked"]] + cvc_check: NotRequired[ + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" + ] """ The result of the check on the card's CVC. """ diff --git a/stripe/params/_payment_record_report_payment_attempt_params.py b/stripe/params/_payment_record_report_payment_attempt_params.py index 4709bf993..8a99b9e6c 100644 --- a/stripe/params/_payment_record_report_payment_attempt_params.py +++ b/stripe/params/_payment_record_report_payment_attempt_params.py @@ -35,7 +35,7 @@ class PaymentRecordReportPaymentAttemptParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - outcome: NotRequired[Literal["failed", "guaranteed"]] + outcome: NotRequired["Literal['failed', 'guaranteed']|str"] """ The outcome of the reported payment. """ @@ -59,10 +59,7 @@ class PaymentRecordReportPaymentAttemptParamsFailed(TypedDict): When the reported payment failed. Measured in seconds since the Unix epoch. """ failure_code: NotRequired[ - Literal[ - "payment_method_customer_decline", - "payment_method_provider_unknown_outcome", - ] + "Literal['payment_method_customer_decline', 'payment_method_provider_unknown_outcome']|str" ] """ The failure code for this payment attempt. Must be one of `payment_method_customer_decline` or `payment_method_provider_unknown_outcome`. @@ -165,7 +162,7 @@ class PaymentRecordReportPaymentAttemptParamsPaymentMethodDetails(TypedDict): """ ID of the Stripe Payment Method used to make this payment. """ - type: NotRequired[Literal["card", "custom"]] + type: NotRequired["Literal['card', 'custom']|str"] """ The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. """ @@ -238,18 +235,20 @@ class PaymentRecordReportPaymentAttemptParamsPaymentMethodDetailsCardChecks( TypedDict, ): address_line1_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's address line 1. """ address_postal_code_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's postal code. """ - cvc_check: NotRequired[Literal["fail", "pass", "unavailable", "unchecked"]] + cvc_check: NotRequired[ + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" + ] """ The result of the check on the card's CVC. """ diff --git a/stripe/params/_payment_record_report_payment_params.py b/stripe/params/_payment_record_report_payment_params.py index b5c4473eb..17da4e179 100644 --- a/stripe/params/_payment_record_report_payment_params.py +++ b/stripe/params/_payment_record_report_payment_params.py @@ -17,7 +17,7 @@ class PaymentRecordReportPaymentParams(RequestOptions): """ Customer information for this payment. """ - customer_presence: NotRequired[Literal["off_session", "on_session"]] + customer_presence: NotRequired["Literal['off_session', 'on_session']|str"] """ Indicates whether the customer was present in your checkout flow during this payment. """ @@ -47,7 +47,7 @@ class PaymentRecordReportPaymentParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - outcome: NotRequired[Literal["failed", "guaranteed"]] + outcome: NotRequired["Literal['failed', 'guaranteed']|str"] """ The outcome of the reported payment. """ @@ -107,10 +107,7 @@ class PaymentRecordReportPaymentParamsFailed(TypedDict): When the reported payment failed. Measured in seconds since the Unix epoch. """ failure_code: NotRequired[ - Literal[ - "payment_method_customer_decline", - "payment_method_provider_unknown_outcome", - ] + "Literal['payment_method_customer_decline', 'payment_method_provider_unknown_outcome']|str" ] """ The failure code for this payment attempt. Must be one of `payment_method_customer_decline` or `payment_method_provider_unknown_outcome`. @@ -209,7 +206,7 @@ class PaymentRecordReportPaymentParamsPaymentMethodDetails(TypedDict): """ ID of the Stripe Payment Method used to make this payment. """ - type: NotRequired[Literal["card", "custom"]] + type: NotRequired["Literal['card', 'custom']|str"] """ The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. """ @@ -280,18 +277,20 @@ class PaymentRecordReportPaymentParamsPaymentMethodDetailsCardChecks( TypedDict ): address_line1_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's address line 1. """ address_postal_code_check: NotRequired[ - Literal["fail", "pass", "unavailable", "unchecked"] + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" ] """ The result of the check on the cardholder's postal code. """ - cvc_check: NotRequired[Literal["fail", "pass", "unavailable", "unchecked"]] + cvc_check: NotRequired[ + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" + ] """ The result of the check on the card's CVC. """ diff --git a/stripe/params/_payment_record_report_refund_params.py b/stripe/params/_payment_record_report_refund_params.py index 426f06a13..fd5ef12ba 100644 --- a/stripe/params/_payment_record_report_refund_params.py +++ b/stripe/params/_payment_record_report_refund_params.py @@ -29,7 +29,7 @@ class PaymentRecordReportRefundParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - outcome: NotRequired[Literal["failed", "refunded"]] + outcome: NotRequired["Literal['failed', 'refunded']|str"] """ The outcome of the reported refund. """ @@ -38,7 +38,7 @@ class PaymentRecordReportRefundParams(RequestOptions): Processor information for this refund. """ reason: NotRequired[ - Literal["duplicate", "fraudulent", "requested_by_customer"] + "Literal['duplicate', 'fraudulent', 'requested_by_customer']|str" ] """ The reason for the refund. One of `duplicate`, `fraudulent`, or `requested_by_customer`. @@ -70,15 +70,7 @@ class PaymentRecordReportRefundParamsFailed(TypedDict): When the reported refund failed. Measured in seconds since the Unix epoch. """ failure_reason: NotRequired[ - Literal[ - "charge_for_pending_refund_disputed", - "declined", - "expired_or_canceled_card", - "insufficient_funds", - "lost_or_stolen_card", - "merchant_request", - "unknown", - ] + "Literal['charge_for_pending_refund_disputed', 'declined', 'expired_or_canceled_card', 'insufficient_funds', 'lost_or_stolen_card', 'merchant_request', 'unknown']|str" ] """ Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. diff --git a/stripe/params/_plan_create_params.py b/stripe/params/_plan_create_params.py index b2f5459bf..4ff55f758 100644 --- a/stripe/params/_plan_create_params.py +++ b/stripe/params/_plan_create_params.py @@ -63,7 +63,7 @@ class PlanCreateParams(RequestOptions): """ Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. """ - tiers_mode: NotRequired[Literal["graduated", "volume"]] + tiers_mode: NotRequired["Literal['graduated', 'volume']|str"] """ Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. """ @@ -157,7 +157,7 @@ class PlanCreateParamsTransformUsage(TypedDict): """ Divide usage by this number. """ - round: Literal["down", "up"] + round: Union[Literal["down", "up"], str] """ After division, either round the result `up` or `down`. """ diff --git a/stripe/params/_price_create_params.py b/stripe/params/_price_create_params.py index 829104990..43205cb25 100644 --- a/stripe/params/_price_create_params.py +++ b/stripe/params/_price_create_params.py @@ -70,7 +70,7 @@ class PriceCreateParams(RequestOptions): """ Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. """ - tiers_mode: NotRequired[Literal["graduated", "volume"]] + tiers_mode: NotRequired["Literal['graduated', 'volume']|str"] """ Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. """ @@ -277,7 +277,7 @@ class PriceCreateParamsTransformQuantity(TypedDict): """ Divide usage by this number. """ - round: Literal["down", "up"] + round: Union[Literal["down", "up"], str] """ After division, either round the result `up` or `down`. """ diff --git a/stripe/params/_quote_create_params.py b/stripe/params/_quote_create_params.py index e87080362..dc6cfde08 100644 --- a/stripe/params/_quote_create_params.py +++ b/stripe/params/_quote_create_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -126,7 +126,7 @@ class QuoteCreateParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -160,14 +160,14 @@ class QuoteCreateParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteCreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -204,7 +204,7 @@ class QuoteCreateParamsInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -265,14 +265,14 @@ class QuoteCreateParamsLineItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteCreateParamsLineItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -329,7 +329,9 @@ class QuoteCreateParamsLine(TypedDict): """ Details to identify the subscription schedule the quote line applies to. """ - billing_cycle_anchor: NotRequired[Literal["automatic", "line_starts_at"]] + billing_cycle_anchor: NotRequired[ + "Literal['automatic', 'line_starts_at']|str" + ] """ For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. """ @@ -339,7 +341,9 @@ class QuoteCreateParamsLine(TypedDict): """ A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. """ - effective_at: NotRequired[Literal["billing_period_start", "line_start"]] + effective_at: NotRequired[ + "Literal['billing_period_start', 'line_start']|str" + ] """ Configures how the quote handles billing for line transitions. """ @@ -348,7 +352,7 @@ class QuoteCreateParamsLine(TypedDict): Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. @@ -359,7 +363,9 @@ class QuoteCreateParamsLine(TypedDict): """ Defines how to pause collection for the underlying subscription throughout the duration of the amendment. """ - set_schedule_end: NotRequired[Literal["line_ends_at", "line_starts_at"]] + set_schedule_end: NotRequired[ + "Literal['line_ends_at', 'line_starts_at']|str" + ] """ Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. """ @@ -412,18 +418,21 @@ class QuoteCreateParamsLineAction(TypedDict): """ Details for the `set_metadata` type: specify an array of key-value pairs. """ - type: Literal[ - "add_discount", - "add_item", - "add_metadata", - "clear_discounts", - "clear_metadata", - "remove_discount", - "remove_item", - "remove_metadata", - "set_discounts", - "set_items", - "set_metadata", + type: Union[ + Literal[ + "add_discount", + "add_item", + "add_metadata", + "clear_discounts", + "clear_metadata", + "remove_discount", + "remove_item", + "remove_metadata", + "set_discounts", + "set_items", + "set_metadata", + ], + str, ] """ The type of action the quote line performs. @@ -474,7 +483,7 @@ class QuoteCreateParamsLineActionAddDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -490,7 +499,7 @@ class QuoteCreateParamsLineActionAddDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -588,14 +597,14 @@ class QuoteCreateParamsLineActionAddItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteCreateParamsLineActionAddItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -613,7 +622,7 @@ class QuoteCreateParamsLineActionAddItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -629,7 +638,7 @@ class QuoteCreateParamsLineActionAddItemDiscountSettingsServicePeriodAnchorConfi """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -665,7 +674,7 @@ class QuoteCreateParamsLineActionAddItemTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -720,7 +729,7 @@ class QuoteCreateParamsLineActionSetDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -736,7 +745,7 @@ class QuoteCreateParamsLineActionSetDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -834,14 +843,14 @@ class QuoteCreateParamsLineActionSetItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteCreateParamsLineActionSetItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -859,7 +868,7 @@ class QuoteCreateParamsLineActionSetItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -875,7 +884,7 @@ class QuoteCreateParamsLineActionSetItemDiscountSettingsServicePeriodAnchorConfi """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -911,7 +920,7 @@ class QuoteCreateParamsLineActionSetItemTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -926,7 +935,7 @@ class QuoteCreateParamsLineAppliesTo(TypedDict): """ The ID of the schedule the line applies to. """ - type: Literal["new_reference", "subscription_schedule"] + type: Union[Literal["new_reference", "subscription_schedule"], str] """ Describes whether the quote line is affecting a new schedule or an existing schedule. """ @@ -960,14 +969,17 @@ class QuoteCreateParamsLineEndsAt(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "billing_period_end", - "discount_end", - "duration", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "billing_period_end", + "discount_end", + "duration", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ Select a way to pass in `ends_at`. @@ -982,7 +994,7 @@ class QuoteCreateParamsLineEndsAtDiscountEnd(TypedDict): class QuoteCreateParamsLineEndsAtDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -997,14 +1009,16 @@ class QuoteCreateParamsLineSetPauseCollection(TypedDict): """ Details of the pause_collection behavior to apply to the amendment. """ - type: Literal["remove", "set"] + type: Union[Literal["remove", "set"], str] """ Determines the type of the pause_collection amendment. """ class QuoteCreateParamsLineSetPauseCollectionSet(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -1023,14 +1037,17 @@ class QuoteCreateParamsLineStartsAt(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "discount_end", - "line_ends_at", - "now", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "discount_end", + "line_ends_at", + "now", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ Select a way to pass in `starts_at`. @@ -1059,7 +1076,7 @@ class QuoteCreateParamsLineTrialSettings(TypedDict): class QuoteCreateParamsLineTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] + prorate_up_front: NotRequired["Literal['defer', 'include']|str"] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -1102,7 +1119,7 @@ class QuoteCreateParamsSubscriptionData(TypedDict): """ When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. """ - end_behavior: NotRequired[Literal["cancel", "release"]] + end_behavior: NotRequired["Literal['cancel', 'release']|str"] """ Behavior of the subscription schedule and underlying subscription when it ends. """ @@ -1115,7 +1132,7 @@ class QuoteCreateParamsSubscriptionData(TypedDict): Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + "Literal['billing_period_start', 'phase_start']|str" ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. @@ -1170,12 +1187,15 @@ class QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillFrom(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", + type: Union[ + Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ], + str, ] """ The type of method to specify the `bill_from` time. @@ -1212,12 +1232,15 @@ class QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1227,7 +1250,7 @@ class QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): class QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1257,7 +1280,7 @@ class QuoteCreateParamsSubscriptionDataBillingMode(TypedDict): """ Configure behavior for flexible billing mode. """ - type: Literal["classic", "flexible"] + type: Union[Literal["classic", "flexible"], str] """ Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. """ @@ -1354,12 +1377,15 @@ class QuoteCreateParamsSubscriptionDataBillingScheduleBillUntil(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1369,7 +1395,7 @@ class QuoteCreateParamsSubscriptionDataBillingScheduleBillUntil(TypedDict): class QuoteCreateParamsSubscriptionDataBillingScheduleBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1430,12 +1456,12 @@ class QuoteCreateParamsSubscriptionDataOverride(TypedDict): """ The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. """ - end_behavior: NotRequired[Literal["cancel", "release"]] + end_behavior: NotRequired["Literal['cancel', 'release']|str"] """ Behavior of the subscription schedule and underlying subscription when it ends. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + "Literal['billing_period_start', 'phase_start']|str" ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. @@ -1463,7 +1489,7 @@ class QuoteCreateParamsSubscriptionDataOverrideAppliesTo(TypedDict): """ The ID of the schedule the line applies to. """ - type: Literal["new_reference", "subscription_schedule"] + type: Union[Literal["new_reference", "subscription_schedule"], str] """ Describes whether the quote line is affecting a new schedule or an existing schedule. """ @@ -1497,12 +1523,15 @@ class QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom( """ A precise Unix timestamp. """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", + type: Union[ + Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ], + str, ] """ The type of method to specify the `bill_from` time. @@ -1541,12 +1570,15 @@ class QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1556,7 +1588,7 @@ class QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( class QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1675,12 +1707,15 @@ class QuoteCreateParamsSubscriptionDataOverrideBillingScheduleBillUntil( """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1690,7 +1725,7 @@ class QuoteCreateParamsSubscriptionDataOverrideBillingScheduleBillUntil( class QuoteCreateParamsSubscriptionDataOverrideBillingScheduleBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ diff --git a/stripe/params/_quote_list_params.py b/stripe/params/_quote_list_params.py index e5bb1b556..6958cca38 100644 --- a/stripe/params/_quote_list_params.py +++ b/stripe/params/_quote_list_params.py @@ -35,7 +35,7 @@ class QuoteListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ status: NotRequired[ - Literal["accepted", "accepting", "canceled", "draft", "open", "stale"] + "Literal['accepted', 'accepting', 'canceled', 'draft', 'open', 'stale']|str" ] """ The status of the quote. diff --git a/stripe/params/_quote_modify_params.py b/stripe/params/_quote_modify_params.py index c3f0388e5..436c35ba2 100644 --- a/stripe/params/_quote_modify_params.py +++ b/stripe/params/_quote_modify_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -118,7 +118,7 @@ class QuoteModifyParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -152,14 +152,14 @@ class QuoteModifyParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteModifyParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -185,7 +185,7 @@ class QuoteModifyParamsInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -250,14 +250,14 @@ class QuoteModifyParamsLineItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteModifyParamsLineItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -314,7 +314,9 @@ class QuoteModifyParamsLine(TypedDict): """ Details to identify the subscription schedule the quote line applies to. """ - billing_cycle_anchor: NotRequired[Literal["automatic", "line_starts_at"]] + billing_cycle_anchor: NotRequired[ + "Literal['automatic', 'line_starts_at']|str" + ] """ For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. """ @@ -324,7 +326,9 @@ class QuoteModifyParamsLine(TypedDict): """ A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. """ - effective_at: NotRequired[Literal["billing_period_start", "line_start"]] + effective_at: NotRequired[ + "Literal['billing_period_start', 'line_start']|str" + ] """ Configures how the quote handles billing for line transitions. """ @@ -337,7 +341,7 @@ class QuoteModifyParamsLine(TypedDict): The ID of an existing line on the quote. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. @@ -348,7 +352,9 @@ class QuoteModifyParamsLine(TypedDict): """ Defines how to pause collection for the underlying subscription throughout the duration of the amendment. """ - set_schedule_end: NotRequired[Literal["line_ends_at", "line_starts_at"]] + set_schedule_end: NotRequired[ + "Literal['line_ends_at', 'line_starts_at']|str" + ] """ Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. """ @@ -401,18 +407,21 @@ class QuoteModifyParamsLineAction(TypedDict): """ Details for the `set_metadata` type: specify an array of key-value pairs. """ - type: Literal[ - "add_discount", - "add_item", - "add_metadata", - "clear_discounts", - "clear_metadata", - "remove_discount", - "remove_item", - "remove_metadata", - "set_discounts", - "set_items", - "set_metadata", + type: Union[ + Literal[ + "add_discount", + "add_item", + "add_metadata", + "clear_discounts", + "clear_metadata", + "remove_discount", + "remove_item", + "remove_metadata", + "set_discounts", + "set_items", + "set_metadata", + ], + str, ] """ The type of action the quote line performs. @@ -463,7 +472,7 @@ class QuoteModifyParamsLineActionAddDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -479,7 +488,7 @@ class QuoteModifyParamsLineActionAddDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -577,14 +586,14 @@ class QuoteModifyParamsLineActionAddItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteModifyParamsLineActionAddItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -602,7 +611,7 @@ class QuoteModifyParamsLineActionAddItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -618,7 +627,7 @@ class QuoteModifyParamsLineActionAddItemDiscountSettingsServicePeriodAnchorConfi """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -654,7 +663,7 @@ class QuoteModifyParamsLineActionAddItemTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -709,7 +718,7 @@ class QuoteModifyParamsLineActionSetDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -725,7 +734,7 @@ class QuoteModifyParamsLineActionSetDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -823,14 +832,14 @@ class QuoteModifyParamsLineActionSetItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteModifyParamsLineActionSetItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -848,7 +857,7 @@ class QuoteModifyParamsLineActionSetItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -864,7 +873,7 @@ class QuoteModifyParamsLineActionSetItemDiscountSettingsServicePeriodAnchorConfi """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -900,7 +909,7 @@ class QuoteModifyParamsLineActionSetItemTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -915,7 +924,7 @@ class QuoteModifyParamsLineAppliesTo(TypedDict): """ The ID of the schedule the line applies to. """ - type: Literal["new_reference", "subscription_schedule"] + type: Union[Literal["new_reference", "subscription_schedule"], str] """ Describes whether the quote line is affecting a new schedule or an existing schedule. """ @@ -949,14 +958,17 @@ class QuoteModifyParamsLineEndsAt(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "billing_period_end", - "discount_end", - "duration", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "billing_period_end", + "discount_end", + "duration", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ Select a way to pass in `ends_at`. @@ -971,7 +983,7 @@ class QuoteModifyParamsLineEndsAtDiscountEnd(TypedDict): class QuoteModifyParamsLineEndsAtDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -986,14 +998,16 @@ class QuoteModifyParamsLineSetPauseCollection(TypedDict): """ Details of the pause_collection behavior to apply to the amendment. """ - type: Literal["remove", "set"] + type: Union[Literal["remove", "set"], str] """ Determines the type of the pause_collection amendment. """ class QuoteModifyParamsLineSetPauseCollectionSet(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -1012,14 +1026,17 @@ class QuoteModifyParamsLineStartsAt(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "discount_end", - "line_ends_at", - "now", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "discount_end", + "line_ends_at", + "now", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ Select a way to pass in `starts_at`. @@ -1052,7 +1069,7 @@ class QuoteModifyParamsLineTrialSettings(TypedDict): class QuoteModifyParamsLineTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] + prorate_up_front: NotRequired["Literal['defer', 'include']|str"] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -1091,7 +1108,7 @@ class QuoteModifyParamsSubscriptionData(TypedDict): """ When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. """ - end_behavior: NotRequired[Literal["cancel", "release"]] + end_behavior: NotRequired["Literal['cancel', 'release']|str"] """ Behavior of the subscription schedule and underlying subscription when it ends. """ @@ -1100,7 +1117,7 @@ class QuoteModifyParamsSubscriptionData(TypedDict): Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + "Literal['billing_period_start', 'phase_start']|str" ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. @@ -1155,12 +1172,15 @@ class QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillFrom(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", + type: Union[ + Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ], + str, ] """ The type of method to specify the `bill_from` time. @@ -1197,12 +1217,15 @@ class QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1212,7 +1235,7 @@ class QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): class QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1323,12 +1346,15 @@ class QuoteModifyParamsSubscriptionDataBillingScheduleBillUntil(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1338,7 +1364,7 @@ class QuoteModifyParamsSubscriptionDataBillingScheduleBillUntil(TypedDict): class QuoteModifyParamsSubscriptionDataBillingScheduleBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1399,12 +1425,12 @@ class QuoteModifyParamsSubscriptionDataOverride(TypedDict): """ The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. """ - end_behavior: NotRequired[Literal["cancel", "release"]] + end_behavior: NotRequired["Literal['cancel', 'release']|str"] """ Behavior of the subscription schedule and underlying subscription when it ends. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + "Literal['billing_period_start', 'phase_start']|str" ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. @@ -1432,7 +1458,7 @@ class QuoteModifyParamsSubscriptionDataOverrideAppliesTo(TypedDict): """ The ID of the schedule the line applies to. """ - type: Literal["new_reference", "subscription_schedule"] + type: Union[Literal["new_reference", "subscription_schedule"], str] """ Describes whether the quote line is affecting a new schedule or an existing schedule. """ @@ -1466,12 +1492,15 @@ class QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom( """ A precise Unix timestamp. """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", + type: Union[ + Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ], + str, ] """ The type of method to specify the `bill_from` time. @@ -1510,12 +1539,15 @@ class QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1525,7 +1557,7 @@ class QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( class QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1644,12 +1676,15 @@ class QuoteModifyParamsSubscriptionDataOverrideBillingScheduleBillUntil( """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1659,7 +1694,7 @@ class QuoteModifyParamsSubscriptionDataOverrideBillingScheduleBillUntil( class QuoteModifyParamsSubscriptionDataOverrideBillingScheduleBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ diff --git a/stripe/params/_quote_update_params.py b/stripe/params/_quote_update_params.py index cac393272..e745e4482 100644 --- a/stripe/params/_quote_update_params.py +++ b/stripe/params/_quote_update_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -117,7 +117,7 @@ class QuoteUpdateParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -151,14 +151,14 @@ class QuoteUpdateParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteUpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -184,7 +184,7 @@ class QuoteUpdateParamsInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -249,14 +249,14 @@ class QuoteUpdateParamsLineItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteUpdateParamsLineItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -313,7 +313,9 @@ class QuoteUpdateParamsLine(TypedDict): """ Details to identify the subscription schedule the quote line applies to. """ - billing_cycle_anchor: NotRequired[Literal["automatic", "line_starts_at"]] + billing_cycle_anchor: NotRequired[ + "Literal['automatic', 'line_starts_at']|str" + ] """ For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. """ @@ -323,7 +325,9 @@ class QuoteUpdateParamsLine(TypedDict): """ A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. """ - effective_at: NotRequired[Literal["billing_period_start", "line_start"]] + effective_at: NotRequired[ + "Literal['billing_period_start', 'line_start']|str" + ] """ Configures how the quote handles billing for line transitions. """ @@ -336,7 +340,7 @@ class QuoteUpdateParamsLine(TypedDict): The ID of an existing line on the quote. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. @@ -347,7 +351,9 @@ class QuoteUpdateParamsLine(TypedDict): """ Defines how to pause collection for the underlying subscription throughout the duration of the amendment. """ - set_schedule_end: NotRequired[Literal["line_ends_at", "line_starts_at"]] + set_schedule_end: NotRequired[ + "Literal['line_ends_at', 'line_starts_at']|str" + ] """ Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. """ @@ -400,18 +406,21 @@ class QuoteUpdateParamsLineAction(TypedDict): """ Details for the `set_metadata` type: specify an array of key-value pairs. """ - type: Literal[ - "add_discount", - "add_item", - "add_metadata", - "clear_discounts", - "clear_metadata", - "remove_discount", - "remove_item", - "remove_metadata", - "set_discounts", - "set_items", - "set_metadata", + type: Union[ + Literal[ + "add_discount", + "add_item", + "add_metadata", + "clear_discounts", + "clear_metadata", + "remove_discount", + "remove_item", + "remove_metadata", + "set_discounts", + "set_items", + "set_metadata", + ], + str, ] """ The type of action the quote line performs. @@ -462,7 +471,7 @@ class QuoteUpdateParamsLineActionAddDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -478,7 +487,7 @@ class QuoteUpdateParamsLineActionAddDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -576,14 +585,14 @@ class QuoteUpdateParamsLineActionAddItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteUpdateParamsLineActionAddItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -601,7 +610,7 @@ class QuoteUpdateParamsLineActionAddItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -617,7 +626,7 @@ class QuoteUpdateParamsLineActionAddItemDiscountSettingsServicePeriodAnchorConfi """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -653,7 +662,7 @@ class QuoteUpdateParamsLineActionAddItemTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -708,7 +717,7 @@ class QuoteUpdateParamsLineActionSetDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -724,7 +733,7 @@ class QuoteUpdateParamsLineActionSetDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -822,14 +831,14 @@ class QuoteUpdateParamsLineActionSetItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class QuoteUpdateParamsLineActionSetItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -847,7 +856,7 @@ class QuoteUpdateParamsLineActionSetItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "line_start"] + "Literal['current_period_end', 'current_period_start', 'line_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `line_start` if omitted. @@ -863,7 +872,7 @@ class QuoteUpdateParamsLineActionSetItemDiscountSettingsServicePeriodAnchorConfi """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -899,7 +908,7 @@ class QuoteUpdateParamsLineActionSetItemTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -914,7 +923,7 @@ class QuoteUpdateParamsLineAppliesTo(TypedDict): """ The ID of the schedule the line applies to. """ - type: Literal["new_reference", "subscription_schedule"] + type: Union[Literal["new_reference", "subscription_schedule"], str] """ Describes whether the quote line is affecting a new schedule or an existing schedule. """ @@ -948,14 +957,17 @@ class QuoteUpdateParamsLineEndsAt(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "billing_period_end", - "discount_end", - "duration", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "billing_period_end", + "discount_end", + "duration", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ Select a way to pass in `ends_at`. @@ -970,7 +982,7 @@ class QuoteUpdateParamsLineEndsAtDiscountEnd(TypedDict): class QuoteUpdateParamsLineEndsAtDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -985,14 +997,16 @@ class QuoteUpdateParamsLineSetPauseCollection(TypedDict): """ Details of the pause_collection behavior to apply to the amendment. """ - type: Literal["remove", "set"] + type: Union[Literal["remove", "set"], str] """ Determines the type of the pause_collection amendment. """ class QuoteUpdateParamsLineSetPauseCollectionSet(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -1011,14 +1025,17 @@ class QuoteUpdateParamsLineStartsAt(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "discount_end", - "line_ends_at", - "now", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "discount_end", + "line_ends_at", + "now", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ Select a way to pass in `starts_at`. @@ -1051,7 +1068,7 @@ class QuoteUpdateParamsLineTrialSettings(TypedDict): class QuoteUpdateParamsLineTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] + prorate_up_front: NotRequired["Literal['defer', 'include']|str"] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -1090,7 +1107,7 @@ class QuoteUpdateParamsSubscriptionData(TypedDict): """ When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. """ - end_behavior: NotRequired[Literal["cancel", "release"]] + end_behavior: NotRequired["Literal['cancel', 'release']|str"] """ Behavior of the subscription schedule and underlying subscription when it ends. """ @@ -1099,7 +1116,7 @@ class QuoteUpdateParamsSubscriptionData(TypedDict): Set of [key-value pairs](https://docs.stripe.com/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + "Literal['billing_period_start', 'phase_start']|str" ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. @@ -1154,12 +1171,15 @@ class QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillFrom(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", + type: Union[ + Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ], + str, ] """ The type of method to specify the `bill_from` time. @@ -1196,12 +1216,15 @@ class QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1211,7 +1234,7 @@ class QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): class QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1322,12 +1345,15 @@ class QuoteUpdateParamsSubscriptionDataBillingScheduleBillUntil(TypedDict): """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1337,7 +1363,7 @@ class QuoteUpdateParamsSubscriptionDataBillingScheduleBillUntil(TypedDict): class QuoteUpdateParamsSubscriptionDataBillingScheduleBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1398,12 +1424,12 @@ class QuoteUpdateParamsSubscriptionDataOverride(TypedDict): """ The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. """ - end_behavior: NotRequired[Literal["cancel", "release"]] + end_behavior: NotRequired["Literal['cancel', 'release']|str"] """ Behavior of the subscription schedule and underlying subscription when it ends. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + "Literal['billing_period_start', 'phase_start']|str" ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. @@ -1431,7 +1457,7 @@ class QuoteUpdateParamsSubscriptionDataOverrideAppliesTo(TypedDict): """ The ID of the schedule the line applies to. """ - type: Literal["new_reference", "subscription_schedule"] + type: Union[Literal["new_reference", "subscription_schedule"], str] """ Describes whether the quote line is affecting a new schedule or an existing schedule. """ @@ -1465,12 +1491,15 @@ class QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom( """ A precise Unix timestamp. """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", + type: Union[ + Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ], + str, ] """ The type of method to specify the `bill_from` time. @@ -1509,12 +1538,15 @@ class QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1524,7 +1556,7 @@ class QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( class QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1643,12 +1675,15 @@ class QuoteUpdateParamsSubscriptionDataOverrideBillingScheduleBillUntil( """ A precise Unix timestamp. """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", + type: Union[ + Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ], + str, ] """ The type of method to specify the `bill_until` time. @@ -1658,7 +1693,7 @@ class QuoteUpdateParamsSubscriptionDataOverrideBillingScheduleBillUntil( class QuoteUpdateParamsSubscriptionDataOverrideBillingScheduleBillUntilDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index 505c78702..6deed388c 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -121,7 +121,9 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -399,69 +401,72 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): """ If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -726,7 +731,7 @@ class SetupIntentConfirmParamsPaymentMethodDataGrabpay(TypedDict): class SetupIntentConfirmParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: NotRequired["Literal['bca', 'bni', 'bri', 'cimb', 'permata']|str"] """ Bank where the account is held. """ @@ -817,7 +822,7 @@ class SetupIntentConfirmParamsPaymentMethodDataMultibanco(TypedDict): class SetupIntentConfirmParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] + funding: NotRequired["Literal['card', 'points']|str"] """ Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ @@ -853,34 +858,7 @@ class SetupIntentConfirmParamsPaymentMethodDataOxxo(TypedDict): class SetupIntentConfirmParamsPaymentMethodDataP24(TypedDict): bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']|str" ] """ The customer's bank. @@ -991,7 +969,7 @@ class SetupIntentConfirmParamsPaymentMethodDataShopeepay(TypedDict): class SetupIntentConfirmParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ Two-letter ISO code representing the country the bank account is located in. """ @@ -1034,7 +1012,7 @@ class SetupIntentConfirmParamsPaymentMethodDataUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1049,7 +1027,7 @@ class SetupIntentConfirmParamsPaymentMethodDataUpiMandateOptions(TypedDict): class SetupIntentConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -1057,7 +1035,7 @@ class SetupIntentConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -1157,7 +1135,7 @@ class SetupIntentConfirmParamsPaymentMethodOptions(TypedDict): class SetupIntentConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] + currency: NotRequired["Literal['cad', 'usd']|str"] """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ @@ -1168,7 +1146,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -1184,7 +1162,9 @@ class SetupIntentConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions( The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] + default_for: NotRequired[ + List[Union[Literal["invoice", "subscription"], str]] + ] """ List of Stripe products where this mandate can be selected automatically. """ @@ -1192,11 +1172,13 @@ class SetupIntentConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions( """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -1262,7 +1244,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -1322,7 +1304,9 @@ class SetupIntentConfirmParamsPaymentMethodOptionsCardMandateOptions( class SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + ares_trans_status: NotRequired[ + "Literal['A', 'C', 'I', 'N', 'R', 'U', 'Y']|str" + ] """ The `transStatus` returned from the card Issuer's ACS in the ARes. """ @@ -1334,7 +1318,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): is what you should specify here.) """ electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] + "Literal['01', '02', '05', '06', '07']|str" ] """ The Electronic Commerce Indicator (ECI) is returned by your 3D Secure @@ -1358,7 +1342,9 @@ class SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID (dsTransID). """ - version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"]] + version: NotRequired[ + "Literal['1.0.2', '2.1.0', '2.2.0', '2.3.0', '2.3.1']|str" + ] """ The version of 3D Secure that was performed. """ @@ -1378,7 +1364,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions class SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( TypedDict, ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + cb_avalgo: Union[Literal["0", "1", "2", "3", "4", "A"], str] """ The cryptogram calculation algorithm used by the card Issuer's ACS to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -1414,54 +1400,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsKlarna(TypedDict): On-demand details if setting up a payment method for on-demand payments. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-RO', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'sv-FI', 'sv-SE']|str" ] """ Preferred language of the Klarna authorization page that the customer is redirected to @@ -1487,7 +1426,9 @@ class SetupIntentConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): """ The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + purchase_interval: NotRequired[ + "Literal['day', 'month', 'week', 'year']|str" + ] """ Interval at which the customer is making purchases """ @@ -1500,7 +1441,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): class SetupIntentConfirmParamsPaymentMethodOptionsKlarnaSubscription( TypedDict ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -1570,7 +1511,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions( """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']"] + amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']|str"] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -1579,7 +1520,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions( Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: NotRequired[ - "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']" + "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']|str" ] """ The periodicity at which payments will be collected. Defaults to `adhoc`. @@ -1589,7 +1530,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions( The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: NotRequired[ - "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']" + "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -1614,11 +1555,11 @@ class SetupIntentConfirmParamsPaymentMethodOptionsPixMandateOptions(TypedDict): """ Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ Type of amount. Defaults to `maximum`. """ @@ -1631,7 +1572,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsPixMandateOptions(TypedDict): Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to `monthly`. @@ -1690,7 +1631,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsUpi(TypedDict): Configuration options for setting up an eMandate """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -1699,7 +1640,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1733,7 +1674,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): Additional fields for network related functions """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -1765,8 +1706,14 @@ class SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnecti """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -1795,7 +1742,7 @@ class SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnecti class SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): - mode: Literal["automatic", "custom"] + mode: Union[Literal["automatic", "custom"], str] """ Settings for configuring manual entry of account details. """ @@ -1840,7 +1787,9 @@ class SetupIntentConfirmParamsSetupDetailsBenefit(TypedDict): class SetupIntentConfirmParamsSetupDetailsBenefitFrMealVoucher(TypedDict): - enabled: NotRequired[Literal["if_payment_method_is_eligible", "never"]] + enabled: NotRequired[ + "Literal['if_payment_method_is_eligible', 'never']|str" + ] """ Whether to enable meal voucher benefit for this setup intent. """ diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 772fccfaf..bcf5bcd4e 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -47,69 +47,72 @@ class SetupIntentCreateParams(RequestOptions): """ excluded_payment_method_types: NotRequired[ List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] ] ] @@ -120,7 +123,9 @@ class SetupIntentCreateParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - flow_directions: NotRequired[List[Literal["inbound", "outbound"]]] + flow_directions: NotRequired[ + List[Union[Literal["inbound", "outbound"], str]] + ] """ Indicates the directions of money movement for which this payment method is intended to be used. @@ -177,7 +182,7 @@ class SetupIntentCreateParams(RequestOptions): Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`. """ - usage: NotRequired[Literal["off_session", "on_session"]] + usage: NotRequired["Literal['off_session', 'on_session']|str"] """ Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. """ @@ -188,7 +193,7 @@ class SetupIntentCreateParams(RequestOptions): class SetupIntentCreateParamsAutomaticPaymentMethods(TypedDict): - allow_redirects: NotRequired[Literal["always", "never"]] + allow_redirects: NotRequired["Literal['always', 'never']|str"] """ Controls whether this SetupIntent will accept redirect-based payment methods. @@ -266,7 +271,9 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -538,69 +545,72 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): """ If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -863,7 +873,7 @@ class SetupIntentCreateParamsPaymentMethodDataGrabpay(TypedDict): class SetupIntentCreateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: NotRequired["Literal['bca', 'bni', 'bri', 'cimb', 'permata']|str"] """ Bank where the account is held. """ @@ -954,7 +964,7 @@ class SetupIntentCreateParamsPaymentMethodDataMultibanco(TypedDict): class SetupIntentCreateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] + funding: NotRequired["Literal['card', 'points']|str"] """ Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ @@ -990,34 +1000,7 @@ class SetupIntentCreateParamsPaymentMethodDataOxxo(TypedDict): class SetupIntentCreateParamsPaymentMethodDataP24(TypedDict): bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']|str" ] """ The customer's bank. @@ -1128,7 +1111,7 @@ class SetupIntentCreateParamsPaymentMethodDataShopeepay(TypedDict): class SetupIntentCreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ Two-letter ISO code representing the country the bank account is located in. """ @@ -1171,7 +1154,7 @@ class SetupIntentCreateParamsPaymentMethodDataUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1186,7 +1169,7 @@ class SetupIntentCreateParamsPaymentMethodDataUpiMandateOptions(TypedDict): class SetupIntentCreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -1194,7 +1177,7 @@ class SetupIntentCreateParamsPaymentMethodDataUsBankAccount(TypedDict): """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -1294,7 +1277,7 @@ class SetupIntentCreateParamsPaymentMethodOptions(TypedDict): class SetupIntentCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] + currency: NotRequired["Literal['cad', 'usd']|str"] """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ @@ -1305,7 +1288,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -1321,7 +1304,9 @@ class SetupIntentCreateParamsPaymentMethodOptionsAcssDebitMandateOptions( The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] + default_for: NotRequired[ + List[Union[Literal["invoice", "subscription"], str]] + ] """ List of Stripe products where this mandate can be selected automatically. """ @@ -1329,11 +1314,13 @@ class SetupIntentCreateParamsPaymentMethodOptionsAcssDebitMandateOptions( """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -1399,7 +1386,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsCard(TypedDict): Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -1457,7 +1444,9 @@ class SetupIntentCreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): class SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + ares_trans_status: NotRequired[ + "Literal['A', 'C', 'I', 'N', 'R', 'U', 'Y']|str" + ] """ The `transStatus` returned from the card Issuer's ACS in the ARes. """ @@ -1469,7 +1458,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): is what you should specify here.) """ electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] + "Literal['01', '02', '05', '06', '07']|str" ] """ The Electronic Commerce Indicator (ECI) is returned by your 3D Secure @@ -1493,7 +1482,9 @@ class SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID (dsTransID). """ - version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"]] + version: NotRequired[ + "Literal['1.0.2', '2.1.0', '2.2.0', '2.3.0', '2.3.1']|str" + ] """ The version of 3D Secure that was performed. """ @@ -1513,7 +1504,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( class SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( TypedDict, ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + cb_avalgo: Union[Literal["0", "1", "2", "3", "4", "A"], str] """ The cryptogram calculation algorithm used by the card Issuer's ACS to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -1549,54 +1540,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsKlarna(TypedDict): On-demand details if setting up a payment method for on-demand payments. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-RO', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'sv-FI', 'sv-SE']|str" ] """ Preferred language of the Klarna authorization page that the customer is redirected to @@ -1622,7 +1566,9 @@ class SetupIntentCreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): """ The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + purchase_interval: NotRequired[ + "Literal['day', 'month', 'week', 'year']|str" + ] """ Interval at which the customer is making purchases """ @@ -1633,7 +1579,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): class SetupIntentCreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -1703,7 +1649,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions( """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']"] + amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']|str"] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -1712,7 +1658,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions( Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: NotRequired[ - "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']" + "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']|str" ] """ The periodicity at which payments will be collected. Defaults to `adhoc`. @@ -1722,7 +1668,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions( The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: NotRequired[ - "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']" + "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -1747,11 +1693,11 @@ class SetupIntentCreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): """ Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ Type of amount. Defaults to `maximum`. """ @@ -1764,7 +1710,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to `monthly`. @@ -1823,7 +1769,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsUpi(TypedDict): Configuration options for setting up an eMandate """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -1832,7 +1778,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1866,7 +1812,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): Additional fields for network related functions """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -1898,8 +1844,14 @@ class SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectio """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -1928,7 +1880,7 @@ class SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectio class SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): - mode: Literal["automatic", "custom"] + mode: Union[Literal["automatic", "custom"], str] """ Settings for configuring manual entry of account details. """ @@ -1973,7 +1925,9 @@ class SetupIntentCreateParamsSetupDetailsBenefit(TypedDict): class SetupIntentCreateParamsSetupDetailsBenefitFrMealVoucher(TypedDict): - enabled: NotRequired[Literal["if_payment_method_is_eligible", "never"]] + enabled: NotRequired[ + "Literal['if_payment_method_is_eligible', 'never']|str" + ] """ Whether to enable meal voucher benefit for this setup intent. """ diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index 1fdc4daec..abd3490aa 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -30,7 +30,7 @@ class SetupIntentModifyParams(RequestOptions): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this SetupIntent. @@ -39,7 +39,9 @@ class SetupIntentModifyParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - flow_directions: NotRequired[List[Literal["inbound", "outbound"]]] + flow_directions: NotRequired[ + List[Union[Literal["inbound", "outbound"], str]] + ] """ Indicates the directions of money movement for which this payment method is intended to be used. @@ -103,7 +105,9 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -375,69 +379,72 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): """ If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -700,7 +707,7 @@ class SetupIntentModifyParamsPaymentMethodDataGrabpay(TypedDict): class SetupIntentModifyParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: NotRequired["Literal['bca', 'bni', 'bri', 'cimb', 'permata']|str"] """ Bank where the account is held. """ @@ -791,7 +798,7 @@ class SetupIntentModifyParamsPaymentMethodDataMultibanco(TypedDict): class SetupIntentModifyParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] + funding: NotRequired["Literal['card', 'points']|str"] """ Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ @@ -827,34 +834,7 @@ class SetupIntentModifyParamsPaymentMethodDataOxxo(TypedDict): class SetupIntentModifyParamsPaymentMethodDataP24(TypedDict): bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']|str" ] """ The customer's bank. @@ -965,7 +945,7 @@ class SetupIntentModifyParamsPaymentMethodDataShopeepay(TypedDict): class SetupIntentModifyParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ Two-letter ISO code representing the country the bank account is located in. """ @@ -1008,7 +988,7 @@ class SetupIntentModifyParamsPaymentMethodDataUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1023,7 +1003,7 @@ class SetupIntentModifyParamsPaymentMethodDataUpiMandateOptions(TypedDict): class SetupIntentModifyParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -1031,7 +1011,7 @@ class SetupIntentModifyParamsPaymentMethodDataUsBankAccount(TypedDict): """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -1131,7 +1111,7 @@ class SetupIntentModifyParamsPaymentMethodOptions(TypedDict): class SetupIntentModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] + currency: NotRequired["Literal['cad', 'usd']|str"] """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ @@ -1142,7 +1122,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -1158,7 +1138,9 @@ class SetupIntentModifyParamsPaymentMethodOptionsAcssDebitMandateOptions( The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] + default_for: NotRequired[ + List[Union[Literal["invoice", "subscription"], str]] + ] """ List of Stripe products where this mandate can be selected automatically. """ @@ -1166,11 +1148,13 @@ class SetupIntentModifyParamsPaymentMethodOptionsAcssDebitMandateOptions( """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -1236,7 +1220,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsCard(TypedDict): Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -1294,7 +1278,9 @@ class SetupIntentModifyParamsPaymentMethodOptionsCardMandateOptions(TypedDict): class SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + ares_trans_status: NotRequired[ + "Literal['A', 'C', 'I', 'N', 'R', 'U', 'Y']|str" + ] """ The `transStatus` returned from the card Issuer's ACS in the ARes. """ @@ -1306,7 +1292,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): is what you should specify here.) """ electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] + "Literal['01', '02', '05', '06', '07']|str" ] """ The Electronic Commerce Indicator (ECI) is returned by your 3D Secure @@ -1330,7 +1316,9 @@ class SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID (dsTransID). """ - version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"]] + version: NotRequired[ + "Literal['1.0.2', '2.1.0', '2.2.0', '2.3.0', '2.3.1']|str" + ] """ The version of 3D Secure that was performed. """ @@ -1350,7 +1338,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( class SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( TypedDict, ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + cb_avalgo: Union[Literal["0", "1", "2", "3", "4", "A"], str] """ The cryptogram calculation algorithm used by the card Issuer's ACS to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -1386,54 +1374,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsKlarna(TypedDict): On-demand details if setting up a payment method for on-demand payments. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-RO', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'sv-FI', 'sv-SE']|str" ] """ Preferred language of the Klarna authorization page that the customer is redirected to @@ -1459,7 +1400,9 @@ class SetupIntentModifyParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): """ The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + purchase_interval: NotRequired[ + "Literal['day', 'month', 'week', 'year']|str" + ] """ Interval at which the customer is making purchases """ @@ -1470,7 +1413,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): class SetupIntentModifyParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -1540,7 +1483,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions( """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']"] + amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']|str"] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -1549,7 +1492,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions( Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: NotRequired[ - "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']" + "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']|str" ] """ The periodicity at which payments will be collected. Defaults to `adhoc`. @@ -1559,7 +1502,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions( The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: NotRequired[ - "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']" + "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -1584,11 +1527,11 @@ class SetupIntentModifyParamsPaymentMethodOptionsPixMandateOptions(TypedDict): """ Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ Type of amount. Defaults to `maximum`. """ @@ -1601,7 +1544,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsPixMandateOptions(TypedDict): Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to `monthly`. @@ -1660,7 +1603,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsUpi(TypedDict): Configuration options for setting up an eMandate """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -1669,7 +1612,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1703,7 +1646,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): Additional fields for network related functions """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -1735,8 +1678,14 @@ class SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectio """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -1765,7 +1714,7 @@ class SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectio class SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): - mode: Literal["automatic", "custom"] + mode: Union[Literal["automatic", "custom"], str] """ Settings for configuring manual entry of account details. """ @@ -1810,7 +1759,9 @@ class SetupIntentModifyParamsSetupDetailsBenefit(TypedDict): class SetupIntentModifyParamsSetupDetailsBenefitFrMealVoucher(TypedDict): - enabled: NotRequired[Literal["if_payment_method_is_eligible", "never"]] + enabled: NotRequired[ + "Literal['if_payment_method_is_eligible', 'never']|str" + ] """ Whether to enable meal voucher benefit for this setup intent. """ diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index c09919193..be55c26f3 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -29,7 +29,7 @@ class SetupIntentUpdateParams(TypedDict): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this SetupIntent. @@ -38,7 +38,9 @@ class SetupIntentUpdateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ - flow_directions: NotRequired[List[Literal["inbound", "outbound"]]] + flow_directions: NotRequired[ + List[Union[Literal["inbound", "outbound"], str]] + ] """ Indicates the directions of money movement for which this payment method is intended to be used. @@ -102,7 +104,9 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -374,69 +378,72 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): """ If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -699,7 +706,7 @@ class SetupIntentUpdateParamsPaymentMethodDataGrabpay(TypedDict): class SetupIntentUpdateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: NotRequired["Literal['bca', 'bni', 'bri', 'cimb', 'permata']|str"] """ Bank where the account is held. """ @@ -790,7 +797,7 @@ class SetupIntentUpdateParamsPaymentMethodDataMultibanco(TypedDict): class SetupIntentUpdateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] + funding: NotRequired["Literal['card', 'points']|str"] """ Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ @@ -826,34 +833,7 @@ class SetupIntentUpdateParamsPaymentMethodDataOxxo(TypedDict): class SetupIntentUpdateParamsPaymentMethodDataP24(TypedDict): bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']|str" ] """ The customer's bank. @@ -964,7 +944,7 @@ class SetupIntentUpdateParamsPaymentMethodDataShopeepay(TypedDict): class SetupIntentUpdateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ Two-letter ISO code representing the country the bank account is located in. """ @@ -1007,7 +987,7 @@ class SetupIntentUpdateParamsPaymentMethodDataUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1022,7 +1002,7 @@ class SetupIntentUpdateParamsPaymentMethodDataUpiMandateOptions(TypedDict): class SetupIntentUpdateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -1030,7 +1010,7 @@ class SetupIntentUpdateParamsPaymentMethodDataUsBankAccount(TypedDict): """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -1130,7 +1110,7 @@ class SetupIntentUpdateParamsPaymentMethodOptions(TypedDict): class SetupIntentUpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] + currency: NotRequired["Literal['cad', 'usd']|str"] """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ @@ -1141,7 +1121,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -1157,7 +1137,9 @@ class SetupIntentUpdateParamsPaymentMethodOptionsAcssDebitMandateOptions( The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] + default_for: NotRequired[ + List[Union[Literal["invoice", "subscription"], str]] + ] """ List of Stripe products where this mandate can be selected automatically. """ @@ -1165,11 +1147,13 @@ class SetupIntentUpdateParamsPaymentMethodOptionsAcssDebitMandateOptions( """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -1235,7 +1219,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -1293,7 +1277,9 @@ class SetupIntentUpdateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): class SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + ares_trans_status: NotRequired[ + "Literal['A', 'C', 'I', 'N', 'R', 'U', 'Y']|str" + ] """ The `transStatus` returned from the card Issuer's ACS in the ARes. """ @@ -1305,7 +1291,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): is what you should specify here.) """ electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] + "Literal['01', '02', '05', '06', '07']|str" ] """ The Electronic Commerce Indicator (ECI) is returned by your 3D Secure @@ -1329,7 +1315,9 @@ class SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server Transaction ID (dsTransID). """ - version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"]] + version: NotRequired[ + "Literal['1.0.2', '2.1.0', '2.2.0', '2.3.0', '2.3.1']|str" + ] """ The version of 3D Secure that was performed. """ @@ -1349,7 +1337,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( class SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( TypedDict, ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + cb_avalgo: Union[Literal["0", "1", "2", "3", "4", "A"], str] """ The cryptogram calculation algorithm used by the card Issuer's ACS to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. @@ -1385,54 +1373,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsKlarna(TypedDict): On-demand details if setting up a payment method for on-demand payments. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'el-GR', 'en-AT', 'en-AU', 'en-BE', 'en-CA', 'en-CH', 'en-CZ', 'en-DE', 'en-DK', 'en-ES', 'en-FI', 'en-FR', 'en-GB', 'en-GR', 'en-IE', 'en-IT', 'en-NL', 'en-NO', 'en-NZ', 'en-PL', 'en-PT', 'en-RO', 'en-SE', 'en-US', 'es-ES', 'es-US', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-CH', 'fr-FR', 'it-CH', 'it-IT', 'nb-NO', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'ro-RO', 'sv-FI', 'sv-SE']|str" ] """ Preferred language of the Klarna authorization page that the customer is redirected to @@ -1458,7 +1399,9 @@ class SetupIntentUpdateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): """ The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + purchase_interval: NotRequired[ + "Literal['day', 'month', 'week', 'year']|str" + ] """ Interval at which the customer is making purchases """ @@ -1469,7 +1412,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): class SetupIntentUpdateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -1539,7 +1482,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions( """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']"] + amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']|str"] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -1548,7 +1491,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions( Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: NotRequired[ - "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']" + "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']|str" ] """ The periodicity at which payments will be collected. Defaults to `adhoc`. @@ -1558,7 +1501,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions( The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: NotRequired[ - "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']" + "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -1583,11 +1526,11 @@ class SetupIntentUpdateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): """ Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ Type of amount. Defaults to `maximum`. """ @@ -1600,7 +1543,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to `monthly`. @@ -1659,7 +1602,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsUpi(TypedDict): Configuration options for setting up an eMandate """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -1668,7 +1611,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1702,7 +1645,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): Additional fields for network related functions """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Bank account verification method. The default value is `automatic`. @@ -1734,8 +1677,14 @@ class SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectio """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -1764,7 +1713,7 @@ class SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectio class SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( TypedDict, ): - mode: Literal["automatic", "custom"] + mode: Union[Literal["automatic", "custom"], str] """ Settings for configuring manual entry of account details. """ @@ -1809,7 +1758,9 @@ class SetupIntentUpdateParamsSetupDetailsBenefit(TypedDict): class SetupIntentUpdateParamsSetupDetailsBenefitFrMealVoucher(TypedDict): - enabled: NotRequired[Literal["if_payment_method_is_eligible", "never"]] + enabled: NotRequired[ + "Literal['if_payment_method_is_eligible', 'never']|str" + ] """ Whether to enable meal voucher benefit for this setup intent. """ diff --git a/stripe/params/_shipping_rate_create_params.py b/stripe/params/_shipping_rate_create_params.py index 173153179..5e24621c9 100644 --- a/stripe/params/_shipping_rate_create_params.py +++ b/stripe/params/_shipping_rate_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -53,7 +53,7 @@ class ShippingRateCreateParamsDeliveryEstimate(TypedDict): class ShippingRateCreateParamsDeliveryEstimateMaximum(TypedDict): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -64,7 +64,7 @@ class ShippingRateCreateParamsDeliveryEstimateMaximum(TypedDict): class ShippingRateCreateParamsDeliveryEstimateMinimum(TypedDict): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ diff --git a/stripe/params/_subscription_cancel_params.py b/stripe/params/_subscription_cancel_params.py index 503bdb00e..0acc4dbe5 100644 --- a/stripe/params/_subscription_cancel_params.py +++ b/stripe/params/_subscription_cancel_params.py @@ -32,7 +32,7 @@ class SubscriptionCancelParamsCancellationDetails(TypedDict): Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. """ feedback: NotRequired[ - "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" + "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']|str" ] """ The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index 1ff3ef428..9ca88f20c 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -57,7 +57,7 @@ class SubscriptionCreateParams(RequestOptions): Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. """ cancel_at: NotRequired[ - "int|Literal['max_billed_until', 'max_period_end', 'min_period_end']" + "int|Literal['max_billed_until', 'max_period_end', 'min_period_end']|str" ] """ A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. @@ -162,7 +162,7 @@ class SubscriptionCreateParams(RequestOptions): If specified, the invoicing for the given billing cycle iterations will be processed now. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. @@ -258,7 +258,7 @@ class SubscriptionCreateParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -267,7 +267,7 @@ class SubscriptionCreateParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): class SubscriptionCreateParamsAddInvoiceItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -293,7 +293,7 @@ class SubscriptionCreateParamsAddInvoiceItemPeriodEnd(TypedDict): """ A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. """ - type: Literal["min_item_period_end", "timestamp"] + type: Union[Literal["min_item_period_end", "timestamp"], str] """ Select how to calculate the end of the invoice item period. """ @@ -304,7 +304,7 @@ class SubscriptionCreateParamsAddInvoiceItemPeriodStart(TypedDict): """ A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. """ - type: Literal["max_item_period_start", "now", "timestamp"] + type: Union[Literal["max_item_period_start", "now", "timestamp"], str] """ Select how to calculate the start of the invoice item period. """ @@ -349,7 +349,7 @@ class SubscriptionCreateParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -383,7 +383,7 @@ class SubscriptionCreateParamsBillingMode(TypedDict): """ Configure behavior for flexible billing mode. """ - type: Literal["classic", "flexible"] + type: Union[Literal["classic", "flexible"], str] """ Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. """ @@ -435,7 +435,7 @@ class SubscriptionCreateParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -497,14 +497,14 @@ class SubscriptionCreateParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class SubscriptionCreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -522,7 +522,7 @@ class SubscriptionCreateParamsDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "now"] + "Literal['current_period_end', 'current_period_start', 'now']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted. @@ -538,7 +538,9 @@ class SubscriptionCreateParamsDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "subscription_service_cycle_anchor"]] + type: NotRequired[ + "Literal['custom', 'subscription_service_cycle_anchor']|str" + ] """ The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted. """ @@ -610,7 +612,7 @@ class SubscriptionCreateParamsInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -717,14 +719,14 @@ class SubscriptionCreateParamsItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class SubscriptionCreateParamsItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -742,7 +744,7 @@ class SubscriptionCreateParamsItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "now"] + "Literal['current_period_end', 'current_period_start', 'now']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted. @@ -758,7 +760,9 @@ class SubscriptionCreateParamsItemDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "subscription_service_cycle_anchor"]] + type: NotRequired[ + "Literal['custom', 'subscription_service_cycle_anchor']|str" + ] """ The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted. """ @@ -832,7 +836,7 @@ class SubscriptionCreateParamsItemTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -846,12 +850,14 @@ class SubscriptionCreateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration """ - save_default_payment_method: NotRequired[Literal["off", "on_subscription"]] + save_default_payment_method: NotRequired[ + "Literal['off', 'on_subscription']|str" + ] """ Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. """ @@ -960,7 +966,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -970,7 +976,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -979,7 +985,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandat class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -1059,7 +1065,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCard( Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -1073,7 +1079,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOpti """ Amount to be charged for future payments, specified in the presentment currency. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1159,19 +1165,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOpt The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit. """ purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] + "Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -1200,7 +1194,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptio """ Amount to be charged for future payments. If not provided, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ @@ -1209,7 +1203,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptio Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to the subscription servicing interval. @@ -1240,7 +1234,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptio """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1264,7 +1258,7 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( Additional fields for Financial Connections Session creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -1290,8 +1284,14 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFi """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -1303,7 +1303,9 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFi class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( TypedDict, ): - account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + account_subcategories: NotRequired[ + List[Union[Literal["checking", "savings"], str]] + ] """ The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. """ @@ -1342,7 +1344,7 @@ class SubscriptionCreateParamsPrebilling(TypedDict): """ This is used to determine the number of billing cycles to prebill. """ - update_behavior: NotRequired[Literal["prebill", "reset"]] + update_behavior: NotRequired["Literal['prebill', 'reset']|str"] """ Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. """ @@ -1371,7 +1373,9 @@ class SubscriptionCreateParamsTrialSettingsEndBehavior(TypedDict): """ Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`. """ - missing_payment_method: Literal["cancel", "create_invoice", "pause"] + missing_payment_method: Union[ + Literal["cancel", "create_invoice", "pause"], str + ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. """ diff --git a/stripe/params/_subscription_item_create_params.py b/stripe/params/_subscription_item_create_params.py index 3ddebaf2b..1321b2e30 100644 --- a/stripe/params/_subscription_item_create_params.py +++ b/stripe/params/_subscription_item_create_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -56,7 +56,7 @@ class SubscriptionItemCreateParams(RequestOptions): Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. @@ -137,14 +137,14 @@ class SubscriptionItemCreateParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class SubscriptionItemCreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -162,7 +162,7 @@ class SubscriptionItemCreateParamsDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "now"] + "Literal['current_period_end', 'current_period_start', 'now']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted. @@ -178,7 +178,9 @@ class SubscriptionItemCreateParamsDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "subscription_service_cycle_anchor"]] + type: NotRequired[ + "Literal['custom', 'subscription_service_cycle_anchor']|str" + ] """ The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted. """ @@ -252,7 +254,7 @@ class SubscriptionItemCreateParamsTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ diff --git a/stripe/params/_subscription_item_delete_params.py b/stripe/params/_subscription_item_delete_params.py index e675cf8a1..1e0e67d97 100644 --- a/stripe/params/_subscription_item_delete_params.py +++ b/stripe/params/_subscription_item_delete_params.py @@ -21,7 +21,7 @@ class SubscriptionItemDeleteParams(RequestOptions): Controls how Stripe handles payment when a subscription update requires payment and `collection_method=charge_automatically`. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. diff --git a/stripe/params/_subscription_item_modify_params.py b/stripe/params/_subscription_item_modify_params.py index 8ee26510f..bf157e03b 100644 --- a/stripe/params/_subscription_item_modify_params.py +++ b/stripe/params/_subscription_item_modify_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -62,7 +62,7 @@ class SubscriptionItemModifyParams(RequestOptions): Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. @@ -135,14 +135,14 @@ class SubscriptionItemModifyParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class SubscriptionItemModifyParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -160,7 +160,7 @@ class SubscriptionItemModifyParamsDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "now"] + "Literal['current_period_end', 'current_period_start', 'now']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted. @@ -176,7 +176,9 @@ class SubscriptionItemModifyParamsDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "subscription_service_cycle_anchor"]] + type: NotRequired[ + "Literal['custom', 'subscription_service_cycle_anchor']|str" + ] """ The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted. """ diff --git a/stripe/params/_subscription_item_update_params.py b/stripe/params/_subscription_item_update_params.py index 2ef104504..e2e12b118 100644 --- a/stripe/params/_subscription_item_update_params.py +++ b/stripe/params/_subscription_item_update_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -61,7 +61,7 @@ class SubscriptionItemUpdateParams(TypedDict): Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. @@ -134,14 +134,14 @@ class SubscriptionItemUpdateParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class SubscriptionItemUpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -159,7 +159,7 @@ class SubscriptionItemUpdateParamsDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "now"] + "Literal['current_period_end', 'current_period_start', 'now']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted. @@ -175,7 +175,9 @@ class SubscriptionItemUpdateParamsDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "subscription_service_cycle_anchor"]] + type: NotRequired[ + "Literal['custom', 'subscription_service_cycle_anchor']|str" + ] """ The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted. """ diff --git a/stripe/params/_subscription_list_params.py b/stripe/params/_subscription_list_params.py index 159f1356d..b3a0978b2 100644 --- a/stripe/params/_subscription_list_params.py +++ b/stripe/params/_subscription_list_params.py @@ -69,18 +69,7 @@ class SubscriptionListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ status: NotRequired[ - Literal[ - "active", - "all", - "canceled", - "ended", - "incomplete", - "incomplete_expired", - "past_due", - "paused", - "trialing", - "unpaid", - ] + "Literal['active', 'all', 'canceled', 'ended', 'incomplete', 'incomplete_expired', 'past_due', 'paused', 'trialing', 'unpaid']|str" ] """ The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://docs.stripe.com/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index 5c8937066..6887c443f 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -43,7 +43,7 @@ class SubscriptionModifyParams(RequestOptions): Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. """ cancel_at: NotRequired[ - "Literal['']|int|Literal['max_billed_until', 'max_period_end', 'min_period_end']" + "Literal['']|int|Literal['max_billed_until', 'max_period_end', 'min_period_end']|str" ] """ A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. @@ -148,7 +148,7 @@ class SubscriptionModifyParams(RequestOptions): If specified, the invoicing for the given billing cycle iterations will be processed now. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. @@ -246,7 +246,7 @@ class SubscriptionModifyParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -255,7 +255,7 @@ class SubscriptionModifyParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): class SubscriptionModifyParamsAddInvoiceItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -281,7 +281,7 @@ class SubscriptionModifyParamsAddInvoiceItemPeriodEnd(TypedDict): """ A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. """ - type: Literal["min_item_period_end", "timestamp"] + type: Union[Literal["min_item_period_end", "timestamp"], str] """ Select how to calculate the end of the invoice item period. """ @@ -292,7 +292,7 @@ class SubscriptionModifyParamsAddInvoiceItemPeriodStart(TypedDict): """ A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. """ - type: Literal["max_item_period_start", "now", "timestamp"] + type: Union[Literal["max_item_period_start", "now", "timestamp"], str] """ Select how to calculate the start of the invoice item period. """ @@ -337,7 +337,7 @@ class SubscriptionModifyParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -382,7 +382,7 @@ class SubscriptionModifyParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -416,7 +416,7 @@ class SubscriptionModifyParamsCancellationDetails(TypedDict): Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. """ feedback: NotRequired[ - "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" + "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']|str" ] """ The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. @@ -457,14 +457,14 @@ class SubscriptionModifyParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class SubscriptionModifyParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -482,7 +482,7 @@ class SubscriptionModifyParamsDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "now"] + "Literal['current_period_end', 'current_period_start', 'now']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted. @@ -498,7 +498,9 @@ class SubscriptionModifyParamsDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "subscription_service_cycle_anchor"]] + type: NotRequired[ + "Literal['custom', 'subscription_service_cycle_anchor']|str" + ] """ The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted. """ @@ -570,7 +572,7 @@ class SubscriptionModifyParamsInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -687,14 +689,14 @@ class SubscriptionModifyParamsItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class SubscriptionModifyParamsItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -712,7 +714,7 @@ class SubscriptionModifyParamsItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "now"] + "Literal['current_period_end', 'current_period_start', 'now']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted. @@ -728,7 +730,9 @@ class SubscriptionModifyParamsItemDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "subscription_service_cycle_anchor"]] + type: NotRequired[ + "Literal['custom', 'subscription_service_cycle_anchor']|str" + ] """ The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted. """ @@ -816,12 +820,14 @@ class SubscriptionModifyParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration """ - save_default_payment_method: NotRequired[Literal["off", "on_subscription"]] + save_default_payment_method: NotRequired[ + "Literal['off', 'on_subscription']|str" + ] """ Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. """ @@ -930,7 +936,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -940,7 +946,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -949,7 +955,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandat class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -1029,7 +1035,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCard( Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -1043,7 +1049,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOpti """ Amount to be charged for future payments, specified in the presentment currency. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1129,19 +1135,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOpt The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit. """ purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] + "Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -1170,7 +1164,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptio """ Amount to be charged for future payments. If not provided, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ @@ -1179,7 +1173,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptio Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to the subscription servicing interval. @@ -1210,7 +1204,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptio """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1234,7 +1228,7 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( Additional fields for Financial Connections Session creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -1260,8 +1254,14 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFi """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -1273,7 +1273,9 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFi class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( TypedDict, ): - account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + account_subcategories: NotRequired[ + List[Union[Literal["checking", "savings"], str]] + ] """ The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. """ @@ -1312,7 +1314,7 @@ class SubscriptionModifyParamsPrebilling(TypedDict): """ This is used to determine the number of billing cycles to prebill. """ - update_behavior: NotRequired[Literal["prebill", "reset"]] + update_behavior: NotRequired["Literal['prebill', 'reset']|str"] """ Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. """ @@ -1341,7 +1343,9 @@ class SubscriptionModifyParamsTrialSettingsEndBehavior(TypedDict): """ Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`. """ - missing_payment_method: Literal["cancel", "create_invoice", "pause"] + missing_payment_method: Union[ + Literal["cancel", "create_invoice", "pause"], str + ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. """ diff --git a/stripe/params/_subscription_pause_params.py b/stripe/params/_subscription_pause_params.py index a3e38e44d..b031397b2 100644 --- a/stripe/params/_subscription_pause_params.py +++ b/stripe/params/_subscription_pause_params.py @@ -14,7 +14,9 @@ class SubscriptionPauseParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - invoicing_behavior: NotRequired[Literal["invoice", "pending_invoice_item"]] + invoicing_behavior: NotRequired[ + "Literal['invoice', 'pending_invoice_item']|str" + ] """ Determines how to handle debits and credits when pausing. Defaults to `pending_invoice_item`. """ diff --git a/stripe/params/_subscription_resume_params.py b/stripe/params/_subscription_resume_params.py index 5fdfc6f66..8b77f68ce 100644 --- a/stripe/params/_subscription_resume_params.py +++ b/stripe/params/_subscription_resume_params.py @@ -6,7 +6,7 @@ class SubscriptionResumeParams(RequestOptions): - billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] + billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|str"] """ The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle). """ @@ -21,7 +21,7 @@ class SubscriptionResumeParams(RequestOptions): Controls whether Stripe attempts payment on the resumption invoice in the resume request, and how payment on that invoice affects the subscription's status. The default is `resume_on_payment_attempt`. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor` being `unchanged`. When the `billing_cycle_anchor` is set to `now` (default value), no prorations are generated. If no value is passed, the default is `create_prorations`. diff --git a/stripe/params/_subscription_schedule_amend_params.py b/stripe/params/_subscription_schedule_amend_params.py index 2c88be84f..31849bff5 100644 --- a/stripe/params/_subscription_schedule_amend_params.py +++ b/stripe/params/_subscription_schedule_amend_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -22,7 +22,7 @@ class SubscriptionScheduleAmendParams(RequestOptions): Provide any time periods to bill in advance. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ In cases where the amendment changes the currently active phase, @@ -47,7 +47,9 @@ class SubscriptionScheduleAmendParamsAmendment(TypedDict): """ Details to identify the earliest timestamp where the proposed change should take effect. """ - billing_cycle_anchor: NotRequired[Literal["amendment_start", "automatic"]] + billing_cycle_anchor: NotRequired[ + "Literal['amendment_start', 'automatic']|str" + ] """ For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. """ @@ -64,7 +66,7 @@ class SubscriptionScheduleAmendParamsAmendment(TypedDict): Changes to the coupons being redeemed or discounts being applied during the amendment time span. """ effective_at: NotRequired[ - Literal["amendment_start", "billing_period_start"] + "Literal['amendment_start', 'billing_period_start']|str" ] """ Configures how the subscription schedule handles billing for phase transitions. @@ -82,7 +84,7 @@ class SubscriptionScheduleAmendParamsAmendment(TypedDict): Instructions for how to modify phase metadata """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. @@ -93,7 +95,9 @@ class SubscriptionScheduleAmendParamsAmendment(TypedDict): """ Defines how to pause collection for the underlying subscription throughout the duration of the amendment. """ - set_schedule_end: NotRequired[Literal["amendment_end", "amendment_start"]] + set_schedule_end: NotRequired[ + "Literal['amendment_end', 'amendment_start']|str" + ] """ Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. """ @@ -122,14 +126,17 @@ class SubscriptionScheduleAmendParamsAmendmentAmendmentEnd(TypedDict): """ A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. """ - type: Literal[ - "discount_end", - "duration", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", + type: Union[ + Literal[ + "discount_end", + "duration", + "schedule_end", + "timestamp", + "trial_end", + "trial_start", + "upcoming_invoice", + ], + str, ] """ Select one of three ways to pass the `amendment_end`. @@ -146,7 +153,7 @@ class SubscriptionScheduleAmendParamsAmendmentAmendmentEndDiscountEnd( class SubscriptionScheduleAmendParamsAmendmentAmendmentEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -173,15 +180,18 @@ class SubscriptionScheduleAmendParamsAmendmentAmendmentStart(TypedDict): """ A precise Unix timestamp for the amendment to start. """ - type: Literal[ - "amendment_end", - "discount_end", - "now", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", + type: Union[ + Literal[ + "amendment_end", + "discount_end", + "now", + "schedule_end", + "timestamp", + "trial_end", + "trial_start", + "upcoming_invoice", + ], + str, ] """ Select one of three ways to pass the `amendment_start`. @@ -217,7 +227,7 @@ class SubscriptionScheduleAmendParamsAmendmentBillingSchedulesAction( """ Specify which subscription items the billing schedule applies to. """ - type: Literal["remove", "set"] + type: Union[Literal["remove", "set"], str] """ Select the action. """ @@ -255,7 +265,7 @@ class SubscriptionScheduleAmendParamsAmendmentDiscountAction(TypedDict): """ Details of the discount to replace the existing discounts with. """ - type: Literal["add", "remove", "set"] + type: Union[Literal["add", "remove", "set"], str] """ Determines the type of discount action. """ @@ -311,9 +321,7 @@ class SubscriptionScheduleAmendParamsAmendmentDiscountActionAddSettings( Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal[ - "amendment_start", "current_period_end", "current_period_start" - ] + "Literal['amendment_start', 'current_period_end', 'current_period_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted. @@ -329,7 +337,7 @@ class SubscriptionScheduleAmendParamsAmendmentDiscountActionAddSettingsServicePe """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -406,9 +414,7 @@ class SubscriptionScheduleAmendParamsAmendmentDiscountActionSetSettings( Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal[ - "amendment_start", "current_period_end", "current_period_start" - ] + "Literal['amendment_start', 'current_period_end', 'current_period_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted. @@ -424,7 +430,7 @@ class SubscriptionScheduleAmendParamsAmendmentDiscountActionSetSettingsServicePe """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -470,7 +476,7 @@ class SubscriptionScheduleAmendParamsAmendmentItemAction(TypedDict): """ Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. """ - type: Literal["add", "remove", "set"] + type: Union[Literal["add", "remove", "set"], str] """ Determines the type of item action. """ @@ -551,7 +557,7 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscountDiscountEnd( """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -560,7 +566,7 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscountDiscountEnd( class SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -580,9 +586,7 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscountSettings( Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal[ - "amendment_start", "current_period_end", "current_period_start" - ] + "Literal['amendment_start', 'current_period_end', 'current_period_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted. @@ -598,7 +602,7 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscountSettingsServi """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -634,7 +638,7 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionAddTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -722,7 +726,7 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscountDiscountEnd( """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -731,7 +735,7 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscountDiscountEnd( class SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -751,9 +755,7 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscountSettings( Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal[ - "amendment_start", "current_period_end", "current_period_start" - ] + "Literal['amendment_start', 'current_period_end', 'current_period_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `amendment_start` if omitted. @@ -769,7 +771,7 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscountSettingsServi """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -805,7 +807,7 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionSetTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ @@ -824,7 +826,7 @@ class SubscriptionScheduleAmendParamsAmendmentMetadataAction(TypedDict): """ Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. """ - type: Literal["add", "remove", "set"] + type: Union[Literal["add", "remove", "set"], str] """ Select one of three ways to update phase-level `metadata` on subscription schedules. """ @@ -837,14 +839,16 @@ class SubscriptionScheduleAmendParamsAmendmentSetPauseCollection(TypedDict): """ Details of the pause_collection behavior to apply to the amendment. """ - type: Literal["remove", "set"] + type: Union[Literal["remove", "set"], str] """ Determines the type of the pause_collection amendment. """ class SubscriptionScheduleAmendParamsAmendmentSetPauseCollectionSet(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -862,7 +866,7 @@ class SubscriptionScheduleAmendParamsAmendmentTrialSettings(TypedDict): class SubscriptionScheduleAmendParamsAmendmentTrialSettingsEndBehavior( TypedDict, ): - prorate_up_front: NotRequired[Literal["defer", "include"]] + prorate_up_front: NotRequired["Literal['defer', 'include']|str"] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -883,7 +887,7 @@ class SubscriptionScheduleAmendParamsPrebilling(TypedDict): """ When the prebilling invoice should be created. The default value is `now`. """ - update_behavior: NotRequired[Literal["prebill", "reset"]] + update_behavior: NotRequired["Literal['prebill', 'reset']|str"] """ Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. """ @@ -900,7 +904,7 @@ class SubscriptionScheduleAmendParamsPrebillingBillFrom(TypedDict): """ Start the prebilled period at a precise integer timestamp, starting from the Unix epoch. """ - type: Literal["amendment_start", "now", "timestamp"] + type: Union[Literal["amendment_start", "now", "timestamp"], str] """ Select one of several ways to pass the `bill_from` value. """ @@ -932,7 +936,9 @@ class SubscriptionScheduleAmendParamsPrebillingBillUntil(TypedDict): """ End the prebilled period at a precise integer timestamp, starting from the Unix epoch. """ - type: Literal["amendment_end", "duration", "schedule_end", "timestamp"] + type: Union[ + Literal["amendment_end", "duration", "schedule_end", "timestamp"], str + ] """ Select one of several ways to pass the `bill_until` value. """ @@ -948,7 +954,7 @@ class SubscriptionScheduleAmendParamsPrebillingBillUntilAmendmentEnd( class SubscriptionScheduleAmendParamsPrebillingBillUntilDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -959,7 +965,7 @@ class SubscriptionScheduleAmendParamsPrebillingBillUntilDuration(TypedDict): class SubscriptionScheduleAmendParamsScheduleSettings(TypedDict): - end_behavior: NotRequired[Literal["cancel", "release"]] + end_behavior: NotRequired["Literal['cancel', 'release']|str"] """ Behavior of the subscription schedule and underlying subscription when it ends. """ diff --git a/stripe/params/_subscription_schedule_create_params.py b/stripe/params/_subscription_schedule_create_params.py index 02ddbf733..765e2001a 100644 --- a/stripe/params/_subscription_schedule_create_params.py +++ b/stripe/params/_subscription_schedule_create_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -38,7 +38,9 @@ class SubscriptionScheduleCreateParams(RequestOptions): """ Object representing the subscription schedule's default settings. """ - end_behavior: NotRequired[Literal["cancel", "none", "release", "renew"]] + end_behavior: NotRequired[ + "Literal['cancel', 'none', 'release', 'renew']|str" + ] """ Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. """ @@ -83,7 +85,7 @@ class SubscriptionScheduleCreateParamsBillingMode(TypedDict): """ Configure behavior for flexible billing mode. """ - type: Literal["classic", "flexible"] + type: Union[Literal["classic", "flexible"], str] """ Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. """ @@ -135,7 +137,7 @@ class SubscriptionScheduleCreateParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -233,7 +235,7 @@ class SubscriptionScheduleCreateParamsDefaultSettingsAutomaticTaxLiability( """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -278,7 +280,7 @@ class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer( """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -328,7 +330,7 @@ class SubscriptionScheduleCreateParamsPauseSchedulePausePauseAt(TypedDict): """ The Unix timestamp at which to pause the subscription. Required when `type` is `timestamp`. """ - type: Literal["now", "timestamp"] + type: Union[Literal["now", "timestamp"], str] """ When to pause the subscription. Use `now` to pause immediately or `timestamp` to pause at a specific time. """ @@ -341,7 +343,9 @@ class SubscriptionScheduleCreateParamsPauseSchedulePauseSettings(TypedDict): """ Controls what to bill for when pausing the subscription. """ - invoicing_behavior: NotRequired[Literal["invoice", "pending_invoice_item"]] + invoicing_behavior: NotRequired[ + "Literal['invoice', 'pending_invoice_item']|str" + ] """ Determines whether to generate an invoice for outstanding amounts when pausing. """ @@ -410,7 +414,7 @@ class SubscriptionScheduleCreateParamsPauseScheduleResumeResumeAt(TypedDict): """ The Unix timestamp at which to resume the subscription. Required when `type` is `timestamp`. """ - type: Literal["duration", "now", "timestamp"] + type: Union[Literal["duration", "now", "timestamp"], str] """ When to resume the subscription. Use `now` to resume immediately, `duration` to resume after a set duration, or `timestamp` to resume at a specific time. """ @@ -441,7 +445,7 @@ class SubscriptionScheduleCreateParamsPauseScheduleResumeSettings(TypedDict): Controls whether Stripe attempts payment on the resumption invoice and how payment affects the subscription's status. The default is `resume_on_payment_attempt`. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle prorations when the subscription resumes. The default is `create_prorations`. @@ -540,7 +544,7 @@ class SubscriptionScheduleCreateParamsPhase(TypedDict): If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment). """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. @@ -555,7 +559,7 @@ class SubscriptionScheduleCreateParamsPhase(TypedDict): """ If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. """ - trial_continuation: NotRequired[Literal["continue", "none"]] + trial_continuation: NotRequired["Literal['continue', 'none']|str"] """ Specify trial behavior when crossing phase boundaries """ @@ -646,7 +650,7 @@ class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscountDiscountEnd( """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -655,7 +659,7 @@ class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscountDiscountEnd( class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -681,7 +685,7 @@ class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriodEnd(TypedDict): """ A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. """ - type: Literal["min_item_period_end", "phase_end", "timestamp"] + type: Union[Literal["min_item_period_end", "phase_end", "timestamp"], str] """ Select how to calculate the end of the invoice item period. """ @@ -694,7 +698,9 @@ class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriodStart( """ A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. """ - type: Literal["max_item_period_start", "phase_start", "timestamp"] + type: Union[ + Literal["max_item_period_start", "phase_start", "timestamp"], str + ] """ Select how to calculate the start of the invoice item period. """ @@ -741,7 +747,7 @@ class SubscriptionScheduleCreateParamsPhaseAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -796,7 +802,7 @@ class SubscriptionScheduleCreateParamsPhaseDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -805,7 +811,7 @@ class SubscriptionScheduleCreateParamsPhaseDiscountDiscountEnd(TypedDict): class SubscriptionScheduleCreateParamsPhaseDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -823,7 +829,7 @@ class SubscriptionScheduleCreateParamsPhaseDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "phase_start"] + "Literal['current_period_end', 'current_period_start', 'phase_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `phase_start` if omitted. @@ -839,7 +845,7 @@ class SubscriptionScheduleCreateParamsPhaseDiscountSettingsServicePeriodAnchorCo """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -903,7 +909,7 @@ class SubscriptionScheduleCreateParamsPhaseInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -1003,7 +1009,7 @@ class SubscriptionScheduleCreateParamsPhaseItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -1012,7 +1018,7 @@ class SubscriptionScheduleCreateParamsPhaseItemDiscountDiscountEnd(TypedDict): class SubscriptionScheduleCreateParamsPhaseItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1030,7 +1036,7 @@ class SubscriptionScheduleCreateParamsPhaseItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "phase_start"] + "Literal['current_period_end', 'current_period_start', 'phase_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `phase_start` if omitted. @@ -1046,7 +1052,7 @@ class SubscriptionScheduleCreateParamsPhaseItemDiscountSettingsServicePeriodAnch """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -1120,14 +1126,16 @@ class SubscriptionScheduleCreateParamsPhaseItemTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ class SubscriptionScheduleCreateParamsPhasePauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -1154,7 +1162,7 @@ class SubscriptionScheduleCreateParamsPhaseTrialSettings(TypedDict): class SubscriptionScheduleCreateParamsPhaseTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] + prorate_up_front: NotRequired["Literal['defer', 'include']|str"] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -1165,7 +1173,7 @@ class SubscriptionScheduleCreateParamsPrebilling(TypedDict): """ This is used to determine the number of billing cycles to prebill. """ - update_behavior: NotRequired[Literal["prebill", "reset"]] + update_behavior: NotRequired["Literal['prebill', 'reset']|str"] """ Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. """ diff --git a/stripe/params/_subscription_schedule_modify_params.py b/stripe/params/_subscription_schedule_modify_params.py index ac685f721..c214f0b5d 100644 --- a/stripe/params/_subscription_schedule_modify_params.py +++ b/stripe/params/_subscription_schedule_modify_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -26,7 +26,9 @@ class SubscriptionScheduleModifyParams(RequestOptions): """ Object representing the subscription schedule's default settings. """ - end_behavior: NotRequired[Literal["cancel", "none", "release", "renew"]] + end_behavior: NotRequired[ + "Literal['cancel', 'none', 'release', 'renew']|str" + ] """ Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. """ @@ -55,7 +57,7 @@ class SubscriptionScheduleModifyParams(RequestOptions): If specified, the invoicing for the given billing cycle iterations will be processed now. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`. @@ -103,7 +105,7 @@ class SubscriptionScheduleModifyParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -201,7 +203,7 @@ class SubscriptionScheduleModifyParamsDefaultSettingsAutomaticTaxLiability( """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -246,7 +248,7 @@ class SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer( """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -298,7 +300,7 @@ class SubscriptionScheduleModifyParamsPauseSchedulePausePauseAt(TypedDict): """ The Unix timestamp at which to pause the subscription. Required when `type` is `timestamp`. """ - type: Literal["now", "timestamp"] + type: Union[Literal["now", "timestamp"], str] """ When to pause the subscription. Use `now` to pause immediately or `timestamp` to pause at a specific time. """ @@ -311,7 +313,9 @@ class SubscriptionScheduleModifyParamsPauseSchedulePauseSettings(TypedDict): """ Controls what to bill for when pausing the subscription. """ - invoicing_behavior: NotRequired[Literal["invoice", "pending_invoice_item"]] + invoicing_behavior: NotRequired[ + "Literal['invoice', 'pending_invoice_item']|str" + ] """ Determines whether to generate an invoice for outstanding amounts when pausing. """ @@ -382,7 +386,7 @@ class SubscriptionScheduleModifyParamsPauseScheduleResumeResumeAt(TypedDict): """ The Unix timestamp at which to resume the subscription. Required when `type` is `timestamp`. """ - type: Literal["duration", "now", "timestamp"] + type: Union[Literal["duration", "now", "timestamp"], str] """ When to resume the subscription. Use `now` to resume immediately, `duration` to resume after a set duration, or `timestamp` to resume at a specific time. """ @@ -413,7 +417,7 @@ class SubscriptionScheduleModifyParamsPauseScheduleResumeSettings(TypedDict): Controls whether Stripe attempts payment on the resumption invoice and how payment affects the subscription's status. The default is `resume_on_payment_attempt`. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle prorations when the subscription resumes. The default is `create_prorations`. @@ -512,7 +516,7 @@ class SubscriptionScheduleModifyParamsPhase(TypedDict): If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment). """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. @@ -531,7 +535,7 @@ class SubscriptionScheduleModifyParamsPhase(TypedDict): """ If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. """ - trial_continuation: NotRequired[Literal["continue", "none"]] + trial_continuation: NotRequired["Literal['continue', 'none']|str"] """ Specify trial behavior when crossing phase boundaries """ @@ -622,7 +626,7 @@ class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemDiscountDiscountEnd( """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -631,7 +635,7 @@ class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemDiscountDiscountEnd( class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -657,7 +661,7 @@ class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemPeriodEnd(TypedDict): """ A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. """ - type: Literal["min_item_period_end", "phase_end", "timestamp"] + type: Union[Literal["min_item_period_end", "phase_end", "timestamp"], str] """ Select how to calculate the end of the invoice item period. """ @@ -670,7 +674,9 @@ class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemPeriodStart( """ A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. """ - type: Literal["max_item_period_start", "phase_start", "timestamp"] + type: Union[ + Literal["max_item_period_start", "phase_start", "timestamp"], str + ] """ Select how to calculate the start of the invoice item period. """ @@ -717,7 +723,7 @@ class SubscriptionScheduleModifyParamsPhaseAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -772,7 +778,7 @@ class SubscriptionScheduleModifyParamsPhaseDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -781,7 +787,7 @@ class SubscriptionScheduleModifyParamsPhaseDiscountDiscountEnd(TypedDict): class SubscriptionScheduleModifyParamsPhaseDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -799,7 +805,7 @@ class SubscriptionScheduleModifyParamsPhaseDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "phase_start"] + "Literal['current_period_end', 'current_period_start', 'phase_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `phase_start` if omitted. @@ -815,7 +821,7 @@ class SubscriptionScheduleModifyParamsPhaseDiscountSettingsServicePeriodAnchorCo """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -879,7 +885,7 @@ class SubscriptionScheduleModifyParamsPhaseInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -979,7 +985,7 @@ class SubscriptionScheduleModifyParamsPhaseItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -988,7 +994,7 @@ class SubscriptionScheduleModifyParamsPhaseItemDiscountDiscountEnd(TypedDict): class SubscriptionScheduleModifyParamsPhaseItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1006,7 +1012,7 @@ class SubscriptionScheduleModifyParamsPhaseItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "phase_start"] + "Literal['current_period_end', 'current_period_start', 'phase_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `phase_start` if omitted. @@ -1022,7 +1028,7 @@ class SubscriptionScheduleModifyParamsPhaseItemDiscountSettingsServicePeriodAnch """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -1096,14 +1102,16 @@ class SubscriptionScheduleModifyParamsPhaseItemTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ class SubscriptionScheduleModifyParamsPhasePauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -1130,7 +1138,7 @@ class SubscriptionScheduleModifyParamsPhaseTrialSettings(TypedDict): class SubscriptionScheduleModifyParamsPhaseTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] + prorate_up_front: NotRequired["Literal['defer', 'include']|str"] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -1141,7 +1149,7 @@ class SubscriptionScheduleModifyParamsPrebilling(TypedDict): """ This is used to determine the number of billing cycles to prebill. """ - update_behavior: NotRequired[Literal["prebill", "reset"]] + update_behavior: NotRequired["Literal['prebill', 'reset']|str"] """ Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. """ diff --git a/stripe/params/_subscription_schedule_update_params.py b/stripe/params/_subscription_schedule_update_params.py index f8882ff37..0f6b69b75 100644 --- a/stripe/params/_subscription_schedule_update_params.py +++ b/stripe/params/_subscription_schedule_update_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -25,7 +25,9 @@ class SubscriptionScheduleUpdateParams(TypedDict): """ Object representing the subscription schedule's default settings. """ - end_behavior: NotRequired[Literal["cancel", "none", "release", "renew"]] + end_behavior: NotRequired[ + "Literal['cancel', 'none', 'release', 'renew']|str" + ] """ Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. """ @@ -54,7 +56,7 @@ class SubscriptionScheduleUpdateParams(TypedDict): If specified, the invoicing for the given billing cycle iterations will be processed now. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`. @@ -102,7 +104,7 @@ class SubscriptionScheduleUpdateParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -200,7 +202,7 @@ class SubscriptionScheduleUpdateParamsDefaultSettingsAutomaticTaxLiability( """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -245,7 +247,7 @@ class SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer( """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -297,7 +299,7 @@ class SubscriptionScheduleUpdateParamsPauseSchedulePausePauseAt(TypedDict): """ The Unix timestamp at which to pause the subscription. Required when `type` is `timestamp`. """ - type: Literal["now", "timestamp"] + type: Union[Literal["now", "timestamp"], str] """ When to pause the subscription. Use `now` to pause immediately or `timestamp` to pause at a specific time. """ @@ -310,7 +312,9 @@ class SubscriptionScheduleUpdateParamsPauseSchedulePauseSettings(TypedDict): """ Controls what to bill for when pausing the subscription. """ - invoicing_behavior: NotRequired[Literal["invoice", "pending_invoice_item"]] + invoicing_behavior: NotRequired[ + "Literal['invoice', 'pending_invoice_item']|str" + ] """ Determines whether to generate an invoice for outstanding amounts when pausing. """ @@ -381,7 +385,7 @@ class SubscriptionScheduleUpdateParamsPauseScheduleResumeResumeAt(TypedDict): """ The Unix timestamp at which to resume the subscription. Required when `type` is `timestamp`. """ - type: Literal["duration", "now", "timestamp"] + type: Union[Literal["duration", "now", "timestamp"], str] """ When to resume the subscription. Use `now` to resume immediately, `duration` to resume after a set duration, or `timestamp` to resume at a specific time. """ @@ -412,7 +416,7 @@ class SubscriptionScheduleUpdateParamsPauseScheduleResumeSettings(TypedDict): Controls whether Stripe attempts payment on the resumption invoice and how payment affects the subscription's status. The default is `resume_on_payment_attempt`. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle prorations when the subscription resumes. The default is `create_prorations`. @@ -511,7 +515,7 @@ class SubscriptionScheduleUpdateParamsPhase(TypedDict): If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment). """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. @@ -530,7 +534,7 @@ class SubscriptionScheduleUpdateParamsPhase(TypedDict): """ If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. """ - trial_continuation: NotRequired[Literal["continue", "none"]] + trial_continuation: NotRequired["Literal['continue', 'none']|str"] """ Specify trial behavior when crossing phase boundaries """ @@ -621,7 +625,7 @@ class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemDiscountDiscountEnd( """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -630,7 +634,7 @@ class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemDiscountDiscountEnd( class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -656,7 +660,7 @@ class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemPeriodEnd(TypedDict): """ A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. """ - type: Literal["min_item_period_end", "phase_end", "timestamp"] + type: Union[Literal["min_item_period_end", "phase_end", "timestamp"], str] """ Select how to calculate the end of the invoice item period. """ @@ -669,7 +673,9 @@ class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemPeriodStart( """ A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. """ - type: Literal["max_item_period_start", "phase_start", "timestamp"] + type: Union[ + Literal["max_item_period_start", "phase_start", "timestamp"], str + ] """ Select how to calculate the start of the invoice item period. """ @@ -716,7 +722,7 @@ class SubscriptionScheduleUpdateParamsPhaseAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -771,7 +777,7 @@ class SubscriptionScheduleUpdateParamsPhaseDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -780,7 +786,7 @@ class SubscriptionScheduleUpdateParamsPhaseDiscountDiscountEnd(TypedDict): class SubscriptionScheduleUpdateParamsPhaseDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -798,7 +804,7 @@ class SubscriptionScheduleUpdateParamsPhaseDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "phase_start"] + "Literal['current_period_end', 'current_period_start', 'phase_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `phase_start` if omitted. @@ -814,7 +820,7 @@ class SubscriptionScheduleUpdateParamsPhaseDiscountSettingsServicePeriodAnchorCo """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -878,7 +884,7 @@ class SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -978,7 +984,7 @@ class SubscriptionScheduleUpdateParamsPhaseItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -987,7 +993,7 @@ class SubscriptionScheduleUpdateParamsPhaseItemDiscountDiscountEnd(TypedDict): class SubscriptionScheduleUpdateParamsPhaseItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -1005,7 +1011,7 @@ class SubscriptionScheduleUpdateParamsPhaseItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "phase_start"] + "Literal['current_period_end', 'current_period_start', 'phase_start']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `phase_start` if omitted. @@ -1021,7 +1027,7 @@ class SubscriptionScheduleUpdateParamsPhaseItemDiscountSettingsServicePeriodAnch """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "inherit"]] + type: NotRequired["Literal['custom', 'inherit']|str"] """ The type of service period anchor config. Defaults to `inherit` if omitted. """ @@ -1095,14 +1101,16 @@ class SubscriptionScheduleUpdateParamsPhaseItemTrial(TypedDict): """ List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. """ - type: Literal["free", "paid"] + type: Union[Literal["free", "paid"], str] """ Determines the type of trial for this item. """ class SubscriptionScheduleUpdateParamsPhasePauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + behavior: Union[ + Literal["keep_as_draft", "mark_uncollectible", "void"], str + ] """ The payment collection behavior for this subscription while paused. """ @@ -1129,7 +1137,7 @@ class SubscriptionScheduleUpdateParamsPhaseTrialSettings(TypedDict): class SubscriptionScheduleUpdateParamsPhaseTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] + prorate_up_front: NotRequired["Literal['defer', 'include']|str"] """ Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. """ @@ -1140,7 +1148,7 @@ class SubscriptionScheduleUpdateParamsPrebilling(TypedDict): """ This is used to determine the number of billing cycles to prebill. """ - update_behavior: NotRequired[Literal["prebill", "reset"]] + update_behavior: NotRequired["Literal['prebill', 'reset']|str"] """ Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. """ diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index 4f23703df..359200e57 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -42,7 +42,7 @@ class SubscriptionUpdateParams(TypedDict): Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. """ cancel_at: NotRequired[ - "Literal['']|int|Literal['max_billed_until', 'max_period_end', 'min_period_end']" + "Literal['']|int|Literal['max_billed_until', 'max_period_end', 'min_period_end']|str" ] """ A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. @@ -147,7 +147,7 @@ class SubscriptionUpdateParams(TypedDict): If specified, the invoicing for the given billing cycle iterations will be processed now. """ proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] + "Literal['always_invoice', 'create_prorations', 'none']|str" ] """ Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. @@ -245,7 +245,7 @@ class SubscriptionUpdateParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ @@ -254,7 +254,7 @@ class SubscriptionUpdateParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): class SubscriptionUpdateParamsAddInvoiceItemDiscountDiscountEndDuration( TypedDict, ): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -280,7 +280,7 @@ class SubscriptionUpdateParamsAddInvoiceItemPeriodEnd(TypedDict): """ A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. """ - type: Literal["min_item_period_end", "timestamp"] + type: Union[Literal["min_item_period_end", "timestamp"], str] """ Select how to calculate the end of the invoice item period. """ @@ -291,7 +291,7 @@ class SubscriptionUpdateParamsAddInvoiceItemPeriodStart(TypedDict): """ A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. """ - type: Literal["max_item_period_start", "now", "timestamp"] + type: Union[Literal["max_item_period_start", "now", "timestamp"], str] """ Select how to calculate the start of the invoice item period. """ @@ -336,7 +336,7 @@ class SubscriptionUpdateParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -381,7 +381,7 @@ class SubscriptionUpdateParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -415,7 +415,7 @@ class SubscriptionUpdateParamsCancellationDetails(TypedDict): Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. """ feedback: NotRequired[ - "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" + "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']|str" ] """ The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. @@ -456,14 +456,14 @@ class SubscriptionUpdateParamsDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class SubscriptionUpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -481,7 +481,7 @@ class SubscriptionUpdateParamsDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "now"] + "Literal['current_period_end', 'current_period_start', 'now']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted. @@ -497,7 +497,9 @@ class SubscriptionUpdateParamsDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "subscription_service_cycle_anchor"]] + type: NotRequired[ + "Literal['custom', 'subscription_service_cycle_anchor']|str" + ] """ The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted. """ @@ -569,7 +571,7 @@ class SubscriptionUpdateParamsInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -686,14 +688,14 @@ class SubscriptionUpdateParamsItemDiscountDiscountEnd(TypedDict): """ A precise Unix timestamp for the discount to end. Must be in the future. """ - type: Literal["duration", "timestamp"] + type: Union[Literal["duration", "timestamp"], str] """ The type of calculation made to determine when the discount ends. """ class SubscriptionUpdateParamsItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. """ @@ -711,7 +713,7 @@ class SubscriptionUpdateParamsItemDiscountSettings(TypedDict): Configures service period cycle anchoring. """ start_date: NotRequired[ - Literal["current_period_end", "current_period_start", "now"] + "Literal['current_period_end', 'current_period_start', 'now']|str" ] """ The start date of the discount's service period when applying a coupon or promotion code with a service period duration. Defaults to `now` if omitted. @@ -727,7 +729,9 @@ class SubscriptionUpdateParamsItemDiscountSettingsServicePeriodAnchorConfig( """ Anchor the service period to a custom date. Type must be `custom` to specify. """ - type: NotRequired[Literal["custom", "subscription_service_cycle_anchor"]] + type: NotRequired[ + "Literal['custom', 'subscription_service_cycle_anchor']|str" + ] """ The type of service period anchor config. Defaults to `subscription_service_cycle_anchor` if omitted. """ @@ -815,12 +819,14 @@ class SubscriptionUpdateParamsPaymentSettings(TypedDict): Payment-method-specific configuration to provide to invoices created by the subscription. """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay']]" + "Literal['']|List[Union[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'alipay', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'check_scan', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'momo', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'revolut_pay', 'satispay', 'sepa_credit_transfer', 'sepa_debit', 'sequra', 'sofort', 'stripe_balance', 'swish', 'twint', 'upi', 'us_bank_account', 'wechat_pay'], str]]" ] """ The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration """ - save_default_payment_method: NotRequired[Literal["off", "on_subscription"]] + save_default_payment_method: NotRequired[ + "Literal['off', 'on_subscription']|str" + ] """ Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. """ @@ -929,7 +935,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( Additional fields for Mandate creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -939,7 +945,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -948,7 +954,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandat class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( TypedDict, ): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -1028,7 +1034,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCard( Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -1042,7 +1048,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCardMandateOpti """ Amount to be charged for future payments, specified in the presentment currency. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1128,19 +1134,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOpt The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit. """ purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] + "Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -1169,7 +1163,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptio """ Amount to be charged for future payments. If not provided, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ @@ -1178,7 +1172,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptio Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to the subscription servicing interval. @@ -1209,7 +1203,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptio """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1233,7 +1227,7 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( Additional fields for Financial Connections Session creation """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -1259,8 +1253,14 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFi """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -1272,7 +1272,9 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFi class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( TypedDict, ): - account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + account_subcategories: NotRequired[ + List[Union[Literal["checking", "savings"], str]] + ] """ The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. """ @@ -1311,7 +1313,7 @@ class SubscriptionUpdateParamsPrebilling(TypedDict): """ This is used to determine the number of billing cycles to prebill. """ - update_behavior: NotRequired[Literal["prebill", "reset"]] + update_behavior: NotRequired["Literal['prebill', 'reset']|str"] """ Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. """ @@ -1340,7 +1342,9 @@ class SubscriptionUpdateParamsTrialSettingsEndBehavior(TypedDict): """ Indicates how the subscription's billing cycle anchor is reset when a trial ends. Defaults to `now`. """ - missing_payment_method: Literal["cancel", "create_invoice", "pause"] + missing_payment_method: Union[ + Literal["cancel", "create_invoice", "pause"], str + ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. """ diff --git a/stripe/params/_tax_id_create_params.py b/stripe/params/_tax_id_create_params.py index 0203eccfc..5b88345eb 100644 --- a/stripe/params/_tax_id_create_params.py +++ b/stripe/params/_tax_id_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -154,7 +154,7 @@ class TaxIdCreateParamsOwner(TypedDict): """ ID of the Account representing the customer that the tax ID belongs to. Can be used in place of `customer` when `type=customer` """ - type: Literal["account", "application", "customer", "self"] + type: Union[Literal["account", "application", "customer", "self"], str] """ Type of owner referenced. """ diff --git a/stripe/params/_tax_id_list_params.py b/stripe/params/_tax_id_list_params.py index 7c30b8178..dce89306e 100644 --- a/stripe/params/_tax_id_list_params.py +++ b/stripe/params/_tax_id_list_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -41,7 +41,7 @@ class TaxIdListParamsOwner(TypedDict): """ ID of the Account representing the customer that the tax ID belongs to. Can be used in place of `customer` when `type=customer` """ - type: Literal["account", "application", "customer", "self"] + type: Union[Literal["account", "application", "customer", "self"], str] """ Type of owner referenced. """ diff --git a/stripe/params/_token_create_params.py b/stripe/params/_token_create_params.py index deebc277d..4d3ab4d26 100644 --- a/stripe/params/_token_create_params.py +++ b/stripe/params/_token_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -43,7 +43,7 @@ class TokenCreateParams(RequestOptions): class TokenCreateParamsAccount(TypedDict): business_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] + "Literal['company', 'government_entity', 'individual', 'non_profit']|str" ] """ The business type. @@ -124,7 +124,7 @@ class TokenCreateParamsAccountCompany(TypedDict): Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct. """ ownership_exemption_reason: NotRequired[ - "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']" + "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']|str" ] """ This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. @@ -150,7 +150,7 @@ class TokenCreateParamsAccountCompany(TypedDict): This hash is used to attest that the representative is authorized to act as the representative of their legal entity. """ structure: NotRequired[ - "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" + "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']|str" ] """ The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. @@ -424,7 +424,7 @@ class TokenCreateParamsAccountIndividual(TypedDict): """ The individual's phone number. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. """ @@ -795,7 +795,9 @@ class TokenCreateParamsCard(TypedDict): class TokenCreateParamsCardNetworks(TypedDict): - preferred: NotRequired[Literal["cartes_bancaires", "mastercard", "visa"]] + preferred: NotRequired[ + "Literal['cartes_bancaires', 'mastercard', 'visa']|str" + ] """ The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. """ @@ -905,7 +907,7 @@ class TokenCreateParamsPerson(TypedDict): """ The person's phone number. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. """ @@ -1242,14 +1244,17 @@ class TokenCreateParamsPersonUsCfpbData(TypedDict): class TokenCreateParamsPersonUsCfpbDataEthnicityDetails(TypedDict): ethnicity: NotRequired[ List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", + Union[ + Literal[ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican", + ], + str, ] ] ] @@ -1265,31 +1270,34 @@ class TokenCreateParamsPersonUsCfpbDataEthnicityDetails(TypedDict): class TokenCreateParamsPersonUsCfpbDataRaceDetails(TypedDict): race: NotRequired[ List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", + Union[ + Literal[ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white", + ], + str, ] ] ] diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py index 313b9fe24..5a189907e 100644 --- a/stripe/params/_webhook_endpoint_create_params.py +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired @@ -148,312 +148,315 @@ class WebhookEndpointCreateParams(RequestOptions): An optional description of what the webhook is used for. """ enabled_events: List[ - Literal[ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "account_notice.created", - "account_notice.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "balance_settings.updated", - "billing.alert.triggered", - "billing.credit_balance_transaction.created", - "billing.credit_grant.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "capital.financing_offer.accepted", - "capital.financing_offer.accepted_other_offer", - "capital.financing_offer.canceled", - "capital.financing_offer.created", - "capital.financing_offer.expired", - "capital.financing_offer.fully_repaid", - "capital.financing_offer.paid_out", - "capital.financing_offer.rejected", - "capital.financing_offer.replacement_created", - "capital.financing_summary.line_of_credit_update", - "capital.financing_transaction.created", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "climate.order.canceled", - "climate.order.created", - "climate.order.delayed", - "climate.order.delivered", - "climate.order.product_substituted", - "climate.product.created", - "climate.product.pricing_updated", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.collection_paused", - "customer.subscription.collection_resumed", - "customer.subscription.created", - "customer.subscription.custom_event", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.price_migration_failed", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "entitlements.active_entitlement_summary.updated", - "file.created", - "financial_connections.account.account_numbers_updated", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.expected_deactivation_date_updated", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "financial_connections.account.refreshed_inferred_balances", - "financial_connections.account.refreshed_ownership", - "financial_connections.account.refreshed_transactions", - "financial_connections.account.supported_payment_method_types_updated", - "financial_connections.account.upcoming_account_number_expiry", - "financial_connections.account.upcoming_deactivation", - "financial_connections.authorization.expected_deactivation_date_updated", - "financial_connections.authorization.upcoming_deactivation", - "financial_connections.session.updated", - "fx_quote.expired", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.overdue", - "invoice.overpaid", - "invoice.paid", - "invoice.payment.overpaid", - "invoice.payment_action_required", - "invoice.payment_attempt_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoice.will_be_due", - "invoice_payment.paid", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.funds_rescinded", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_dispute_settlement_detail.created", - "issuing_dispute_settlement_detail.updated", - "issuing_fraud_liability_debit.created", - "issuing_personalization_design.activated", - "issuing_personalization_design.deactivated", - "issuing_personalization_design.rejected", - "issuing_personalization_design.updated", - "issuing_settlement.created", - "issuing_settlement.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.purchase_details_receipt_updated", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "privacy.redaction_job.canceled", - "privacy.redaction_job.created", - "privacy.redaction_job.ready", - "privacy.redaction_job.succeeded", - "privacy.redaction_job.validation_error", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accept_failed", - "quote.accepted", - "quote.accepting", - "quote.canceled", - "quote.created", - "quote.draft", - "quote.finalized", - "quote.reestimate_failed", - "quote.reestimated", - "quote.stale", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.failed", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "reserve.hold.created", - "reserve.hold.updated", - "reserve.plan.created", - "reserve.plan.disabled", - "reserve.plan.expired", - "reserve.plan.updated", - "reserve.release.created", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.price_migration_failed", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.form.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "terminal.reader.action_updated", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_payment.tracking_details_updated", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.outbound_transfer.tracking_details_updated", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", + Union[ + Literal[ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "account_notice.created", + "account_notice.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "balance_settings.updated", + "billing.alert.triggered", + "billing.credit_balance_transaction.created", + "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "capital.financing_offer.accepted", + "capital.financing_offer.accepted_other_offer", + "capital.financing_offer.canceled", + "capital.financing_offer.created", + "capital.financing_offer.expired", + "capital.financing_offer.fully_repaid", + "capital.financing_offer.paid_out", + "capital.financing_offer.rejected", + "capital.financing_offer.replacement_created", + "capital.financing_summary.line_of_credit_update", + "capital.financing_transaction.created", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.collection_paused", + "customer.subscription.collection_resumed", + "customer.subscription.created", + "customer.subscription.custom_event", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.price_migration_failed", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "entitlements.active_entitlement_summary.updated", + "file.created", + "financial_connections.account.account_numbers_updated", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.expected_deactivation_date_updated", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_inferred_balances", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", + "financial_connections.account.supported_payment_method_types_updated", + "financial_connections.account.upcoming_account_number_expiry", + "financial_connections.account.upcoming_deactivation", + "financial_connections.authorization.expected_deactivation_date_updated", + "financial_connections.authorization.upcoming_deactivation", + "financial_connections.session.updated", + "fx_quote.expired", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.overdue", + "invoice.overpaid", + "invoice.paid", + "invoice.payment.overpaid", + "invoice.payment_action_required", + "invoice.payment_attempt_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "invoice_payment.paid", + "invoiceitem.created", + "invoiceitem.deleted", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.funds_rescinded", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_dispute_settlement_detail.created", + "issuing_dispute_settlement_detail.updated", + "issuing_fraud_liability_debit.created", + "issuing_personalization_design.activated", + "issuing_personalization_design.deactivated", + "issuing_personalization_design.rejected", + "issuing_personalization_design.updated", + "issuing_settlement.created", + "issuing_settlement.updated", + "issuing_token.created", + "issuing_token.updated", + "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", + "issuing_transaction.updated", + "mandate.updated", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.reconciliation_completed", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "privacy.redaction_job.canceled", + "privacy.redaction_job.created", + "privacy.redaction_job.ready", + "privacy.redaction_job.succeeded", + "privacy.redaction_job.validation_error", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accept_failed", + "quote.accepted", + "quote.accepting", + "quote.canceled", + "quote.created", + "quote.draft", + "quote.finalized", + "quote.reestimate_failed", + "quote.reestimated", + "quote.stale", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "refund.created", + "refund.failed", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "reserve.hold.created", + "reserve.hold.updated", + "reserve.plan.created", + "reserve.plan.disabled", + "reserve.plan.expired", + "reserve.plan.updated", + "reserve.release.created", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.price_migration_failed", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax.form.updated", + "tax.settings.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "terminal.reader.action_updated", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_payment.tracking_details_updated", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.outbound_transfer.tracking_details_updated", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", + ], + str, ] ] """ diff --git a/stripe/params/_webhook_endpoint_modify_params.py b/stripe/params/_webhook_endpoint_modify_params.py index 717613716..33c503cd5 100644 --- a/stripe/params/_webhook_endpoint_modify_params.py +++ b/stripe/params/_webhook_endpoint_modify_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired @@ -17,312 +17,315 @@ class WebhookEndpointModifyParams(RequestOptions): """ enabled_events: NotRequired[ List[ - Literal[ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "account_notice.created", - "account_notice.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "balance_settings.updated", - "billing.alert.triggered", - "billing.credit_balance_transaction.created", - "billing.credit_grant.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "capital.financing_offer.accepted", - "capital.financing_offer.accepted_other_offer", - "capital.financing_offer.canceled", - "capital.financing_offer.created", - "capital.financing_offer.expired", - "capital.financing_offer.fully_repaid", - "capital.financing_offer.paid_out", - "capital.financing_offer.rejected", - "capital.financing_offer.replacement_created", - "capital.financing_summary.line_of_credit_update", - "capital.financing_transaction.created", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "climate.order.canceled", - "climate.order.created", - "climate.order.delayed", - "climate.order.delivered", - "climate.order.product_substituted", - "climate.product.created", - "climate.product.pricing_updated", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.collection_paused", - "customer.subscription.collection_resumed", - "customer.subscription.created", - "customer.subscription.custom_event", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.price_migration_failed", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "entitlements.active_entitlement_summary.updated", - "file.created", - "financial_connections.account.account_numbers_updated", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.expected_deactivation_date_updated", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "financial_connections.account.refreshed_inferred_balances", - "financial_connections.account.refreshed_ownership", - "financial_connections.account.refreshed_transactions", - "financial_connections.account.supported_payment_method_types_updated", - "financial_connections.account.upcoming_account_number_expiry", - "financial_connections.account.upcoming_deactivation", - "financial_connections.authorization.expected_deactivation_date_updated", - "financial_connections.authorization.upcoming_deactivation", - "financial_connections.session.updated", - "fx_quote.expired", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.overdue", - "invoice.overpaid", - "invoice.paid", - "invoice.payment.overpaid", - "invoice.payment_action_required", - "invoice.payment_attempt_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoice.will_be_due", - "invoice_payment.paid", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.funds_rescinded", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_dispute_settlement_detail.created", - "issuing_dispute_settlement_detail.updated", - "issuing_fraud_liability_debit.created", - "issuing_personalization_design.activated", - "issuing_personalization_design.deactivated", - "issuing_personalization_design.rejected", - "issuing_personalization_design.updated", - "issuing_settlement.created", - "issuing_settlement.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.purchase_details_receipt_updated", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "privacy.redaction_job.canceled", - "privacy.redaction_job.created", - "privacy.redaction_job.ready", - "privacy.redaction_job.succeeded", - "privacy.redaction_job.validation_error", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accept_failed", - "quote.accepted", - "quote.accepting", - "quote.canceled", - "quote.created", - "quote.draft", - "quote.finalized", - "quote.reestimate_failed", - "quote.reestimated", - "quote.stale", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.failed", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "reserve.hold.created", - "reserve.hold.updated", - "reserve.plan.created", - "reserve.plan.disabled", - "reserve.plan.expired", - "reserve.plan.updated", - "reserve.release.created", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.price_migration_failed", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.form.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "terminal.reader.action_updated", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_payment.tracking_details_updated", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.outbound_transfer.tracking_details_updated", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", + Union[ + Literal[ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "account_notice.created", + "account_notice.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "balance_settings.updated", + "billing.alert.triggered", + "billing.credit_balance_transaction.created", + "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "capital.financing_offer.accepted", + "capital.financing_offer.accepted_other_offer", + "capital.financing_offer.canceled", + "capital.financing_offer.created", + "capital.financing_offer.expired", + "capital.financing_offer.fully_repaid", + "capital.financing_offer.paid_out", + "capital.financing_offer.rejected", + "capital.financing_offer.replacement_created", + "capital.financing_summary.line_of_credit_update", + "capital.financing_transaction.created", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.collection_paused", + "customer.subscription.collection_resumed", + "customer.subscription.created", + "customer.subscription.custom_event", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.price_migration_failed", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "entitlements.active_entitlement_summary.updated", + "file.created", + "financial_connections.account.account_numbers_updated", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.expected_deactivation_date_updated", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_inferred_balances", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", + "financial_connections.account.supported_payment_method_types_updated", + "financial_connections.account.upcoming_account_number_expiry", + "financial_connections.account.upcoming_deactivation", + "financial_connections.authorization.expected_deactivation_date_updated", + "financial_connections.authorization.upcoming_deactivation", + "financial_connections.session.updated", + "fx_quote.expired", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.overdue", + "invoice.overpaid", + "invoice.paid", + "invoice.payment.overpaid", + "invoice.payment_action_required", + "invoice.payment_attempt_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "invoice_payment.paid", + "invoiceitem.created", + "invoiceitem.deleted", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.funds_rescinded", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_dispute_settlement_detail.created", + "issuing_dispute_settlement_detail.updated", + "issuing_fraud_liability_debit.created", + "issuing_personalization_design.activated", + "issuing_personalization_design.deactivated", + "issuing_personalization_design.rejected", + "issuing_personalization_design.updated", + "issuing_settlement.created", + "issuing_settlement.updated", + "issuing_token.created", + "issuing_token.updated", + "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", + "issuing_transaction.updated", + "mandate.updated", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.reconciliation_completed", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "privacy.redaction_job.canceled", + "privacy.redaction_job.created", + "privacy.redaction_job.ready", + "privacy.redaction_job.succeeded", + "privacy.redaction_job.validation_error", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accept_failed", + "quote.accepted", + "quote.accepting", + "quote.canceled", + "quote.created", + "quote.draft", + "quote.finalized", + "quote.reestimate_failed", + "quote.reestimated", + "quote.stale", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "refund.created", + "refund.failed", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "reserve.hold.created", + "reserve.hold.updated", + "reserve.plan.created", + "reserve.plan.disabled", + "reserve.plan.expired", + "reserve.plan.updated", + "reserve.release.created", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.price_migration_failed", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax.form.updated", + "tax.settings.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "terminal.reader.action_updated", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_payment.tracking_details_updated", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.outbound_transfer.tracking_details_updated", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", + ], + str, ] ] ] diff --git a/stripe/params/_webhook_endpoint_update_params.py b/stripe/params/_webhook_endpoint_update_params.py index 20731ac5b..4b1c7966a 100644 --- a/stripe/params/_webhook_endpoint_update_params.py +++ b/stripe/params/_webhook_endpoint_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -16,312 +16,315 @@ class WebhookEndpointUpdateParams(TypedDict): """ enabled_events: NotRequired[ List[ - Literal[ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "account_notice.created", - "account_notice.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "balance_settings.updated", - "billing.alert.triggered", - "billing.credit_balance_transaction.created", - "billing.credit_grant.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "capital.financing_offer.accepted", - "capital.financing_offer.accepted_other_offer", - "capital.financing_offer.canceled", - "capital.financing_offer.created", - "capital.financing_offer.expired", - "capital.financing_offer.fully_repaid", - "capital.financing_offer.paid_out", - "capital.financing_offer.rejected", - "capital.financing_offer.replacement_created", - "capital.financing_summary.line_of_credit_update", - "capital.financing_transaction.created", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "climate.order.canceled", - "climate.order.created", - "climate.order.delayed", - "climate.order.delivered", - "climate.order.product_substituted", - "climate.product.created", - "climate.product.pricing_updated", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.collection_paused", - "customer.subscription.collection_resumed", - "customer.subscription.created", - "customer.subscription.custom_event", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.price_migration_failed", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "entitlements.active_entitlement_summary.updated", - "file.created", - "financial_connections.account.account_numbers_updated", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.expected_deactivation_date_updated", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "financial_connections.account.refreshed_inferred_balances", - "financial_connections.account.refreshed_ownership", - "financial_connections.account.refreshed_transactions", - "financial_connections.account.supported_payment_method_types_updated", - "financial_connections.account.upcoming_account_number_expiry", - "financial_connections.account.upcoming_deactivation", - "financial_connections.authorization.expected_deactivation_date_updated", - "financial_connections.authorization.upcoming_deactivation", - "financial_connections.session.updated", - "fx_quote.expired", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.overdue", - "invoice.overpaid", - "invoice.paid", - "invoice.payment.overpaid", - "invoice.payment_action_required", - "invoice.payment_attempt_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoice.will_be_due", - "invoice_payment.paid", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.funds_rescinded", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_dispute_settlement_detail.created", - "issuing_dispute_settlement_detail.updated", - "issuing_fraud_liability_debit.created", - "issuing_personalization_design.activated", - "issuing_personalization_design.deactivated", - "issuing_personalization_design.rejected", - "issuing_personalization_design.updated", - "issuing_settlement.created", - "issuing_settlement.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.purchase_details_receipt_updated", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "privacy.redaction_job.canceled", - "privacy.redaction_job.created", - "privacy.redaction_job.ready", - "privacy.redaction_job.succeeded", - "privacy.redaction_job.validation_error", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accept_failed", - "quote.accepted", - "quote.accepting", - "quote.canceled", - "quote.created", - "quote.draft", - "quote.finalized", - "quote.reestimate_failed", - "quote.reestimated", - "quote.stale", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.failed", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "reserve.hold.created", - "reserve.hold.updated", - "reserve.plan.created", - "reserve.plan.disabled", - "reserve.plan.expired", - "reserve.plan.updated", - "reserve.release.created", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.price_migration_failed", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.form.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "terminal.reader.action_updated", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_payment.tracking_details_updated", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.outbound_transfer.tracking_details_updated", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", + Union[ + Literal[ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "account_notice.created", + "account_notice.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "balance_settings.updated", + "billing.alert.triggered", + "billing.credit_balance_transaction.created", + "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "capital.financing_offer.accepted", + "capital.financing_offer.accepted_other_offer", + "capital.financing_offer.canceled", + "capital.financing_offer.created", + "capital.financing_offer.expired", + "capital.financing_offer.fully_repaid", + "capital.financing_offer.paid_out", + "capital.financing_offer.rejected", + "capital.financing_offer.replacement_created", + "capital.financing_summary.line_of_credit_update", + "capital.financing_transaction.created", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.collection_paused", + "customer.subscription.collection_resumed", + "customer.subscription.created", + "customer.subscription.custom_event", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.price_migration_failed", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "entitlements.active_entitlement_summary.updated", + "file.created", + "financial_connections.account.account_numbers_updated", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.expected_deactivation_date_updated", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_inferred_balances", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", + "financial_connections.account.supported_payment_method_types_updated", + "financial_connections.account.upcoming_account_number_expiry", + "financial_connections.account.upcoming_deactivation", + "financial_connections.authorization.expected_deactivation_date_updated", + "financial_connections.authorization.upcoming_deactivation", + "financial_connections.session.updated", + "fx_quote.expired", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.overdue", + "invoice.overpaid", + "invoice.paid", + "invoice.payment.overpaid", + "invoice.payment_action_required", + "invoice.payment_attempt_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "invoice_payment.paid", + "invoiceitem.created", + "invoiceitem.deleted", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.funds_rescinded", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_dispute_settlement_detail.created", + "issuing_dispute_settlement_detail.updated", + "issuing_fraud_liability_debit.created", + "issuing_personalization_design.activated", + "issuing_personalization_design.deactivated", + "issuing_personalization_design.rejected", + "issuing_personalization_design.updated", + "issuing_settlement.created", + "issuing_settlement.updated", + "issuing_token.created", + "issuing_token.updated", + "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", + "issuing_transaction.updated", + "mandate.updated", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.reconciliation_completed", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "privacy.redaction_job.canceled", + "privacy.redaction_job.created", + "privacy.redaction_job.ready", + "privacy.redaction_job.succeeded", + "privacy.redaction_job.validation_error", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accept_failed", + "quote.accepted", + "quote.accepting", + "quote.canceled", + "quote.created", + "quote.draft", + "quote.finalized", + "quote.reestimate_failed", + "quote.reestimated", + "quote.stale", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "refund.created", + "refund.failed", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "reserve.hold.created", + "reserve.hold.updated", + "reserve.plan.created", + "reserve.plan.disabled", + "reserve.plan.expired", + "reserve.plan.updated", + "reserve.release.created", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.price_migration_failed", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax.form.updated", + "tax.settings.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "terminal.reader.action_updated", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_payment.tracking_details_updated", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.outbound_transfer.tracking_details_updated", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", + ], + str, ] ] ] diff --git a/stripe/params/apps/_secret_create_params.py b/stripe/params/apps/_secret_create_params.py index 8fe08f4bd..cf175566d 100644 --- a/stripe/params/apps/_secret_create_params.py +++ b/stripe/params/apps/_secret_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -29,7 +29,7 @@ class SecretCreateParams(RequestOptions): class SecretCreateParamsScope(TypedDict): - type: Literal["account", "user"] + type: Union[Literal["account", "user"], str] """ The secret scope type. """ diff --git a/stripe/params/apps/_secret_delete_where_params.py b/stripe/params/apps/_secret_delete_where_params.py index ad26f74b7..871bd51a3 100644 --- a/stripe/params/apps/_secret_delete_where_params.py +++ b/stripe/params/apps/_secret_delete_where_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -21,7 +21,7 @@ class SecretDeleteWhereParams(RequestOptions): class SecretDeleteWhereParamsScope(TypedDict): - type: Literal["account", "user"] + type: Union[Literal["account", "user"], str] """ The secret scope type. """ diff --git a/stripe/params/apps/_secret_find_params.py b/stripe/params/apps/_secret_find_params.py index 4f47911bc..085086d52 100644 --- a/stripe/params/apps/_secret_find_params.py +++ b/stripe/params/apps/_secret_find_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -21,7 +21,7 @@ class SecretFindParams(RequestOptions): class SecretFindParamsScope(TypedDict): - type: Literal["account", "user"] + type: Union[Literal["account", "user"], str] """ The secret scope type. """ diff --git a/stripe/params/apps/_secret_list_params.py b/stripe/params/apps/_secret_list_params.py index b3856e859..472ccdb3c 100644 --- a/stripe/params/apps/_secret_list_params.py +++ b/stripe/params/apps/_secret_list_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -29,7 +29,7 @@ class SecretListParams(RequestOptions): class SecretListParamsScope(TypedDict): - type: Literal["account", "user"] + type: Union[Literal["account", "user"], str] """ The secret scope type. """ diff --git a/stripe/params/billing/_alert_create_params.py b/stripe/params/billing/_alert_create_params.py index 8669c2da9..a6a9c2e55 100644 --- a/stripe/params/billing/_alert_create_params.py +++ b/stripe/params/billing/_alert_create_params.py @@ -2,13 +2,16 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class AlertCreateParams(RequestOptions): - alert_type: Literal[ - "credit_balance_threshold", "spend_threshold", "usage_threshold" + alert_type: Union[ + Literal[ + "credit_balance_threshold", "spend_threshold", "usage_threshold" + ], + str, ] """ The type of alert to create. @@ -59,7 +62,7 @@ class AlertCreateParamsCreditBalanceThresholdFilter(TypedDict): """ Limit the scope to this credit balance alert only to this customer. """ - type: Literal["customer", "tenant"] + type: Union[Literal["customer", "tenant"], str] """ What type of filter is being applied to this credit balance alert. """ @@ -125,7 +128,7 @@ class AlertCreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConf class AlertCreateParamsCreditBalanceThresholdLte(TypedDict): - balance_type: Literal["custom_pricing_unit", "monetary"] + balance_type: Union[Literal["custom_pricing_unit", "monetary"], str] """ Specify the type of this balance. We currently only support `monetary` billing credits. """ @@ -173,7 +176,7 @@ class AlertCreateParamsSpendThreshold(TypedDict): Filters to scope the spend calculation. """ group_by: NotRequired[ - Literal["billing_cadence", "pricing_plan_subscription"] + "Literal['billing_cadence', 'pricing_plan_subscription']|str" ] """ Defines the granularity of spend aggregation. Defaults to `pricing_plan_subscription`. @@ -214,7 +217,7 @@ class AlertCreateParamsSpendThresholdGte(TypedDict): """ The custom pricing unit amount. Required when type is `custom_pricing_unit`. """ - type: Literal["amount", "custom_pricing_unit"] + type: Union[Literal["amount", "custom_pricing_unit"], str] """ The type of the threshold amount. """ diff --git a/stripe/params/billing/_alert_list_params.py b/stripe/params/billing/_alert_list_params.py index 58eb60a71..2333377a1 100644 --- a/stripe/params/billing/_alert_list_params.py +++ b/stripe/params/billing/_alert_list_params.py @@ -7,9 +7,7 @@ class AlertListParams(RequestOptions): alert_type: NotRequired[ - Literal[ - "credit_balance_threshold", "spend_threshold", "usage_threshold" - ] + "Literal['credit_balance_threshold', 'spend_threshold', 'usage_threshold']|str" ] """ Filter results to only include this type of alert. diff --git a/stripe/params/billing/_credit_balance_summary_retrieve_params.py b/stripe/params/billing/_credit_balance_summary_retrieve_params.py index 6a947c927..770631695 100644 --- a/stripe/params/billing/_credit_balance_summary_retrieve_params.py +++ b/stripe/params/billing/_credit_balance_summary_retrieve_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -35,7 +35,7 @@ class CreditBalanceSummaryRetrieveParamsFilter(TypedDict): """ The credit grant for which to fetch credit balance summary. """ - type: Literal["applicability_scope", "credit_grant"] + type: Union[Literal["applicability_scope", "credit_grant"], str] """ Specify the type of this filter. """ diff --git a/stripe/params/billing/_credit_grant_create_params.py b/stripe/params/billing/_credit_grant_create_params.py index fa220e203..cc700190b 100644 --- a/stripe/params/billing/_credit_grant_create_params.py +++ b/stripe/params/billing/_credit_grant_create_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -16,7 +16,7 @@ class CreditGrantCreateParams(RequestOptions): """ Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. """ - category: NotRequired[Literal["paid", "promotional"]] + category: NotRequired["Literal['paid', 'promotional']|str"] """ The category of this credit grant. It defaults to `paid` if not specified. """ @@ -65,7 +65,7 @@ class CreditGrantCreateParamsAmount(TypedDict): """ The monetary amount. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[Literal["custom_pricing_unit", "monetary"], str] """ The type of this amount. We currently only support `monetary` billing credits. """ diff --git a/stripe/params/billing/_meter_create_params.py b/stripe/params/billing/_meter_create_params.py index d1367a6d2..a178d40fe 100644 --- a/stripe/params/billing/_meter_create_params.py +++ b/stripe/params/billing/_meter_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -26,7 +26,7 @@ class MeterCreateParams(RequestOptions): """ The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. """ - event_time_window: NotRequired[Literal["day", "hour"]] + event_time_window: NotRequired["Literal['day', 'hour']|str"] """ The time window which meter events have been pre-aggregated for, if any. """ @@ -52,7 +52,7 @@ class MeterCreateParamsCustomerMapping(TypedDict): class MeterCreateParamsDefaultAggregation(TypedDict): - formula: Literal["count", "last", "sum"] + formula: Union[Literal["count", "last", "sum"], str] """ Specifies how events are aggregated. """ diff --git a/stripe/params/billing/_meter_event_summary_list_params.py b/stripe/params/billing/_meter_event_summary_list_params.py index 3bde2fd5d..a4885d354 100644 --- a/stripe/params/billing/_meter_event_summary_list_params.py +++ b/stripe/params/billing/_meter_event_summary_list_params.py @@ -54,7 +54,7 @@ class MeterEventSummaryListParams(TypedDict): """ List of value lists corresponding to each key in tenant_keys. Each element contains the values to filter on for the corresponding tenant key. Must be used together with tenant_operator and tenant_keys. Cannot be used with tenant_filters. """ - value_grouping_window: NotRequired[Literal["day", "hour"]] + value_grouping_window: NotRequired["Literal['day', 'hour']|str"] """ Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). """ diff --git a/stripe/params/billing/_meter_list_event_summaries_params.py b/stripe/params/billing/_meter_list_event_summaries_params.py index c1cf1b097..1877ee13e 100644 --- a/stripe/params/billing/_meter_list_event_summaries_params.py +++ b/stripe/params/billing/_meter_list_event_summaries_params.py @@ -55,7 +55,7 @@ class MeterListEventSummariesParams(RequestOptions): """ List of value lists corresponding to each key in tenant_keys. Each element contains the values to filter on for the corresponding tenant key. Must be used together with tenant_operator and tenant_keys. Cannot be used with tenant_filters. """ - value_grouping_window: NotRequired[Literal["day", "hour"]] + value_grouping_window: NotRequired["Literal['day', 'hour']|str"] """ Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). """ diff --git a/stripe/params/billing/_meter_list_params.py b/stripe/params/billing/_meter_list_params.py index 4de12600d..e35d79bd7 100644 --- a/stripe/params/billing/_meter_list_params.py +++ b/stripe/params/billing/_meter_list_params.py @@ -22,7 +22,7 @@ class MeterListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["active", "inactive"]] + status: NotRequired["Literal['active', 'inactive']|str"] """ Filter results to only include meters with the given status. """ diff --git a/stripe/params/billing_portal/_configuration_create_params.py b/stripe/params/billing_portal/_configuration_create_params.py index 49a45f855..9ae894d2a 100644 --- a/stripe/params/billing_portal/_configuration_create_params.py +++ b/stripe/params/billing_portal/_configuration_create_params.py @@ -87,7 +87,7 @@ class ConfigurationCreateParamsFeatures(TypedDict): class ConfigurationCreateParamsFeaturesCustomerUpdate(TypedDict): allowed_updates: NotRequired[ - "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" + "Literal['']|List[Union[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id'], str]]" ] """ The types of customer updates that are supported. When empty, customers are not updateable. @@ -127,7 +127,7 @@ class ConfigurationCreateParamsFeaturesSubscriptionCancel(TypedDict): """ Whether the feature is enabled. """ - mode: NotRequired[Literal["at_period_end", "immediately"]] + mode: NotRequired["Literal['at_period_end', 'immediately']|str"] """ Whether to cancel subscriptions immediately or at the end of the billing period. """ @@ -149,15 +149,18 @@ class ConfigurationCreateParamsFeaturesSubscriptionCancelCancellationReason( options: Union[ Literal[""], List[ - Literal[ - "customer_service", - "low_quality", - "missing_features", - "other", - "switched_service", - "too_complex", - "too_expensive", - "unused", + Union[ + Literal[ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused", + ], + str, ] ], ] @@ -172,7 +175,7 @@ class ConfigurationCreateParamsFeaturesSubscriptionUpdate(TypedDict): Determines the value to use for the billing cycle anchor on subscription updates. Valid values are `now` or `unchanged`, and the default value is `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle). """ default_allowed_updates: NotRequired[ - "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" + "Literal['']|List[Union[Literal['price', 'promotion_code', 'quantity'], str]]" ] """ The types of subscription updates that are supported. When empty, subscriptions are not updateable. @@ -199,7 +202,9 @@ class ConfigurationCreateParamsFeaturesSubscriptionUpdate(TypedDict): """ Setting to control when an update should be scheduled at the end of the period instead of applying immediately. """ - trial_update_behavior: NotRequired[Literal["continue_trial", "end_trial"]] + trial_update_behavior: NotRequired[ + "Literal['continue_trial', 'end_trial']|str" + ] """ The behavior when updating a subscription that is trialing. """ @@ -255,7 +260,7 @@ class ConfigurationCreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd( class ConfigurationCreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( TypedDict, ): - type: Literal["decreasing_item_amount", "shortening_interval"] + type: Union[Literal["decreasing_item_amount", "shortening_interval"], str] """ The type of condition. """ diff --git a/stripe/params/billing_portal/_configuration_modify_params.py b/stripe/params/billing_portal/_configuration_modify_params.py index 1f0b3c513..39434ee1d 100644 --- a/stripe/params/billing_portal/_configuration_modify_params.py +++ b/stripe/params/billing_portal/_configuration_modify_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -93,7 +93,7 @@ class ConfigurationModifyParamsFeatures(TypedDict): class ConfigurationModifyParamsFeaturesCustomerUpdate(TypedDict): allowed_updates: NotRequired[ - "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" + "Literal['']|List[Union[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id'], str]]" ] """ The types of customer updates that are supported. When empty, customers are not updateable. @@ -133,7 +133,7 @@ class ConfigurationModifyParamsFeaturesSubscriptionCancel(TypedDict): """ Whether the feature is enabled. """ - mode: NotRequired[Literal["at_period_end", "immediately"]] + mode: NotRequired["Literal['at_period_end', 'immediately']|str"] """ Whether to cancel subscriptions immediately or at the end of the billing period. """ @@ -153,7 +153,7 @@ class ConfigurationModifyParamsFeaturesSubscriptionCancelCancellationReason( Whether the feature is enabled. """ options: NotRequired[ - "Literal['']|List[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']]" + "Literal['']|List[Union[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused'], str]]" ] """ Which cancellation reasons will be given as options to the customer. @@ -166,7 +166,7 @@ class ConfigurationModifyParamsFeaturesSubscriptionUpdate(TypedDict): Determines the value to use for the billing cycle anchor on subscription updates. Valid values are `now` or `unchanged`, and the default value is `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle). """ default_allowed_updates: NotRequired[ - "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" + "Literal['']|List[Union[Literal['price', 'promotion_code', 'quantity'], str]]" ] """ The types of subscription updates that are supported. When empty, subscriptions are not updateable. @@ -193,7 +193,9 @@ class ConfigurationModifyParamsFeaturesSubscriptionUpdate(TypedDict): """ Setting to control when an update should be scheduled at the end of the period instead of applying immediately. """ - trial_update_behavior: NotRequired[Literal["continue_trial", "end_trial"]] + trial_update_behavior: NotRequired[ + "Literal['continue_trial', 'end_trial']|str" + ] """ The behavior when updating a subscription that is trialing. """ @@ -247,7 +249,7 @@ class ConfigurationModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd( class ConfigurationModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( TypedDict, ): - type: Literal["decreasing_item_amount", "shortening_interval"] + type: Union[Literal["decreasing_item_amount", "shortening_interval"], str] """ The type of condition. """ diff --git a/stripe/params/billing_portal/_configuration_update_params.py b/stripe/params/billing_portal/_configuration_update_params.py index d11b1c06a..51d4f28be 100644 --- a/stripe/params/billing_portal/_configuration_update_params.py +++ b/stripe/params/billing_portal/_configuration_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -92,7 +92,7 @@ class ConfigurationUpdateParamsFeatures(TypedDict): class ConfigurationUpdateParamsFeaturesCustomerUpdate(TypedDict): allowed_updates: NotRequired[ - "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" + "Literal['']|List[Union[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id'], str]]" ] """ The types of customer updates that are supported. When empty, customers are not updateable. @@ -132,7 +132,7 @@ class ConfigurationUpdateParamsFeaturesSubscriptionCancel(TypedDict): """ Whether the feature is enabled. """ - mode: NotRequired[Literal["at_period_end", "immediately"]] + mode: NotRequired["Literal['at_period_end', 'immediately']|str"] """ Whether to cancel subscriptions immediately or at the end of the billing period. """ @@ -152,7 +152,7 @@ class ConfigurationUpdateParamsFeaturesSubscriptionCancelCancellationReason( Whether the feature is enabled. """ options: NotRequired[ - "Literal['']|List[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']]" + "Literal['']|List[Union[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused'], str]]" ] """ Which cancellation reasons will be given as options to the customer. @@ -165,7 +165,7 @@ class ConfigurationUpdateParamsFeaturesSubscriptionUpdate(TypedDict): Determines the value to use for the billing cycle anchor on subscription updates. Valid values are `now` or `unchanged`, and the default value is `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle). """ default_allowed_updates: NotRequired[ - "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" + "Literal['']|List[Union[Literal['price', 'promotion_code', 'quantity'], str]]" ] """ The types of subscription updates that are supported. When empty, subscriptions are not updateable. @@ -192,7 +192,9 @@ class ConfigurationUpdateParamsFeaturesSubscriptionUpdate(TypedDict): """ Setting to control when an update should be scheduled at the end of the period instead of applying immediately. """ - trial_update_behavior: NotRequired[Literal["continue_trial", "end_trial"]] + trial_update_behavior: NotRequired[ + "Literal['continue_trial', 'end_trial']|str" + ] """ The behavior when updating a subscription that is trialing. """ @@ -246,7 +248,7 @@ class ConfigurationUpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd( class ConfigurationUpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( TypedDict, ): - type: Literal["decreasing_item_amount", "shortening_interval"] + type: Union[Literal["decreasing_item_amount", "shortening_interval"], str] """ The type of condition. """ diff --git a/stripe/params/billing_portal/_session_create_params.py b/stripe/params/billing_portal/_session_create_params.py index 4c6c4c73e..3d35c999a 100644 --- a/stripe/params/billing_portal/_session_create_params.py +++ b/stripe/params/billing_portal/_session_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -27,55 +27,7 @@ class SessionCreateParams(RequestOptions): Information about a specific flow for the customer to go through. See the [docs](https://docs.stripe.com/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. """ locale: NotRequired[ - Literal[ - "auto", - "bg", - "cs", - "da", - "de", - "el", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-IE", - "en-IN", - "en-NZ", - "en-SG", - "es", - "es-419", - "et", - "fi", - "fil", - "fr", - "fr-CA", - "hr", - "hu", - "id", - "it", - "ja", - "ko", - "lt", - "lv", - "ms", - "mt", - "nb", - "nl", - "pl", - "pt", - "pt-BR", - "ro", - "ru", - "sk", - "sl", - "sv", - "th", - "tr", - "vi", - "zh", - "zh-HK", - "zh-TW", - ] + "Literal['auto', 'bg', 'cs', 'da', 'de', 'el', 'en', 'en-AU', 'en-CA', 'en-GB', 'en-IE', 'en-IN', 'en-NZ', 'en-SG', 'es', 'es-419', 'et', 'fi', 'fil', 'fr', 'fr-CA', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'ms', 'mt', 'nb', 'nl', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'sv', 'th', 'tr', 'vi', 'zh', 'zh-HK', 'zh-TW']|str" ] """ The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used. @@ -113,11 +65,14 @@ class SessionCreateParamsFlowData(TypedDict): """ Configuration when `flow_data.type=subscription_update_confirm`. """ - type: Literal[ - "payment_method_update", - "subscription_cancel", - "subscription_update", - "subscription_update_confirm", + type: Union[ + Literal[ + "payment_method_update", + "subscription_cancel", + "subscription_update", + "subscription_update_confirm", + ], + str, ] """ Type of flow that the customer will go through. @@ -135,7 +90,9 @@ class SessionCreateParamsFlowDataAfterCompletion(TypedDict): """ Configuration when `after_completion.type=redirect`. """ - type: Literal["hosted_confirmation", "portal_homepage", "redirect"] + type: Union[ + Literal["hosted_confirmation", "portal_homepage", "redirect"], str + ] """ The specified behavior after the flow is completed. """ diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index 239cf13c9..240598530 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -20,7 +20,7 @@ class SessionCreateParams(RequestOptions): """ Enables user redeemable promotion codes. """ - approval_method: NotRequired[Literal["auto", "manual"]] + approval_method: NotRequired["Literal['auto', 'manual']|str"] """ Determines whether the customer's attempt to pay must be manually approved. @@ -36,7 +36,7 @@ class SessionCreateParams(RequestOptions): """ Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. """ - billing_address_collection: NotRequired[Literal["auto", "required"]] + billing_address_collection: NotRequired["Literal['auto', 'required']|str"] """ Specify whether Checkout should collect the customer's billing address. Defaults to `auto`. """ @@ -96,7 +96,7 @@ class SessionCreateParams(RequestOptions): """ ID of an existing Account, if one exists. Has the same behavior as `customer`. """ - customer_creation: NotRequired[Literal["always", "if_required"]] + customer_creation: NotRequired["Literal['always', 'if_required']|str"] """ Configure whether a Checkout Session creates a [Customer](https://docs.stripe.com/api/customers) during Session confirmation. @@ -126,65 +126,68 @@ class SessionCreateParams(RequestOptions): """ excluded_payment_method_types: NotRequired[ List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] ] ] @@ -220,49 +223,7 @@ class SessionCreateParams(RequestOptions): For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. """ locale: NotRequired[ - Literal[ - "auto", - "bg", - "cs", - "da", - "de", - "el", - "en", - "en-GB", - "es", - "es-419", - "et", - "fi", - "fil", - "fr", - "fr-CA", - "hr", - "hu", - "id", - "it", - "ja", - "ko", - "lt", - "lv", - "ms", - "mt", - "nb", - "nl", - "pl", - "pt", - "pt-BR", - "ro", - "ru", - "sk", - "sl", - "sv", - "th", - "tr", - "vi", - "zh", - "zh-HK", - "zh-TW", - ] + "Literal['auto', 'bg', 'cs', 'da', 'de', 'el', 'en', 'en-GB', 'es', 'es-419', 'et', 'fi', 'fil', 'fr', 'fr-CA', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'lt', 'lv', 'ms', 'mt', 'nb', 'nl', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'sk', 'sl', 'sv', 'th', 'tr', 'vi', 'zh', 'zh-HK', 'zh-TW']|str" ] """ The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. @@ -275,7 +236,7 @@ class SessionCreateParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - mode: NotRequired[Literal["payment", "setup", "subscription"]] + mode: NotRequired["Literal['payment', 'setup', 'subscription']|str"] """ The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. """ @@ -299,7 +260,7 @@ class SessionCreateParams(RequestOptions): You can't set this parameter if `ui_mode` is `custom`. """ - origin_context: NotRequired[Literal["mobile_app", "web"]] + origin_context: NotRequired["Literal['mobile_app', 'web']|str"] """ Where the user is coming from. This informs the optimizations that are applied to the session. You can't set this parameter if `ui_mode` is `elements`. """ @@ -307,7 +268,9 @@ class SessionCreateParams(RequestOptions): """ A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. """ - payment_method_collection: NotRequired[Literal["always", "if_required"]] + payment_method_collection: NotRequired[ + "Literal['always', 'if_required']|str" + ] """ Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. This may occur if the Checkout Session includes a free trial or a discount. @@ -332,66 +295,69 @@ class SessionCreateParams(RequestOptions): """ payment_method_types: NotRequired[ List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] ] ] @@ -424,7 +390,7 @@ class SessionCreateParams(RequestOptions): before using this feature. Learn more about [collecting phone numbers with Checkout](https://docs.stripe.com/payments/checkout/phone-numbers). """ redirect_on_completion: NotRequired[ - Literal["always", "if_required", "never"] + "Literal['always', 'if_required', 'never']|str" ] """ This parameter applies to `ui_mode: embedded_page`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. @@ -456,7 +422,7 @@ class SessionCreateParams(RequestOptions): The shipping rate options to apply to this Session. Up to a maximum of 5. """ submit_type: NotRequired[ - Literal["auto", "book", "donate", "pay", "subscribe"] + "Literal['auto', 'book', 'donate', 'pay', 'subscribe']|str" ] """ Describes the type of transaction being performed by Checkout in order @@ -482,7 +448,7 @@ class SessionCreateParams(RequestOptions): Controls tax ID collection during checkout. """ ui_mode: NotRequired[ - Literal["elements", "embedded_page", "form", "hosted_page"] + "Literal['elements', 'embedded_page', 'form', 'hosted_page']|str" ] """ The UI mode of the Session. Defaults to `hosted_page`. @@ -564,7 +530,7 @@ class SessionCreateParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -576,7 +542,7 @@ class SessionCreateParamsBrandingSettings(TypedDict): A hex color value starting with `#` representing the background color for the Checkout Session. """ border_style: NotRequired[ - "Literal['']|Literal['pill', 'rectangular', 'rounded']" + "Literal['']|Literal['pill', 'rectangular', 'rounded']|str" ] """ The border style for the Checkout Session. @@ -590,7 +556,7 @@ class SessionCreateParamsBrandingSettings(TypedDict): A string to override the business name shown on the Checkout Session. This only shows at the top of the Checkout page, and your business name still appears in terms, receipts, and other places. """ font_family: NotRequired[ - "Literal['']|Literal['be_vietnam_pro', 'bitter', 'chakra_petch', 'default', 'hahmlet', 'inconsolata', 'inter', 'lato', 'lora', 'm_plus_1_code', 'montserrat', 'noto_sans', 'noto_sans_jp', 'noto_serif', 'nunito', 'open_sans', 'pridi', 'pt_sans', 'pt_serif', 'raleway', 'roboto', 'roboto_slab', 'source_sans_pro', 'titillium_web', 'ubuntu_mono', 'zen_maru_gothic']" + "Literal['']|Literal['be_vietnam_pro', 'bitter', 'chakra_petch', 'default', 'hahmlet', 'inconsolata', 'inter', 'lato', 'lora', 'm_plus_1_code', 'montserrat', 'noto_sans', 'noto_sans_jp', 'noto_serif', 'nunito', 'open_sans', 'pridi', 'pt_sans', 'pt_serif', 'raleway', 'roboto', 'roboto_slab', 'source_sans_pro', 'titillium_web', 'ubuntu_mono', 'zen_maru_gothic']|str" ] """ The font family for the Checkout Session corresponding to one of the [supported font families](https://docs.stripe.com/payments/checkout/customization/appearance?payment-ui=stripe-hosted#font-compatibility). @@ -610,7 +576,7 @@ class SessionCreateParamsBrandingSettingsIcon(TypedDict): """ The ID of a [File upload](https://stripe.com/docs/api/files) representing the icon. Purpose must be `business_icon`. Required if `type` is `file` and disallowed otherwise. """ - type: Literal["file", "url"] + type: Union[Literal["file", "url"], str] """ The type of image for the icon. Must be one of `file` or `url`. """ @@ -625,7 +591,7 @@ class SessionCreateParamsBrandingSettingsLogo(TypedDict): """ The ID of a [File upload](https://stripe.com/docs/api/files) representing the logo. Purpose must be `business_logo`. Required if `type` is `file` and disallowed otherwise. """ - type: Literal["file", "url"] + type: Union[Literal["file", "url"], str] """ The type of image for the logo. Must be one of `file` or `url`. """ @@ -642,13 +608,13 @@ class SessionCreateParamsConsentCollection(TypedDict): """ Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. """ - promotions: NotRequired[Literal["auto", "none"]] + promotions: NotRequired["Literal['auto', 'none']|str"] """ If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout Session will determine whether to display an option to opt into promotional communication from the merchant depending on the customer's locale. Only available to US merchants and US customers. """ - terms_of_service: NotRequired[Literal["none", "required"]] + terms_of_service: NotRequired["Literal['none', 'required']|str"] """ If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). @@ -658,7 +624,7 @@ class SessionCreateParamsConsentCollection(TypedDict): class SessionCreateParamsConsentCollectionPaymentMethodReuseAgreement( TypedDict, ): - position: Literal["auto", "hidden"] + position: Union[Literal["auto", "hidden"], str] """ Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. @@ -690,7 +656,7 @@ class SessionCreateParamsCustomField(TypedDict): """ Configuration for `type=text` fields. """ - type: Literal["dropdown", "numeric", "text"] + type: Union[Literal["dropdown", "numeric", "text"], str] """ The type of the field. """ @@ -813,16 +779,16 @@ class SessionCreateParamsCustomTextTermsOfServiceAcceptance(TypedDict): class SessionCreateParamsCustomerUpdate(TypedDict): - address: NotRequired[Literal["auto", "never"]] + address: NotRequired["Literal['auto', 'never']|str"] """ Describes whether Checkout saves the billing address onto `customer.address`. To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. """ - name: NotRequired[Literal["auto", "never"]] + name: NotRequired["Literal['auto', 'never']|str"] """ Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. """ - shipping: NotRequired[Literal["auto", "never"]] + shipping: NotRequired["Literal['auto', 'never']|str"] """ Describes whether Checkout saves shipping information onto `customer.shipping`. To collect shipping information, use `shipping_address_collection`. Defaults to `never`. @@ -854,7 +820,7 @@ class SessionCreateParamsDiscountCouponData(TypedDict): Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). """ duration: NotRequired[ - Literal["forever", "once", "repeating", "service_period"] + "Literal['forever', 'once', 'repeating', 'service_period']|str" ] """ Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. @@ -937,7 +903,7 @@ class SessionCreateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -996,7 +962,7 @@ class SessionCreateParamsItemSubscription(TypedDict): """ Specifies an interval for how often to bill for any pending invoice items. """ - proration_behavior: NotRequired[Literal["create_prorations", "none"]] + proration_behavior: NotRequired["Literal['create_prorations', 'none']|str"] """ Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. """ @@ -1046,7 +1012,7 @@ class SessionCreateParamsItemSubscriptionBillingMode(TypedDict): """ Configure behavior for flexible billing mode. """ - type: Literal["classic", "flexible"] + type: Union[Literal["classic", "flexible"], str] """ Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. """ @@ -1185,7 +1151,9 @@ class SessionCreateParamsItemSubscriptionTrialSettings(TypedDict): class SessionCreateParamsItemSubscriptionTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] + missing_payment_method: Union[ + Literal["cancel", "create_invoice", "pause"], str + ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. """ @@ -1405,7 +1373,7 @@ class SessionCreateParamsPaymentIntentData(TypedDict): The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://docs.stripe.com/payments/connected-accounts). """ capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] + "Literal['automatic', 'automatic_async', 'manual']|str" ] """ Controls when the funds will be captured from the customer's account. @@ -1428,7 +1396,7 @@ class SessionCreateParamsPaymentIntentData(TypedDict): """ Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + setup_future_usage: NotRequired["Literal['off_session', 'on_session']|str"] """ Indicates that you intend to [make future payments](https://docs.stripe.com/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. @@ -1543,7 +1511,9 @@ class SessionCreateParamsPaymentIntentDataTransferData(TypedDict): class SessionCreateParamsPaymentMethodData(TypedDict): - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout. """ @@ -1775,7 +1745,7 @@ class SessionCreateParamsPaymentMethodOptions(TypedDict): class SessionCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] + currency: NotRequired["Literal['cad', 'usd']|str"] """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). This is only accepted for Checkout Sessions in `setup` mode. """ @@ -1786,7 +1756,7 @@ class SessionCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1802,7 +1772,7 @@ class SessionCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method for the intent @@ -1818,7 +1788,9 @@ class SessionCreateParamsPaymentMethodOptionsAcssDebitMandateOptions( The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] + default_for: NotRequired[ + List[Union[Literal["invoice", "subscription"], str]] + ] """ List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. """ @@ -1826,11 +1798,13 @@ class SessionCreateParamsPaymentMethodOptionsAcssDebitMandateOptions( """ Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. """ - payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + payment_schedule: NotRequired[ + "Literal['combined', 'interval', 'sporadic']|str" + ] """ Payment schedule for the mandate. """ - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ @@ -1895,7 +1869,7 @@ class SessionCreateParamsPaymentMethodOptionsAmazonPay(TypedDict): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1932,7 +1906,7 @@ class SessionCreateParamsPaymentMethodOptionsBacsDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -1999,7 +1973,7 @@ class SessionCreateParamsPaymentMethodOptionsBlik(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -2016,7 +1990,7 @@ class SessionCreateParamsPaymentMethodOptionsBoleto(TypedDict): The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2041,33 +2015,33 @@ class SessionCreateParamsPaymentMethodOptionsCard(TypedDict): Installment options for card payments """ request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession. """ request_extended_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession. """ request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] + "Literal['if_available', 'never']|str" ] """ Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this CheckoutSession. """ - request_multicapture: NotRequired[Literal["if_available", "never"]] + request_multicapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this CheckoutSession. """ - request_overcapture: NotRequired[Literal["if_available", "never"]] + request_overcapture: NotRequired["Literal['if_available', 'never']|str"] """ Request ability to [overcapture](https://docs.stripe.com/payments/overcapture) for this CheckoutSession. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/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://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. @@ -2078,7 +2052,7 @@ class SessionCreateParamsPaymentMethodOptionsCard(TypedDict): """ Restrictions to apply to the card payment method. For example, you can block specific card brands. You can't set this parameter if `ui_mode` is `custom`. """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + setup_future_usage: NotRequired["Literal['off_session', 'on_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2109,11 +2083,14 @@ class SessionCreateParamsPaymentMethodOptionsCardInstallments(TypedDict): class SessionCreateParamsPaymentMethodOptionsCardRestrictions(TypedDict): brands_blocked: NotRequired[ List[ - Literal[ - "american_express", - "discover_global_network", - "mastercard", - "visa", + Union[ + Literal[ + "american_express", + "discover_global_network", + "mastercard", + "visa", + ], + str, ] ] ] @@ -2128,7 +2105,7 @@ class SessionCreateParamsPaymentMethodOptionsCashapp(TypedDict): Controls when the funds will be captured from the customer's account. """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2188,8 +2165,17 @@ class SessionCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( """ requested_address_types: NotRequired[ List[ - Literal[ - "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + Union[ + Literal[ + "aba", + "iban", + "sepa", + "sort_code", + "spei", + "swift", + "zengin", + ], + str, ] ] ] @@ -2198,12 +2184,15 @@ class SessionCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + type: Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] """ The list of bank transfer types that this PaymentIntent is allowed to use for funding. @@ -2220,7 +2209,7 @@ class SessionCreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTr class SessionCreateParamsPaymentMethodOptionsDemoPay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2302,7 +2291,7 @@ class SessionCreateParamsPaymentMethodOptionsKakaoPay(TypedDict): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2338,7 +2327,7 @@ class SessionCreateParamsPaymentMethodOptionsKlarna(TypedDict): class SessionCreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] + interval: Union[Literal["day", "month", "week", "year"], str] """ Unit of time between subscription charges. """ @@ -2397,7 +2386,7 @@ class SessionCreateParamsPaymentMethodOptionsKrCard(TypedDict): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2414,7 +2403,7 @@ class SessionCreateParamsPaymentMethodOptionsLink(TypedDict): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2461,7 +2450,7 @@ class SessionCreateParamsPaymentMethodOptionsNaverPay(TypedDict): """ Controls when the funds will be captured from the customer's account. """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2537,29 +2526,7 @@ class SessionCreateParamsPaymentMethodOptionsPaypal(TypedDict): Controls when the funds will be captured from the customer's account. """ preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] + "Literal['cs-CZ', 'da-DK', 'de-AT', 'de-DE', 'de-LU', 'el-GR', 'en-GB', 'en-US', 'es-ES', 'fi-FI', 'fr-BE', 'fr-FR', 'fr-LU', 'hu-HU', 'it-IT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-PT', 'sk-SK', 'sv-SE']|str" ] """ [Preferred locale](https://docs.stripe.com/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. @@ -2577,7 +2544,7 @@ class SessionCreateParamsPaymentMethodOptionsPaypal(TypedDict): The risk correlation ID for an on-session payment using a saved PayPal payment method. """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" + "Literal['']|Literal['none', 'off_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2603,7 +2570,7 @@ class SessionCreateParamsPaymentMethodOptionsPayto(TypedDict): """ Additional fields for Mandate creation """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2620,7 +2587,7 @@ class SessionCreateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): """ Amount that will be collected. It is required when `amount_type` is `fixed`. """ - amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']"] + amount_type: NotRequired["Literal['']|Literal['fixed', 'maximum']|str"] """ The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. Defaults to `maximum`. """ @@ -2629,7 +2596,7 @@ class SessionCreateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. """ payment_schedule: NotRequired[ - "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']" + "Literal['']|Literal['adhoc', 'annual', 'daily', 'fortnightly', 'monthly', 'quarterly', 'semi_annual', 'weekly']|str" ] """ The periodicity at which payments will be collected. Defaults to `adhoc`. @@ -2639,7 +2606,7 @@ class SessionCreateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. """ purpose: NotRequired[ - "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']" + "Literal['']|Literal['dependant_support', 'government', 'loan', 'mortgage', 'other', 'pension', 'personal', 'retail', 'salary', 'tax', 'utility']|str" ] """ The purpose for which payments are made. Has a default value based on your merchant category code. @@ -2651,7 +2618,7 @@ class SessionCreateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): class SessionCreateParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ @@ -2665,7 +2632,7 @@ class SessionCreateParamsPaymentMethodOptionsPix(TypedDict): """ Additional fields for mandate creation. """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2682,11 +2649,11 @@ class SessionCreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): """ Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. """ - amount_includes_iof: NotRequired[Literal["always", "never"]] + amount_includes_iof: NotRequired["Literal['always', 'never']|str"] """ Determines if the amount includes the IOF tax. Defaults to `never`. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ Type of amount. Defaults to `maximum`. """ @@ -2699,7 +2666,7 @@ class SessionCreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. """ payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + "Literal['halfyearly', 'monthly', 'quarterly', 'weekly', 'yearly']|str" ] """ Schedule at which the future payments will be charged. Defaults to `monthly`. @@ -2760,7 +2727,7 @@ class SessionCreateParamsPaymentMethodOptionsSepaDebit(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2824,7 +2791,7 @@ class SessionCreateParamsPaymentMethodOptionsSwish(TypedDict): class SessionCreateParamsPaymentMethodOptionsTwint(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] + setup_future_usage: NotRequired["Literal['none', 'off_session']|str"] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2844,7 +2811,7 @@ class SessionCreateParamsPaymentMethodOptionsUpi(TypedDict): Additional fields for Mandate creation """ setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" + "Literal['']|Literal['none', 'off_session', 'on_session']|str" ] @@ -2853,7 +2820,7 @@ class SessionCreateParamsPaymentMethodOptionsUpiMandateOptions(TypedDict): """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -2875,7 +2842,7 @@ class SessionCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): Additional fields for Financial Connections Session creation """ setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] + "Literal['none', 'off_session', 'on_session']|str" ] """ Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -2890,7 +2857,7 @@ class SessionCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. """ - verification_method: NotRequired[Literal["automatic", "instant"]] + verification_method: NotRequired["Literal['automatic', 'instant']|str"] """ Verification method for the intent """ @@ -2909,8 +2876,14 @@ class SessionCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -2945,13 +2918,13 @@ class SessionCreateParamsPermissions(TypedDict): """ Permissions for updating the Checkout Session. """ - update_discounts: NotRequired[Literal["client_only", "server_only"]] + update_discounts: NotRequired["Literal['client_only', 'server_only']|str"] """ Determines which entity is allowed to update the discounts (coupons or promotion codes) that apply to this session. Default is `client_only`. Stripe Checkout client will automatically handle discount updates. If set to `server_only`, only your server is allowed to update discounts. """ - update_line_items: NotRequired[Literal["client_only", "server_only"]] + update_line_items: NotRequired["Literal['client_only', 'server_only']|str"] """ Determines which entity is allowed to update the line items. @@ -2959,7 +2932,9 @@ class SessionCreateParamsPermissions(TypedDict): When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. """ - update_shipping_details: NotRequired[Literal["client_only", "server_only"]] + update_shipping_details: NotRequired[ + "Literal['client_only', 'server_only']|str" + ] """ Determines which entity is allowed to update the shipping details. @@ -2970,7 +2945,7 @@ class SessionCreateParamsPermissions(TypedDict): class SessionCreateParamsPermissionsUpdate(TypedDict): - line_items: NotRequired[Literal["client_only", "server_only"]] + line_items: NotRequired["Literal['client_only', 'server_only']|str"] """ Determines which entity is allowed to update the line items. @@ -2978,7 +2953,7 @@ class SessionCreateParamsPermissionsUpdate(TypedDict): When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. """ - shipping_details: NotRequired[Literal["client_only", "server_only"]] + shipping_details: NotRequired["Literal['client_only', 'server_only']|str"] """ Determines which entity is allowed to update the shipping details. @@ -2999,16 +2974,16 @@ class SessionCreateParamsPhoneNumberCollection(TypedDict): class SessionCreateParamsSavedPaymentMethodOptions(TypedDict): allow_redisplay_filters: NotRequired[ - List[Literal["always", "limited", "unspecified"]] + List[Union[Literal["always", "limited", "unspecified"], str]] ] """ Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout. """ - payment_method_remove: NotRequired[Literal["disabled", "enabled"]] + payment_method_remove: NotRequired["Literal['disabled', 'enabled']|str"] """ Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. """ - payment_method_save: NotRequired[Literal["disabled", "enabled"]] + payment_method_save: NotRequired["Literal['disabled', 'enabled']|str"] """ Enable customers to choose if they wish to save their payment method for future use. Disabled by default. """ @@ -3031,245 +3006,248 @@ class SessionCreateParamsSetupIntentData(TypedDict): class SessionCreateParamsShippingAddressCollection(TypedDict): allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", + Union[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", + ], + str, ] ] """ @@ -3346,7 +3324,7 @@ class SessionCreateParamsShippingOptionShippingRateDataDeliveryEstimate( class SessionCreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -3359,7 +3337,7 @@ class SessionCreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( class SessionCreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -3450,7 +3428,7 @@ class SessionCreateParamsSubscriptionData(TypedDict): """ Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://docs.stripe.com/api#create_invoice) for the given subscription at the specified interval. """ - proration_behavior: NotRequired[Literal["create_prorations", "none"]] + proration_behavior: NotRequired["Literal['create_prorations', 'none']|str"] """ Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. """ @@ -3506,7 +3484,7 @@ class SessionCreateParamsSubscriptionDataBillingMode(TypedDict): """ Configure behavior for flexible billing mode. """ - type: Literal["classic", "flexible"] + type: Union[Literal["classic", "flexible"], str] """ Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. """ @@ -3533,7 +3511,7 @@ class SessionCreateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -3569,7 +3547,9 @@ class SessionCreateParamsSubscriptionDataTrialSettings(TypedDict): class SessionCreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] + missing_payment_method: Union[ + Literal["cancel", "create_invoice", "pause"], str + ] """ Indicates how the subscription should change when the trial ends if the user did not provide a payment method. """ @@ -3580,7 +3560,7 @@ class SessionCreateParamsTaxIdCollection(TypedDict): """ Enable tax ID collection during checkout. Defaults to `false`. """ - required: NotRequired[Literal["if_supported", "never"]] + required: NotRequired["Literal['if_supported', 'never']|str"] """ Describes whether a tax ID is required during checkout. Defaults to `never`. You can't set this parameter if `ui_mode` is `custom`. """ @@ -3594,7 +3574,7 @@ class SessionCreateParamsWalletOptions(TypedDict): class SessionCreateParamsWalletOptionsLink(TypedDict): - display: NotRequired[Literal["auto", "never"]] + display: NotRequired["Literal['auto', 'never']|str"] """ Specifies whether Checkout should display Link as a payment option. By default, Checkout will display all the supported wallets that the Checkout Session was created with. This is the `auto` behavior, and it is the default choice. """ diff --git a/stripe/params/checkout/_session_modify_params.py b/stripe/params/checkout/_session_modify_params.py index 7c1d73ac8..7e5935c2c 100644 --- a/stripe/params/checkout/_session_modify_params.py +++ b/stripe/params/checkout/_session_modify_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -76,7 +76,7 @@ class SessionModifyParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -150,7 +150,7 @@ class SessionModifyParamsDiscountCouponData(TypedDict): Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). """ duration: NotRequired[ - Literal["forever", "once", "repeating", "service_period"] + "Literal['forever', 'once', 'repeating', 'service_period']|str" ] """ Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. @@ -190,7 +190,7 @@ class SessionModifyParamsInvoiceCreationInvoiceDataIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -402,7 +402,7 @@ class SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimate( class SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -415,7 +415,7 @@ class SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( class SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -492,7 +492,7 @@ class SessionModifyParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ diff --git a/stripe/params/checkout/_session_update_params.py b/stripe/params/checkout/_session_update_params.py index 085257971..43d5944ec 100644 --- a/stripe/params/checkout/_session_update_params.py +++ b/stripe/params/checkout/_session_update_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -75,7 +75,7 @@ class SessionUpdateParamsAutomaticTaxLiability(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -149,7 +149,7 @@ class SessionUpdateParamsDiscountCouponData(TypedDict): Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). """ duration: NotRequired[ - Literal["forever", "once", "repeating", "service_period"] + "Literal['forever', 'once', 'repeating', 'service_period']|str" ] """ Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. @@ -189,7 +189,7 @@ class SessionUpdateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ @@ -401,7 +401,7 @@ class SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimate( class SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -414,7 +414,7 @@ class SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( class SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( TypedDict, ): - unit: Literal["business_day", "day", "hour", "month", "week"] + unit: Union[Literal["business_day", "day", "hour", "month", "week"], str] """ A unit of time. """ @@ -491,7 +491,7 @@ class SessionUpdateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): """ The connected account being referenced when `type` is `account`. """ - type: Literal["account", "application", "self"] + type: Union[Literal["account", "application", "self"], str] """ Type of the account referenced in the request. """ diff --git a/stripe/params/crypto/_onramp_session_create_params.py b/stripe/params/crypto/_onramp_session_create_params.py index 9cd6d15db..e2061bb40 100644 --- a/stripe/params/crypto/_onramp_session_create_params.py +++ b/stripe/params/crypto/_onramp_session_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -24,7 +24,12 @@ class OnrampSessionCreateParams(RequestOptions): """ destination_currencies: NotRequired[ List[ - Literal["avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm"] + Union[ + Literal[ + "avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm" + ], + str, + ] ] ] """ @@ -34,7 +39,7 @@ class OnrampSessionCreateParams(RequestOptions): * When set, it must be a non-empty array where all values in the array are valid cryptocurrencies. You can use it to lock users to a specific cryptocurrency by passing a single value array. Users **cannot** override this parameter. """ destination_currency: NotRequired[ - Literal["avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm"] + "Literal['avax', 'btc', 'eth', 'matic', 'sol', 'usdc', 'wld', 'xlm']|str" ] """ The default destination cryptocurrency. @@ -43,17 +48,7 @@ class OnrampSessionCreateParams(RequestOptions): * When set, if `destination_currencies` is also set, the value of `destination_currency` must be present in that array. To lock a `destination_currency`, specify that value as the single value for `destination_currencies`. Users can select a different cryptocurrency in the onramp UI subject to `destination_currencies` if set. """ destination_network: NotRequired[ - Literal[ - "avalanche", - "base", - "bitcoin", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "worldchain", - ] + "Literal['avalanche', 'base', 'bitcoin', 'ethereum', 'optimism', 'polygon', 'solana', 'stellar', 'worldchain']|str" ] """ The default destination crypto network. @@ -63,16 +58,19 @@ class OnrampSessionCreateParams(RequestOptions): """ destination_networks: NotRequired[ List[ - Literal[ - "avalanche", - "base", - "bitcoin", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "worldchain", + Union[ + Literal[ + "avalanche", + "base", + "bitcoin", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "worldchain", + ], + str, ] ] ] @@ -100,7 +98,7 @@ class OnrampSessionCreateParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - settlement_speed: NotRequired[Literal["instant", "standard"]] + settlement_speed: NotRequired["Literal['instant', 'standard']|str"] """ Speed at which the cryptocurrency is delivered to the wallet One of: @@ -114,7 +112,7 @@ class OnrampSessionCreateParams(RequestOptions): * When left null, a default value is computed if `destination_amount` is set. * When set, setting `source_amount` is mutually exclusive with setting `destination_amount` (only one or the other is supported). We don't support fractional pennies. If fractional minor units of a currency are passed in, it generates an error. Users can update the value in the onramp UI. """ - source_currency: NotRequired[Literal["eur", "gbp", "usd"]] + source_currency: NotRequired["Literal['eur', 'gbp', 'usd']|str"] """ The default source fiat currency for the onramp session. diff --git a/stripe/params/crypto/_onramp_session_list_params.py b/stripe/params/crypto/_onramp_session_list_params.py index 382e394a7..14cae367a 100644 --- a/stripe/params/crypto/_onramp_session_list_params.py +++ b/stripe/params/crypto/_onramp_session_list_params.py @@ -11,23 +11,13 @@ class OnrampSessionListParams(RequestOptions): Only return onramp sessions that were created during the given date interval. """ destination_currency: NotRequired[ - Literal["avax", "btc", "eth", "matic", "sol", "usdc", "wld", "xlm"] + "Literal['avax', 'btc', 'eth', 'matic', 'sol', 'usdc', 'wld', 'xlm']|str" ] """ The destination cryptocurrency to filter by. """ destination_network: NotRequired[ - Literal[ - "avalanche", - "base", - "bitcoin", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "worldchain", - ] + "Literal['avalanche', 'base', 'bitcoin', 'ethereum', 'optimism', 'polygon', 'solana', 'stellar', 'worldchain']|str" ] """ The destination blockchain network to filter by. @@ -49,13 +39,7 @@ class OnrampSessionListParams(RequestOptions): An object ID cursor for use in pagination. """ status: NotRequired[ - Literal[ - "fulfillment_complete", - "fulfillment_processing", - "initialized", - "rejected", - "requires_payment", - ] + "Literal['fulfillment_complete', 'fulfillment_processing', 'initialized', 'rejected', 'requires_payment']|str" ] """ The status of the Onramp Session. One of = `{initialized, rejected, requires_payment, fulfillment_processing, fulfillment_complete}` diff --git a/stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py b/stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py index 449477eec..32054eda0 100644 --- a/stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py +++ b/stripe/params/crypto/_onramp_transaction_limits_retrieve_params.py @@ -11,17 +11,7 @@ class OnrampTransactionLimitsRetrieveParams(RequestOptions): The IP address of the customer requesting transaction limits. We support IPv4 and IPv6 addresses. """ destination_network: NotRequired[ - Literal[ - "avalanche", - "base", - "bitcoin", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "worldchain", - ] + "Literal['avalanche', 'base', 'bitcoin', 'ethereum', 'optimism', 'polygon', 'solana', 'stellar', 'worldchain']|str" ] """ The destination blockchain network to use for limit calculations. diff --git a/stripe/params/delegated_checkout/_requested_session_confirm_params.py b/stripe/params/delegated_checkout/_requested_session_confirm_params.py index a46949ec9..60de4c02b 100644 --- a/stripe/params/delegated_checkout/_requested_session_confirm_params.py +++ b/stripe/params/delegated_checkout/_requested_session_confirm_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -84,7 +84,7 @@ class RequestedSessionConfirmParamsAffiliateAttribution(TypedDict): """ Agent-scoped sub-tracking identifier. """ - touchpoint: Literal["first", "last"] + touchpoint: Union[Literal["first", "last"], str] """ Whether this is the first or last touchpoint. """ @@ -95,7 +95,7 @@ class RequestedSessionConfirmParamsAffiliateAttributionSource(TypedDict): """ The platform where the attribution originated. """ - type: Literal["platform", "url"] + type: Union[Literal["platform", "url"], str] """ The type of the attribution source. """ diff --git a/stripe/params/delegated_checkout/_requested_session_create_params.py b/stripe/params/delegated_checkout/_requested_session_create_params.py index f7c2e4a5c..6a13a3d04 100644 --- a/stripe/params/delegated_checkout/_requested_session_create_params.py +++ b/stripe/params/delegated_checkout/_requested_session_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -110,7 +110,7 @@ class RequestedSessionCreateParamsAffiliateAttribution(TypedDict): """ Agent-scoped sub-tracking identifier. """ - touchpoint: Literal["first", "last"] + touchpoint: Union[Literal["first", "last"], str] """ Whether this is the first or last touchpoint. """ @@ -121,7 +121,7 @@ class RequestedSessionCreateParamsAffiliateAttributionSource(TypedDict): """ The platform where the attribution originated. """ - type: Literal["platform", "url"] + type: Union[Literal["platform", "url"], str] """ The type of the attribution source. """ @@ -207,7 +207,7 @@ class RequestedSessionCreateParamsPaymentMethodOptions(TypedDict): Card-specific payment method options. """ excluded_payment_method_types: NotRequired[ - List[Literal["affirm", "card", "klarna"]] + List[Union[Literal["affirm", "card", "klarna"], str]] ] """ The payment method types to exclude from the session. @@ -216,7 +216,7 @@ class RequestedSessionCreateParamsPaymentMethodOptions(TypedDict): class RequestedSessionCreateParamsPaymentMethodOptionsCard(TypedDict): brands_blocked: NotRequired[ - List[Literal["american_express", "mastercard", "visa"]] + List[Union[Literal["american_express", "mastercard", "visa"], str]] ] """ The card brands to exclude from the session. diff --git a/stripe/params/delegated_checkout/_requested_session_modify_params.py b/stripe/params/delegated_checkout/_requested_session_modify_params.py index 798425a44..cd7a5a34a 100644 --- a/stripe/params/delegated_checkout/_requested_session_modify_params.py +++ b/stripe/params/delegated_checkout/_requested_session_modify_params.py @@ -139,7 +139,7 @@ class RequestedSessionModifyParamsFulfillmentDetailsSelectedFulfillmentOption( """ The shipping fulfillment option. """ - type: Literal["digital", "shipping"] + type: Union[Literal["digital", "shipping"], str] """ The type of fulfillment option. """ @@ -182,7 +182,7 @@ class RequestedSessionModifyParamsFulfillmentDetailsSelectedFulfillmentOptionOve """ The shipping fulfillment option. """ - type: Literal["digital", "shipping"] + type: Union[Literal["digital", "shipping"], str] """ The type of fulfillment option. """ @@ -223,7 +223,7 @@ class RequestedSessionModifyParamsPaymentMethodOptions(TypedDict): Card-specific payment method options. """ excluded_payment_method_types: NotRequired[ - List[Literal["affirm", "card", "klarna"]] + List[Union[Literal["affirm", "card", "klarna"], str]] ] """ The payment method types to exclude from the session. @@ -232,7 +232,7 @@ class RequestedSessionModifyParamsPaymentMethodOptions(TypedDict): class RequestedSessionModifyParamsPaymentMethodOptionsCard(TypedDict): brands_blocked: NotRequired[ - List[Literal["american_express", "mastercard", "visa"]] + List[Union[Literal["american_express", "mastercard", "visa"], str]] ] """ The card brands to exclude from the session. diff --git a/stripe/params/delegated_checkout/_requested_session_update_params.py b/stripe/params/delegated_checkout/_requested_session_update_params.py index 8310380a8..69b50c557 100644 --- a/stripe/params/delegated_checkout/_requested_session_update_params.py +++ b/stripe/params/delegated_checkout/_requested_session_update_params.py @@ -138,7 +138,7 @@ class RequestedSessionUpdateParamsFulfillmentDetailsSelectedFulfillmentOption( """ The shipping fulfillment option. """ - type: Literal["digital", "shipping"] + type: Union[Literal["digital", "shipping"], str] """ The type of fulfillment option. """ @@ -181,7 +181,7 @@ class RequestedSessionUpdateParamsFulfillmentDetailsSelectedFulfillmentOptionOve """ The shipping fulfillment option. """ - type: Literal["digital", "shipping"] + type: Union[Literal["digital", "shipping"], str] """ The type of fulfillment option. """ @@ -222,7 +222,7 @@ class RequestedSessionUpdateParamsPaymentMethodOptions(TypedDict): Card-specific payment method options. """ excluded_payment_method_types: NotRequired[ - List[Literal["affirm", "card", "klarna"]] + List[Union[Literal["affirm", "card", "klarna"], str]] ] """ The payment method types to exclude from the session. @@ -231,7 +231,7 @@ class RequestedSessionUpdateParamsPaymentMethodOptions(TypedDict): class RequestedSessionUpdateParamsPaymentMethodOptionsCard(TypedDict): brands_blocked: NotRequired[ - List[Literal["american_express", "mastercard", "visa"]] + List[Union[Literal["american_express", "mastercard", "visa"], str]] ] """ The card brands to exclude from the session. diff --git a/stripe/params/financial_connections/_account_refresh_account_params.py b/stripe/params/financial_connections/_account_refresh_account_params.py index 257cd29cd..d22e135d6 100644 --- a/stripe/params/financial_connections/_account_refresh_account_params.py +++ b/stripe/params/financial_connections/_account_refresh_account_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired @@ -11,7 +11,12 @@ class AccountRefreshAccountParams(RequestOptions): Specifies which fields in the response should be expanded. """ features: List[ - Literal["balance", "inferred_balances", "ownership", "transactions"] + Union[ + Literal[ + "balance", "inferred_balances", "ownership", "transactions" + ], + str, + ] ] """ The list of account features that you would like to refresh. diff --git a/stripe/params/financial_connections/_account_refresh_params.py b/stripe/params/financial_connections/_account_refresh_params.py index e4c8a982a..993b7f90d 100644 --- a/stripe/params/financial_connections/_account_refresh_params.py +++ b/stripe/params/financial_connections/_account_refresh_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -10,7 +10,12 @@ class AccountRefreshParams(TypedDict): Specifies which fields in the response should be expanded. """ features: List[ - Literal["balance", "inferred_balances", "ownership", "transactions"] + Union[ + Literal[ + "balance", "inferred_balances", "ownership", "transactions" + ], + str, + ] ] """ The list of account features that you would like to refresh. diff --git a/stripe/params/financial_connections/_account_subscribe_params.py b/stripe/params/financial_connections/_account_subscribe_params.py index 1ab376be3..3ecd11bc6 100644 --- a/stripe/params/financial_connections/_account_subscribe_params.py +++ b/stripe/params/financial_connections/_account_subscribe_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired @@ -10,7 +10,9 @@ class AccountSubscribeParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - features: List[Literal["balance", "inferred_balances", "transactions"]] + features: List[ + Union[Literal["balance", "inferred_balances", "transactions"], str] + ] """ The list of account features to which you would like to subscribe. """ diff --git a/stripe/params/financial_connections/_account_unsubscribe_params.py b/stripe/params/financial_connections/_account_unsubscribe_params.py index 6035ae614..a9b0933a3 100644 --- a/stripe/params/financial_connections/_account_unsubscribe_params.py +++ b/stripe/params/financial_connections/_account_unsubscribe_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired @@ -10,7 +10,9 @@ class AccountUnsubscribeParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - features: List[Literal["balance", "inferred_balances", "transactions"]] + features: List[ + Union[Literal["balance", "inferred_balances", "transactions"], str] + ] """ The list of account features from which you would like to unsubscribe. """ diff --git a/stripe/params/financial_connections/_session_create_params.py b/stripe/params/financial_connections/_session_create_params.py index 7f9130e06..752a55aa4 100644 --- a/stripe/params/financial_connections/_session_create_params.py +++ b/stripe/params/financial_connections/_session_create_params.py @@ -40,8 +40,14 @@ class SessionCreateParams(RequestOptions): """ prefetch: NotRequired[ List[ - Literal[ - "balances", "inferred_balances", "ownership", "transactions" + Union[ + Literal[ + "balances", + "inferred_balances", + "ownership", + "transactions", + ], + str, ] ] ] @@ -56,7 +62,7 @@ class SessionCreateParams(RequestOptions): """ For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. """ - ui_mode: NotRequired[Literal["hosted", "modal"]] + ui_mode: NotRequired["Literal['hosted', 'modal']|str"] """ The UI mode of the Session. Defaults to `modal`. """ @@ -75,7 +81,7 @@ class SessionCreateParamsAccountHolder(TypedDict): """ The ID of Account representing a customer whose accounts you will retrieve. Only available when `type` is `customer`. """ - type: Literal["account", "customer"] + type: Union[Literal["account", "customer"], str] """ Type of account holder to collect accounts for. """ @@ -84,12 +90,15 @@ class SessionCreateParamsAccountHolder(TypedDict): class SessionCreateParamsFilters(TypedDict): account_subcategories: NotRequired[ List[ - Literal[ - "checking", - "credit_card", - "line_of_credit", - "mortgage", - "savings", + Union[ + Literal[ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "savings", + ], + str, ] ] ] diff --git a/stripe/params/forwarding/_request_create_params.py b/stripe/params/forwarding/_request_create_params.py index dcb527765..abf72b564 100644 --- a/stripe/params/forwarding/_request_create_params.py +++ b/stripe/params/forwarding/_request_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -20,12 +20,15 @@ class RequestCreateParams(RequestOptions): The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. """ replacements: List[ - Literal[ - "card_cvc", - "card_expiry", - "card_number", - "cardholder_name", - "request_signature", + Union[ + Literal[ + "card_cvc", + "card_expiry", + "card_number", + "cardholder_name", + "request_signature", + ], + str, ] ] """ diff --git a/stripe/params/identity/_verification_report_list_params.py b/stripe/params/identity/_verification_report_list_params.py index 32aae1888..3eaed8250 100644 --- a/stripe/params/identity/_verification_report_list_params.py +++ b/stripe/params/identity/_verification_report_list_params.py @@ -34,7 +34,7 @@ class VerificationReportListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - type: NotRequired[Literal["document", "email", "id_number"]] + type: NotRequired["Literal['document', 'email', 'id_number']|str"] """ Only return VerificationReports of this type """ diff --git a/stripe/params/identity/_verification_session_create_params.py b/stripe/params/identity/_verification_session_create_params.py index 912398208..6696b26d2 100644 --- a/stripe/params/identity/_verification_session_create_params.py +++ b/stripe/params/identity/_verification_session_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -49,7 +49,7 @@ class VerificationSessionCreateParams(RequestOptions): """ The URL that the user will be redirected to upon completing the verification flow. """ - type: NotRequired[Literal["document", "email", "id_number"]] + type: NotRequired["Literal['document', 'email', 'id_number']|str"] """ The type of [verification check](https://docs.stripe.com/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. """ @@ -70,7 +70,7 @@ class VerificationSessionCreateParamsOptions(TypedDict): class VerificationSessionCreateParamsOptionsDocument(TypedDict): allowed_types: NotRequired[ - List[Literal["driving_license", "id_card", "passport"]] + List[Union[Literal["driving_license", "id_card", "passport"], str]] ] """ Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. diff --git a/stripe/params/identity/_verification_session_list_params.py b/stripe/params/identity/_verification_session_list_params.py index 3ca5ee030..4039a18d2 100644 --- a/stripe/params/identity/_verification_session_list_params.py +++ b/stripe/params/identity/_verification_session_list_params.py @@ -39,7 +39,7 @@ class VerificationSessionListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ status: NotRequired[ - Literal["canceled", "processing", "requires_input", "verified"] + "Literal['canceled', 'processing', 'requires_input', 'verified']|str" ] """ Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://docs.stripe.com/identity/how-sessions-work). diff --git a/stripe/params/identity/_verification_session_modify_params.py b/stripe/params/identity/_verification_session_modify_params.py index ff0fc1f7e..7c1f919ed 100644 --- a/stripe/params/identity/_verification_session_modify_params.py +++ b/stripe/params/identity/_verification_session_modify_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -29,7 +29,7 @@ class VerificationSessionModifyParams(RequestOptions): """ Details provided about the user being verified. These details may be shown to the user. """ - type: NotRequired[Literal["document", "email", "id_number"]] + type: NotRequired["Literal['document', 'email', 'id_number']|str"] """ The type of [verification check](https://docs.stripe.com/identity/verification-checks) to be performed. """ @@ -46,7 +46,7 @@ class VerificationSessionModifyParamsOptions(TypedDict): class VerificationSessionModifyParamsOptionsDocument(TypedDict): allowed_types: NotRequired[ - List[Literal["driving_license", "id_card", "passport"]] + List[Union[Literal["driving_license", "id_card", "passport"], str]] ] """ Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. diff --git a/stripe/params/identity/_verification_session_update_params.py b/stripe/params/identity/_verification_session_update_params.py index 875a43b7c..25fdd341f 100644 --- a/stripe/params/identity/_verification_session_update_params.py +++ b/stripe/params/identity/_verification_session_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -28,7 +28,7 @@ class VerificationSessionUpdateParams(TypedDict): """ Details provided about the user being verified. These details may be shown to the user. """ - type: NotRequired[Literal["document", "email", "id_number"]] + type: NotRequired["Literal['document', 'email', 'id_number']|str"] """ The type of [verification check](https://docs.stripe.com/identity/verification-checks) to be performed. """ @@ -45,7 +45,7 @@ class VerificationSessionUpdateParamsOptions(TypedDict): class VerificationSessionUpdateParamsOptionsDocument(TypedDict): allowed_types: NotRequired[ - List[Literal["driving_license", "id_card", "passport"]] + List[Union[Literal["driving_license", "id_card", "passport"], str]] ] """ Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. diff --git a/stripe/params/issuing/_authorization_create_params.py b/stripe/params/issuing/_authorization_create_params.py index 9f6180f12..c4c77585a 100644 --- a/stripe/params/issuing/_authorization_create_params.py +++ b/stripe/params/issuing/_authorization_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -16,7 +16,7 @@ class AuthorizationCreateParams(RequestOptions): Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). """ authorization_method: NotRequired[ - Literal["chip", "contactless", "keyed_in", "online", "swipe"] + "Literal['chip', 'contactless', 'keyed_in', 'online', 'swipe']|str" ] """ How the card details were provided. Defaults to online. @@ -38,7 +38,7 @@ class AuthorizationCreateParams(RequestOptions): Fleet-specific information for authorizations using Fleet cards. """ fraud_disputability_likelihood: NotRequired[ - Literal["neutral", "unknown", "very_likely", "very_unlikely"] + "Literal['neutral', 'unknown', 'very_likely', 'very_unlikely']|str" ] """ Probability that this transaction can be disputed in the event of fraud. Assessed by comparing the characteristics of the authorization to card network rules. @@ -75,7 +75,9 @@ class AuthorizationCreateParams(RequestOptions): """ Verifications that Stripe performed on information that the cardholder provided to the merchant. """ - wallet: NotRequired[Literal["apple_pay", "google_pay", "samsung_pay"]] + wallet: NotRequired[ + "Literal['apple_pay', 'google_pay', 'samsung_pay']|str" + ] """ The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. """ @@ -607,8 +609,11 @@ class AuthorizationCreateParamsRiskAssessmentCardTestingRisk(TypedDict): """ The % of declines due to incorrect verification data (like CVV or expiry) in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of bad actors attempting to utilize valid card credentials at merchants with verification requirements. Takes on values between 0 and 100. """ - level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" + level: Union[ + Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ], + str, ] """ The likelihood that this authorization is associated with card testing activity. This is assessed by evaluating decline activity over the last hour. @@ -616,8 +621,11 @@ class AuthorizationCreateParamsRiskAssessmentCardTestingRisk(TypedDict): class AuthorizationCreateParamsRiskAssessmentFraudRisk(TypedDict): - level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" + level: Union[ + Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ], + str, ] """ Stripe's assessment of the likelihood of fraud on an authorization. @@ -633,8 +641,11 @@ class AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk(TypedDict): """ The dispute rate observed across all Stripe Issuing authorizations for this merchant. For example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing have resulted in a dispute. Higher values mean a higher likelihood the authorization is disputed. Takes on values between 0 and 100. """ - level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" + level: Union[ + Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ], + str, ] """ The likelihood that authorizations from this merchant will result in a dispute based on their history on Stripe Issuing. @@ -643,13 +654,13 @@ class AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk(TypedDict): class AuthorizationCreateParamsVerificationData(TypedDict): address_line1_check: NotRequired[ - Literal["match", "mismatch", "not_provided"] + "Literal['match', 'mismatch', 'not_provided']|str" ] """ Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`. """ address_postal_code_check: NotRequired[ - Literal["match", "mismatch", "not_provided"] + "Literal['match', 'mismatch', 'not_provided']|str" ] """ Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. @@ -660,11 +671,13 @@ class AuthorizationCreateParamsVerificationData(TypedDict): """ The exemption applied to this authorization. """ - cvc_check: NotRequired[Literal["match", "mismatch", "not_provided"]] + cvc_check: NotRequired["Literal['match', 'mismatch', 'not_provided']|str"] """ Whether the cardholder provided a CVC and if it matched Stripe's record. """ - expiry_check: NotRequired[Literal["match", "mismatch", "not_provided"]] + expiry_check: NotRequired[ + "Literal['match', 'mismatch', 'not_provided']|str" + ] """ Whether the cardholder provided an expiry date and if it matched Stripe's record. """ @@ -679,12 +692,15 @@ class AuthorizationCreateParamsVerificationData(TypedDict): class AuthorizationCreateParamsVerificationDataAuthenticationExemption( TypedDict, ): - claimed_by: Literal["acquirer", "issuer"] + claimed_by: Union[Literal["acquirer", "issuer"], str] """ The entity that requested the exemption, either the acquiring merchant or the Issuing user. """ - type: Literal[ - "low_value_transaction", "transaction_risk_analysis", "unknown" + type: Union[ + Literal[ + "low_value_transaction", "transaction_risk_analysis", "unknown" + ], + str, ] """ The specific exemption claimed for this authorization. @@ -692,8 +708,9 @@ class AuthorizationCreateParamsVerificationDataAuthenticationExemption( class AuthorizationCreateParamsVerificationDataThreeDSecure(TypedDict): - result: Literal[ - "attempt_acknowledged", "authenticated", "failed", "required" + result: Union[ + Literal["attempt_acknowledged", "authenticated", "failed", "required"], + str, ] """ The outcome of the 3D Secure authentication request. diff --git a/stripe/params/issuing/_authorization_list_params.py b/stripe/params/issuing/_authorization_list_params.py index ccea33632..50137e110 100644 --- a/stripe/params/issuing/_authorization_list_params.py +++ b/stripe/params/issuing/_authorization_list_params.py @@ -34,7 +34,9 @@ class AuthorizationListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["closed", "expired", "pending", "reversed"]] + status: NotRequired[ + "Literal['closed', 'expired', 'pending', 'reversed']|str" + ] """ Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. """ diff --git a/stripe/params/issuing/_card_create_params.py b/stripe/params/issuing/_card_create_params.py index 880b06feb..3b7af6972 100644 --- a/stripe/params/issuing/_card_create_params.py +++ b/stripe/params/issuing/_card_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -69,11 +69,11 @@ class CardCreateParams(RequestOptions): """ Rules that control spending for this card. Refer to our [documentation](https://docs.stripe.com/issuing/controls/spending-controls) for more details. """ - status: NotRequired[Literal["active", "inactive"]] + status: NotRequired["Literal['active', 'inactive']|str"] """ Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. """ - type: Literal["physical", "virtual"] + type: Union[Literal["physical", "virtual"], str] """ The type of card to issue. Possible values are `physical` or `virtual`. """ @@ -127,11 +127,11 @@ class CardCreateParamsShipping(TypedDict): """ Whether a signature is required for card delivery. """ - service: NotRequired[Literal["express", "priority", "standard"]] + service: NotRequired["Literal['express', 'priority', 'standard']|str"] """ Shipment service. """ - type: NotRequired[Literal["bulk", "individual"]] + type: NotRequired["Literal['bulk', 'individual']|str"] """ Packaging options. """ @@ -165,8 +165,11 @@ class CardCreateParamsShippingAddress(TypedDict): class CardCreateParamsShippingAddressValidation(TypedDict): - mode: Literal[ - "disabled", "normalization_only", "validation_and_normalization" + mode: Union[ + Literal[ + "disabled", "normalization_only", "validation_and_normalization" + ], + str, ] """ The address validation capabilities to use. @@ -1126,8 +1129,16 @@ class CardCreateParamsSpendingControlsSpendingLimit(TypedDict): """ Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. """ - interval: Literal[ - "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + interval: Union[ + Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ], + str, ] """ Interval (or event) to which the amount applies. diff --git a/stripe/params/issuing/_card_list_params.py b/stripe/params/issuing/_card_list_params.py index 70d6480b3..1858186d2 100644 --- a/stripe/params/issuing/_card_list_params.py +++ b/stripe/params/issuing/_card_list_params.py @@ -43,11 +43,11 @@ class CardListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["active", "canceled", "inactive"]] + status: NotRequired["Literal['active', 'canceled', 'inactive']|str"] """ Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. """ - type: NotRequired[Literal["physical", "virtual"]] + type: NotRequired["Literal['physical', 'virtual']|str"] """ Only return cards that have the given type. One of `virtual` or `physical`. """ diff --git a/stripe/params/issuing/_card_modify_params.py b/stripe/params/issuing/_card_modify_params.py index db85ee9a1..0fa94b9cb 100644 --- a/stripe/params/issuing/_card_modify_params.py +++ b/stripe/params/issuing/_card_modify_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -34,7 +34,7 @@ class CardModifyParams(RequestOptions): """ Rules that control spending for this card. Refer to our [documentation](https://docs.stripe.com/issuing/controls/spending-controls) for more details. """ - status: NotRequired[Literal["active", "canceled", "inactive"]] + status: NotRequired["Literal['active', 'canceled', 'inactive']|str"] """ Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. """ @@ -74,11 +74,11 @@ class CardModifyParamsShipping(TypedDict): """ Whether a signature is required for card delivery. """ - service: NotRequired[Literal["express", "priority", "standard"]] + service: NotRequired["Literal['express', 'priority', 'standard']|str"] """ Shipment service. """ - type: NotRequired[Literal["bulk", "individual"]] + type: NotRequired["Literal['bulk', 'individual']|str"] """ Packaging options. """ @@ -112,8 +112,11 @@ class CardModifyParamsShippingAddress(TypedDict): class CardModifyParamsShippingAddressValidation(TypedDict): - mode: Literal[ - "disabled", "normalization_only", "validation_and_normalization" + mode: Union[ + Literal[ + "disabled", "normalization_only", "validation_and_normalization" + ], + str, ] """ The address validation capabilities to use. @@ -1073,8 +1076,16 @@ class CardModifyParamsSpendingControlsSpendingLimit(TypedDict): """ Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. """ - interval: Literal[ - "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + interval: Union[ + Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ], + str, ] """ Interval (or event) to which the amount applies. diff --git a/stripe/params/issuing/_card_update_params.py b/stripe/params/issuing/_card_update_params.py index b661a8811..25f5c719c 100644 --- a/stripe/params/issuing/_card_update_params.py +++ b/stripe/params/issuing/_card_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -33,7 +33,7 @@ class CardUpdateParams(TypedDict): """ Rules that control spending for this card. Refer to our [documentation](https://docs.stripe.com/issuing/controls/spending-controls) for more details. """ - status: NotRequired[Literal["active", "canceled", "inactive"]] + status: NotRequired["Literal['active', 'canceled', 'inactive']|str"] """ Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. """ @@ -73,11 +73,11 @@ class CardUpdateParamsShipping(TypedDict): """ Whether a signature is required for card delivery. """ - service: NotRequired[Literal["express", "priority", "standard"]] + service: NotRequired["Literal['express', 'priority', 'standard']|str"] """ Shipment service. """ - type: NotRequired[Literal["bulk", "individual"]] + type: NotRequired["Literal['bulk', 'individual']|str"] """ Packaging options. """ @@ -111,8 +111,11 @@ class CardUpdateParamsShippingAddress(TypedDict): class CardUpdateParamsShippingAddressValidation(TypedDict): - mode: Literal[ - "disabled", "normalization_only", "validation_and_normalization" + mode: Union[ + Literal[ + "disabled", "normalization_only", "validation_and_normalization" + ], + str, ] """ The address validation capabilities to use. @@ -1072,8 +1075,16 @@ class CardUpdateParamsSpendingControlsSpendingLimit(TypedDict): """ Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. """ - interval: Literal[ - "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + interval: Union[ + Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ], + str, ] """ Interval (or event) to which the amount applies. diff --git a/stripe/params/issuing/_cardholder_create_params.py b/stripe/params/issuing/_cardholder_create_params.py index 165292c42..0c6b969f6 100644 --- a/stripe/params/issuing/_cardholder_create_params.py +++ b/stripe/params/issuing/_cardholder_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -41,7 +41,9 @@ class CardholderCreateParams(RequestOptions): While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://docs.stripe.com/issuing/3d-secure#when-is-3d-secure-applied) for more details. """ preferred_locales: NotRequired[ - List[Literal["da", "de", "en", "es", "fr", "it", "pl", "sv"]] + List[ + Union[Literal["da", "de", "en", "es", "fr", "it", "pl", "sv"], str] + ] ] """ The cardholder's preferred locales (languages), ordered by preference. Locales can be `da`, `de`, `en`, `es`, `fr`, `it`, `pl`, or `sv`. @@ -51,11 +53,11 @@ class CardholderCreateParams(RequestOptions): """ Rules that control spending across this cardholder's cards. Refer to our [documentation](https://docs.stripe.com/issuing/controls/spending-controls) for more details. """ - status: NotRequired[Literal["active", "inactive"]] + status: NotRequired["Literal['active', 'inactive']|str"] """ Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. """ - type: NotRequired[Literal["company", "individual"]] + type: NotRequired["Literal['company', 'individual']|str"] """ One of `individual` or `company`. See [Choose a cardholder type](https://docs.stripe.com/issuing/other/choose-cardholder) for more details. """ @@ -1136,8 +1138,16 @@ class CardholderCreateParamsSpendingControlsSpendingLimit(TypedDict): """ Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. """ - interval: Literal[ - "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + interval: Union[ + Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ], + str, ] """ Interval (or event) to which the amount applies. diff --git a/stripe/params/issuing/_cardholder_list_params.py b/stripe/params/issuing/_cardholder_list_params.py index 00fc05d23..ed49c9ff5 100644 --- a/stripe/params/issuing/_cardholder_list_params.py +++ b/stripe/params/issuing/_cardholder_list_params.py @@ -34,11 +34,11 @@ class CardholderListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["active", "blocked", "inactive"]] + status: NotRequired["Literal['active', 'blocked', 'inactive']|str"] """ Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. """ - type: NotRequired[Literal["company", "individual"]] + type: NotRequired["Literal['company', 'individual']|str"] """ Only return cardholders that have the given type. One of `individual` or `company`. """ diff --git a/stripe/params/issuing/_cardholder_modify_params.py b/stripe/params/issuing/_cardholder_modify_params.py index 55627338c..0688583cd 100644 --- a/stripe/params/issuing/_cardholder_modify_params.py +++ b/stripe/params/issuing/_cardholder_modify_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -36,7 +36,9 @@ class CardholderModifyParams(RequestOptions): The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://docs.stripe.com/issuing/3d-secure) for more details. """ preferred_locales: NotRequired[ - List[Literal["da", "de", "en", "es", "fr", "it", "pl", "sv"]] + List[ + Union[Literal["da", "de", "en", "es", "fr", "it", "pl", "sv"], str] + ] ] """ The cardholder's preferred locales (languages), ordered by preference. Locales can be `da`, `de`, `en`, `es`, `fr`, `it`, `pl`, or `sv`. @@ -46,7 +48,7 @@ class CardholderModifyParams(RequestOptions): """ Rules that control spending across this cardholder's cards. Refer to our [documentation](https://docs.stripe.com/issuing/controls/spending-controls) for more details. """ - status: NotRequired[Literal["active", "inactive"]] + status: NotRequired["Literal['active', 'inactive']|str"] """ Specifies whether to permit authorizations on this cardholder's cards. """ @@ -1127,8 +1129,16 @@ class CardholderModifyParamsSpendingControlsSpendingLimit(TypedDict): """ Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. """ - interval: Literal[ - "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + interval: Union[ + Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ], + str, ] """ Interval (or event) to which the amount applies. diff --git a/stripe/params/issuing/_cardholder_update_params.py b/stripe/params/issuing/_cardholder_update_params.py index 48294ba46..9a785f496 100644 --- a/stripe/params/issuing/_cardholder_update_params.py +++ b/stripe/params/issuing/_cardholder_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -35,7 +35,9 @@ class CardholderUpdateParams(TypedDict): The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://docs.stripe.com/issuing/3d-secure) for more details. """ preferred_locales: NotRequired[ - List[Literal["da", "de", "en", "es", "fr", "it", "pl", "sv"]] + List[ + Union[Literal["da", "de", "en", "es", "fr", "it", "pl", "sv"], str] + ] ] """ The cardholder's preferred locales (languages), ordered by preference. Locales can be `da`, `de`, `en`, `es`, `fr`, `it`, `pl`, or `sv`. @@ -45,7 +47,7 @@ class CardholderUpdateParams(TypedDict): """ Rules that control spending across this cardholder's cards. Refer to our [documentation](https://docs.stripe.com/issuing/controls/spending-controls) for more details. """ - status: NotRequired[Literal["active", "inactive"]] + status: NotRequired["Literal['active', 'inactive']|str"] """ Specifies whether to permit authorizations on this cardholder's cards. """ @@ -1126,8 +1128,16 @@ class CardholderUpdateParamsSpendingControlsSpendingLimit(TypedDict): """ Array of strings containing [categories](https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. """ - interval: Literal[ - "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + interval: Union[ + Literal[ + "all_time", + "daily", + "monthly", + "per_authorization", + "weekly", + "yearly", + ], + str, ] """ Interval (or event) to which the amount applies. diff --git a/stripe/params/issuing/_credit_underwriting_record_correct_params.py b/stripe/params/issuing/_credit_underwriting_record_correct_params.py index 49d0fb2b4..079a2dc9a 100644 --- a/stripe/params/issuing/_credit_underwriting_record_correct_params.py +++ b/stripe/params/issuing/_credit_underwriting_record_correct_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -47,12 +47,14 @@ class CreditUnderwritingRecordCorrectParams(RequestOptions): class CreditUnderwritingRecordCorrectParamsApplication(TypedDict): application_method: NotRequired[ - Literal["in_person", "mail", "online", "phone"] + "Literal['in_person', 'mail', 'online', 'phone']|str" ] """ The channel through which the applicant has submitted their application. Defaults to `online`. """ - purpose: Literal["credit_limit_increase", "credit_line_opening"] + purpose: Union[ + Literal["credit_limit_increase", "credit_line_opening"], str + ] """ Scope of demand made by the applicant. """ @@ -98,14 +100,17 @@ class CreditUnderwritingRecordCorrectParamsDecision(TypedDict): """ Details about the credit line closed. """ - type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", + type: Union[ + Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + "withdrawn_by_applicant", + ], + str, ] """ Outcome of the decision. @@ -120,70 +125,73 @@ class CreditUnderwritingRecordCorrectParamsDecisionApplicationRejected( Details about the `reasons.other` when present. """ reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", + Union[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ], + str, ] ] """ @@ -220,78 +228,81 @@ class CreditUnderwritingRecordCorrectParamsDecisionCreditLimitDecreased( Details about the `reasons.other` when present. """ reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", + Union[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "change_in_financial_state", + "change_in_utilization_of_credit_line", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "decrease_in_income_to_expense_ratio", + "decrease_in_social_media_performance", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "exceeds_acceptable_platform_exposure", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "has_recent_credit_limit_increase", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_credit_utilization", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "insufficient_usage_as_qualified_expenses", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ], + str, ] ] """ @@ -305,78 +316,81 @@ class CreditUnderwritingRecordCorrectParamsDecisionCreditLineClosed(TypedDict): Details about the `reasons.other` when present. """ reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", + Union[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "change_in_financial_state", + "change_in_utilization_of_credit_line", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "decrease_in_income_to_expense_ratio", + "decrease_in_social_media_performance", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "exceeds_acceptable_platform_exposure", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "has_recent_credit_limit_increase", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_credit_utilization", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "insufficient_usage_as_qualified_expenses", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ], + str, ] ] """ @@ -389,14 +403,17 @@ class CreditUnderwritingRecordCorrectParamsUnderwritingException(TypedDict): """ Written explanation for the exception. """ - original_decision_type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", + original_decision_type: Union[ + Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + "withdrawn_by_applicant", + ], + str, ] """ The decision before the exception was applied. diff --git a/stripe/params/issuing/_credit_underwriting_record_create_from_application_params.py b/stripe/params/issuing/_credit_underwriting_record_create_from_application_params.py index b7150ab7e..6dfe972ad 100644 --- a/stripe/params/issuing/_credit_underwriting_record_create_from_application_params.py +++ b/stripe/params/issuing/_credit_underwriting_record_create_from_application_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -33,12 +33,14 @@ class CreditUnderwritingRecordCreateFromApplicationParamsApplication( TypedDict ): application_method: NotRequired[ - Literal["in_person", "mail", "online", "phone"] + "Literal['in_person', 'mail', 'online', 'phone']|str" ] """ The channel through which the applicant has submitted their application. Defaults to `online`. """ - purpose: Literal["credit_limit_increase", "credit_line_opening"] + purpose: Union[ + Literal["credit_limit_increase", "credit_line_opening"], str + ] """ Scope of demand made by the applicant. """ diff --git a/stripe/params/issuing/_credit_underwriting_record_create_from_proactive_review_params.py b/stripe/params/issuing/_credit_underwriting_record_create_from_proactive_review_params.py index 748832223..118cfb697 100644 --- a/stripe/params/issuing/_credit_underwriting_record_create_from_proactive_review_params.py +++ b/stripe/params/issuing/_credit_underwriting_record_create_from_proactive_review_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -75,11 +75,14 @@ class CreditUnderwritingRecordCreateFromProactiveReviewParamsDecision( """ Details about the credit line closed. """ - type: Literal[ - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", + type: Union[ + Literal[ + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + ], + str, ] """ Outcome of the decision. @@ -115,78 +118,81 @@ class CreditUnderwritingRecordCreateFromProactiveReviewParamsDecisionCreditLimit Details about the `reasons.other` when present. """ reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", + Union[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "change_in_financial_state", + "change_in_utilization_of_credit_line", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "decrease_in_income_to_expense_ratio", + "decrease_in_social_media_performance", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "exceeds_acceptable_platform_exposure", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "has_recent_credit_limit_increase", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_credit_utilization", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "insufficient_usage_as_qualified_expenses", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ], + str, ] ] """ @@ -202,78 +208,81 @@ class CreditUnderwritingRecordCreateFromProactiveReviewParamsDecisionCreditLineC Details about the `reasons.other` when present. """ reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", + Union[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "change_in_financial_state", + "change_in_utilization_of_credit_line", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "decrease_in_income_to_expense_ratio", + "decrease_in_social_media_performance", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "exceeds_acceptable_platform_exposure", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "has_recent_credit_limit_increase", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_credit_utilization", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "insufficient_usage_as_qualified_expenses", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ], + str, ] ] """ @@ -288,14 +297,17 @@ class CreditUnderwritingRecordCreateFromProactiveReviewParamsUnderwritingExcepti """ Written explanation for the exception. """ - original_decision_type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", + original_decision_type: Union[ + Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + "withdrawn_by_applicant", + ], + str, ] """ The decision before the exception was applied. diff --git a/stripe/params/issuing/_credit_underwriting_record_report_decision_params.py b/stripe/params/issuing/_credit_underwriting_record_report_decision_params.py index 6b414070f..15e3f69a7 100644 --- a/stripe/params/issuing/_credit_underwriting_record_report_decision_params.py +++ b/stripe/params/issuing/_credit_underwriting_record_report_decision_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -48,11 +48,14 @@ class CreditUnderwritingRecordReportDecisionParamsDecision(TypedDict): """ Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://docs.stripe.com/api/issuing/credit_policy/) """ - type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "withdrawn_by_applicant", + type: Union[ + Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "withdrawn_by_applicant", + ], + str, ] """ Outcome of the decision. @@ -67,70 +70,73 @@ class CreditUnderwritingRecordReportDecisionParamsDecisionApplicationRejected( Details about the `reasons.other` when present. """ reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", + Union[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ], + str, ] ] """ @@ -158,14 +164,17 @@ class CreditUnderwritingRecordReportDecisionParamsUnderwritingException( """ Written explanation for the exception. """ - original_decision_type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", + original_decision_type: Union[ + Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + "withdrawn_by_applicant", + ], + str, ] """ The decision before the exception was applied. diff --git a/stripe/params/issuing/_dispute_close_params.py b/stripe/params/issuing/_dispute_close_params.py index 4b22cef96..ee1d3ac70 100644 --- a/stripe/params/issuing/_dispute_close_params.py +++ b/stripe/params/issuing/_dispute_close_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired @@ -10,7 +10,7 @@ class DisputeCloseParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - status: Literal["lost", "won"] + status: Union[Literal["lost", "won"], str] """ Whether to close the dispute as `won` or `lost`. """ diff --git a/stripe/params/issuing/_dispute_create_params.py b/stripe/params/issuing/_dispute_create_params.py index fe7ca8072..d6d82ccfa 100644 --- a/stripe/params/issuing/_dispute_create_params.py +++ b/stripe/params/issuing/_dispute_create_params.py @@ -71,16 +71,7 @@ class DisputeCreateParamsEvidence(TypedDict): Evidence provided when `reason` is 'other'. """ reason: NotRequired[ - Literal[ - "canceled", - "duplicate", - "fraudulent", - "merchandise_not_as_described", - "no_valid_authorization", - "not_received", - "other", - "service_not_as_described", - ] + "Literal['canceled', 'duplicate', 'fraudulent', 'merchandise_not_as_described', 'no_valid_authorization', 'not_received', 'other', 'service_not_as_described']|str" ] """ The reason for filing the dispute. The evidence should be submitted in the field of the same name. @@ -122,12 +113,14 @@ class DisputeCreateParamsEvidenceCanceled(TypedDict): """ Description of the merchandise or service that was purchased. """ - product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']|str" + ] """ Whether the product was a merchandise or service. """ return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" + "Literal['']|Literal['merchant_rejected', 'successful']|str" ] """ Result of cardholder's attempt to return the product. @@ -194,7 +187,7 @@ class DisputeCreateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): Description of the cardholder's attempt to return the product. """ return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" + "Literal['']|Literal['merchant_rejected', 'successful']|str" ] """ Result of cardholder's attempt to return the product. @@ -233,7 +226,9 @@ class DisputeCreateParamsEvidenceNotReceived(TypedDict): """ Description of the merchandise or service that was purchased. """ - product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']|str" + ] """ Whether the product was a merchandise or service. """ @@ -252,7 +247,9 @@ class DisputeCreateParamsEvidenceOther(TypedDict): """ Description of the merchandise or service that was purchased. """ - product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']|str" + ] """ Whether the product was a merchandise or service. """ diff --git a/stripe/params/issuing/_dispute_list_params.py b/stripe/params/issuing/_dispute_list_params.py index f613beba0..5df4eb494 100644 --- a/stripe/params/issuing/_dispute_list_params.py +++ b/stripe/params/issuing/_dispute_list_params.py @@ -27,7 +27,7 @@ class DisputeListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ status: NotRequired[ - Literal["expired", "lost", "submitted", "unsubmitted", "won"] + "Literal['expired', 'lost', 'submitted', 'unsubmitted', 'won']|str" ] """ Select Issuing disputes with the given status. diff --git a/stripe/params/issuing/_dispute_modify_params.py b/stripe/params/issuing/_dispute_modify_params.py index 89f3c9237..aff693d3a 100644 --- a/stripe/params/issuing/_dispute_modify_params.py +++ b/stripe/params/issuing/_dispute_modify_params.py @@ -69,16 +69,7 @@ class DisputeModifyParamsEvidence(TypedDict): Evidence provided when `reason` is 'other'. """ reason: NotRequired[ - Literal[ - "canceled", - "duplicate", - "fraudulent", - "merchandise_not_as_described", - "no_valid_authorization", - "not_received", - "other", - "service_not_as_described", - ] + "Literal['canceled', 'duplicate', 'fraudulent', 'merchandise_not_as_described', 'no_valid_authorization', 'not_received', 'other', 'service_not_as_described']|str" ] """ The reason for filing the dispute. The evidence should be submitted in the field of the same name. @@ -120,12 +111,14 @@ class DisputeModifyParamsEvidenceCanceled(TypedDict): """ Description of the merchandise or service that was purchased. """ - product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']|str" + ] """ Whether the product was a merchandise or service. """ return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" + "Literal['']|Literal['merchant_rejected', 'successful']|str" ] """ Result of cardholder's attempt to return the product. @@ -192,7 +185,7 @@ class DisputeModifyParamsEvidenceMerchandiseNotAsDescribed(TypedDict): Description of the cardholder's attempt to return the product. """ return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" + "Literal['']|Literal['merchant_rejected', 'successful']|str" ] """ Result of cardholder's attempt to return the product. @@ -231,7 +224,9 @@ class DisputeModifyParamsEvidenceNotReceived(TypedDict): """ Description of the merchandise or service that was purchased. """ - product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']|str" + ] """ Whether the product was a merchandise or service. """ @@ -250,7 +245,9 @@ class DisputeModifyParamsEvidenceOther(TypedDict): """ Description of the merchandise or service that was purchased. """ - product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']|str" + ] """ Whether the product was a merchandise or service. """ diff --git a/stripe/params/issuing/_dispute_update_params.py b/stripe/params/issuing/_dispute_update_params.py index 729fbaa99..ba0239705 100644 --- a/stripe/params/issuing/_dispute_update_params.py +++ b/stripe/params/issuing/_dispute_update_params.py @@ -68,16 +68,7 @@ class DisputeUpdateParamsEvidence(TypedDict): Evidence provided when `reason` is 'other'. """ reason: NotRequired[ - Literal[ - "canceled", - "duplicate", - "fraudulent", - "merchandise_not_as_described", - "no_valid_authorization", - "not_received", - "other", - "service_not_as_described", - ] + "Literal['canceled', 'duplicate', 'fraudulent', 'merchandise_not_as_described', 'no_valid_authorization', 'not_received', 'other', 'service_not_as_described']|str" ] """ The reason for filing the dispute. The evidence should be submitted in the field of the same name. @@ -119,12 +110,14 @@ class DisputeUpdateParamsEvidenceCanceled(TypedDict): """ Description of the merchandise or service that was purchased. """ - product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']|str" + ] """ Whether the product was a merchandise or service. """ return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" + "Literal['']|Literal['merchant_rejected', 'successful']|str" ] """ Result of cardholder's attempt to return the product. @@ -191,7 +184,7 @@ class DisputeUpdateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): Description of the cardholder's attempt to return the product. """ return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" + "Literal['']|Literal['merchant_rejected', 'successful']|str" ] """ Result of cardholder's attempt to return the product. @@ -230,7 +223,9 @@ class DisputeUpdateParamsEvidenceNotReceived(TypedDict): """ Description of the merchandise or service that was purchased. """ - product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']|str" + ] """ Whether the product was a merchandise or service. """ @@ -249,7 +244,9 @@ class DisputeUpdateParamsEvidenceOther(TypedDict): """ Description of the merchandise or service that was purchased. """ - product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + product_type: NotRequired[ + "Literal['']|Literal['merchandise', 'service']|str" + ] """ Whether the product was a merchandise or service. """ diff --git a/stripe/params/issuing/_personalization_design_list_params.py b/stripe/params/issuing/_personalization_design_list_params.py index a212083f6..48bf08154 100644 --- a/stripe/params/issuing/_personalization_design_list_params.py +++ b/stripe/params/issuing/_personalization_design_list_params.py @@ -30,7 +30,9 @@ class PersonalizationDesignListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["active", "inactive", "rejected", "review"]] + status: NotRequired[ + "Literal['active', 'inactive', 'rejected', 'review']|str" + ] """ Only return personalization designs with the given status. """ diff --git a/stripe/params/issuing/_personalization_design_reject_params.py b/stripe/params/issuing/_personalization_design_reject_params.py index ced5adae7..18463f6eb 100644 --- a/stripe/params/issuing/_personalization_design_reject_params.py +++ b/stripe/params/issuing/_personalization_design_reject_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -19,15 +19,18 @@ class PersonalizationDesignRejectParams(RequestOptions): class PersonalizationDesignRejectParamsRejectionReasons(TypedDict): card_logo: NotRequired[ List[ - Literal[ - "geographic_location", - "inappropriate", - "network_name", - "non_binary_image", - "non_fiat_currency", - "other", - "other_entity", - "promotional_material", + Union[ + Literal[ + "geographic_location", + "inappropriate", + "network_name", + "non_binary_image", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ], + str, ] ] ] @@ -36,14 +39,17 @@ class PersonalizationDesignRejectParamsRejectionReasons(TypedDict): """ carrier_text: NotRequired[ List[ - Literal[ - "geographic_location", - "inappropriate", - "network_name", - "non_fiat_currency", - "other", - "other_entity", - "promotional_material", + Union[ + Literal[ + "geographic_location", + "inappropriate", + "network_name", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ], + str, ] ] ] diff --git a/stripe/params/issuing/_physical_bundle_list_params.py b/stripe/params/issuing/_physical_bundle_list_params.py index 5193d4872..fca918987 100644 --- a/stripe/params/issuing/_physical_bundle_list_params.py +++ b/stripe/params/issuing/_physical_bundle_list_params.py @@ -22,11 +22,11 @@ class PhysicalBundleListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["active", "inactive", "review"]] + status: NotRequired["Literal['active', 'inactive', 'review']|str"] """ Only return physical bundles with the given status. """ - type: NotRequired[Literal["custom", "standard"]] + type: NotRequired["Literal['custom', 'standard']|str"] """ Only return physical bundles with the given type. """ diff --git a/stripe/params/issuing/_token_list_params.py b/stripe/params/issuing/_token_list_params.py index fa43b1dd0..0eb710275 100644 --- a/stripe/params/issuing/_token_list_params.py +++ b/stripe/params/issuing/_token_list_params.py @@ -30,7 +30,9 @@ class TokenListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["active", "deleted", "requested", "suspended"]] + status: NotRequired[ + "Literal['active', 'deleted', 'requested', 'suspended']|str" + ] """ Select Issuing tokens with the given status. """ diff --git a/stripe/params/issuing/_token_modify_params.py b/stripe/params/issuing/_token_modify_params.py index d8cbd4b20..893c62b1c 100644 --- a/stripe/params/issuing/_token_modify_params.py +++ b/stripe/params/issuing/_token_modify_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired @@ -10,7 +10,7 @@ class TokenModifyParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - status: Literal["active", "deleted", "suspended"] + status: Union[Literal["active", "deleted", "suspended"], str] """ Specifies which status the token should be updated to. """ diff --git a/stripe/params/issuing/_token_update_params.py b/stripe/params/issuing/_token_update_params.py index 3b78cc084..dadc993b2 100644 --- a/stripe/params/issuing/_token_update_params.py +++ b/stripe/params/issuing/_token_update_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -9,7 +9,7 @@ class TokenUpdateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ - status: Literal["active", "deleted", "suspended"] + status: Union[Literal["active", "deleted", "suspended"], str] """ Specifies which status the token should be updated to. """ diff --git a/stripe/params/issuing/_transaction_list_params.py b/stripe/params/issuing/_transaction_list_params.py index ad985c220..2d36220f0 100644 --- a/stripe/params/issuing/_transaction_list_params.py +++ b/stripe/params/issuing/_transaction_list_params.py @@ -38,7 +38,7 @@ class TransactionListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - type: NotRequired[Literal["capture", "refund"]] + type: NotRequired["Literal['capture', 'refund']|str"] """ Only return transactions that have the given type. One of `capture` or `refund`. """ diff --git a/stripe/params/privacy/_redaction_job_create_params.py b/stripe/params/privacy/_redaction_job_create_params.py index 2b4a7f4de..99cddff8a 100644 --- a/stripe/params/privacy/_redaction_job_create_params.py +++ b/stripe/params/privacy/_redaction_job_create_params.py @@ -14,7 +14,7 @@ class RedactionJobCreateParams(RequestOptions): """ The objects to redact. These root objects and their related ones will be validated for redaction. """ - validation_behavior: NotRequired[Literal["error", "fix"]] + validation_behavior: NotRequired["Literal['error', 'fix']|str"] """ Determines the validation behavior of the job. Default is `error`. """ diff --git a/stripe/params/privacy/_redaction_job_list_params.py b/stripe/params/privacy/_redaction_job_list_params.py index 8edf6f2b0..6b138cb5c 100644 --- a/stripe/params/privacy/_redaction_job_list_params.py +++ b/stripe/params/privacy/_redaction_job_list_params.py @@ -23,16 +23,7 @@ class RedactionJobListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ status: NotRequired[ - Literal[ - "canceled", - "canceling", - "created", - "failed", - "ready", - "redacting", - "succeeded", - "validating", - ] + "Literal['canceled', 'canceling', 'created', 'failed', 'ready', 'redacting', 'succeeded', 'validating']|str" ] """ If provided, only RedactionJob objects with the given status will be returned. diff --git a/stripe/params/privacy/_redaction_job_modify_params.py b/stripe/params/privacy/_redaction_job_modify_params.py index 424eeeea6..ed4402a69 100644 --- a/stripe/params/privacy/_redaction_job_modify_params.py +++ b/stripe/params/privacy/_redaction_job_modify_params.py @@ -10,7 +10,7 @@ class RedactionJobModifyParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - validation_behavior: NotRequired[Literal["error", "fix"]] + validation_behavior: NotRequired["Literal['error', 'fix']|str"] """ Determines the validation behavior of the job. Default is `error`. """ diff --git a/stripe/params/privacy/_redaction_job_update_params.py b/stripe/params/privacy/_redaction_job_update_params.py index 1a499c55e..0bc7c3ea9 100644 --- a/stripe/params/privacy/_redaction_job_update_params.py +++ b/stripe/params/privacy/_redaction_job_update_params.py @@ -9,7 +9,7 @@ class RedactionJobUpdateParams(TypedDict): """ Specifies which fields in the response should be expanded. """ - validation_behavior: NotRequired[Literal["error", "fix"]] + validation_behavior: NotRequired["Literal['error', 'fix']|str"] """ Determines the validation behavior of the job. Default is `error`. """ diff --git a/stripe/params/product_catalog/_trial_offer_create_params.py b/stripe/params/product_catalog/_trial_offer_create_params.py index 21b9b8297..888a1fe89 100644 --- a/stripe/params/product_catalog/_trial_offer_create_params.py +++ b/stripe/params/product_catalog/_trial_offer_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -33,7 +33,7 @@ class TrialOfferCreateParamsDuration(TypedDict): """ The relative duration of the trial period computed as the number of recurring price intervals. """ - type: Literal["relative", "timestamp"] + type: Union[Literal["relative", "timestamp"], str] """ Specifies how the trial offer duration is determined. """ diff --git a/stripe/params/radar/_issuing_authorization_evaluation_create_params.py b/stripe/params/radar/_issuing_authorization_evaluation_create_params.py index 89487a9cd..1c63b3b6c 100644 --- a/stripe/params/radar/_issuing_authorization_evaluation_create_params.py +++ b/stripe/params/radar/_issuing_authorization_evaluation_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -65,7 +65,7 @@ class IssuingAuthorizationEvaluationCreateParamsAuthorizationDetails( The total amount of the authorization in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). """ authorization_method: NotRequired[ - Literal["chip", "contactless", "keyed_in", "online", "swipe"] + "Literal['chip', 'contactless', 'keyed_in', 'online', 'swipe']|str" ] """ How the card details were provided. @@ -75,17 +75,7 @@ class IssuingAuthorizationEvaluationCreateParamsAuthorizationDetails( Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ entry_mode: NotRequired[ - Literal[ - "contactless", - "contactless_magstripe", - "credential_on_file", - "integrated_circuit_card", - "magstripe", - "magstripe_no_cvv", - "manual", - "other", - "unknown", - ] + "Literal['contactless', 'contactless_magstripe', 'credential_on_file', 'integrated_circuit_card', 'magstripe', 'magstripe_no_cvv', 'manual', 'other', 'unknown']|str" ] """ Defines how the card's information was entered for the authorization. @@ -99,18 +89,7 @@ class IssuingAuthorizationEvaluationCreateParamsAuthorizationDetails( The time the authorization was initiated, as a Unix timestamp in seconds. Must not be in the future. """ point_of_sale_condition: NotRequired[ - Literal[ - "account_verification", - "card_not_present", - "card_present", - "e_commerce", - "key_entered_pos", - "missing", - "moto", - "other", - "pin_entered", - "recurring", - ] + "Literal['account_verification', 'card_not_present', 'card_present', 'e_commerce', 'key_entered_pos', 'missing', 'moto', 'other', 'pin_entered', 'recurring']|str" ] """ Defines how the card was read at the point of sale. @@ -134,7 +113,7 @@ class IssuingAuthorizationEvaluationCreateParamsCardDetails(TypedDict): """ The two-letter country code of the BIN issuer. """ - card_type: Literal["physical", "virtual"] + card_type: Union[Literal["physical", "virtual"], str] """ The type of the card. """ @@ -192,15 +171,7 @@ class IssuingAuthorizationEvaluationCreateParamsNetworkDetails(TypedDict): Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be null. """ routed_network: NotRequired[ - Literal[ - "cirrus", - "interlink", - "maestro", - "mastercard", - "other", - "plus", - "visa", - ] + "Literal['cirrus', 'interlink', 'maestro', 'mastercard', 'other', 'plus', 'visa']|str" ] """ The card network over which Stripe received the authorization. @@ -216,7 +187,9 @@ class IssuingAuthorizationEvaluationCreateParamsTokenDetails(TypedDict): """ User's specified unique ID of the card token for this authorization attempt (e.g., RRN or internal reference). """ - wallet: NotRequired[Literal["apple_pay", "google_pay", "samsung_pay"]] + wallet: NotRequired[ + "Literal['apple_pay', 'google_pay', 'samsung_pay']|str" + ] """ The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. """ @@ -224,13 +197,7 @@ class IssuingAuthorizationEvaluationCreateParamsTokenDetails(TypedDict): class IssuingAuthorizationEvaluationCreateParamsVerificationDetails(TypedDict): three_d_secure_result: NotRequired[ - Literal[ - "attempt_acknowledged", - "authenticated", - "exempted", - "failed", - "required", - ] + "Literal['attempt_acknowledged', 'authenticated', 'exempted', 'failed', 'required']|str" ] """ The outcome of the 3D Secure authentication request. diff --git a/stripe/params/radar/_payment_evaluation_create_params.py b/stripe/params/radar/_payment_evaluation_create_params.py index 75a7efe68..4cf063591 100644 --- a/stripe/params/radar/_payment_evaluation_create_params.py +++ b/stripe/params/radar/_payment_evaluation_create_params.py @@ -145,12 +145,12 @@ class PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetails( class PaymentEvaluationCreateParamsPaymentDetailsMoneyMovementDetailsCard( TypedDict, ): - customer_presence: NotRequired[Literal["off_session", "on_session"]] + customer_presence: NotRequired["Literal['off_session', 'on_session']|str"] """ Describes the presence of the customer during the payment. """ payment_type: NotRequired[ - Literal["one_off", "recurring", "setup_one_off", "setup_recurring"] + "Literal['one_off', 'recurring', 'setup_one_off', 'setup_recurring']|str" ] """ Describes the type of payment. diff --git a/stripe/params/reserve/_hold_list_params.py b/stripe/params/reserve/_hold_list_params.py index b561bc6be..768a5ae53 100644 --- a/stripe/params/reserve/_hold_list_params.py +++ b/stripe/params/reserve/_hold_list_params.py @@ -26,7 +26,7 @@ class HoldListParams(RequestOptions): """ A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. """ - reason: NotRequired[Literal["charge", "standalone"]] + reason: NotRequired["Literal['charge', 'standalone']|str"] reserve_plan: NotRequired[str] """ Only return ReserveHolds associated with the ReservePlan specified by this ReservePlan ID. diff --git a/stripe/params/shared_payment/_granted_token_create_params.py b/stripe/params/shared_payment/_granted_token_create_params.py index 6fb466197..ac2067ac8 100644 --- a/stripe/params/shared_payment/_granted_token_create_params.py +++ b/stripe/params/shared_payment/_granted_token_create_params.py @@ -44,7 +44,7 @@ class GrantedTokenCreateParamsUsageLimits(TypedDict): """ Max amount that can be captured using this SharedPaymentToken """ - recurring_interval: NotRequired[Literal["month", "week", "year"]] + recurring_interval: NotRequired["Literal['month', 'week', 'year']|str"] """ The recurring interval at which the shared payment token's amount usage restrictions reset. """ diff --git a/stripe/params/shared_payment/_issued_token_create_params.py b/stripe/params/shared_payment/_issued_token_create_params.py index 77eb2525e..cc8850e45 100644 --- a/stripe/params/shared_payment/_issued_token_create_params.py +++ b/stripe/params/shared_payment/_issued_token_create_params.py @@ -61,7 +61,7 @@ class IssuedTokenCreateParamsUsageLimits(TypedDict): """ Max amount that can be captured using this SharedPaymentToken """ - recurring_interval: NotRequired[Literal["month", "week", "year"]] + recurring_interval: NotRequired["Literal['month', 'week', 'year']|str"] """ The recurring interval at which the shared payment token's amount usage restrictions reset. """ diff --git a/stripe/params/tax/_calculation_create_params.py b/stripe/params/tax/_calculation_create_params.py index b9a6fca88..3a96478c0 100644 --- a/stripe/params/tax/_calculation_create_params.py +++ b/stripe/params/tax/_calculation_create_params.py @@ -46,7 +46,7 @@ class CalculationCreateParamsCustomerDetails(TypedDict): """ The customer's postal address (for example, home or business location). """ - address_source: NotRequired[Literal["billing", "shipping"]] + address_source: NotRequired["Literal['billing', 'shipping']|str"] """ The type of customer address provided. """ @@ -59,7 +59,7 @@ class CalculationCreateParamsCustomerDetails(TypedDict): The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness. """ taxability_override: NotRequired[ - Literal["customer_exempt", "none", "reverse_charge"] + "Literal['customer_exempt', 'none', 'reverse_charge']|str" ] """ Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies. @@ -253,7 +253,7 @@ class CalculationCreateParamsLineItem(TypedDict): """ A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://docs.stripe.com/tax/reports). """ - tax_behavior: NotRequired[Literal["exclusive", "inclusive"]] + tax_behavior: NotRequired["Literal['exclusive', 'inclusive']|str"] """ Specifies whether the `amount` includes taxes. Defaults to `exclusive`. """ @@ -342,7 +342,7 @@ class CalculationCreateParamsShippingCost(TypedDict): """ If provided, the [shipping rate](https://docs.stripe.com/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters. """ - tax_behavior: NotRequired[Literal["exclusive", "inclusive"]] + tax_behavior: NotRequired["Literal['exclusive', 'inclusive']|str"] """ Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. """ diff --git a/stripe/params/tax/_form_list_params.py b/stripe/params/tax/_form_list_params.py index 19ba1fafb..e7e1a243c 100644 --- a/stripe/params/tax/_form_list_params.py +++ b/stripe/params/tax/_form_list_params.py @@ -27,16 +27,7 @@ class FormListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ type: NotRequired[ - Literal[ - "au_serr", - "ca_mrdp", - "eu_dac7", - "gb_mrdp", - "nz_mrdp", - "us_1099_k", - "us_1099_misc", - "us_1099_nec", - ] + "Literal['au_serr', 'ca_mrdp', 'eu_dac7', 'gb_mrdp', 'nz_mrdp', 'us_1099_k', 'us_1099_misc', 'us_1099_nec']|str" ] """ An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future tax form types. If your integration expects only one type of tax form in the response, make sure to provide a type value in the request. diff --git a/stripe/params/tax/_registration_create_params.py b/stripe/params/tax/_registration_create_params.py index f3d0d8d7e..62e728e33 100644 --- a/stripe/params/tax/_registration_create_params.py +++ b/stripe/params/tax/_registration_create_params.py @@ -450,7 +450,9 @@ class RegistrationCreateParamsCountryOptionsAe(TypedDict): class RegistrationCreateParamsCountryOptionsAeStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -468,7 +470,9 @@ class RegistrationCreateParamsCountryOptionsAl(TypedDict): class RegistrationCreateParamsCountryOptionsAlStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -493,7 +497,9 @@ class RegistrationCreateParamsCountryOptionsAo(TypedDict): class RegistrationCreateParamsCountryOptionsAoStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -504,15 +510,15 @@ class RegistrationCreateParamsCountryOptionsAt(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsAtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -531,7 +537,9 @@ class RegistrationCreateParamsCountryOptionsAu(TypedDict): class RegistrationCreateParamsCountryOptionsAuStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -549,7 +557,9 @@ class RegistrationCreateParamsCountryOptionsAw(TypedDict): class RegistrationCreateParamsCountryOptionsAwStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -574,7 +584,9 @@ class RegistrationCreateParamsCountryOptionsBa(TypedDict): class RegistrationCreateParamsCountryOptionsBaStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -592,7 +604,9 @@ class RegistrationCreateParamsCountryOptionsBb(TypedDict): class RegistrationCreateParamsCountryOptionsBbStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -610,7 +624,9 @@ class RegistrationCreateParamsCountryOptionsBd(TypedDict): class RegistrationCreateParamsCountryOptionsBdStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -621,15 +637,15 @@ class RegistrationCreateParamsCountryOptionsBe(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsBeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -648,7 +664,9 @@ class RegistrationCreateParamsCountryOptionsBf(TypedDict): class RegistrationCreateParamsCountryOptionsBfStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -659,15 +677,15 @@ class RegistrationCreateParamsCountryOptionsBg(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsBgStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -686,7 +704,9 @@ class RegistrationCreateParamsCountryOptionsBh(TypedDict): class RegistrationCreateParamsCountryOptionsBhStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -711,7 +731,9 @@ class RegistrationCreateParamsCountryOptionsBs(TypedDict): class RegistrationCreateParamsCountryOptionsBsStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -731,7 +753,7 @@ class RegistrationCreateParamsCountryOptionsCa(TypedDict): """ Options for the provincial tax registration. """ - type: Literal["province_standard", "simplified", "standard"] + type: Union[Literal["province_standard", "simplified", "standard"], str] """ Type of registration to be created in Canada. """ @@ -756,7 +778,9 @@ class RegistrationCreateParamsCountryOptionsCd(TypedDict): class RegistrationCreateParamsCountryOptionsCdStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -774,7 +798,9 @@ class RegistrationCreateParamsCountryOptionsCh(TypedDict): class RegistrationCreateParamsCountryOptionsChStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -820,15 +846,15 @@ class RegistrationCreateParamsCountryOptionsCy(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsCyStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -840,15 +866,15 @@ class RegistrationCreateParamsCountryOptionsCz(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsCzStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -860,15 +886,15 @@ class RegistrationCreateParamsCountryOptionsDe(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsDeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -880,15 +906,15 @@ class RegistrationCreateParamsCountryOptionsDk(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsDkStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -907,15 +933,15 @@ class RegistrationCreateParamsCountryOptionsEe(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsEeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -934,15 +960,15 @@ class RegistrationCreateParamsCountryOptionsEs(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsEsStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -961,7 +987,9 @@ class RegistrationCreateParamsCountryOptionsEt(TypedDict): class RegistrationCreateParamsCountryOptionsEtStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -972,15 +1000,15 @@ class RegistrationCreateParamsCountryOptionsFi(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsFiStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -992,15 +1020,15 @@ class RegistrationCreateParamsCountryOptionsFr(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsFrStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1019,7 +1047,9 @@ class RegistrationCreateParamsCountryOptionsGb(TypedDict): class RegistrationCreateParamsCountryOptionsGbStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1044,7 +1074,9 @@ class RegistrationCreateParamsCountryOptionsGn(TypedDict): class RegistrationCreateParamsCountryOptionsGnStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1055,15 +1087,15 @@ class RegistrationCreateParamsCountryOptionsGr(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsGrStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1075,15 +1107,15 @@ class RegistrationCreateParamsCountryOptionsHr(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsHrStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1095,15 +1127,15 @@ class RegistrationCreateParamsCountryOptionsHu(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsHuStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1122,15 +1154,15 @@ class RegistrationCreateParamsCountryOptionsIe(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsIeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1156,7 +1188,9 @@ class RegistrationCreateParamsCountryOptionsIs(TypedDict): class RegistrationCreateParamsCountryOptionsIsStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1167,15 +1201,15 @@ class RegistrationCreateParamsCountryOptionsIt(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsItStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1194,7 +1228,9 @@ class RegistrationCreateParamsCountryOptionsJp(TypedDict): class RegistrationCreateParamsCountryOptionsJpStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1254,15 +1290,15 @@ class RegistrationCreateParamsCountryOptionsLt(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsLtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1274,15 +1310,15 @@ class RegistrationCreateParamsCountryOptionsLu(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsLuStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1294,15 +1330,15 @@ class RegistrationCreateParamsCountryOptionsLv(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsLvStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1335,7 +1371,9 @@ class RegistrationCreateParamsCountryOptionsMe(TypedDict): class RegistrationCreateParamsCountryOptionsMeStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1353,7 +1391,9 @@ class RegistrationCreateParamsCountryOptionsMk(TypedDict): class RegistrationCreateParamsCountryOptionsMkStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1371,7 +1411,9 @@ class RegistrationCreateParamsCountryOptionsMr(TypedDict): class RegistrationCreateParamsCountryOptionsMrStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1382,15 +1424,15 @@ class RegistrationCreateParamsCountryOptionsMt(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsMtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1423,15 +1465,15 @@ class RegistrationCreateParamsCountryOptionsNl(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsNlStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1450,7 +1492,9 @@ class RegistrationCreateParamsCountryOptionsNo(TypedDict): class RegistrationCreateParamsCountryOptionsNoStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1475,7 +1519,9 @@ class RegistrationCreateParamsCountryOptionsNz(TypedDict): class RegistrationCreateParamsCountryOptionsNzStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1493,7 +1539,9 @@ class RegistrationCreateParamsCountryOptionsOm(TypedDict): class RegistrationCreateParamsCountryOptionsOmStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1518,15 +1566,15 @@ class RegistrationCreateParamsCountryOptionsPl(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsPlStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1538,15 +1586,15 @@ class RegistrationCreateParamsCountryOptionsPt(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsPtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1558,15 +1606,15 @@ class RegistrationCreateParamsCountryOptionsRo(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsRoStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1585,7 +1633,9 @@ class RegistrationCreateParamsCountryOptionsRs(TypedDict): class RegistrationCreateParamsCountryOptionsRsStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1610,15 +1660,15 @@ class RegistrationCreateParamsCountryOptionsSe(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsSeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1637,7 +1687,9 @@ class RegistrationCreateParamsCountryOptionsSg(TypedDict): class RegistrationCreateParamsCountryOptionsSgStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1648,15 +1700,15 @@ class RegistrationCreateParamsCountryOptionsSi(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsSiStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1668,15 +1720,15 @@ class RegistrationCreateParamsCountryOptionsSk(TypedDict): """ Options for the standard registration. """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[Literal["ioss", "oss_non_union", "oss_union", "standard"], str] """ Type of registration to be created in an EU country. """ class RegistrationCreateParamsCountryOptionsSkStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. @@ -1702,7 +1754,9 @@ class RegistrationCreateParamsCountryOptionsSr(TypedDict): class RegistrationCreateParamsCountryOptionsSrStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -1941,8 +1995,13 @@ class RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict): """ A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City). """ - type: Literal[ - "local_use_tax", "simplified_sellers_use_tax", "single_local_use_tax" + type: Union[ + Literal[ + "local_use_tax", + "simplified_sellers_use_tax", + "single_local_use_tax", + ], + str, ] """ The type of the election for the state sales tax registration. @@ -1968,7 +2027,9 @@ class RegistrationCreateParamsCountryOptionsUy(TypedDict): class RegistrationCreateParamsCountryOptionsUyStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -2000,7 +2061,9 @@ class RegistrationCreateParamsCountryOptionsZa(TypedDict): class RegistrationCreateParamsCountryOptionsZaStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ @@ -2025,7 +2088,9 @@ class RegistrationCreateParamsCountryOptionsZw(TypedDict): class RegistrationCreateParamsCountryOptionsZwStandard(TypedDict): - place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + place_of_supply_scheme: NotRequired[ + "Literal['inbound_goods', 'standard']|str" + ] """ Place of supply scheme used in an standard registration. """ diff --git a/stripe/params/tax/_registration_list_params.py b/stripe/params/tax/_registration_list_params.py index 7573e1e6b..ce0b0af39 100644 --- a/stripe/params/tax/_registration_list_params.py +++ b/stripe/params/tax/_registration_list_params.py @@ -22,7 +22,7 @@ class RegistrationListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["active", "all", "expired", "scheduled"]] + status: NotRequired["Literal['active', 'all', 'expired', 'scheduled']|str"] """ The status of the Tax Registration. """ diff --git a/stripe/params/tax/_transaction_create_reversal_params.py b/stripe/params/tax/_transaction_create_reversal_params.py index da51da430..37c799c7c 100644 --- a/stripe/params/tax/_transaction_create_reversal_params.py +++ b/stripe/params/tax/_transaction_create_reversal_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -23,7 +23,7 @@ class TransactionCreateReversalParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - mode: Literal["full", "partial"] + mode: Union[Literal["full", "partial"], str] """ If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed. """ diff --git a/stripe/params/terminal/_configuration_create_params.py b/stripe/params/terminal/_configuration_create_params.py index d62b7461f..cd759e341 100644 --- a/stripe/params/terminal/_configuration_create_params.py +++ b/stripe/params/terminal/_configuration_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -592,7 +592,10 @@ class ConfigurationCreateParamsWifi(TypedDict): """ Credentials for a WPA-Personal WiFi network. """ - type: Literal["enterprise_eap_peap", "enterprise_eap_tls", "personal_psk"] + type: Union[ + Literal["enterprise_eap_peap", "enterprise_eap_tls", "personal_psk"], + str, + ] """ Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. """ diff --git a/stripe/params/terminal/_configuration_modify_params.py b/stripe/params/terminal/_configuration_modify_params.py index cb4a0a550..cea171fd8 100644 --- a/stripe/params/terminal/_configuration_modify_params.py +++ b/stripe/params/terminal/_configuration_modify_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -608,7 +608,10 @@ class ConfigurationModifyParamsWifi(TypedDict): """ Credentials for a WPA-Personal WiFi network. """ - type: Literal["enterprise_eap_peap", "enterprise_eap_tls", "personal_psk"] + type: Union[ + Literal["enterprise_eap_peap", "enterprise_eap_tls", "personal_psk"], + str, + ] """ Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. """ diff --git a/stripe/params/terminal/_configuration_update_params.py b/stripe/params/terminal/_configuration_update_params.py index 9ff889662..6b5dfae23 100644 --- a/stripe/params/terminal/_configuration_update_params.py +++ b/stripe/params/terminal/_configuration_update_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -607,7 +607,10 @@ class ConfigurationUpdateParamsWifi(TypedDict): """ Credentials for a WPA-Personal WiFi network. """ - type: Literal["enterprise_eap_peap", "enterprise_eap_tls", "personal_psk"] + type: Union[ + Literal["enterprise_eap_peap", "enterprise_eap_tls", "personal_psk"], + str, + ] """ Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. """ diff --git a/stripe/params/terminal/_reader_collect_inputs_params.py b/stripe/params/terminal/_reader_collect_inputs_params.py index 92688106d..c0deb829e 100644 --- a/stripe/params/terminal/_reader_collect_inputs_params.py +++ b/stripe/params/terminal/_reader_collect_inputs_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -38,8 +38,9 @@ class ReaderCollectInputsParamsInput(TypedDict): """ List of toggles to be displayed and customization for the toggles """ - type: Literal[ - "email", "numeric", "phone", "selection", "signature", "text" + type: Union[ + Literal["email", "numeric", "phone", "selection", "signature", "text"], + str, ] """ The type of input to collect @@ -77,7 +78,7 @@ class ReaderCollectInputsParamsInputSelectionChoice(TypedDict): """ The unique identifier for this choice """ - style: NotRequired[Literal["primary", "secondary"]] + style: NotRequired["Literal['primary', 'secondary']|str"] """ The style of the button which will be shown for this choice. Can be `primary` or `secondary`. """ @@ -88,7 +89,7 @@ class ReaderCollectInputsParamsInputSelectionChoice(TypedDict): class ReaderCollectInputsParamsInputToggle(TypedDict): - default_value: NotRequired[Literal["disabled", "enabled"]] + default_value: NotRequired["Literal['disabled', 'enabled']|str"] """ The default value of the toggle. Can be `enabled` or `disabled`. """ diff --git a/stripe/params/terminal/_reader_collect_payment_method_params.py b/stripe/params/terminal/_reader_collect_payment_method_params.py index e987fc320..8fed5401f 100644 --- a/stripe/params/terminal/_reader_collect_payment_method_params.py +++ b/stripe/params/terminal/_reader_collect_payment_method_params.py @@ -23,7 +23,9 @@ class ReaderCollectPaymentMethodParams(RequestOptions): class ReaderCollectPaymentMethodParamsCollectConfig(TypedDict): - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. """ diff --git a/stripe/params/terminal/_reader_list_params.py b/stripe/params/terminal/_reader_list_params.py index cef8d2c9f..becba0d89 100644 --- a/stripe/params/terminal/_reader_list_params.py +++ b/stripe/params/terminal/_reader_list_params.py @@ -7,27 +7,7 @@ class ReaderListParams(RequestOptions): device_type: NotRequired[ - Literal[ - "bbpos_chipper2x", - "bbpos_wisepad3", - "bbpos_wisepos_e", - "mobile_phone_reader", - "simulated_stripe_s700", - "simulated_stripe_s710", - "simulated_verifone_m425", - "simulated_verifone_p630", - "simulated_verifone_ux700", - "simulated_verifone_v660p", - "simulated_wisepos_e", - "stripe_m2", - "stripe_s700", - "stripe_s710", - "verifone_P400", - "verifone_m425", - "verifone_p630", - "verifone_ux700", - "verifone_v660p", - ] + "Literal['bbpos_chipper2x', 'bbpos_wisepad3', 'bbpos_wisepos_e', 'mobile_phone_reader', 'simulated_stripe_s700', 'simulated_stripe_s710', 'simulated_verifone_m425', 'simulated_verifone_p630', 'simulated_verifone_ux700', 'simulated_verifone_v660p', 'simulated_wisepos_e', 'stripe_m2', 'stripe_s700', 'stripe_s710', 'verifone_P400', 'verifone_m425', 'verifone_p630', 'verifone_ux700', 'verifone_v660p']|str" ] """ Filters readers by device type @@ -56,7 +36,7 @@ class ReaderListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["offline", "online"]] + status: NotRequired["Literal['offline', 'online']|str"] """ A status filter to filter readers to only offline or online readers """ diff --git a/stripe/params/terminal/_reader_present_payment_method_params.py b/stripe/params/terminal/_reader_present_payment_method_params.py index 000061f71..b908e1eb9 100644 --- a/stripe/params/terminal/_reader_present_payment_method_params.py +++ b/stripe/params/terminal/_reader_present_payment_method_params.py @@ -28,7 +28,7 @@ class ReaderPresentPaymentMethodParams(RequestOptions): """ Simulated data for the interac_present payment method. """ - type: NotRequired[Literal["card", "card_present", "interac_present"]] + type: NotRequired["Literal['card', 'card_present', 'interac_present']|str"] """ Simulated payment type. """ diff --git a/stripe/params/terminal/_reader_process_payment_intent_params.py b/stripe/params/terminal/_reader_process_payment_intent_params.py index 3d7876c98..290ada6d5 100644 --- a/stripe/params/terminal/_reader_process_payment_intent_params.py +++ b/stripe/params/terminal/_reader_process_payment_intent_params.py @@ -23,7 +23,9 @@ class ReaderProcessPaymentIntentParams(RequestOptions): class ReaderProcessPaymentIntentParamsProcessConfig(TypedDict): - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. """ diff --git a/stripe/params/terminal/_reader_process_setup_intent_params.py b/stripe/params/terminal/_reader_process_setup_intent_params.py index 373e2ec05..b49e27c19 100644 --- a/stripe/params/terminal/_reader_process_setup_intent_params.py +++ b/stripe/params/terminal/_reader_process_setup_intent_params.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class ReaderProcessSetupIntentParams(RequestOptions): - allow_redisplay: Literal["always", "limited", "unspecified"] + allow_redisplay: Union[Literal["always", "limited", "unspecified"], str] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. """ diff --git a/stripe/params/terminal/_reader_succeed_input_collection_params.py b/stripe/params/terminal/_reader_succeed_input_collection_params.py index 0872d72aa..75e7ad7e6 100644 --- a/stripe/params/terminal/_reader_succeed_input_collection_params.py +++ b/stripe/params/terminal/_reader_succeed_input_collection_params.py @@ -10,7 +10,7 @@ class ReaderSucceedInputCollectionParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - skip_non_required_inputs: NotRequired[Literal["all", "none"]] + skip_non_required_inputs: NotRequired["Literal['all', 'none']|str"] """ This parameter defines the skip behavior for input collection. """ diff --git a/stripe/params/test_helpers/_confirmation_token_create_params.py b/stripe/params/test_helpers/_confirmation_token_create_params.py index 59da017bd..f44d50bc9 100644 --- a/stripe/params/test_helpers/_confirmation_token_create_params.py +++ b/stripe/params/test_helpers/_confirmation_token_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -30,7 +30,7 @@ class ConfirmationTokenCreateParams(TypedDict): """ Return URL used to confirm the Intent. """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + setup_future_usage: NotRequired["Literal['off_session', 'on_session']|str"] """ Indicates that you intend to make future payments with this ConfirmationToken's payment method. @@ -63,7 +63,9 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. """ - allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + allow_redisplay: NotRequired[ + "Literal['always', 'limited', 'unspecified']|str" + ] """ This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. """ @@ -363,69 +365,72 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): """ If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -692,7 +697,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataGrabpay(TypedDict): class ConfirmationTokenCreateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: NotRequired["Literal['bca', 'bni', 'bri', 'cimb', 'permata']|str"] """ Bank where the account is held. """ @@ -783,7 +788,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataMultibanco(TypedDict): class ConfirmationTokenCreateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] + funding: NotRequired["Literal['card', 'points']|str"] """ Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. """ @@ -819,34 +824,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataOxxo(TypedDict): class ConfirmationTokenCreateParamsPaymentMethodDataP24(TypedDict): bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] + "Literal['alior_bank', 'bank_millennium', 'bank_nowy_bfg_sa', 'bank_pekao_sa', 'banki_spbdzielcze', 'blik', 'bnp_paribas', 'boz', 'citi_handlowy', 'credit_agricole', 'envelobank', 'etransfer_pocztowy24', 'getin_bank', 'ideabank', 'ing', 'inteligo', 'mbank_mtransfer', 'nest_przelew', 'noble_pay', 'pbac_z_ipko', 'plus_bank', 'santander_przelew24', 'tmobile_usbugi_bankowe', 'toyota_bank', 'velobank', 'volkswagen_bank']|str" ] """ The customer's bank. @@ -957,7 +935,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataShopeepay(TypedDict): class ConfirmationTokenCreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + country: Union[Literal["AT", "BE", "DE", "ES", "IT", "NL"], str] """ Two-letter ISO code representing the country the bank account is located in. """ @@ -1002,7 +980,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataUpiMandateOptions( """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. """ @@ -1017,7 +995,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataUpiMandateOptions( class ConfirmationTokenCreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -1025,7 +1003,7 @@ class ConfirmationTokenCreateParamsPaymentMethodDataUsBankAccount(TypedDict): """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -1087,7 +1065,7 @@ class ConfirmationTokenCreateParamsPaymentMethodOptionsCardInstallmentsPlan( For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. One of `month`. """ - type: Literal["bonus", "fixed_count", "revolving"] + type: Union[Literal["bonus", "fixed_count", "revolving"], str] """ Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. """ diff --git a/stripe/params/test_helpers/_payment_intent_simulate_crypto_deposit_params.py b/stripe/params/test_helpers/_payment_intent_simulate_crypto_deposit_params.py index b39dea3f5..53dcc9cb5 100644 --- a/stripe/params/test_helpers/_payment_intent_simulate_crypto_deposit_params.py +++ b/stripe/params/test_helpers/_payment_intent_simulate_crypto_deposit_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -13,7 +13,9 @@ class PaymentIntentSimulateCryptoDepositParams(TypedDict): """ Specifies which fields in the response should be expanded. """ - network: Literal["base", "ethereum", "polygon", "solana", "tempo"] + network: Union[ + Literal["base", "ethereum", "polygon", "solana", "tempo"], str + ] """ The blockchain network of the simulated crypto deposit. """ diff --git a/stripe/params/test_helpers/issuing/_authorization_create_params.py b/stripe/params/test_helpers/issuing/_authorization_create_params.py index 47c1ff165..718442b25 100644 --- a/stripe/params/test_helpers/issuing/_authorization_create_params.py +++ b/stripe/params/test_helpers/issuing/_authorization_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from decimal import Decimal -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -15,7 +15,7 @@ class AuthorizationCreateParams(TypedDict): Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). """ authorization_method: NotRequired[ - Literal["chip", "contactless", "keyed_in", "online", "swipe"] + "Literal['chip', 'contactless', 'keyed_in', 'online', 'swipe']|str" ] """ How the card details were provided. Defaults to online. @@ -37,7 +37,7 @@ class AuthorizationCreateParams(TypedDict): Fleet-specific information for authorizations using Fleet cards. """ fraud_disputability_likelihood: NotRequired[ - Literal["neutral", "unknown", "very_likely", "very_unlikely"] + "Literal['neutral', 'unknown', 'very_likely', 'very_unlikely']|str" ] """ Probability that this transaction can be disputed in the event of fraud. Assessed by comparing the characteristics of the authorization to card network rules. @@ -74,7 +74,9 @@ class AuthorizationCreateParams(TypedDict): """ Verifications that Stripe performed on information that the cardholder provided to the merchant. """ - wallet: NotRequired[Literal["apple_pay", "google_pay", "samsung_pay"]] + wallet: NotRequired[ + "Literal['apple_pay', 'google_pay', 'samsung_pay']|str" + ] """ The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. """ @@ -606,8 +608,11 @@ class AuthorizationCreateParamsRiskAssessmentCardTestingRisk(TypedDict): """ The % of declines due to incorrect verification data (like CVV or expiry) in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of bad actors attempting to utilize valid card credentials at merchants with verification requirements. Takes on values between 0 and 100. """ - level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" + level: Union[ + Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ], + str, ] """ The likelihood that this authorization is associated with card testing activity. This is assessed by evaluating decline activity over the last hour. @@ -615,8 +620,11 @@ class AuthorizationCreateParamsRiskAssessmentCardTestingRisk(TypedDict): class AuthorizationCreateParamsRiskAssessmentFraudRisk(TypedDict): - level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" + level: Union[ + Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ], + str, ] """ Stripe's assessment of the likelihood of fraud on an authorization. @@ -632,8 +640,11 @@ class AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk(TypedDict): """ The dispute rate observed across all Stripe Issuing authorizations for this merchant. For example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing have resulted in a dispute. Higher values mean a higher likelihood the authorization is disputed. Takes on values between 0 and 100. """ - level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" + level: Union[ + Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ], + str, ] """ The likelihood that authorizations from this merchant will result in a dispute based on their history on Stripe Issuing. @@ -642,13 +653,13 @@ class AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk(TypedDict): class AuthorizationCreateParamsVerificationData(TypedDict): address_line1_check: NotRequired[ - Literal["match", "mismatch", "not_provided"] + "Literal['match', 'mismatch', 'not_provided']|str" ] """ Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`. """ address_postal_code_check: NotRequired[ - Literal["match", "mismatch", "not_provided"] + "Literal['match', 'mismatch', 'not_provided']|str" ] """ Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. @@ -659,11 +670,13 @@ class AuthorizationCreateParamsVerificationData(TypedDict): """ The exemption applied to this authorization. """ - cvc_check: NotRequired[Literal["match", "mismatch", "not_provided"]] + cvc_check: NotRequired["Literal['match', 'mismatch', 'not_provided']|str"] """ Whether the cardholder provided a CVC and if it matched Stripe's record. """ - expiry_check: NotRequired[Literal["match", "mismatch", "not_provided"]] + expiry_check: NotRequired[ + "Literal['match', 'mismatch', 'not_provided']|str" + ] """ Whether the cardholder provided an expiry date and if it matched Stripe's record. """ @@ -678,12 +691,15 @@ class AuthorizationCreateParamsVerificationData(TypedDict): class AuthorizationCreateParamsVerificationDataAuthenticationExemption( TypedDict, ): - claimed_by: Literal["acquirer", "issuer"] + claimed_by: Union[Literal["acquirer", "issuer"], str] """ The entity that requested the exemption, either the acquiring merchant or the Issuing user. """ - type: Literal[ - "low_value_transaction", "transaction_risk_analysis", "unknown" + type: Union[ + Literal[ + "low_value_transaction", "transaction_risk_analysis", "unknown" + ], + str, ] """ The specific exemption claimed for this authorization. @@ -691,8 +707,9 @@ class AuthorizationCreateParamsVerificationDataAuthenticationExemption( class AuthorizationCreateParamsVerificationDataThreeDSecure(TypedDict): - result: Literal[ - "attempt_acknowledged", "authenticated", "failed", "required" + result: Union[ + Literal["attempt_acknowledged", "authenticated", "failed", "required"], + str, ] """ The outcome of the 3D Secure authentication request. diff --git a/stripe/params/test_helpers/issuing/_dispute_close_params.py b/stripe/params/test_helpers/issuing/_dispute_close_params.py index 1a53f449d..4f6eaed23 100644 --- a/stripe/params/test_helpers/issuing/_dispute_close_params.py +++ b/stripe/params/test_helpers/issuing/_dispute_close_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -9,7 +9,7 @@ class DisputeCloseParams(TypedDict): """ Specifies which fields in the response should be expanded. """ - status: Literal["lost", "won"] + status: Union[Literal["lost", "won"], str] """ Whether to close the dispute as `won` or `lost`. """ diff --git a/stripe/params/test_helpers/issuing/_personalization_design_reject_params.py b/stripe/params/test_helpers/issuing/_personalization_design_reject_params.py index 36e4cad3b..720a67ab4 100644 --- a/stripe/params/test_helpers/issuing/_personalization_design_reject_params.py +++ b/stripe/params/test_helpers/issuing/_personalization_design_reject_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -18,15 +18,18 @@ class PersonalizationDesignRejectParams(TypedDict): class PersonalizationDesignRejectParamsRejectionReasons(TypedDict): card_logo: NotRequired[ List[ - Literal[ - "geographic_location", - "inappropriate", - "network_name", - "non_binary_image", - "non_fiat_currency", - "other", - "other_entity", - "promotional_material", + Union[ + Literal[ + "geographic_location", + "inappropriate", + "network_name", + "non_binary_image", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ], + str, ] ] ] @@ -35,14 +38,17 @@ class PersonalizationDesignRejectParamsRejectionReasons(TypedDict): """ carrier_text: NotRequired[ List[ - Literal[ - "geographic_location", - "inappropriate", - "network_name", - "non_fiat_currency", - "other", - "other_entity", - "promotional_material", + Union[ + Literal[ + "geographic_location", + "inappropriate", + "network_name", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ], + str, ] ] ] diff --git a/stripe/params/test_helpers/shared_payment/_granted_token_create_params.py b/stripe/params/test_helpers/shared_payment/_granted_token_create_params.py index da76121b1..a5d23dc4e 100644 --- a/stripe/params/test_helpers/shared_payment/_granted_token_create_params.py +++ b/stripe/params/test_helpers/shared_payment/_granted_token_create_params.py @@ -43,7 +43,7 @@ class GrantedTokenCreateParamsUsageLimits(TypedDict): """ Max amount that can be captured using this SharedPaymentToken """ - recurring_interval: NotRequired[Literal["month", "week", "year"]] + recurring_interval: NotRequired["Literal['month', 'week', 'year']|str"] """ The recurring interval at which the shared payment token's amount usage restrictions reset. """ diff --git a/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py b/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py index 74561c821..f8be0f583 100644 --- a/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py +++ b/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py @@ -27,7 +27,7 @@ class ReaderPresentPaymentMethodParams(TypedDict): """ Simulated data for the interac_present payment method. """ - type: NotRequired[Literal["card", "card_present", "interac_present"]] + type: NotRequired["Literal['card', 'card_present', 'interac_present']|str"] """ Simulated payment type. """ diff --git a/stripe/params/test_helpers/terminal/_reader_succeed_input_collection_params.py b/stripe/params/test_helpers/terminal/_reader_succeed_input_collection_params.py index 8d3fd43d6..6a74198c8 100644 --- a/stripe/params/test_helpers/terminal/_reader_succeed_input_collection_params.py +++ b/stripe/params/test_helpers/terminal/_reader_succeed_input_collection_params.py @@ -9,7 +9,7 @@ class ReaderSucceedInputCollectionParams(TypedDict): """ Specifies which fields in the response should be expanded. """ - skip_non_required_inputs: NotRequired[Literal["all", "none"]] + skip_non_required_inputs: NotRequired["Literal['all', 'none']|str"] """ This parameter defines the skip behavior for input collection. """ diff --git a/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py b/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py index 5e5877d44..515241848 100644 --- a/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py +++ b/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py @@ -17,21 +17,7 @@ class InboundTransferFailParams(TypedDict): class InboundTransferFailParamsFailureDetails(TypedDict): code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "debit_not_authorized", - "incorrect_account_holder_address", - "incorrect_account_holder_name", - "incorrect_account_holder_tax_id", - "insufficient_funds", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] + "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'debit_not_authorized', 'incorrect_account_holder_address', 'incorrect_account_holder_name', 'incorrect_account_holder_tax_id', 'insufficient_funds', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']|str" ] """ Reason for the failure. diff --git a/stripe/params/test_helpers/treasury/_outbound_payment_return_outbound_payment_params.py b/stripe/params/test_helpers/treasury/_outbound_payment_return_outbound_payment_params.py index 1c3a426e9..810b9be45 100644 --- a/stripe/params/test_helpers/treasury/_outbound_payment_return_outbound_payment_params.py +++ b/stripe/params/test_helpers/treasury/_outbound_payment_return_outbound_payment_params.py @@ -19,18 +19,7 @@ class OutboundPaymentReturnOutboundPaymentParams(TypedDict): class OutboundPaymentReturnOutboundPaymentParamsReturnedDetails(TypedDict): code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "declined", - "incorrect_account_holder_name", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] + "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'declined', 'incorrect_account_holder_name', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']|str" ] """ The return code to be set on the OutboundPayment object. diff --git a/stripe/params/test_helpers/treasury/_outbound_payment_update_params.py b/stripe/params/test_helpers/treasury/_outbound_payment_update_params.py index 53de8373a..739db2b5b 100644 --- a/stripe/params/test_helpers/treasury/_outbound_payment_update_params.py +++ b/stripe/params/test_helpers/treasury/_outbound_payment_update_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -20,7 +20,7 @@ class OutboundPaymentUpdateParamsTrackingDetails(TypedDict): """ ACH network tracking details. """ - type: Literal["ach", "us_domestic_wire"] + type: Union[Literal["ach", "us_domestic_wire"], str] """ The US bank account network used to send funds. """ diff --git a/stripe/params/test_helpers/treasury/_outbound_transfer_return_outbound_transfer_params.py b/stripe/params/test_helpers/treasury/_outbound_transfer_return_outbound_transfer_params.py index ba555bef2..229592c95 100644 --- a/stripe/params/test_helpers/treasury/_outbound_transfer_return_outbound_transfer_params.py +++ b/stripe/params/test_helpers/treasury/_outbound_transfer_return_outbound_transfer_params.py @@ -19,18 +19,7 @@ class OutboundTransferReturnOutboundTransferParams(TypedDict): class OutboundTransferReturnOutboundTransferParamsReturnedDetails(TypedDict): code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "declined", - "incorrect_account_holder_name", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] + "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'declined', 'incorrect_account_holder_name', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']|str" ] """ Reason for the return. diff --git a/stripe/params/test_helpers/treasury/_outbound_transfer_update_params.py b/stripe/params/test_helpers/treasury/_outbound_transfer_update_params.py index 69a268fee..22deff605 100644 --- a/stripe/params/test_helpers/treasury/_outbound_transfer_update_params.py +++ b/stripe/params/test_helpers/treasury/_outbound_transfer_update_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -20,7 +20,7 @@ class OutboundTransferUpdateParamsTrackingDetails(TypedDict): """ ACH network tracking details. """ - type: Literal["ach", "us_domestic_wire"] + type: Union[Literal["ach", "us_domestic_wire"], str] """ The US bank account network used to send funds. """ diff --git a/stripe/params/test_helpers/treasury/_received_credit_create_params.py b/stripe/params/test_helpers/treasury/_received_credit_create_params.py index b40f8bc70..b1735a925 100644 --- a/stripe/params/test_helpers/treasury/_received_credit_create_params.py +++ b/stripe/params/test_helpers/treasury/_received_credit_create_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -31,7 +31,7 @@ class ReceivedCreditCreateParams(TypedDict): """ Initiating payment method details for the object. """ - network: Literal["ach", "us_domestic_wire"] + network: Union[Literal["ach", "us_domestic_wire"], str] """ Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. """ diff --git a/stripe/params/treasury/_credit_reversal_list_params.py b/stripe/params/treasury/_credit_reversal_list_params.py index 33b3b7359..11932cead 100644 --- a/stripe/params/treasury/_credit_reversal_list_params.py +++ b/stripe/params/treasury/_credit_reversal_list_params.py @@ -30,7 +30,7 @@ class CreditReversalListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["canceled", "posted", "processing"]] + status: NotRequired["Literal['canceled', 'posted', 'processing']|str"] """ Only return CreditReversals for a given status. """ diff --git a/stripe/params/treasury/_debit_reversal_list_params.py b/stripe/params/treasury/_debit_reversal_list_params.py index 66dad5062..0f6673cfa 100644 --- a/stripe/params/treasury/_debit_reversal_list_params.py +++ b/stripe/params/treasury/_debit_reversal_list_params.py @@ -26,7 +26,7 @@ class DebitReversalListParams(RequestOptions): """ Only return DebitReversals for the ReceivedDebit ID. """ - resolution: NotRequired[Literal["lost", "won"]] + resolution: NotRequired["Literal['lost', 'won']|str"] """ Only return DebitReversals for a given resolution. """ @@ -34,7 +34,7 @@ class DebitReversalListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["canceled", "completed", "processing"]] + status: NotRequired["Literal['canceled', 'completed', 'processing']|str"] """ Only return DebitReversals for a given status. """ diff --git a/stripe/params/treasury/_financial_account_close_params.py b/stripe/params/treasury/_financial_account_close_params.py index cff6fa7b2..5a89dccb1 100644 --- a/stripe/params/treasury/_financial_account_close_params.py +++ b/stripe/params/treasury/_financial_account_close_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -27,7 +27,7 @@ class FinancialAccountCloseParamsForwardingSettings(TypedDict): """ The payment_method or bank account id. This needs to be a verified bank account. """ - type: Literal["financial_account", "payment_method"] + type: Union[Literal["financial_account", "payment_method"], str] """ The type of the bank account provided. This can be either "financial_account" or "payment_method" """ diff --git a/stripe/params/treasury/_financial_account_create_params.py b/stripe/params/treasury/_financial_account_create_params.py index eb80bdb8a..1c1ac4b53 100644 --- a/stripe/params/treasury/_financial_account_create_params.py +++ b/stripe/params/treasury/_financial_account_create_params.py @@ -108,7 +108,7 @@ class FinancialAccountCreateParamsFeaturesFinancialAddresses(TypedDict): class FinancialAccountCreateParamsFeaturesFinancialAddressesAba(TypedDict): - bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] + bank: NotRequired["Literal['evolve', 'fifth_third', 'goldman_sachs']|str"] """ Requested bank partner """ @@ -200,11 +200,11 @@ class FinancialAccountCreateParamsFeaturesOutboundTransfersUsDomesticWire( class FinancialAccountCreateParamsPlatformRestrictions(TypedDict): - inbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + inbound_flows: NotRequired["Literal['restricted', 'unrestricted']|str"] """ Restricts all inbound money movement. """ - outbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + outbound_flows: NotRequired["Literal['restricted', 'unrestricted']|str"] """ Restricts all outbound money movement. """ diff --git a/stripe/params/treasury/_financial_account_features_update_params.py b/stripe/params/treasury/_financial_account_features_update_params.py index 994ffd966..263e68b84 100644 --- a/stripe/params/treasury/_financial_account_features_update_params.py +++ b/stripe/params/treasury/_financial_account_features_update_params.py @@ -77,7 +77,7 @@ class FinancialAccountFeaturesUpdateParamsFinancialAddresses(TypedDict): class FinancialAccountFeaturesUpdateParamsFinancialAddressesAba(TypedDict): - bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] + bank: NotRequired["Literal['evolve', 'fifth_third', 'goldman_sachs']|str"] """ Requested bank partner """ diff --git a/stripe/params/treasury/_financial_account_list_params.py b/stripe/params/treasury/_financial_account_list_params.py index fdcc9de14..d55cdf238 100644 --- a/stripe/params/treasury/_financial_account_list_params.py +++ b/stripe/params/treasury/_financial_account_list_params.py @@ -26,7 +26,7 @@ class FinancialAccountListParams(RequestOptions): """ An object ID cursor for use in pagination. """ - status: NotRequired[Literal["closed", "open"]] + status: NotRequired["Literal['closed', 'open']|str"] """ Only return FinancialAccounts that have the given status: `open` or `closed` """ diff --git a/stripe/params/treasury/_financial_account_modify_params.py b/stripe/params/treasury/_financial_account_modify_params.py index e7c0e30fc..8c5f1ef0b 100644 --- a/stripe/params/treasury/_financial_account_modify_params.py +++ b/stripe/params/treasury/_financial_account_modify_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -110,7 +110,7 @@ class FinancialAccountModifyParamsFeaturesFinancialAddresses(TypedDict): class FinancialAccountModifyParamsFeaturesFinancialAddressesAba(TypedDict): - bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] + bank: NotRequired["Literal['evolve', 'fifth_third', 'goldman_sachs']|str"] """ Requested bank partner """ @@ -210,18 +210,18 @@ class FinancialAccountModifyParamsForwardingSettings(TypedDict): """ The payment_method or bank account id. This needs to be a verified bank account. """ - type: Literal["financial_account", "payment_method"] + type: Union[Literal["financial_account", "payment_method"], str] """ The type of the bank account provided. This can be either "financial_account" or "payment_method" """ class FinancialAccountModifyParamsPlatformRestrictions(TypedDict): - inbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + inbound_flows: NotRequired["Literal['restricted', 'unrestricted']|str"] """ Restricts all inbound money movement. """ - outbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + outbound_flows: NotRequired["Literal['restricted', 'unrestricted']|str"] """ Restricts all outbound money movement. """ diff --git a/stripe/params/treasury/_financial_account_update_features_params.py b/stripe/params/treasury/_financial_account_update_features_params.py index 434a5a3c6..44cff0014 100644 --- a/stripe/params/treasury/_financial_account_update_features_params.py +++ b/stripe/params/treasury/_financial_account_update_features_params.py @@ -78,7 +78,7 @@ class FinancialAccountUpdateFeaturesParamsFinancialAddresses(TypedDict): class FinancialAccountUpdateFeaturesParamsFinancialAddressesAba(TypedDict): - bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] + bank: NotRequired["Literal['evolve', 'fifth_third', 'goldman_sachs']|str"] """ Requested bank partner """ diff --git a/stripe/params/treasury/_financial_account_update_params.py b/stripe/params/treasury/_financial_account_update_params.py index 3c773a988..c997c27d1 100644 --- a/stripe/params/treasury/_financial_account_update_params.py +++ b/stripe/params/treasury/_financial_account_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -109,7 +109,7 @@ class FinancialAccountUpdateParamsFeaturesFinancialAddresses(TypedDict): class FinancialAccountUpdateParamsFeaturesFinancialAddressesAba(TypedDict): - bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] + bank: NotRequired["Literal['evolve', 'fifth_third', 'goldman_sachs']|str"] """ Requested bank partner """ @@ -209,18 +209,18 @@ class FinancialAccountUpdateParamsForwardingSettings(TypedDict): """ The payment_method or bank account id. This needs to be a verified bank account. """ - type: Literal["financial_account", "payment_method"] + type: Union[Literal["financial_account", "payment_method"], str] """ The type of the bank account provided. This can be either "financial_account" or "payment_method" """ class FinancialAccountUpdateParamsPlatformRestrictions(TypedDict): - inbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + inbound_flows: NotRequired["Literal['restricted', 'unrestricted']|str"] """ Restricts all inbound money movement. """ - outbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + outbound_flows: NotRequired["Literal['restricted', 'unrestricted']|str"] """ Restricts all outbound money movement. """ diff --git a/stripe/params/treasury/_inbound_transfer_fail_params.py b/stripe/params/treasury/_inbound_transfer_fail_params.py index 8f220ed16..02f8bb4fc 100644 --- a/stripe/params/treasury/_inbound_transfer_fail_params.py +++ b/stripe/params/treasury/_inbound_transfer_fail_params.py @@ -18,21 +18,7 @@ class InboundTransferFailParams(RequestOptions): class InboundTransferFailParamsFailureDetails(TypedDict): code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "debit_not_authorized", - "incorrect_account_holder_address", - "incorrect_account_holder_name", - "incorrect_account_holder_tax_id", - "insufficient_funds", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] + "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'debit_not_authorized', 'incorrect_account_holder_address', 'incorrect_account_holder_name', 'incorrect_account_holder_tax_id', 'insufficient_funds', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']|str" ] """ Reason for the failure. diff --git a/stripe/params/treasury/_inbound_transfer_list_params.py b/stripe/params/treasury/_inbound_transfer_list_params.py index 709a65820..2a362be85 100644 --- a/stripe/params/treasury/_inbound_transfer_list_params.py +++ b/stripe/params/treasury/_inbound_transfer_list_params.py @@ -27,7 +27,7 @@ class InboundTransferListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ status: NotRequired[ - Literal["canceled", "failed", "processing", "succeeded"] + "Literal['canceled', 'failed', 'processing', 'succeeded']|str" ] """ Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. diff --git a/stripe/params/treasury/_outbound_payment_create_params.py b/stripe/params/treasury/_outbound_payment_create_params.py index 464ec432e..13e743173 100644 --- a/stripe/params/treasury/_outbound_payment_create_params.py +++ b/stripe/params/treasury/_outbound_payment_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -80,7 +80,7 @@ class OutboundPaymentCreateParamsDestinationPaymentMethodData(TypedDict): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - type: Literal["financial_account", "us_bank_account"] + type: Union[Literal["financial_account", "us_bank_account"], str] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. """ @@ -147,7 +147,7 @@ class OutboundPaymentCreateParamsDestinationPaymentMethodDataBillingDetailsAddre class OutboundPaymentCreateParamsDestinationPaymentMethodDataUsBankAccount( TypedDict, ): - account_holder_type: NotRequired[Literal["company", "individual"]] + account_holder_type: NotRequired["Literal['company', 'individual']|str"] """ Account holder type: individual or company. """ @@ -155,7 +155,7 @@ class OutboundPaymentCreateParamsDestinationPaymentMethodDataUsBankAccount( """ Account number of the bank account. """ - account_type: NotRequired[Literal["checking", "savings"]] + account_type: NotRequired["Literal['checking', 'savings']|str"] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -181,7 +181,7 @@ class OutboundPaymentCreateParamsDestinationPaymentMethodOptions(TypedDict): class OutboundPaymentCreateParamsDestinationPaymentMethodOptionsUsBankAccount( TypedDict, ): - network: NotRequired[Literal["ach", "us_domestic_wire"]] + network: NotRequired["Literal['ach', 'us_domestic_wire']|str"] """ Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. """ diff --git a/stripe/params/treasury/_outbound_payment_list_params.py b/stripe/params/treasury/_outbound_payment_list_params.py index 6c663d073..5d7b0e30b 100644 --- a/stripe/params/treasury/_outbound_payment_list_params.py +++ b/stripe/params/treasury/_outbound_payment_list_params.py @@ -35,7 +35,7 @@ class OutboundPaymentListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ status: NotRequired[ - Literal["canceled", "failed", "posted", "processing", "returned"] + "Literal['canceled', 'failed', 'posted', 'processing', 'returned']|str" ] """ Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. diff --git a/stripe/params/treasury/_outbound_payment_return_outbound_payment_params.py b/stripe/params/treasury/_outbound_payment_return_outbound_payment_params.py index b5bd84265..34c0d413c 100644 --- a/stripe/params/treasury/_outbound_payment_return_outbound_payment_params.py +++ b/stripe/params/treasury/_outbound_payment_return_outbound_payment_params.py @@ -20,18 +20,7 @@ class OutboundPaymentReturnOutboundPaymentParams(RequestOptions): class OutboundPaymentReturnOutboundPaymentParamsReturnedDetails(TypedDict): code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "declined", - "incorrect_account_holder_name", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] + "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'declined', 'incorrect_account_holder_name', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']|str" ] """ The return code to be set on the OutboundPayment object. diff --git a/stripe/params/treasury/_outbound_payment_update_params.py b/stripe/params/treasury/_outbound_payment_update_params.py index 301b4e96d..49a540846 100644 --- a/stripe/params/treasury/_outbound_payment_update_params.py +++ b/stripe/params/treasury/_outbound_payment_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -21,7 +21,7 @@ class OutboundPaymentUpdateParamsTrackingDetails(TypedDict): """ ACH network tracking details. """ - type: Literal["ach", "us_domestic_wire"] + type: Union[Literal["ach", "us_domestic_wire"], str] """ The US bank account network used to send funds. """ diff --git a/stripe/params/treasury/_outbound_transfer_create_params.py b/stripe/params/treasury/_outbound_transfer_create_params.py index 684497c94..4669e07e1 100644 --- a/stripe/params/treasury/_outbound_transfer_create_params.py +++ b/stripe/params/treasury/_outbound_transfer_create_params.py @@ -80,7 +80,7 @@ class OutboundTransferCreateParamsDestinationPaymentMethodOptions(TypedDict): class OutboundTransferCreateParamsDestinationPaymentMethodOptionsUsBankAccount( TypedDict, ): - network: NotRequired[Literal["ach", "us_domestic_wire"]] + network: NotRequired["Literal['ach', 'us_domestic_wire']|str"] """ Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. """ diff --git a/stripe/params/treasury/_outbound_transfer_list_params.py b/stripe/params/treasury/_outbound_transfer_list_params.py index 6f9e24782..6eae7886f 100644 --- a/stripe/params/treasury/_outbound_transfer_list_params.py +++ b/stripe/params/treasury/_outbound_transfer_list_params.py @@ -27,7 +27,7 @@ class OutboundTransferListParams(RequestOptions): A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ status: NotRequired[ - Literal["canceled", "failed", "posted", "processing", "returned"] + "Literal['canceled', 'failed', 'posted', 'processing', 'returned']|str" ] """ Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. diff --git a/stripe/params/treasury/_outbound_transfer_return_outbound_transfer_params.py b/stripe/params/treasury/_outbound_transfer_return_outbound_transfer_params.py index dd73d7e87..8da30c675 100644 --- a/stripe/params/treasury/_outbound_transfer_return_outbound_transfer_params.py +++ b/stripe/params/treasury/_outbound_transfer_return_outbound_transfer_params.py @@ -20,18 +20,7 @@ class OutboundTransferReturnOutboundTransferParams(RequestOptions): class OutboundTransferReturnOutboundTransferParamsReturnedDetails(TypedDict): code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "declined", - "incorrect_account_holder_name", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] + "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'declined', 'incorrect_account_holder_name', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']|str" ] """ Reason for the return. diff --git a/stripe/params/treasury/_outbound_transfer_update_params.py b/stripe/params/treasury/_outbound_transfer_update_params.py index dcee93420..5b5bdb517 100644 --- a/stripe/params/treasury/_outbound_transfer_update_params.py +++ b/stripe/params/treasury/_outbound_transfer_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -21,7 +21,7 @@ class OutboundTransferUpdateParamsTrackingDetails(TypedDict): """ ACH network tracking details. """ - type: Literal["ach", "us_domestic_wire"] + type: Union[Literal["ach", "us_domestic_wire"], str] """ The US bank account network used to send funds. """ diff --git a/stripe/params/treasury/_received_credit_create_params.py b/stripe/params/treasury/_received_credit_create_params.py index c73381441..8797a0097 100644 --- a/stripe/params/treasury/_received_credit_create_params.py +++ b/stripe/params/treasury/_received_credit_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -32,7 +32,7 @@ class ReceivedCreditCreateParams(RequestOptions): """ Initiating payment method details for the object. """ - network: Literal["ach", "us_domestic_wire"] + network: Union[Literal["ach", "us_domestic_wire"], str] """ Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. """ diff --git a/stripe/params/treasury/_received_credit_list_params.py b/stripe/params/treasury/_received_credit_list_params.py index 7f0965463..76eb87192 100644 --- a/stripe/params/treasury/_received_credit_list_params.py +++ b/stripe/params/treasury/_received_credit_list_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._request_options import RequestOptions -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -30,19 +30,22 @@ class ReceivedCreditListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["failed", "succeeded"]] + status: NotRequired["Literal['failed', 'succeeded']|str"] """ Only return ReceivedCredits that have the given status: `succeeded` or `failed`. """ class ReceivedCreditListParamsLinkedFlows(TypedDict): - source_flow_type: Literal[ - "credit_reversal", - "other", - "outbound_payment", - "outbound_transfer", - "payout", + source_flow_type: Union[ + Literal[ + "credit_reversal", + "other", + "outbound_payment", + "outbound_transfer", + "payout", + ], + str, ] """ The source flow type. diff --git a/stripe/params/treasury/_received_debit_list_params.py b/stripe/params/treasury/_received_debit_list_params.py index cd32d32f8..e163db76e 100644 --- a/stripe/params/treasury/_received_debit_list_params.py +++ b/stripe/params/treasury/_received_debit_list_params.py @@ -26,7 +26,7 @@ class ReceivedDebitListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["failed", "succeeded"]] + status: NotRequired["Literal['failed', 'succeeded']|str"] """ Only return ReceivedDebits that have the given status: `succeeded` or `failed`. """ diff --git a/stripe/params/treasury/_transaction_entry_list_params.py b/stripe/params/treasury/_transaction_entry_list_params.py index c6b8d011a..9c8758b68 100644 --- a/stripe/params/treasury/_transaction_entry_list_params.py +++ b/stripe/params/treasury/_transaction_entry_list_params.py @@ -27,7 +27,7 @@ class TransactionEntryListParams(RequestOptions): """ A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. """ - order_by: NotRequired[Literal["created", "effective_at"]] + order_by: NotRequired["Literal['created', 'effective_at']|str"] """ The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. """ diff --git a/stripe/params/treasury/_transaction_list_params.py b/stripe/params/treasury/_transaction_list_params.py index 6b5afe1e7..4c3a52e9e 100644 --- a/stripe/params/treasury/_transaction_list_params.py +++ b/stripe/params/treasury/_transaction_list_params.py @@ -26,7 +26,7 @@ class TransactionListParams(RequestOptions): """ A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. """ - order_by: NotRequired[Literal["created", "posted_at"]] + order_by: NotRequired["Literal['created', 'posted_at']|str"] """ The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. """ @@ -34,7 +34,7 @@ class TransactionListParams(RequestOptions): """ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. """ - status: NotRequired[Literal["open", "posted", "void"]] + status: NotRequired["Literal['open', 'posted', 'void']|str"] """ Only return Transactions that have the given status: `open`, `posted`, or `void`. """ diff --git a/stripe/params/v2/billing/_bill_setting_create_params.py b/stripe/params/v2/billing/_bill_setting_create_params.py index b6f1a4c7d..f4b4878b0 100644 --- a/stripe/params/v2/billing/_bill_setting_create_params.py +++ b/stripe/params/v2/billing/_bill_setting_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from typing import Union from typing_extensions import Literal, NotRequired, TypedDict @@ -36,7 +37,7 @@ class BillSettingCreateParamsCalculation(TypedDict): class BillSettingCreateParamsCalculationTax(TypedDict): - type: Literal["automatic", "manual"] + type: Union[Literal["automatic", "manual"], str] """ Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual". """ diff --git a/stripe/params/v2/billing/_bill_setting_update_params.py b/stripe/params/v2/billing/_bill_setting_update_params.py index ac65afc99..39e882ec7 100644 --- a/stripe/params/v2/billing/_bill_setting_update_params.py +++ b/stripe/params/v2/billing/_bill_setting_update_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from typing import Union from typing_extensions import Literal, NotRequired, TypedDict @@ -42,7 +43,7 @@ class BillSettingUpdateParamsCalculation(TypedDict): class BillSettingUpdateParamsCalculationTax(TypedDict): - type: Literal["automatic", "manual"] + type: Union[Literal["automatic", "manual"], str] """ Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual". """ diff --git a/stripe/params/v2/billing/_cadence_cancel_params.py b/stripe/params/v2/billing/_cadence_cancel_params.py index 8c2e327b5..58af143ee 100644 --- a/stripe/params/v2/billing/_cadence_cancel_params.py +++ b/stripe/params/v2/billing/_cadence_cancel_params.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class CadenceCancelParams(TypedDict): include: NotRequired[ - List[Literal["invoice_discount_rules", "settings_data"]] + List[Union[Literal["invoice_discount_rules", "settings_data"], str]] ] """ Additional resource to include in the response. diff --git a/stripe/params/v2/billing/_cadence_create_params.py b/stripe/params/v2/billing/_cadence_create_params.py index 718b432c1..ba1356e49 100644 --- a/stripe/params/v2/billing/_cadence_create_params.py +++ b/stripe/params/v2/billing/_cadence_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -11,7 +11,7 @@ class CadenceCreateParams(TypedDict): The billing cycle is the object that defines future billing cycle dates. """ include: NotRequired[ - List[Literal["invoice_discount_rules", "settings_data"]] + List[Union[Literal["invoice_discount_rules", "settings_data"], str]] ] """ Additional resource to include in the response. @@ -49,7 +49,7 @@ class CadenceCreateParamsBillingCycle(TypedDict): """ Specific configuration for determining billing dates when type=month. """ - type: Literal["day", "month", "week", "year"] + type: Union[Literal["day", "month", "week", "year"], str] """ The frequency at which a cadence bills. """ diff --git a/stripe/params/v2/billing/_cadence_list_params.py b/stripe/params/v2/billing/_cadence_list_params.py index 7fd0d9e8d..505cd00d6 100644 --- a/stripe/params/v2/billing/_cadence_list_params.py +++ b/stripe/params/v2/billing/_cadence_list_params.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class CadenceListParams(TypedDict): include: NotRequired[ - List[Literal["invoice_discount_rules", "settings_data"]] + List[Union[Literal["invoice_discount_rules", "settings_data"], str]] ] """ Additional resource to include in the response. diff --git a/stripe/params/v2/billing/_cadence_retrieve_params.py b/stripe/params/v2/billing/_cadence_retrieve_params.py index f269a46aa..c569f69b1 100644 --- a/stripe/params/v2/billing/_cadence_retrieve_params.py +++ b/stripe/params/v2/billing/_cadence_retrieve_params.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class CadenceRetrieveParams(TypedDict): include: NotRequired[ - List[Literal["invoice_discount_rules", "settings_data"]] + List[Union[Literal["invoice_discount_rules", "settings_data"], str]] ] """ Additional resource to include in the response. diff --git a/stripe/params/v2/billing/_cadence_update_params.py b/stripe/params/v2/billing/_cadence_update_params.py index d323f803d..70b5b6800 100644 --- a/stripe/params/v2/billing/_cadence_update_params.py +++ b/stripe/params/v2/billing/_cadence_update_params.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List, Optional +from typing import Dict, List, Optional, Union from typing_extensions import Literal, NotRequired, TypedDict class CadenceUpdateParams(TypedDict): include: NotRequired[ - List[Literal["invoice_discount_rules", "settings_data"]] + List[Union[Literal["invoice_discount_rules", "settings_data"], str]] ] """ Additional resource to include in the response. diff --git a/stripe/params/v2/billing/_collection_setting_create_params.py b/stripe/params/v2/billing/_collection_setting_create_params.py index 9ce026b00..9d8c260af 100644 --- a/stripe/params/v2/billing/_collection_setting_create_params.py +++ b/stripe/params/v2/billing/_collection_setting_create_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -109,7 +109,7 @@ class CollectionSettingCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method. @@ -119,14 +119,14 @@ class CollectionSettingCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): class CollectionSettingCreateParamsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ class CollectionSettingCreateParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -144,7 +144,7 @@ class CollectionSettingCreateParamsPaymentMethodOptionsCard(TypedDict): Selected network to process the payment on. Depends on the available networks of the card. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers @@ -161,7 +161,7 @@ class CollectionSettingCreateParamsPaymentMethodOptionsCardMandateOptions( """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ The AmountType for the mandate. One of `fixed` or `maximum`. """ @@ -196,13 +196,7 @@ class CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransf Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. """ type: NotRequired[ - Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] + "Literal['eu_bank_transfer', 'gb_bank_transfer', 'jp_bank_transfer', 'mx_bank_transfer', 'us_bank_transfer']|str" ] """ The bank transfer type that can be used for funding. @@ -212,7 +206,7 @@ class CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransf class CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( TypedDict, ): - country: Literal["BE", "DE", "ES", "FR", "IE", "NL"] + country: Union[Literal["BE", "DE", "ES", "FR", "IE", "NL"], str] """ The desired country code of the bank account information. """ @@ -233,7 +227,9 @@ class CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccount( """ Additional fields for Financial Connections Session creation. """ - verification_method: Literal["automatic", "instant", "microdeposits"] + verification_method: Union[ + Literal["automatic", "instant", "microdeposits"], str + ] """ Verification method. """ @@ -250,14 +246,19 @@ class CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccountFinancialCon """ permissions: NotRequired[ List[ - Literal["balances", "ownership", "payment_method", "transactions"] + Union[ + Literal[ + "balances", "ownership", "payment_method", "transactions" + ], + str, + ] ] ] """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. """ prefetch: NotRequired[ - List[Literal["balances", "ownership", "transactions"]] + List[Union[Literal["balances", "ownership", "transactions"], str]] ] """ List of data features that you would like to retrieve upon account creation. @@ -267,7 +268,9 @@ class CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccountFinancialCon class CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( TypedDict, ): - account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + account_subcategories: NotRequired[ + List[Union[Literal["checking", "savings"], str]] + ] """ The account subcategories to use to filter for selectable accounts. """ diff --git a/stripe/params/v2/billing/_collection_setting_update_params.py b/stripe/params/v2/billing/_collection_setting_update_params.py index cce3b132a..f9878966d 100644 --- a/stripe/params/v2/billing/_collection_setting_update_params.py +++ b/stripe/params/v2/billing/_collection_setting_update_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -115,7 +115,7 @@ class CollectionSettingUpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): Additional fields for Mandate creation. """ verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] + "Literal['automatic', 'instant', 'microdeposits']|str" ] """ Verification method. @@ -125,14 +125,14 @@ class CollectionSettingUpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): class CollectionSettingUpdateParamsPaymentMethodOptionsAcssDebitMandateOptions( TypedDict, ): - transaction_type: NotRequired[Literal["business", "personal"]] + transaction_type: NotRequired["Literal['business', 'personal']|str"] """ Transaction type of the mandate. """ class CollectionSettingUpdateParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + preferred_language: NotRequired["Literal['de', 'en', 'fr', 'nl']|str"] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -150,7 +150,7 @@ class CollectionSettingUpdateParamsPaymentMethodOptionsCard(TypedDict): Selected network to process the payment on. Depends on the available networks of the card. """ request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] + "Literal['any', 'automatic', 'challenge']|str" ] """ An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers @@ -167,7 +167,7 @@ class CollectionSettingUpdateParamsPaymentMethodOptionsCardMandateOptions( """ Amount to be charged for future payments. """ - amount_type: NotRequired[Literal["fixed", "maximum"]] + amount_type: NotRequired["Literal['fixed', 'maximum']|str"] """ The AmountType for the mandate. One of `fixed` or `maximum`. """ @@ -202,13 +202,7 @@ class CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransf Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. """ type: NotRequired[ - Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] + "Literal['eu_bank_transfer', 'gb_bank_transfer', 'jp_bank_transfer', 'mx_bank_transfer', 'us_bank_transfer']|str" ] """ The bank transfer type that can be used for funding. @@ -218,7 +212,7 @@ class CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransf class CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( TypedDict, ): - country: Literal["BE", "DE", "ES", "FR", "IE", "NL"] + country: Union[Literal["BE", "DE", "ES", "FR", "IE", "NL"], str] """ The desired country code of the bank account information. """ @@ -239,7 +233,9 @@ class CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccount( """ Additional fields for Financial Connections Session creation. """ - verification_method: Literal["automatic", "instant", "microdeposits"] + verification_method: Union[ + Literal["automatic", "instant", "microdeposits"], str + ] """ Verification method. """ @@ -256,14 +252,19 @@ class CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccountFinancialCon """ permissions: NotRequired[ List[ - Literal["balances", "ownership", "payment_method", "transactions"] + Union[ + Literal[ + "balances", "ownership", "payment_method", "transactions" + ], + str, + ] ] ] """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. """ prefetch: NotRequired[ - List[Literal["balances", "ownership", "transactions"]] + List[Union[Literal["balances", "ownership", "transactions"], str]] ] """ List of data features that you would like to retrieve upon account creation. @@ -273,7 +274,9 @@ class CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccountFinancialCon class CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( TypedDict, ): - account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + account_subcategories: NotRequired[ + List[Union[Literal["checking", "savings"], str]] + ] """ The account subcategories to use to filter for selectable accounts. """ diff --git a/stripe/params/v2/billing/_contract_activate_params.py b/stripe/params/v2/billing/_contract_activate_params.py index aae044fd1..dc2a57b49 100644 --- a/stripe/params/v2/billing/_contract_activate_params.py +++ b/stripe/params/v2/billing/_contract_activate_params.py @@ -1,12 +1,19 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class ContractActivateParams(TypedDict): include: NotRequired[ - List[Literal["billing_settings", "pricing_lines", "pricing_overrides"]] + List[ + Union[ + Literal[ + "billing_settings", "pricing_lines", "pricing_overrides" + ], + str, + ] + ] ] """ Additional fields to include in the response. diff --git a/stripe/params/v2/billing/_contract_cancel_params.py b/stripe/params/v2/billing/_contract_cancel_params.py index 68df5686a..d51325af0 100644 --- a/stripe/params/v2/billing/_contract_cancel_params.py +++ b/stripe/params/v2/billing/_contract_cancel_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -13,12 +13,19 @@ class ContractCancelParams(TypedDict): not specified for a given line. """ include: NotRequired[ - List[Literal["billing_settings", "pricing_lines", "pricing_overrides"]] + List[ + Union[ + Literal[ + "billing_settings", "pricing_lines", "pricing_overrides" + ], + str, + ] + ] ] """ Additional fields to include in the response. """ - proration_behavior: NotRequired[Literal["none", "prorated"]] + proration_behavior: NotRequired["Literal['none', 'prorated']|str"] """ Top-level proration behavior for the cancellation. Defaults to `prorated` if not set. """ @@ -33,7 +40,7 @@ class ContractCancelParamsCancelPricingLine(TypedDict): """ The lookup key of the pricing line. """ - proration_behavior: NotRequired[Literal["none", "prorated"]] + proration_behavior: NotRequired["Literal['none', 'prorated']|str"] """ Proration behavior scoped to this pricing line. If not provided, falls back to the top-level `proration_behavior` on the cancel request. Defaults to `prorated`. diff --git a/stripe/params/v2/billing/_contract_create_params.py b/stripe/params/v2/billing/_contract_create_params.py index 1cd50251d..575ea1ab4 100644 --- a/stripe/params/v2/billing/_contract_create_params.py +++ b/stripe/params/v2/billing/_contract_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -25,7 +25,14 @@ class ContractCreateParams(TypedDict): Currency of the contract. """ include: NotRequired[ - List[Literal["billing_settings", "pricing_lines", "pricing_overrides"]] + List[ + Union[ + Literal[ + "billing_settings", "pricing_lines", "pricing_overrides" + ], + str, + ] + ] ] """ Additional fields to include in the response. @@ -426,7 +433,7 @@ class ContractCreateParamsPricingOverrideMultiplyPricingCriterion(TypedDict): """ Filter by pricing line lookup keys. """ - type: Literal["exclude", "include"] + type: Union[Literal["exclude", "include"], str] """ Whether to include or exclude items matching these criteria. """ diff --git a/stripe/params/v2/billing/_contract_list_params.py b/stripe/params/v2/billing/_contract_list_params.py index a2dc198fc..10f4b2ee1 100644 --- a/stripe/params/v2/billing/_contract_list_params.py +++ b/stripe/params/v2/billing/_contract_list_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -10,7 +10,14 @@ class ContractListParams(TypedDict): Filter by customer id. """ include: NotRequired[ - List[Literal["billing_settings", "pricing_lines", "pricing_overrides"]] + List[ + Union[ + Literal[ + "billing_settings", "pricing_lines", "pricing_overrides" + ], + str, + ] + ] ] """ Additional fields to include in the response. diff --git a/stripe/params/v2/billing/_contract_retrieve_params.py b/stripe/params/v2/billing/_contract_retrieve_params.py index 3cd05de48..2e8feadea 100644 --- a/stripe/params/v2/billing/_contract_retrieve_params.py +++ b/stripe/params/v2/billing/_contract_retrieve_params.py @@ -1,12 +1,19 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class ContractRetrieveParams(TypedDict): include: NotRequired[ - List[Literal["billing_settings", "pricing_lines", "pricing_overrides"]] + List[ + Union[ + Literal[ + "billing_settings", "pricing_lines", "pricing_overrides" + ], + str, + ] + ] ] """ Additional fields to include in the response. diff --git a/stripe/params/v2/billing/_contract_update_params.py b/stripe/params/v2/billing/_contract_update_params.py index 46da3c2e6..7ec277606 100644 --- a/stripe/params/v2/billing/_contract_update_params.py +++ b/stripe/params/v2/billing/_contract_update_params.py @@ -2,13 +2,20 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict class ContractUpdateParams(TypedDict): include: NotRequired[ - List[Literal["billing_settings", "pricing_lines", "pricing_overrides"]] + List[ + Union[ + Literal[ + "billing_settings", "pricing_lines", "pricing_overrides" + ], + str, + ] + ] ] """ Additional fields to include in the response. @@ -36,7 +43,7 @@ class ContractUpdateParamsPricingLineAction(TypedDict): """ Remove a pricing line. """ - type: Literal["add", "remove", "update"] + type: Union[Literal["add", "remove", "update"], str] """ The type of pricing line action. """ @@ -312,7 +319,7 @@ class ContractUpdateParamsPricingLineActionUpdatePricingPriceDetailsPricingOverr """ Remove a pricing line override. """ - type: Literal["add", "remove", "update"] + type: Union[Literal["add", "remove", "update"], str] """ The type of pricing line override action. """ @@ -508,7 +515,7 @@ class ContractUpdateParamsPricingOverrideAction(TypedDict): """ Remove a pricing override. """ - type: Literal["add", "remove", "update"] + type: Union[Literal["add", "remove", "update"], str] """ The type of pricing override action. """ @@ -588,7 +595,7 @@ class ContractUpdateParamsPricingOverrideActionAddMultiplyPricingCriterion( """ Filter by pricing line lookup keys. """ - type: Literal["exclude", "include"] + type: Union[Literal["exclude", "include"], str] """ Whether to include or exclude items matching these criteria. """ diff --git a/stripe/params/v2/billing/_intent_create_params.py b/stripe/params/v2/billing/_intent_create_params.py index e9703018a..34ead884c 100644 --- a/stripe/params/v2/billing/_intent_create_params.py +++ b/stripe/params/v2/billing/_intent_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -46,7 +46,9 @@ class IntentCreateParamsAction(TypedDict): """ Details for a subscribe action. """ - type: Literal["apply", "deactivate", "modify", "remove", "subscribe"] + type: Union[ + Literal["apply", "deactivate", "modify", "remove", "subscribe"], str + ] """ Type of the Billing Intent action. """ @@ -73,7 +75,10 @@ class IntentCreateParamsActionApply(TypedDict): """ Details for applying a spend modifier rule. Only present if type is spend_modifier_rule. """ - type: Literal["discount", "invoice_discount_rule", "spend_modifier_rule"] + type: Union[ + Literal["discount", "invoice_discount_rule", "spend_modifier_rule"], + str, + ] """ Type of the apply action details. """ @@ -222,7 +227,9 @@ class IntentCreateParamsActionDeactivate(TypedDict): """ Details about why the cancellation is being requested. """ - collect_at: NotRequired[Literal["next_billing_date", "on_effective_at"]] + collect_at: NotRequired[ + "Literal['next_billing_date', 'on_effective_at']|str" + ] """ When the invoice is collected. If not specified, the default behavior is on_effective_at. """ @@ -250,16 +257,7 @@ class IntentCreateParamsActionDeactivateCancellationDetails(TypedDict): Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. """ feedback: NotRequired[ - Literal[ - "customer_service", - "low_quality", - "missing_features", - "other", - "switched_service", - "too_complex", - "too_expensive", - "unused", - ] + "Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']|str" ] """ The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. @@ -271,11 +269,14 @@ class IntentCreateParamsActionDeactivateEffectiveAt(TypedDict): """ The timestamp at which the deactivate action takes effect. Only present if type is timestamp. """ - type: Literal[ - "current_billing_period_end", - "current_billing_period_start", - "on_reserve", - "timestamp", + type: Union[ + Literal[ + "current_billing_period_end", + "current_billing_period_start", + "on_reserve", + "timestamp", + ], + str, ] """ When the deactivate action takes effect. @@ -317,7 +318,7 @@ class IntentCreateParamsActionDeactivatePricingPlanSubscriptionDetailsOverridesP """ Overrides the behavior for license fee components when the action takes effect during the service period. """ - type: Literal["license_fee", "recurring_credit_grant"] + type: Union[Literal["license_fee", "recurring_credit_grant"], str] """ The type of behavior to override. """ @@ -326,14 +327,16 @@ class IntentCreateParamsActionDeactivatePricingPlanSubscriptionDetailsOverridesP class IntentCreateParamsActionDeactivatePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFee( TypedDict, ): - credit_proration_behavior: Literal["none", "prorated"] + credit_proration_behavior: Union[Literal["none", "prorated"], str] """ The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user is deactivating. If not specified, defaults to none. """ class IntentCreateParamsActionModify(TypedDict): - collect_at: NotRequired[Literal["next_billing_date", "on_effective_at"]] + collect_at: NotRequired[ + "Literal['next_billing_date', 'on_effective_at']|str" + ] """ When the invoice is collected. If not specified, the default behavior is next_billing_date. """ @@ -360,7 +363,9 @@ class IntentCreateParamsActionModifyEffectiveAt(TypedDict): """ The timestamp at which the modify action takes effect. Only present if type is timestamp. """ - type: Literal["current_billing_period_start", "on_reserve", "timestamp"] + type: Union[ + Literal["current_billing_period_start", "on_reserve", "timestamp"], str + ] """ When the modify action takes effect. """ @@ -438,7 +443,7 @@ class IntentCreateParamsActionModifyPricingPlanSubscriptionDetailsOverridesParti """ Overrides the behavior for recurring credit grant components when the action takes effect during the service period. """ - type: Literal["license_fee", "recurring_credit_grant"] + type: Union[Literal["license_fee", "recurring_credit_grant"], str] """ The type of behavior to override. """ @@ -447,11 +452,11 @@ class IntentCreateParamsActionModifyPricingPlanSubscriptionDetailsOverridesParti class IntentCreateParamsActionModifyPricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFee( TypedDict, ): - credit_proration_behavior: Literal["none", "prorated"] + credit_proration_behavior: Union[Literal["none", "prorated"], str] """ The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user modifies the subscription. If not specified, defaults to prorated. """ - debit_proration_behavior: Literal["none", "prorated"] + debit_proration_behavior: Union[Literal["none", "prorated"], str] """ The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user modifies the subscription. If not specified, defaults to prorated. """ @@ -460,7 +465,7 @@ class IntentCreateParamsActionModifyPricingPlanSubscriptionDetailsOverridesParti class IntentCreateParamsActionModifyPricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorRecurringCreditGrant( TypedDict, ): - create_behavior: Literal["full_credits", "none"] + create_behavior: Union[Literal["full_credits", "none"], str] """ Controls credit grant creation behavior during partial periods. If not specified, defaults to full_credits. """ @@ -479,21 +484,23 @@ class IntentCreateParamsActionRemove(TypedDict): """ The ID of the spend modifier rule to remove. """ - type: Literal["invoice_discount_rule", "spend_modifier_rule"] + type: Union[Literal["invoice_discount_rule", "spend_modifier_rule"], str] """ Type of the remove action. """ class IntentCreateParamsActionRemoveEffectiveAt(TypedDict): - type: Literal["current_billing_period_end", "on_reserve"] + type: Union[Literal["current_billing_period_end", "on_reserve"], str] """ When the remove action takes effect. """ class IntentCreateParamsActionSubscribe(TypedDict): - collect_at: NotRequired[Literal["next_billing_date", "on_effective_at"]] + collect_at: NotRequired[ + "Literal['next_billing_date', 'on_effective_at']|str" + ] """ When the invoice is collected. If not specified, defaults to on_effective_at. """ @@ -526,7 +533,9 @@ class IntentCreateParamsActionSubscribeEffectiveAt(TypedDict): """ The timestamp at which the subscribe action takes effect. Only present if type is timestamp. """ - type: Literal["current_billing_period_start", "on_reserve", "timestamp"] + type: Union[ + Literal["current_billing_period_start", "on_reserve", "timestamp"], str + ] """ When the subscribe action takes effect. """ @@ -606,7 +615,7 @@ class IntentCreateParamsActionSubscribePricingPlanSubscriptionDetailsOverridesPa """ Overrides the behavior for recurring credit grant components when the action takes effect during the service period. """ - type: Literal["license_fee", "recurring_credit_grant"] + type: Union[Literal["license_fee", "recurring_credit_grant"], str] """ The type of behavior to override. """ @@ -615,7 +624,7 @@ class IntentCreateParamsActionSubscribePricingPlanSubscriptionDetailsOverridesPa class IntentCreateParamsActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorLicenseFee( TypedDict, ): - debit_proration_behavior: Literal["none", "prorated"] + debit_proration_behavior: Union[Literal["none", "prorated"], str] """ The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user is subscribing. If not specified, defaults to prorated. """ @@ -624,7 +633,7 @@ class IntentCreateParamsActionSubscribePricingPlanSubscriptionDetailsOverridesPa class IntentCreateParamsActionSubscribePricingPlanSubscriptionDetailsOverridesPartialPeriodBehaviorRecurringCreditGrant( TypedDict, ): - create_behavior: Literal["full_credits", "none"] + create_behavior: Union[Literal["full_credits", "none"], str] """ Controls credit grant creation behavior during partial periods. If not specified, defaults to full_credits. """ @@ -691,7 +700,7 @@ class IntentCreateParamsCadenceDataBillingCycle(TypedDict): """ Specific configuration for determining billing dates when type=month. """ - type: Literal["day", "month", "week", "year"] + type: Union[Literal["day", "month", "week", "year"], str] """ The frequency at which a cadence bills. """ diff --git a/stripe/params/v2/billing/_pricing_plan_subscription_list_params.py b/stripe/params/v2/billing/_pricing_plan_subscription_list_params.py index b9830a285..48cadeb6d 100644 --- a/stripe/params/v2/billing/_pricing_plan_subscription_list_params.py +++ b/stripe/params/v2/billing/_pricing_plan_subscription_list_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -10,7 +10,12 @@ class PricingPlanSubscriptionListParams(TypedDict): Filter by Billing Cadence ID. Mutually exclusive with `payer`, `pricing_plan`, and `pricing_plan_version`. """ include: NotRequired[ - List[Literal["discount_details", "pricing_plan_component_details"]] + List[ + Union[ + Literal["discount_details", "pricing_plan_component_details"], + str, + ] + ] ] """ Expand to include additional data such as discount_details, billing_cadence_details, or pricing_plan_component_details. diff --git a/stripe/params/v2/billing/_pricing_plan_subscription_remove_discounts_params.py b/stripe/params/v2/billing/_pricing_plan_subscription_remove_discounts_params.py index 2809406c4..1830e720f 100644 --- a/stripe/params/v2/billing/_pricing_plan_subscription_remove_discounts_params.py +++ b/stripe/params/v2/billing/_pricing_plan_subscription_remove_discounts_params.py @@ -1,12 +1,17 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class PricingPlanSubscriptionRemoveDiscountsParams(TypedDict): include: NotRequired[ - List[Literal["discount_details", "pricing_plan_component_details"]] + List[ + Union[ + Literal["discount_details", "pricing_plan_component_details"], + str, + ] + ] ] """ Expand to include additional data such as discount_details. diff --git a/stripe/params/v2/billing/_pricing_plan_subscription_retrieve_params.py b/stripe/params/v2/billing/_pricing_plan_subscription_retrieve_params.py index 4e0b16164..255a79a3f 100644 --- a/stripe/params/v2/billing/_pricing_plan_subscription_retrieve_params.py +++ b/stripe/params/v2/billing/_pricing_plan_subscription_retrieve_params.py @@ -1,12 +1,17 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class PricingPlanSubscriptionRetrieveParams(TypedDict): include: NotRequired[ - List[Literal["discount_details", "pricing_plan_component_details"]] + List[ + Union[ + Literal["discount_details", "pricing_plan_component_details"], + str, + ] + ] ] """ Expand to include additional data such as discount_details. diff --git a/stripe/params/v2/billing/_profile_list_params.py b/stripe/params/v2/billing/_profile_list_params.py index 3c69dad24..0bdddc2f4 100644 --- a/stripe/params/v2/billing/_profile_list_params.py +++ b/stripe/params/v2/billing/_profile_list_params.py @@ -25,7 +25,7 @@ class ProfileListParams(TypedDict): with `customer` and `default_payment_method`. You can specify up to 10 lookup_keys. """ - status: NotRequired[Literal["active", "inactive"]] + status: NotRequired["Literal['active', 'inactive']|str"] """ Filter billing profiles by status. Can be combined with all other filters. If not provided, all billing profiles are returned. diff --git a/stripe/params/v2/billing/_service_action_create_params.py b/stripe/params/v2/billing/_service_action_create_params.py index 7cf250b81..0070637f9 100644 --- a/stripe/params/v2/billing/_service_action_create_params.py +++ b/stripe/params/v2/billing/_service_action_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe.v2._amount import AmountParam -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -29,7 +29,7 @@ class ServiceActionCreateParams(TypedDict): """ The length of the interval for assessing service. """ - type: Literal["credit_grant", "credit_grant_per_tenant"] + type: Union[Literal["credit_grant", "credit_grant_per_tenant"], str] """ The type of the service action. """ @@ -75,7 +75,7 @@ class ServiceActionCreateParamsCreditGrantAmount(TypedDict): """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[Literal["custom_pricing_unit", "monetary"], str] """ The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. """ @@ -163,7 +163,7 @@ class ServiceActionCreateParamsCreditGrantPerTenantAmount(TypedDict): """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[Literal["custom_pricing_unit", "monetary"], str] """ The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. """ diff --git a/stripe/params/v2/commerce/product_catalog/_import_create_params.py b/stripe/params/v2/commerce/product_catalog/_import_create_params.py index a84306f92..2b3fca492 100644 --- a/stripe/params/v2/commerce/product_catalog/_import_create_params.py +++ b/stripe/params/v2/commerce/product_catalog/_import_create_params.py @@ -1,12 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict +from typing import Dict, Union from typing_extensions import Literal, TypedDict class ImportCreateParams(TypedDict): - feed_type: Literal["inventory", "pricing", "product", "promotion"] + feed_type: Union[ + Literal["inventory", "pricing", "product", "promotion"], str + ] """ The type of catalog data to import. """ @@ -14,7 +16,7 @@ class ImportCreateParams(TypedDict): """ Additional information about the import in a structured format. """ - mode: Literal["replace", "upsert"] + mode: Union[Literal["replace", "upsert"], str] """ The strategy for handling existing catalog data during import. """ diff --git a/stripe/params/v2/commerce/product_catalog/_import_list_params.py b/stripe/params/v2/commerce/product_catalog/_import_list_params.py index 5833fd5e4..3ce793fdc 100644 --- a/stripe/params/v2/commerce/product_catalog/_import_list_params.py +++ b/stripe/params/v2/commerce/product_catalog/_import_list_params.py @@ -30,7 +30,7 @@ class ImportListParams(TypedDict): Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. """ feed_type: NotRequired[ - Literal["inventory", "pricing", "product", "promotion"] + "Literal['inventory', 'pricing', 'product', 'promotion']|str" ] """ Filter by the type of feed data being imported. diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py index f2c0156f1..f5ebddb70 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._stripe_object import UntypedStripeObject from stripe.v2._amount import AmountParam -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -2952,22 +2952,25 @@ class AccountCreateParamsConfigurationMoneyManager(TypedDict): """ high_risk_activities: NotRequired[ List[ - Literal[ - "adult_entertainment", - "gambling", - "hold_client_funds", - "investment_services", - "lending_banking", - "marijuana_or_related_services", - "money_services", - "nicotine_tobacco_or_related_services", - "none", - "operate_foreign_exchange_virtual_currencies_brokerage_otc", - "pharmaceuticals", - "precious_metals_precious_stones_jewelry", - "safe_deposit_box_rentals", - "third_party_payment_processing", - "weapons_firearms_and_explosives", + Union[ + Literal[ + "adult_entertainment", + "gambling", + "hold_client_funds", + "investment_services", + "lending_banking", + "marijuana_or_related_services", + "money_services", + "nicotine_tobacco_or_related_services", + "none", + "operate_foreign_exchange_virtual_currencies_brokerage_otc", + "pharmaceuticals", + "precious_metals_precious_stones_jewelry", + "safe_deposit_box_rentals", + "third_party_payment_processing", + "weapons_firearms_and_explosives", + ], + str, ] ] ] @@ -2991,21 +2994,7 @@ class AccountCreateParamsConfigurationMoneyManager(TypedDict): Indicates whether the business participates in any regulated activity. """ purpose_of_funds: NotRequired[ - Literal[ - "charitable_donations", - "ecommerce_retail_payments", - "investment_purposes", - "other", - "payments_to_friends_or_family_abroad", - "payroll", - "personal_or_living_expenses", - "protect_wealth", - "purchase_goods_and_services", - "receive_payments_for_goods_and_services", - "tax_optimization", - "third_party_money_transmission", - "treasury_management", - ] + "Literal['charitable_donations', 'ecommerce_retail_payments', 'investment_purposes', 'other', 'payments_to_friends_or_family_abroad', 'payroll', 'personal_or_living_expenses', 'protect_wealth', 'purchase_goods_and_services', 'receive_payments_for_goods_and_services', 'tax_optimization', 'third_party_money_transmission', 'treasury_management']|str" ] """ Primary purpose of the stored funds. @@ -3021,20 +3010,7 @@ class AccountCreateParamsConfigurationMoneyManager(TypedDict): Details of the regulated activity if the business participates in one. """ source_of_funds: NotRequired[ - Literal[ - "business_loans", - "grants", - "inter_company_funds", - "investment_proceeds", - "legal_settlement", - "owners_capital", - "pension_retirement", - "sales_of_assets", - "sales_of_goods_and_services", - "tax_refund", - "third_party_funds", - "treasury_reserves", - ] + "Literal['business_loans', 'grants', 'inter_company_funds', 'investment_proceeds', 'legal_settlement', 'owners_capital', 'pension_retirement', 'sales_of_assets', 'sales_of_goods_and_services', 'tax_refund', 'third_party_funds', 'treasury_reserves']|str" ] """ The source of funds for the business, e.g. profits, income, venture capital, etc. @@ -4982,91 +4958,94 @@ class AccountCreateParamsDefaults(TypedDict): """ locales: NotRequired[ List[ - Literal[ - "ar-SA", - "bg", - "bg-BG", - "cs", - "cs-CZ", - "da", - "da-DK", - "de", - "de-DE", - "el", - "el-GR", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-IE", - "en-IN", - "en-NZ", - "en-SG", - "en-US", - "es", - "es-419", - "es-ES", - "et", - "et-EE", - "fi", - "fil", - "fil-PH", - "fi-FI", - "fr", - "fr-CA", - "fr-FR", - "he-IL", - "hr", - "hr-HR", - "hu", - "hu-HU", - "id", - "id-ID", - "it", - "it-IT", - "ja", - "ja-JP", - "ko", - "ko-KR", - "lt", - "lt-LT", - "lv", - "lv-LV", - "ms", - "ms-MY", - "mt", - "mt-MT", - "nb", - "nb-NO", - "nl", - "nl-NL", - "pl", - "pl-PL", - "pt", - "pt-BR", - "pt-PT", - "ro", - "ro-RO", - "ru", - "ru-RU", - "sk", - "sk-SK", - "sl", - "sl-SI", - "sv", - "sv-SE", - "th", - "th-TH", - "tr", - "tr-TR", - "vi", - "vi-VN", - "zh", - "zh-Hans", - "zh-Hant-HK", - "zh-Hant-TW", - "zh-HK", - "zh-TW", + Union[ + Literal[ + "ar-SA", + "bg", + "bg-BG", + "cs", + "cs-CZ", + "da", + "da-DK", + "de", + "de-DE", + "el", + "el-GR", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "en-US", + "es", + "es-419", + "es-ES", + "et", + "et-EE", + "fi", + "fil", + "fil-PH", + "fi-FI", + "fr", + "fr-CA", + "fr-FR", + "he-IL", + "hr", + "hr-HR", + "hu", + "hu-HU", + "id", + "id-ID", + "it", + "it-IT", + "ja", + "ja-JP", + "ko", + "ko-KR", + "lt", + "lt-LT", + "lv", + "lv-LV", + "ms", + "ms-MY", + "mt", + "mt-MT", + "nb", + "nb-NO", + "nl", + "nl-NL", + "pl", + "pl-PL", + "pt", + "pt-BR", + "pt-PT", + "ro", + "ro-RO", + "ru", + "ru-RU", + "sk", + "sk-SK", + "sl", + "sl-SI", + "sv", + "sv-SE", + "th", + "th-TH", + "tr", + "tr-TR", + "vi", + "vi-VN", + "zh", + "zh-Hans", + "zh-Hant-HK", + "zh-Hant-TW", + "zh-HK", + "zh-TW", + ], + str, ] ] ] @@ -5135,7 +5114,7 @@ class AccountCreateParamsIdentity(TypedDict): The country in which the account holder resides, or in which the business is legally established. This should be an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. """ entity_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] + "Literal['company', 'government_entity', 'individual', 'non_profit']|str" ] """ The entity type represented by the Account. Ensure this field is accurate before adding configurations that rely on identity information, as it determines which identity fields apply and how the Account is validated. @@ -6537,35 +6516,7 @@ class AccountCreateParamsIdentityBusinessDetails(TypedDict): The business legal name in non latin script. """ structure: NotRequired[ - Literal[ - "cooperative", - "free_zone_establishment", - "free_zone_llc", - "governmental_unit", - "government_instrumentality", - "incorporated_association", - "incorporated_non_profit", - "incorporated_partnership", - "limited_liability_partnership", - "llc", - "multi_member_llc", - "private_company", - "private_corporation", - "private_partnership", - "public_company", - "public_corporation", - "public_listed_corporation", - "public_partnership", - "registered_charity", - "single_member_llc", - "sole_establishment", - "sole_proprietorship", - "tax_exempt_government_instrumentality", - "trust", - "unincorporated_association", - "unincorporated_non_profit", - "unincorporated_partnership", - ] + "Literal['cooperative', 'free_zone_establishment', 'free_zone_llc', 'governmental_unit', 'government_instrumentality', 'incorporated_association', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_listed_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'trust', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']|str" ] """ The category identifying the legal structure of the business. @@ -6855,147 +6806,150 @@ class AccountCreateParamsIdentityBusinessDetailsIdNumber(TypedDict): """ The registrar of the ID number (Only valid for DE ID number types). """ - type: Literal[ - "ae_crn", - "ae_vat", - "ao_nif", - "ar_cuit", - "at_fn", - "at_stn", - "at_vat", - "au_abn", - "au_acn", - "au_in", - "az_tin", - "bd_etin", - "be_cbe", - "be_vat", - "bg_uic", - "bg_vat", - "bm_crn", - "bo_tin", - "br_cnpj", - "bt_tpn", - "ca_cn", - "ca_crarr", - "ca_gst_hst", - "ca_neq", - "ca_rid", - "ch_chid", - "ch_uid", - "co_nit", - "cr_cpj", - "cr_nite", - "cy_he", - "cy_tic", - "cy_vat", - "cz_ico", - "cz_vat", - "de_hrn", - "de_stn", - "de_vat", - "dk_cvr", - "dk_vat", - "do_rcn", - "ec_ruc", - "ee_rk", - "ee_vat", - "eg_tin", - "es_cif", - "es_vat", - "fi_vat", - "fi_yt", - "fr_rna", - "fr_siren", - "fr_vat", - "gb_crn", - "gb_vat", - "gh_tin", - "gi_crn", - "gr_afm", - "gr_gemi", - "gr_vat", - "gt_nit", - "gy_tin", - "hk_br", - "hk_cr", - "hn_rtn", - "hr_mbs", - "hr_oib", - "hr_vat", - "hu_cjs", - "hu_tin", - "hu_vat", - "ie_crn", - "ie_trn", - "ie_vat", - "it_rea", - "it_vat", - "jm_trn", - "jo_crn", - "jp_cn", - "ke_pin", - "ky_crn", - "kz_bin", - "li_uid", - "lk_tin", - "lt_ccrn", - "lt_vat", - "lu_nif", - "lu_rcs", - "lu_vat", - "lv_urn", - "lv_vat", - "mo_tin", - "mt_crn", - "mt_tin", - "mt_vat", - "mv_tin", - "mx_rfc", - "my_brn", - "my_coid", - "my_itn", - "my_sst", - "mz_nuit", - "ng_tin", - "nl_kvk", - "nl_rsin", - "nl_vat", - "no_orgnr", - "nz_bn", - "nz_ird", - "pa_ruc", - "pe_ruc", - "ph_tin", - "pk_ntn", - "pl_nip", - "pl_regon", - "pl_vat", - "pt_vat", - "py_ruc", - "ro_cui", - "ro_orc", - "ro_vat", - "sa_crn", - "sa_tin", - "se_orgnr", - "se_vat", - "sg_uen", - "si_msp", - "si_tin", - "si_vat", - "sk_dic", - "sk_ico", - "sk_vat", - "sl_tin", - "sv_nit", - "th_crn", - "th_prn", - "th_tin", - "us_ein", - "uy_ruc", - "vg_cn", - "za_tin", + type: Union[ + Literal[ + "ae_crn", + "ae_vat", + "ao_nif", + "ar_cuit", + "at_fn", + "at_stn", + "at_vat", + "au_abn", + "au_acn", + "au_in", + "az_tin", + "bd_etin", + "be_cbe", + "be_vat", + "bg_uic", + "bg_vat", + "bm_crn", + "bo_tin", + "br_cnpj", + "bt_tpn", + "ca_cn", + "ca_crarr", + "ca_gst_hst", + "ca_neq", + "ca_rid", + "ch_chid", + "ch_uid", + "co_nit", + "cr_cpj", + "cr_nite", + "cy_he", + "cy_tic", + "cy_vat", + "cz_ico", + "cz_vat", + "de_hrn", + "de_stn", + "de_vat", + "dk_cvr", + "dk_vat", + "do_rcn", + "ec_ruc", + "ee_rk", + "ee_vat", + "eg_tin", + "es_cif", + "es_vat", + "fi_vat", + "fi_yt", + "fr_rna", + "fr_siren", + "fr_vat", + "gb_crn", + "gb_vat", + "gh_tin", + "gi_crn", + "gr_afm", + "gr_gemi", + "gr_vat", + "gt_nit", + "gy_tin", + "hk_br", + "hk_cr", + "hn_rtn", + "hr_mbs", + "hr_oib", + "hr_vat", + "hu_cjs", + "hu_tin", + "hu_vat", + "ie_crn", + "ie_trn", + "ie_vat", + "it_rea", + "it_vat", + "jm_trn", + "jo_crn", + "jp_cn", + "ke_pin", + "ky_crn", + "kz_bin", + "li_uid", + "lk_tin", + "lt_ccrn", + "lt_vat", + "lu_nif", + "lu_rcs", + "lu_vat", + "lv_urn", + "lv_vat", + "mo_tin", + "mt_crn", + "mt_tin", + "mt_vat", + "mv_tin", + "mx_rfc", + "my_brn", + "my_coid", + "my_itn", + "my_sst", + "mz_nuit", + "ng_tin", + "nl_kvk", + "nl_rsin", + "nl_vat", + "no_orgnr", + "nz_bn", + "nz_ird", + "pa_ruc", + "pe_ruc", + "ph_tin", + "pk_ntn", + "pl_nip", + "pl_regon", + "pl_vat", + "pt_vat", + "py_ruc", + "ro_cui", + "ro_orc", + "ro_vat", + "sa_crn", + "sa_tin", + "se_orgnr", + "se_vat", + "sg_uen", + "si_msp", + "si_tin", + "si_vat", + "sk_dic", + "sk_ico", + "sk_vat", + "sl_tin", + "sv_nit", + "th_crn", + "th_prn", + "th_tin", + "us_ein", + "uy_ruc", + "vg_cn", + "za_tin", + ], + str, ] """ Open Enum. The ID number type of a business entity. @@ -7179,7 +7133,7 @@ class AccountCreateParamsIdentityIndividual(TypedDict): """ The identification numbers (e.g., SSN) associated with the individual. """ - legal_gender: NotRequired[Literal["female", "male"]] + legal_gender: NotRequired["Literal['female', 'male']|str"] """ The individual's gender (International regulations require either "male" or "female"). """ @@ -7195,7 +7149,7 @@ class AccountCreateParamsIdentityIndividual(TypedDict): """ The individual's phone number. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ The individual's political exposure. """ @@ -7442,104 +7396,107 @@ class AccountCreateParamsIdentityIndividualDocumentsVisa(TypedDict): class AccountCreateParamsIdentityIndividualIdNumber(TypedDict): - type: Literal[ - "ae_eid", - "ao_nif", - "ar_cuil", - "ar_dni", - "at_stn", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "be_nrn", - "bg_ucn", - "bm_pp", - "bn_nric", - "bo_ci", - "br_cpf", - "bt_cid", - "ca_sin", - "ch_oasi", - "cl_rut", - "cn_pp", - "co_nuip", - "cr_ci", - "cr_cpf", - "cr_dimex", - "cr_nite", - "cy_tic", - "cz_rc", - "de_stn", - "dk_cpr", - "do_cie", - "do_rcn", - "ec_ci", - "ee_ik", - "eg_tin", - "es_nif", - "fi_hetu", - "fr_nir", - "gb_nino", - "gh_pin", - "gr_afm", - "gt_nit", - "gy_tin", - "hk_id", - "hn_rtn", - "hr_oib", - "hu_ad", - "id_nik", - "ie_ppsn", - "is_kt", - "it_cf", - "jm_trn", - "jo_pin", - "jp_inc", - "ke_pin", - "ky_pp", - "kz_iin", - "li_peid", - "lk_nic", - "lt_ak", - "lu_nif", - "lv_pk", - "mo_bir", - "mt_nic", - "mv_tin", - "mx_rfc", - "my_nric", - "mz_nuit", - "ng_nin", - "nl_bsn", - "no_nin", - "nz_ird", - "pa_ruc", - "pe_dni", - "ph_tin", - "pk_cnic", - "pk_snic", - "pl_pesel", - "pt_nif", - "py_ruc", - "ro_cnp", - "sa_tin", - "se_pin", - "sg_fin", - "sg_nric", - "si_pin", - "sk_dic", - "sv_nit", - "th_lc", - "th_pin", - "tr_tin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - "uy_dni", - "vg_pp", - "za_id", + type: Union[ + Literal[ + "ae_eid", + "ao_nif", + "ar_cuil", + "ar_dni", + "at_stn", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "be_nrn", + "bg_ucn", + "bm_pp", + "bn_nric", + "bo_ci", + "br_cpf", + "bt_cid", + "ca_sin", + "ch_oasi", + "cl_rut", + "cn_pp", + "co_nuip", + "cr_ci", + "cr_cpf", + "cr_dimex", + "cr_nite", + "cy_tic", + "cz_rc", + "de_stn", + "dk_cpr", + "do_cie", + "do_rcn", + "ec_ci", + "ee_ik", + "eg_tin", + "es_nif", + "fi_hetu", + "fr_nir", + "gb_nino", + "gh_pin", + "gr_afm", + "gt_nit", + "gy_tin", + "hk_id", + "hn_rtn", + "hr_oib", + "hu_ad", + "id_nik", + "ie_ppsn", + "is_kt", + "it_cf", + "jm_trn", + "jo_pin", + "jp_inc", + "ke_pin", + "ky_pp", + "kz_iin", + "li_peid", + "lk_nic", + "lt_ak", + "lu_nif", + "lv_pk", + "mo_bir", + "mt_nic", + "mv_tin", + "mx_rfc", + "my_nric", + "mz_nuit", + "ng_nin", + "nl_bsn", + "no_nin", + "nz_ird", + "pa_ruc", + "pe_dni", + "ph_tin", + "pk_cnic", + "pk_snic", + "pl_pesel", + "pt_nif", + "py_ruc", + "ro_cnp", + "sa_tin", + "se_pin", + "sg_fin", + "sg_nric", + "si_pin", + "sk_dic", + "sv_nit", + "th_lc", + "th_pin", + "tr_tin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + "uy_dni", + "vg_pp", + "za_id", + ], + str, ] """ The ID number type of an individual. diff --git a/stripe/params/v2/core/_account_link_create_params.py b/stripe/params/v2/core/_account_link_create_params.py index cea9dff64..51dfa05aa 100644 --- a/stripe/params/v2/core/_account_link_create_params.py +++ b/stripe/params/v2/core/_account_link_create_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -38,11 +38,14 @@ class AccountLinkCreateParamsUseCase(TypedDict): """ Hash containing configuration options for an Account Link that updates an existing recipient. """ - type: Literal[ - "account_onboarding", - "account_update", - "recipient_onboarding", - "recipient_update", + type: Union[ + Literal[ + "account_onboarding", + "account_update", + "recipient_onboarding", + "recipient_update", + ], + str, ] """ Open Enum. The type of Account Link the user is requesting. @@ -57,7 +60,12 @@ class AccountLinkCreateParamsUseCaseAccountOnboarding(TypedDict): Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ configurations: List[ - Literal["customer", "merchant", "money_manager", "recipient", "storer"] + Union[ + Literal[ + "customer", "merchant", "money_manager", "recipient", "storer" + ], + str, + ] ] """ Open Enum. A v2/core/account can be configured to enable certain functionality. The configuration param targets the v2/core/account_link to collect information for the specified v2/core/account configuration/s. @@ -75,11 +83,11 @@ class AccountLinkCreateParamsUseCaseAccountOnboarding(TypedDict): class AccountLinkCreateParamsUseCaseAccountOnboardingCollectionOptions( TypedDict, ): - fields: NotRequired[Literal["currently_due", "eventually_due"]] + fields: NotRequired["Literal['currently_due', 'eventually_due']|str"] """ Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify collection_options, the default value is currently_due. """ - future_requirements: NotRequired[Literal["include", "omit"]] + future_requirements: NotRequired["Literal['include', 'omit']|str"] """ Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. """ @@ -93,7 +101,12 @@ class AccountLinkCreateParamsUseCaseAccountUpdate(TypedDict): Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ configurations: List[ - Literal["customer", "merchant", "money_manager", "recipient", "storer"] + Union[ + Literal[ + "customer", "merchant", "money_manager", "recipient", "storer" + ], + str, + ] ] """ Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. @@ -109,11 +122,11 @@ class AccountLinkCreateParamsUseCaseAccountUpdate(TypedDict): class AccountLinkCreateParamsUseCaseAccountUpdateCollectionOptions(TypedDict): - fields: NotRequired[Literal["currently_due", "eventually_due"]] + fields: NotRequired["Literal['currently_due', 'eventually_due']|str"] """ Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). The default value is `currently_due`. """ - future_requirements: NotRequired[Literal["include", "omit"]] + future_requirements: NotRequired["Literal['include', 'omit']|str"] """ Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. """ @@ -143,11 +156,11 @@ class AccountLinkCreateParamsUseCaseRecipientOnboarding(TypedDict): class AccountLinkCreateParamsUseCaseRecipientOnboardingCollectionOptions( TypedDict, ): - fields: NotRequired[Literal["currently_due", "eventually_due"]] + fields: NotRequired["Literal['currently_due', 'eventually_due']|str"] """ Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify collection_options, the default value is currently_due. """ - future_requirements: NotRequired[Literal["include", "omit"]] + future_requirements: NotRequired["Literal['include', 'omit']|str"] """ Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. """ @@ -177,11 +190,11 @@ class AccountLinkCreateParamsUseCaseRecipientUpdate(TypedDict): class AccountLinkCreateParamsUseCaseRecipientUpdateCollectionOptions( TypedDict ): - fields: NotRequired[Literal["currently_due", "eventually_due"]] + fields: NotRequired["Literal['currently_due', 'eventually_due']|str"] """ Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). The default value is `currently_due`. """ - future_requirements: NotRequired[Literal["include", "omit"]] + future_requirements: NotRequired["Literal['include', 'omit']|str"] """ Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. """ diff --git a/stripe/params/v2/core/_account_token_create_params.py b/stripe/params/v2/core/_account_token_create_params.py index 967734d39..fc3742ee6 100644 --- a/stripe/params/v2/core/_account_token_create_params.py +++ b/stripe/params/v2/core/_account_token_create_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._stripe_object import UntypedStripeObject from stripe.v2._amount import AmountParam -from typing import Dict, List, Optional +from typing import Dict, List, Optional, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -38,7 +38,7 @@ class AccountTokenCreateParamsIdentity(TypedDict): Information about the company or business. """ entity_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] + "Literal['company', 'government_entity', 'individual', 'non_profit']|str" ] """ The entity type. @@ -530,35 +530,7 @@ class AccountTokenCreateParamsIdentityBusinessDetails(TypedDict): The business legal name in non latin script. """ structure: NotRequired[ - Literal[ - "cooperative", - "free_zone_establishment", - "free_zone_llc", - "governmental_unit", - "government_instrumentality", - "incorporated_association", - "incorporated_non_profit", - "incorporated_partnership", - "limited_liability_partnership", - "llc", - "multi_member_llc", - "private_company", - "private_corporation", - "private_partnership", - "public_company", - "public_corporation", - "public_listed_corporation", - "public_partnership", - "registered_charity", - "single_member_llc", - "sole_establishment", - "sole_proprietorship", - "tax_exempt_government_instrumentality", - "trust", - "unincorporated_association", - "unincorporated_non_profit", - "unincorporated_partnership", - ] + "Literal['cooperative', 'free_zone_establishment', 'free_zone_llc', 'governmental_unit', 'government_instrumentality', 'incorporated_association', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_listed_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'trust', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']|str" ] """ The category identifying the legal structure of the business. @@ -848,147 +820,150 @@ class AccountTokenCreateParamsIdentityBusinessDetailsIdNumber(TypedDict): """ The registrar of the ID number (Only valid for DE ID number types). """ - type: Literal[ - "ae_crn", - "ae_vat", - "ao_nif", - "ar_cuit", - "at_fn", - "at_stn", - "at_vat", - "au_abn", - "au_acn", - "au_in", - "az_tin", - "bd_etin", - "be_cbe", - "be_vat", - "bg_uic", - "bg_vat", - "bm_crn", - "bo_tin", - "br_cnpj", - "bt_tpn", - "ca_cn", - "ca_crarr", - "ca_gst_hst", - "ca_neq", - "ca_rid", - "ch_chid", - "ch_uid", - "co_nit", - "cr_cpj", - "cr_nite", - "cy_he", - "cy_tic", - "cy_vat", - "cz_ico", - "cz_vat", - "de_hrn", - "de_stn", - "de_vat", - "dk_cvr", - "dk_vat", - "do_rcn", - "ec_ruc", - "ee_rk", - "ee_vat", - "eg_tin", - "es_cif", - "es_vat", - "fi_vat", - "fi_yt", - "fr_rna", - "fr_siren", - "fr_vat", - "gb_crn", - "gb_vat", - "gh_tin", - "gi_crn", - "gr_afm", - "gr_gemi", - "gr_vat", - "gt_nit", - "gy_tin", - "hk_br", - "hk_cr", - "hn_rtn", - "hr_mbs", - "hr_oib", - "hr_vat", - "hu_cjs", - "hu_tin", - "hu_vat", - "ie_crn", - "ie_trn", - "ie_vat", - "it_rea", - "it_vat", - "jm_trn", - "jo_crn", - "jp_cn", - "ke_pin", - "ky_crn", - "kz_bin", - "li_uid", - "lk_tin", - "lt_ccrn", - "lt_vat", - "lu_nif", - "lu_rcs", - "lu_vat", - "lv_urn", - "lv_vat", - "mo_tin", - "mt_crn", - "mt_tin", - "mt_vat", - "mv_tin", - "mx_rfc", - "my_brn", - "my_coid", - "my_itn", - "my_sst", - "mz_nuit", - "ng_tin", - "nl_kvk", - "nl_rsin", - "nl_vat", - "no_orgnr", - "nz_bn", - "nz_ird", - "pa_ruc", - "pe_ruc", - "ph_tin", - "pk_ntn", - "pl_nip", - "pl_regon", - "pl_vat", - "pt_vat", - "py_ruc", - "ro_cui", - "ro_orc", - "ro_vat", - "sa_crn", - "sa_tin", - "se_orgnr", - "se_vat", - "sg_uen", - "si_msp", - "si_tin", - "si_vat", - "sk_dic", - "sk_ico", - "sk_vat", - "sl_tin", - "sv_nit", - "th_crn", - "th_prn", - "th_tin", - "us_ein", - "uy_ruc", - "vg_cn", - "za_tin", + type: Union[ + Literal[ + "ae_crn", + "ae_vat", + "ao_nif", + "ar_cuit", + "at_fn", + "at_stn", + "at_vat", + "au_abn", + "au_acn", + "au_in", + "az_tin", + "bd_etin", + "be_cbe", + "be_vat", + "bg_uic", + "bg_vat", + "bm_crn", + "bo_tin", + "br_cnpj", + "bt_tpn", + "ca_cn", + "ca_crarr", + "ca_gst_hst", + "ca_neq", + "ca_rid", + "ch_chid", + "ch_uid", + "co_nit", + "cr_cpj", + "cr_nite", + "cy_he", + "cy_tic", + "cy_vat", + "cz_ico", + "cz_vat", + "de_hrn", + "de_stn", + "de_vat", + "dk_cvr", + "dk_vat", + "do_rcn", + "ec_ruc", + "ee_rk", + "ee_vat", + "eg_tin", + "es_cif", + "es_vat", + "fi_vat", + "fi_yt", + "fr_rna", + "fr_siren", + "fr_vat", + "gb_crn", + "gb_vat", + "gh_tin", + "gi_crn", + "gr_afm", + "gr_gemi", + "gr_vat", + "gt_nit", + "gy_tin", + "hk_br", + "hk_cr", + "hn_rtn", + "hr_mbs", + "hr_oib", + "hr_vat", + "hu_cjs", + "hu_tin", + "hu_vat", + "ie_crn", + "ie_trn", + "ie_vat", + "it_rea", + "it_vat", + "jm_trn", + "jo_crn", + "jp_cn", + "ke_pin", + "ky_crn", + "kz_bin", + "li_uid", + "lk_tin", + "lt_ccrn", + "lt_vat", + "lu_nif", + "lu_rcs", + "lu_vat", + "lv_urn", + "lv_vat", + "mo_tin", + "mt_crn", + "mt_tin", + "mt_vat", + "mv_tin", + "mx_rfc", + "my_brn", + "my_coid", + "my_itn", + "my_sst", + "mz_nuit", + "ng_tin", + "nl_kvk", + "nl_rsin", + "nl_vat", + "no_orgnr", + "nz_bn", + "nz_ird", + "pa_ruc", + "pe_ruc", + "ph_tin", + "pk_ntn", + "pl_nip", + "pl_regon", + "pl_vat", + "pt_vat", + "py_ruc", + "ro_cui", + "ro_orc", + "ro_vat", + "sa_crn", + "sa_tin", + "se_orgnr", + "se_vat", + "sg_uen", + "si_msp", + "si_tin", + "si_vat", + "sk_dic", + "sk_ico", + "sk_vat", + "sl_tin", + "sv_nit", + "th_crn", + "th_prn", + "th_tin", + "us_ein", + "uy_ruc", + "vg_cn", + "za_tin", + ], + str, ] """ Open Enum. The ID number type of a business entity. @@ -1184,7 +1159,7 @@ class AccountTokenCreateParamsIdentityIndividual(TypedDict): """ The identification numbers (e.g., SSN) associated with the individual. """ - legal_gender: NotRequired[Literal["female", "male"]] + legal_gender: NotRequired["Literal['female', 'male']|str"] """ The individual's gender (International regulations require either "male" or "female"). """ @@ -1202,7 +1177,7 @@ class AccountTokenCreateParamsIdentityIndividual(TypedDict): """ The individual's phone number. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ The individual's political exposure. """ @@ -1451,104 +1426,107 @@ class AccountTokenCreateParamsIdentityIndividualDocumentsVisa(TypedDict): class AccountTokenCreateParamsIdentityIndividualIdNumber(TypedDict): - type: Literal[ - "ae_eid", - "ao_nif", - "ar_cuil", - "ar_dni", - "at_stn", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "be_nrn", - "bg_ucn", - "bm_pp", - "bn_nric", - "bo_ci", - "br_cpf", - "bt_cid", - "ca_sin", - "ch_oasi", - "cl_rut", - "cn_pp", - "co_nuip", - "cr_ci", - "cr_cpf", - "cr_dimex", - "cr_nite", - "cy_tic", - "cz_rc", - "de_stn", - "dk_cpr", - "do_cie", - "do_rcn", - "ec_ci", - "ee_ik", - "eg_tin", - "es_nif", - "fi_hetu", - "fr_nir", - "gb_nino", - "gh_pin", - "gr_afm", - "gt_nit", - "gy_tin", - "hk_id", - "hn_rtn", - "hr_oib", - "hu_ad", - "id_nik", - "ie_ppsn", - "is_kt", - "it_cf", - "jm_trn", - "jo_pin", - "jp_inc", - "ke_pin", - "ky_pp", - "kz_iin", - "li_peid", - "lk_nic", - "lt_ak", - "lu_nif", - "lv_pk", - "mo_bir", - "mt_nic", - "mv_tin", - "mx_rfc", - "my_nric", - "mz_nuit", - "ng_nin", - "nl_bsn", - "no_nin", - "nz_ird", - "pa_ruc", - "pe_dni", - "ph_tin", - "pk_cnic", - "pk_snic", - "pl_pesel", - "pt_nif", - "py_ruc", - "ro_cnp", - "sa_tin", - "se_pin", - "sg_fin", - "sg_nric", - "si_pin", - "sk_dic", - "sv_nit", - "th_lc", - "th_pin", - "tr_tin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - "uy_dni", - "vg_pp", - "za_id", + type: Union[ + Literal[ + "ae_eid", + "ao_nif", + "ar_cuil", + "ar_dni", + "at_stn", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "be_nrn", + "bg_ucn", + "bm_pp", + "bn_nric", + "bo_ci", + "br_cpf", + "bt_cid", + "ca_sin", + "ch_oasi", + "cl_rut", + "cn_pp", + "co_nuip", + "cr_ci", + "cr_cpf", + "cr_dimex", + "cr_nite", + "cy_tic", + "cz_rc", + "de_stn", + "dk_cpr", + "do_cie", + "do_rcn", + "ec_ci", + "ee_ik", + "eg_tin", + "es_nif", + "fi_hetu", + "fr_nir", + "gb_nino", + "gh_pin", + "gr_afm", + "gt_nit", + "gy_tin", + "hk_id", + "hn_rtn", + "hr_oib", + "hu_ad", + "id_nik", + "ie_ppsn", + "is_kt", + "it_cf", + "jm_trn", + "jo_pin", + "jp_inc", + "ke_pin", + "ky_pp", + "kz_iin", + "li_peid", + "lk_nic", + "lt_ak", + "lu_nif", + "lv_pk", + "mo_bir", + "mt_nic", + "mv_tin", + "mx_rfc", + "my_nric", + "mz_nuit", + "ng_nin", + "nl_bsn", + "no_nin", + "nz_ird", + "pa_ruc", + "pe_dni", + "ph_tin", + "pk_cnic", + "pk_snic", + "pl_pesel", + "pt_nif", + "py_ruc", + "ro_cnp", + "sa_tin", + "se_pin", + "sg_fin", + "sg_nric", + "si_pin", + "sk_dic", + "sv_nit", + "th_lc", + "th_pin", + "tr_tin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + "uy_dni", + "vg_pp", + "za_id", + ], + str, ] """ The ID number type of an individual. diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index ca0096b39..44832d404 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._stripe_object import UntypedStripeObject from stripe.v2._amount import AmountParam -from typing import Dict, List, Optional +from typing import Dict, List, Optional, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -2978,22 +2978,25 @@ class AccountUpdateParamsConfigurationMoneyManager(TypedDict): """ high_risk_activities: NotRequired[ List[ - Literal[ - "adult_entertainment", - "gambling", - "hold_client_funds", - "investment_services", - "lending_banking", - "marijuana_or_related_services", - "money_services", - "nicotine_tobacco_or_related_services", - "none", - "operate_foreign_exchange_virtual_currencies_brokerage_otc", - "pharmaceuticals", - "precious_metals_precious_stones_jewelry", - "safe_deposit_box_rentals", - "third_party_payment_processing", - "weapons_firearms_and_explosives", + Union[ + Literal[ + "adult_entertainment", + "gambling", + "hold_client_funds", + "investment_services", + "lending_banking", + "marijuana_or_related_services", + "money_services", + "nicotine_tobacco_or_related_services", + "none", + "operate_foreign_exchange_virtual_currencies_brokerage_otc", + "pharmaceuticals", + "precious_metals_precious_stones_jewelry", + "safe_deposit_box_rentals", + "third_party_payment_processing", + "weapons_firearms_and_explosives", + ], + str, ] ] ] @@ -3017,21 +3020,7 @@ class AccountUpdateParamsConfigurationMoneyManager(TypedDict): Indicates whether the business participates in any regulated activity. """ purpose_of_funds: NotRequired[ - Literal[ - "charitable_donations", - "ecommerce_retail_payments", - "investment_purposes", - "other", - "payments_to_friends_or_family_abroad", - "payroll", - "personal_or_living_expenses", - "protect_wealth", - "purchase_goods_and_services", - "receive_payments_for_goods_and_services", - "tax_optimization", - "third_party_money_transmission", - "treasury_management", - ] + "Literal['charitable_donations', 'ecommerce_retail_payments', 'investment_purposes', 'other', 'payments_to_friends_or_family_abroad', 'payroll', 'personal_or_living_expenses', 'protect_wealth', 'purchase_goods_and_services', 'receive_payments_for_goods_and_services', 'tax_optimization', 'third_party_money_transmission', 'treasury_management']|str" ] """ Primary purpose of the stored funds. @@ -3047,20 +3036,7 @@ class AccountUpdateParamsConfigurationMoneyManager(TypedDict): Details of the regulated activity if the business participates in one. """ source_of_funds: NotRequired[ - Literal[ - "business_loans", - "grants", - "inter_company_funds", - "investment_proceeds", - "legal_settlement", - "owners_capital", - "pension_retirement", - "sales_of_assets", - "sales_of_goods_and_services", - "tax_refund", - "third_party_funds", - "treasury_reserves", - ] + "Literal['business_loans', 'grants', 'inter_company_funds', 'investment_proceeds', 'legal_settlement', 'owners_capital', 'pension_retirement', 'sales_of_assets', 'sales_of_goods_and_services', 'tax_refund', 'third_party_funds', 'treasury_reserves']|str" ] """ The source of funds for the business, e.g. profits, income, venture capital, etc. @@ -5016,91 +4992,94 @@ class AccountUpdateParamsDefaults(TypedDict): """ locales: NotRequired[ List[ - Literal[ - "ar-SA", - "bg", - "bg-BG", - "cs", - "cs-CZ", - "da", - "da-DK", - "de", - "de-DE", - "el", - "el-GR", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-IE", - "en-IN", - "en-NZ", - "en-SG", - "en-US", - "es", - "es-419", - "es-ES", - "et", - "et-EE", - "fi", - "fil", - "fil-PH", - "fi-FI", - "fr", - "fr-CA", - "fr-FR", - "he-IL", - "hr", - "hr-HR", - "hu", - "hu-HU", - "id", - "id-ID", - "it", - "it-IT", - "ja", - "ja-JP", - "ko", - "ko-KR", - "lt", - "lt-LT", - "lv", - "lv-LV", - "ms", - "ms-MY", - "mt", - "mt-MT", - "nb", - "nb-NO", - "nl", - "nl-NL", - "pl", - "pl-PL", - "pt", - "pt-BR", - "pt-PT", - "ro", - "ro-RO", - "ru", - "ru-RU", - "sk", - "sk-SK", - "sl", - "sl-SI", - "sv", - "sv-SE", - "th", - "th-TH", - "tr", - "tr-TR", - "vi", - "vi-VN", - "zh", - "zh-Hans", - "zh-Hant-HK", - "zh-Hant-TW", - "zh-HK", - "zh-TW", + Union[ + Literal[ + "ar-SA", + "bg", + "bg-BG", + "cs", + "cs-CZ", + "da", + "da-DK", + "de", + "de-DE", + "el", + "el-GR", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "en-US", + "es", + "es-419", + "es-ES", + "et", + "et-EE", + "fi", + "fil", + "fil-PH", + "fi-FI", + "fr", + "fr-CA", + "fr-FR", + "he-IL", + "hr", + "hr-HR", + "hu", + "hu-HU", + "id", + "id-ID", + "it", + "it-IT", + "ja", + "ja-JP", + "ko", + "ko-KR", + "lt", + "lt-LT", + "lv", + "lv-LV", + "ms", + "ms-MY", + "mt", + "mt-MT", + "nb", + "nb-NO", + "nl", + "nl-NL", + "pl", + "pl-PL", + "pt", + "pt-BR", + "pt-PT", + "ro", + "ro-RO", + "ru", + "ru-RU", + "sk", + "sk-SK", + "sl", + "sl-SI", + "sv", + "sv-SE", + "th", + "th-TH", + "tr", + "tr-TR", + "vi", + "vi-VN", + "zh", + "zh-Hans", + "zh-Hant-HK", + "zh-Hant-TW", + "zh-HK", + "zh-TW", + ], + str, ] ] ] @@ -5169,7 +5148,7 @@ class AccountUpdateParamsIdentity(TypedDict): The country in which the account holder resides, or in which the business is legally established. This should be an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. """ entity_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] + "Literal['company', 'government_entity', 'individual', 'non_profit']|str" ] """ The entity type represented by the Account. Ensure this field is accurate before adding configurations that rely on identity information, as it determines which identity fields apply and how the Account is validated. @@ -6571,35 +6550,7 @@ class AccountUpdateParamsIdentityBusinessDetails(TypedDict): The business legal name in non latin script. """ structure: NotRequired[ - Literal[ - "cooperative", - "free_zone_establishment", - "free_zone_llc", - "governmental_unit", - "government_instrumentality", - "incorporated_association", - "incorporated_non_profit", - "incorporated_partnership", - "limited_liability_partnership", - "llc", - "multi_member_llc", - "private_company", - "private_corporation", - "private_partnership", - "public_company", - "public_corporation", - "public_listed_corporation", - "public_partnership", - "registered_charity", - "single_member_llc", - "sole_establishment", - "sole_proprietorship", - "tax_exempt_government_instrumentality", - "trust", - "unincorporated_association", - "unincorporated_non_profit", - "unincorporated_partnership", - ] + "Literal['cooperative', 'free_zone_establishment', 'free_zone_llc', 'governmental_unit', 'government_instrumentality', 'incorporated_association', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_listed_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'trust', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']|str" ] """ The category identifying the legal structure of the business. @@ -6889,147 +6840,150 @@ class AccountUpdateParamsIdentityBusinessDetailsIdNumber(TypedDict): """ The registrar of the ID number (Only valid for DE ID number types). """ - type: Literal[ - "ae_crn", - "ae_vat", - "ao_nif", - "ar_cuit", - "at_fn", - "at_stn", - "at_vat", - "au_abn", - "au_acn", - "au_in", - "az_tin", - "bd_etin", - "be_cbe", - "be_vat", - "bg_uic", - "bg_vat", - "bm_crn", - "bo_tin", - "br_cnpj", - "bt_tpn", - "ca_cn", - "ca_crarr", - "ca_gst_hst", - "ca_neq", - "ca_rid", - "ch_chid", - "ch_uid", - "co_nit", - "cr_cpj", - "cr_nite", - "cy_he", - "cy_tic", - "cy_vat", - "cz_ico", - "cz_vat", - "de_hrn", - "de_stn", - "de_vat", - "dk_cvr", - "dk_vat", - "do_rcn", - "ec_ruc", - "ee_rk", - "ee_vat", - "eg_tin", - "es_cif", - "es_vat", - "fi_vat", - "fi_yt", - "fr_rna", - "fr_siren", - "fr_vat", - "gb_crn", - "gb_vat", - "gh_tin", - "gi_crn", - "gr_afm", - "gr_gemi", - "gr_vat", - "gt_nit", - "gy_tin", - "hk_br", - "hk_cr", - "hn_rtn", - "hr_mbs", - "hr_oib", - "hr_vat", - "hu_cjs", - "hu_tin", - "hu_vat", - "ie_crn", - "ie_trn", - "ie_vat", - "it_rea", - "it_vat", - "jm_trn", - "jo_crn", - "jp_cn", - "ke_pin", - "ky_crn", - "kz_bin", - "li_uid", - "lk_tin", - "lt_ccrn", - "lt_vat", - "lu_nif", - "lu_rcs", - "lu_vat", - "lv_urn", - "lv_vat", - "mo_tin", - "mt_crn", - "mt_tin", - "mt_vat", - "mv_tin", - "mx_rfc", - "my_brn", - "my_coid", - "my_itn", - "my_sst", - "mz_nuit", - "ng_tin", - "nl_kvk", - "nl_rsin", - "nl_vat", - "no_orgnr", - "nz_bn", - "nz_ird", - "pa_ruc", - "pe_ruc", - "ph_tin", - "pk_ntn", - "pl_nip", - "pl_regon", - "pl_vat", - "pt_vat", - "py_ruc", - "ro_cui", - "ro_orc", - "ro_vat", - "sa_crn", - "sa_tin", - "se_orgnr", - "se_vat", - "sg_uen", - "si_msp", - "si_tin", - "si_vat", - "sk_dic", - "sk_ico", - "sk_vat", - "sl_tin", - "sv_nit", - "th_crn", - "th_prn", - "th_tin", - "us_ein", - "uy_ruc", - "vg_cn", - "za_tin", + type: Union[ + Literal[ + "ae_crn", + "ae_vat", + "ao_nif", + "ar_cuit", + "at_fn", + "at_stn", + "at_vat", + "au_abn", + "au_acn", + "au_in", + "az_tin", + "bd_etin", + "be_cbe", + "be_vat", + "bg_uic", + "bg_vat", + "bm_crn", + "bo_tin", + "br_cnpj", + "bt_tpn", + "ca_cn", + "ca_crarr", + "ca_gst_hst", + "ca_neq", + "ca_rid", + "ch_chid", + "ch_uid", + "co_nit", + "cr_cpj", + "cr_nite", + "cy_he", + "cy_tic", + "cy_vat", + "cz_ico", + "cz_vat", + "de_hrn", + "de_stn", + "de_vat", + "dk_cvr", + "dk_vat", + "do_rcn", + "ec_ruc", + "ee_rk", + "ee_vat", + "eg_tin", + "es_cif", + "es_vat", + "fi_vat", + "fi_yt", + "fr_rna", + "fr_siren", + "fr_vat", + "gb_crn", + "gb_vat", + "gh_tin", + "gi_crn", + "gr_afm", + "gr_gemi", + "gr_vat", + "gt_nit", + "gy_tin", + "hk_br", + "hk_cr", + "hn_rtn", + "hr_mbs", + "hr_oib", + "hr_vat", + "hu_cjs", + "hu_tin", + "hu_vat", + "ie_crn", + "ie_trn", + "ie_vat", + "it_rea", + "it_vat", + "jm_trn", + "jo_crn", + "jp_cn", + "ke_pin", + "ky_crn", + "kz_bin", + "li_uid", + "lk_tin", + "lt_ccrn", + "lt_vat", + "lu_nif", + "lu_rcs", + "lu_vat", + "lv_urn", + "lv_vat", + "mo_tin", + "mt_crn", + "mt_tin", + "mt_vat", + "mv_tin", + "mx_rfc", + "my_brn", + "my_coid", + "my_itn", + "my_sst", + "mz_nuit", + "ng_tin", + "nl_kvk", + "nl_rsin", + "nl_vat", + "no_orgnr", + "nz_bn", + "nz_ird", + "pa_ruc", + "pe_ruc", + "ph_tin", + "pk_ntn", + "pl_nip", + "pl_regon", + "pl_vat", + "pt_vat", + "py_ruc", + "ro_cui", + "ro_orc", + "ro_vat", + "sa_crn", + "sa_tin", + "se_orgnr", + "se_vat", + "sg_uen", + "si_msp", + "si_tin", + "si_vat", + "sk_dic", + "sk_ico", + "sk_vat", + "sl_tin", + "sv_nit", + "th_crn", + "th_prn", + "th_tin", + "us_ein", + "uy_ruc", + "vg_cn", + "za_tin", + ], + str, ] """ Open Enum. The ID number type of a business entity. @@ -7213,7 +7167,7 @@ class AccountUpdateParamsIdentityIndividual(TypedDict): """ The identification numbers (e.g., SSN) associated with the individual. """ - legal_gender: NotRequired[Literal["female", "male"]] + legal_gender: NotRequired["Literal['female', 'male']|str"] """ The individual's gender (International regulations require either "male" or "female"). """ @@ -7231,7 +7185,7 @@ class AccountUpdateParamsIdentityIndividual(TypedDict): """ The individual's phone number. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ The individual's political exposure. """ @@ -7478,104 +7432,107 @@ class AccountUpdateParamsIdentityIndividualDocumentsVisa(TypedDict): class AccountUpdateParamsIdentityIndividualIdNumber(TypedDict): - type: Literal[ - "ae_eid", - "ao_nif", - "ar_cuil", - "ar_dni", - "at_stn", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "be_nrn", - "bg_ucn", - "bm_pp", - "bn_nric", - "bo_ci", - "br_cpf", - "bt_cid", - "ca_sin", - "ch_oasi", - "cl_rut", - "cn_pp", - "co_nuip", - "cr_ci", - "cr_cpf", - "cr_dimex", - "cr_nite", - "cy_tic", - "cz_rc", - "de_stn", - "dk_cpr", - "do_cie", - "do_rcn", - "ec_ci", - "ee_ik", - "eg_tin", - "es_nif", - "fi_hetu", - "fr_nir", - "gb_nino", - "gh_pin", - "gr_afm", - "gt_nit", - "gy_tin", - "hk_id", - "hn_rtn", - "hr_oib", - "hu_ad", - "id_nik", - "ie_ppsn", - "is_kt", - "it_cf", - "jm_trn", - "jo_pin", - "jp_inc", - "ke_pin", - "ky_pp", - "kz_iin", - "li_peid", - "lk_nic", - "lt_ak", - "lu_nif", - "lv_pk", - "mo_bir", - "mt_nic", - "mv_tin", - "mx_rfc", - "my_nric", - "mz_nuit", - "ng_nin", - "nl_bsn", - "no_nin", - "nz_ird", - "pa_ruc", - "pe_dni", - "ph_tin", - "pk_cnic", - "pk_snic", - "pl_pesel", - "pt_nif", - "py_ruc", - "ro_cnp", - "sa_tin", - "se_pin", - "sg_fin", - "sg_nric", - "si_pin", - "sk_dic", - "sv_nit", - "th_lc", - "th_pin", - "tr_tin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - "uy_dni", - "vg_pp", - "za_id", + type: Union[ + Literal[ + "ae_eid", + "ao_nif", + "ar_cuil", + "ar_dni", + "at_stn", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "be_nrn", + "bg_ucn", + "bm_pp", + "bn_nric", + "bo_ci", + "br_cpf", + "bt_cid", + "ca_sin", + "ch_oasi", + "cl_rut", + "cn_pp", + "co_nuip", + "cr_ci", + "cr_cpf", + "cr_dimex", + "cr_nite", + "cy_tic", + "cz_rc", + "de_stn", + "dk_cpr", + "do_cie", + "do_rcn", + "ec_ci", + "ee_ik", + "eg_tin", + "es_nif", + "fi_hetu", + "fr_nir", + "gb_nino", + "gh_pin", + "gr_afm", + "gt_nit", + "gy_tin", + "hk_id", + "hn_rtn", + "hr_oib", + "hu_ad", + "id_nik", + "ie_ppsn", + "is_kt", + "it_cf", + "jm_trn", + "jo_pin", + "jp_inc", + "ke_pin", + "ky_pp", + "kz_iin", + "li_peid", + "lk_nic", + "lt_ak", + "lu_nif", + "lv_pk", + "mo_bir", + "mt_nic", + "mv_tin", + "mx_rfc", + "my_nric", + "mz_nuit", + "ng_nin", + "nl_bsn", + "no_nin", + "nz_ird", + "pa_ruc", + "pe_dni", + "ph_tin", + "pk_cnic", + "pk_snic", + "pl_pesel", + "pt_nif", + "py_ruc", + "ro_cnp", + "sa_tin", + "se_pin", + "sg_fin", + "sg_nric", + "si_pin", + "sk_dic", + "sv_nit", + "th_lc", + "th_pin", + "tr_tin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + "uy_dni", + "vg_pp", + "za_id", + ], + str, ] """ The ID number type of an individual. diff --git a/stripe/params/v2/core/_event_destination_create_params.py b/stripe/params/v2/core/_event_destination_create_params.py index 6ac47e438..4e3f42040 100644 --- a/stripe/params/v2/core/_event_destination_create_params.py +++ b/stripe/params/v2/core/_event_destination_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -38,7 +38,12 @@ class EventDestinationCreateParams(TypedDict): """ include: NotRequired[ List[ - Literal["webhook_endpoint.signing_secret", "webhook_endpoint.url"] + Union[ + Literal[ + "webhook_endpoint.signing_secret", "webhook_endpoint.url" + ], + str, + ] ] ] """ @@ -56,7 +61,10 @@ class EventDestinationCreateParams(TypedDict): """ If using the snapshot event payload, the API version events are rendered as. """ - type: Literal["amazon_eventbridge", "azure_event_grid", "webhook_endpoint"] + type: Union[ + Literal["amazon_eventbridge", "azure_event_grid", "webhook_endpoint"], + str, + ] """ Event destination type. """ diff --git a/stripe/params/v2/core/accounts/_person_create_params.py b/stripe/params/v2/core/accounts/_person_create_params.py index bf1ed5f53..f0aadc02f 100644 --- a/stripe/params/v2/core/accounts/_person_create_params.py +++ b/stripe/params/v2/core/accounts/_person_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -47,7 +47,7 @@ class PersonCreateParams(TypedDict): """ The identification numbers (e.g., SSN) associated with the person. """ - legal_gender: NotRequired[Literal["female", "male"]] + legal_gender: NotRequired["Literal['female', 'male']|str"] """ The person's gender (International regulations require either "male" or "female"). """ @@ -67,7 +67,7 @@ class PersonCreateParams(TypedDict): """ The phone number for this person. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ The person's political exposure. """ @@ -318,104 +318,107 @@ class PersonCreateParamsDocumentsVisa(TypedDict): class PersonCreateParamsIdNumber(TypedDict): - type: Literal[ - "ae_eid", - "ao_nif", - "ar_cuil", - "ar_dni", - "at_stn", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "be_nrn", - "bg_ucn", - "bm_pp", - "bn_nric", - "bo_ci", - "br_cpf", - "bt_cid", - "ca_sin", - "ch_oasi", - "cl_rut", - "cn_pp", - "co_nuip", - "cr_ci", - "cr_cpf", - "cr_dimex", - "cr_nite", - "cy_tic", - "cz_rc", - "de_stn", - "dk_cpr", - "do_cie", - "do_rcn", - "ec_ci", - "ee_ik", - "eg_tin", - "es_nif", - "fi_hetu", - "fr_nir", - "gb_nino", - "gh_pin", - "gr_afm", - "gt_nit", - "gy_tin", - "hk_id", - "hn_rtn", - "hr_oib", - "hu_ad", - "id_nik", - "ie_ppsn", - "is_kt", - "it_cf", - "jm_trn", - "jo_pin", - "jp_inc", - "ke_pin", - "ky_pp", - "kz_iin", - "li_peid", - "lk_nic", - "lt_ak", - "lu_nif", - "lv_pk", - "mo_bir", - "mt_nic", - "mv_tin", - "mx_rfc", - "my_nric", - "mz_nuit", - "ng_nin", - "nl_bsn", - "no_nin", - "nz_ird", - "pa_ruc", - "pe_dni", - "ph_tin", - "pk_cnic", - "pk_snic", - "pl_pesel", - "pt_nif", - "py_ruc", - "ro_cnp", - "sa_tin", - "se_pin", - "sg_fin", - "sg_nric", - "si_pin", - "sk_dic", - "sv_nit", - "th_lc", - "th_pin", - "tr_tin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - "uy_dni", - "vg_pp", - "za_id", + type: Union[ + Literal[ + "ae_eid", + "ao_nif", + "ar_cuil", + "ar_dni", + "at_stn", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "be_nrn", + "bg_ucn", + "bm_pp", + "bn_nric", + "bo_ci", + "br_cpf", + "bt_cid", + "ca_sin", + "ch_oasi", + "cl_rut", + "cn_pp", + "co_nuip", + "cr_ci", + "cr_cpf", + "cr_dimex", + "cr_nite", + "cy_tic", + "cz_rc", + "de_stn", + "dk_cpr", + "do_cie", + "do_rcn", + "ec_ci", + "ee_ik", + "eg_tin", + "es_nif", + "fi_hetu", + "fr_nir", + "gb_nino", + "gh_pin", + "gr_afm", + "gt_nit", + "gy_tin", + "hk_id", + "hn_rtn", + "hr_oib", + "hu_ad", + "id_nik", + "ie_ppsn", + "is_kt", + "it_cf", + "jm_trn", + "jo_pin", + "jp_inc", + "ke_pin", + "ky_pp", + "kz_iin", + "li_peid", + "lk_nic", + "lt_ak", + "lu_nif", + "lv_pk", + "mo_bir", + "mt_nic", + "mv_tin", + "mx_rfc", + "my_nric", + "mz_nuit", + "ng_nin", + "nl_bsn", + "no_nin", + "nz_ird", + "pa_ruc", + "pe_dni", + "ph_tin", + "pk_cnic", + "pk_snic", + "pl_pesel", + "pt_nif", + "py_ruc", + "ro_cnp", + "sa_tin", + "se_pin", + "sg_fin", + "sg_nric", + "si_pin", + "sk_dic", + "sv_nit", + "th_lc", + "th_pin", + "tr_tin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + "uy_dni", + "vg_pp", + "za_id", + ], + str, ] """ The ID number type of an individual. diff --git a/stripe/params/v2/core/accounts/_person_token_create_params.py b/stripe/params/v2/core/accounts/_person_token_create_params.py index dacea3bf7..4f9e18c42 100644 --- a/stripe/params/v2/core/accounts/_person_token_create_params.py +++ b/stripe/params/v2/core/accounts/_person_token_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List, Optional +from typing import Dict, List, Optional, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -49,7 +49,7 @@ class PersonTokenCreateParams(TypedDict): """ The identification numbers (e.g., SSN) associated with the person. """ - legal_gender: NotRequired[Literal["female", "male"]] + legal_gender: NotRequired["Literal['female', 'male']|str"] """ The person's gender (International regulations require either "male" or "female"). """ @@ -67,7 +67,7 @@ class PersonTokenCreateParams(TypedDict): """ The phone number for this person. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ The person's political exposure. """ @@ -316,104 +316,107 @@ class PersonTokenCreateParamsDocumentsVisa(TypedDict): class PersonTokenCreateParamsIdNumber(TypedDict): - type: Literal[ - "ae_eid", - "ao_nif", - "ar_cuil", - "ar_dni", - "at_stn", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "be_nrn", - "bg_ucn", - "bm_pp", - "bn_nric", - "bo_ci", - "br_cpf", - "bt_cid", - "ca_sin", - "ch_oasi", - "cl_rut", - "cn_pp", - "co_nuip", - "cr_ci", - "cr_cpf", - "cr_dimex", - "cr_nite", - "cy_tic", - "cz_rc", - "de_stn", - "dk_cpr", - "do_cie", - "do_rcn", - "ec_ci", - "ee_ik", - "eg_tin", - "es_nif", - "fi_hetu", - "fr_nir", - "gb_nino", - "gh_pin", - "gr_afm", - "gt_nit", - "gy_tin", - "hk_id", - "hn_rtn", - "hr_oib", - "hu_ad", - "id_nik", - "ie_ppsn", - "is_kt", - "it_cf", - "jm_trn", - "jo_pin", - "jp_inc", - "ke_pin", - "ky_pp", - "kz_iin", - "li_peid", - "lk_nic", - "lt_ak", - "lu_nif", - "lv_pk", - "mo_bir", - "mt_nic", - "mv_tin", - "mx_rfc", - "my_nric", - "mz_nuit", - "ng_nin", - "nl_bsn", - "no_nin", - "nz_ird", - "pa_ruc", - "pe_dni", - "ph_tin", - "pk_cnic", - "pk_snic", - "pl_pesel", - "pt_nif", - "py_ruc", - "ro_cnp", - "sa_tin", - "se_pin", - "sg_fin", - "sg_nric", - "si_pin", - "sk_dic", - "sv_nit", - "th_lc", - "th_pin", - "tr_tin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - "uy_dni", - "vg_pp", - "za_id", + type: Union[ + Literal[ + "ae_eid", + "ao_nif", + "ar_cuil", + "ar_dni", + "at_stn", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "be_nrn", + "bg_ucn", + "bm_pp", + "bn_nric", + "bo_ci", + "br_cpf", + "bt_cid", + "ca_sin", + "ch_oasi", + "cl_rut", + "cn_pp", + "co_nuip", + "cr_ci", + "cr_cpf", + "cr_dimex", + "cr_nite", + "cy_tic", + "cz_rc", + "de_stn", + "dk_cpr", + "do_cie", + "do_rcn", + "ec_ci", + "ee_ik", + "eg_tin", + "es_nif", + "fi_hetu", + "fr_nir", + "gb_nino", + "gh_pin", + "gr_afm", + "gt_nit", + "gy_tin", + "hk_id", + "hn_rtn", + "hr_oib", + "hu_ad", + "id_nik", + "ie_ppsn", + "is_kt", + "it_cf", + "jm_trn", + "jo_pin", + "jp_inc", + "ke_pin", + "ky_pp", + "kz_iin", + "li_peid", + "lk_nic", + "lt_ak", + "lu_nif", + "lv_pk", + "mo_bir", + "mt_nic", + "mv_tin", + "mx_rfc", + "my_nric", + "mz_nuit", + "ng_nin", + "nl_bsn", + "no_nin", + "nz_ird", + "pa_ruc", + "pe_dni", + "ph_tin", + "pk_cnic", + "pk_snic", + "pl_pesel", + "pt_nif", + "py_ruc", + "ro_cnp", + "sa_tin", + "se_pin", + "sg_fin", + "sg_nric", + "si_pin", + "sk_dic", + "sv_nit", + "th_lc", + "th_pin", + "tr_tin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + "uy_dni", + "vg_pp", + "za_id", + ], + str, ] """ The ID number type of an individual. diff --git a/stripe/params/v2/core/accounts/_person_update_params.py b/stripe/params/v2/core/accounts/_person_update_params.py index 449f13426..60ac97414 100644 --- a/stripe/params/v2/core/accounts/_person_update_params.py +++ b/stripe/params/v2/core/accounts/_person_update_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List, Optional +from typing import Dict, List, Optional, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -47,7 +47,7 @@ class PersonUpdateParams(TypedDict): """ The identification numbers (e.g., SSN) associated with the person. """ - legal_gender: NotRequired[Literal["female", "male"]] + legal_gender: NotRequired["Literal['female', 'male']|str"] """ The person's gender (International regulations require either "male" or "female"). """ @@ -69,7 +69,7 @@ class PersonUpdateParams(TypedDict): """ The phone number for this person. """ - political_exposure: NotRequired[Literal["existing", "none"]] + political_exposure: NotRequired["Literal['existing', 'none']|str"] """ The person's political exposure. """ @@ -320,104 +320,107 @@ class PersonUpdateParamsDocumentsVisa(TypedDict): class PersonUpdateParamsIdNumber(TypedDict): - type: Literal[ - "ae_eid", - "ao_nif", - "ar_cuil", - "ar_dni", - "at_stn", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "be_nrn", - "bg_ucn", - "bm_pp", - "bn_nric", - "bo_ci", - "br_cpf", - "bt_cid", - "ca_sin", - "ch_oasi", - "cl_rut", - "cn_pp", - "co_nuip", - "cr_ci", - "cr_cpf", - "cr_dimex", - "cr_nite", - "cy_tic", - "cz_rc", - "de_stn", - "dk_cpr", - "do_cie", - "do_rcn", - "ec_ci", - "ee_ik", - "eg_tin", - "es_nif", - "fi_hetu", - "fr_nir", - "gb_nino", - "gh_pin", - "gr_afm", - "gt_nit", - "gy_tin", - "hk_id", - "hn_rtn", - "hr_oib", - "hu_ad", - "id_nik", - "ie_ppsn", - "is_kt", - "it_cf", - "jm_trn", - "jo_pin", - "jp_inc", - "ke_pin", - "ky_pp", - "kz_iin", - "li_peid", - "lk_nic", - "lt_ak", - "lu_nif", - "lv_pk", - "mo_bir", - "mt_nic", - "mv_tin", - "mx_rfc", - "my_nric", - "mz_nuit", - "ng_nin", - "nl_bsn", - "no_nin", - "nz_ird", - "pa_ruc", - "pe_dni", - "ph_tin", - "pk_cnic", - "pk_snic", - "pl_pesel", - "pt_nif", - "py_ruc", - "ro_cnp", - "sa_tin", - "se_pin", - "sg_fin", - "sg_nric", - "si_pin", - "sk_dic", - "sv_nit", - "th_lc", - "th_pin", - "tr_tin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - "uy_dni", - "vg_pp", - "za_id", + type: Union[ + Literal[ + "ae_eid", + "ao_nif", + "ar_cuil", + "ar_dni", + "at_stn", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "be_nrn", + "bg_ucn", + "bm_pp", + "bn_nric", + "bo_ci", + "br_cpf", + "bt_cid", + "ca_sin", + "ch_oasi", + "cl_rut", + "cn_pp", + "co_nuip", + "cr_ci", + "cr_cpf", + "cr_dimex", + "cr_nite", + "cy_tic", + "cz_rc", + "de_stn", + "dk_cpr", + "do_cie", + "do_rcn", + "ec_ci", + "ee_ik", + "eg_tin", + "es_nif", + "fi_hetu", + "fr_nir", + "gb_nino", + "gh_pin", + "gr_afm", + "gt_nit", + "gy_tin", + "hk_id", + "hn_rtn", + "hr_oib", + "hu_ad", + "id_nik", + "ie_ppsn", + "is_kt", + "it_cf", + "jm_trn", + "jo_pin", + "jp_inc", + "ke_pin", + "ky_pp", + "kz_iin", + "li_peid", + "lk_nic", + "lt_ak", + "lu_nif", + "lv_pk", + "mo_bir", + "mt_nic", + "mv_tin", + "mx_rfc", + "my_nric", + "mz_nuit", + "ng_nin", + "nl_bsn", + "no_nin", + "nz_ird", + "pa_ruc", + "pe_dni", + "ph_tin", + "pk_cnic", + "pk_snic", + "pl_pesel", + "pt_nif", + "py_ruc", + "ro_cnp", + "sa_tin", + "se_pin", + "sg_fin", + "sg_nric", + "si_pin", + "sk_dic", + "sv_nit", + "th_lc", + "th_pin", + "tr_tin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + "uy_dni", + "vg_pp", + "za_id", + ], + str, ] """ The ID number type of an individual. diff --git a/stripe/params/v2/core/health/_alert_list_params.py b/stripe/params/v2/core/health/_alert_list_params.py index 4467ef131..ac0cf2918 100644 --- a/stripe/params/v2/core/health/_alert_list_params.py +++ b/stripe/params/v2/core/health/_alert_list_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -29,32 +29,35 @@ class AlertListParams(TypedDict): """ The page limit. """ - severity: NotRequired[Literal["critical", "non_critical"]] + severity: NotRequired["Literal['critical', 'non_critical']|str"] """ Filter by alert severity. """ - status: NotRequired[Literal["open", "resolved"]] + status: NotRequired["Literal['open', 'resolved']|str"] """ Filter by alert status. """ types: NotRequired[ List[ - Literal[ - "api_error", - "api_latency", - "authorization_rate_drop", - "elements_error", - "event_generation_failure", - "fraud_rate", - "invoice_count_dropped", - "issuing_authorization_request_errors", - "issuing_authorization_request_timeout", - "meter_event_summaries_delayed", - "metronome_notification_latency", - "payment_method_error", - "sepa_debit_delayed", - "traffic_volume_drop", - "webhook_latency", + Union[ + Literal[ + "api_error", + "api_latency", + "authorization_rate_drop", + "elements_error", + "event_generation_failure", + "fraud_rate", + "invoice_count_dropped", + "issuing_authorization_request_errors", + "issuing_authorization_request_timeout", + "meter_event_summaries_delayed", + "metronome_notification_latency", + "payment_method_error", + "sepa_debit_delayed", + "traffic_volume_drop", + "webhook_latency", + ], + str, ] ] ] diff --git a/stripe/params/v2/data/analytics/_metric_query_create_params.py b/stripe/params/v2/data/analytics/_metric_query_create_params.py index 9152c2473..823d53bed 100644 --- a/stripe/params/v2/data/analytics/_metric_query_create_params.py +++ b/stripe/params/v2/data/analytics/_metric_query_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Any, Dict, List +from typing import Any, Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -18,7 +18,7 @@ class MetricQueryCreateParams(TypedDict): """ Which dimension values to filter on; keys are dimension names, values are arrays of dimension values to filter on. """ - granularity: Literal["day", "month", "week", "year"] + granularity: Union[Literal["day", "month", "week", "year"], str] """ The time granularity to aggregate results by. """ diff --git a/stripe/params/v2/extend/_workflow_list_params.py b/stripe/params/v2/extend/_workflow_list_params.py index 2bfaad998..3b05a7259 100644 --- a/stripe/params/v2/extend/_workflow_list_params.py +++ b/stripe/params/v2/extend/_workflow_list_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -10,7 +10,7 @@ class WorkflowListParams(TypedDict): Restrict page size to no more than this number. """ status: NotRequired[ - List[Literal["active", "archived", "draft", "inactive"]] + List[Union[Literal["active", "archived", "draft", "inactive"], str]] ] """ When retrieving Workflows, include only those with the specified status values. diff --git a/stripe/params/v2/extend/_workflow_run_list_params.py b/stripe/params/v2/extend/_workflow_run_list_params.py index 61a6afd17..f42b89511 100644 --- a/stripe/params/v2/extend/_workflow_run_list_params.py +++ b/stripe/params/v2/extend/_workflow_run_list_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -9,7 +9,9 @@ class WorkflowRunListParams(TypedDict): """ Restrict page size to no more than this number. """ - status: NotRequired[List[Literal["failed", "started", "succeeded"]]] + status: NotRequired[ + List[Union[Literal["failed", "started", "succeeded"], str]] + ] """ When retrieving Workflow Runs, include only those with the specified status values. If not specified, all Runs are returned. """ diff --git a/stripe/params/v2/iam/_activity_log_list_params.py b/stripe/params/v2/iam/_activity_log_list_params.py index 92128a2ea..5c0f39a72 100644 --- a/stripe/params/v2/iam/_activity_log_list_params.py +++ b/stripe/params/v2/iam/_activity_log_list_params.py @@ -1,28 +1,31 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class ActivityLogListParams(TypedDict): action_groups: NotRequired[ - List[Literal["api_key", "user_invite", "user_roles"]] + List[Union[Literal["api_key", "user_invite", "user_roles"], str]] ] """ Filter results to only include activity logs for the specified action group types. """ actions: NotRequired[ List[ - Literal[ - "api_key_created", - "api_key_deleted", - "api_key_updated", - "api_key_viewed", - "user_invite_accepted", - "user_invite_created", - "user_invite_deleted", - "user_roles_deleted", - "user_roles_updated", + Union[ + Literal[ + "api_key_created", + "api_key_deleted", + "api_key_updated", + "api_key_viewed", + "user_invite_accepted", + "user_invite_created", + "user_invite_deleted", + "user_roles_deleted", + "user_roles_updated", + ], + str, ] ] ] diff --git a/stripe/params/v2/iam/_api_key_create_params.py b/stripe/params/v2/iam/_api_key_create_params.py index 08cd27aab..0379cd851 100644 --- a/stripe/params/v2/iam/_api_key_create_params.py +++ b/stripe/params/v2/iam/_api_key_create_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -32,7 +32,7 @@ class ApiKeyCreateParams(TypedDict): A public key is required when creating secret keys. Publishable keys are not encrypted and a public key should not be included. """ - type: Literal["publishable_key", "secret_key"] + type: Union[Literal["publishable_key", "secret_key"], str] """ Type of the API key to create (secret or publishable). """ diff --git a/stripe/params/v2/money_management/_debit_dispute_create_params.py b/stripe/params/v2/money_management/_debit_dispute_create_params.py index e8e5954b1..b9f6f5a85 100644 --- a/stripe/params/v2/money_management/_debit_dispute_create_params.py +++ b/stripe/params/v2/money_management/_debit_dispute_create_params.py @@ -15,7 +15,9 @@ class DebitDisputeCreateParams(TypedDict): class DebitDisputeCreateParamsBankTransfer(TypedDict): - reason: NotRequired[Literal["incorrect_amount_or_date", "unauthorized"]] + reason: NotRequired[ + "Literal['incorrect_amount_or_date', 'unauthorized']|str" + ] """ The reason for the dispute. """ diff --git a/stripe/params/v2/money_management/_debit_dispute_list_params.py b/stripe/params/v2/money_management/_debit_dispute_list_params.py index 971797ddc..83fafa761 100644 --- a/stripe/params/v2/money_management/_debit_dispute_list_params.py +++ b/stripe/params/v2/money_management/_debit_dispute_list_params.py @@ -12,7 +12,7 @@ class DebitDisputeListParams(TypedDict): """ The page limit. """ - status: NotRequired[Literal["failed", "submitted", "succeeded"]] + status: NotRequired["Literal['failed', 'submitted', 'succeeded']|str"] """ Filter by status. """ diff --git a/stripe/params/v2/money_management/_financial_account_create_params.py b/stripe/params/v2/money_management/_financial_account_create_params.py index 718848dfa..122f2aec0 100644 --- a/stripe/params/v2/money_management/_financial_account_create_params.py +++ b/stripe/params/v2/money_management/_financial_account_create_params.py @@ -25,7 +25,7 @@ class FinancialAccountCreateParams(TypedDict): class FinancialAccountCreateParamsStorage(TypedDict): - funds_usage_type: NotRequired[Literal["business", "consumer"]] + funds_usage_type: NotRequired["Literal['business', 'consumer']|str"] """ The usage type for funds in this FinancialAccount. Can be used to specify that the funds are for Consumer activity. """ diff --git a/stripe/params/v2/money_management/_financial_account_list_params.py b/stripe/params/v2/money_management/_financial_account_list_params.py index ece645ae6..5c73d400b 100644 --- a/stripe/params/v2/money_management/_financial_account_list_params.py +++ b/stripe/params/v2/money_management/_financial_account_list_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -19,12 +19,15 @@ class FinancialAccountListParams(TypedDict): """ types: NotRequired[ List[ - Literal[ - "accrued_fees", - "credit", - "multiprocessor_settlement", - "payments", - "storage", + Union[ + Literal[ + "accrued_fees", + "credit", + "multiprocessor_settlement", + "payments", + "storage", + ], + str, ] ] ] diff --git a/stripe/params/v2/money_management/_financial_address_create_params.py b/stripe/params/v2/money_management/_financial_address_create_params.py index 6af0723a7..1d976a7ed 100644 --- a/stripe/params/v2/money_management/_financial_address_create_params.py +++ b/stripe/params/v2/money_management/_financial_address_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from typing import Union from typing_extensions import Literal, NotRequired, TypedDict @@ -24,13 +25,16 @@ class FinancialAddressCreateParams(TypedDict): """ Open Enum. The currency the FinancialAddress settles into the FinancialAccount. Currently, only the `usd`, `gbp` and `usdc` values are supported. """ - type: Literal[ - "ca_bank_account", - "crypto_wallet", - "gb_bank_account", - "mx_bank_account", - "sepa_bank_account", - "us_bank_account", + type: Union[ + Literal[ + "ca_bank_account", + "crypto_wallet", + "gb_bank_account", + "mx_bank_account", + "sepa_bank_account", + "us_bank_account", + ], + str, ] """ The type of FinancialAddress details to provision. @@ -38,16 +42,19 @@ class FinancialAddressCreateParams(TypedDict): class FinancialAddressCreateParamsCryptoProperties(TypedDict): - network: Literal[ - "arbitrum", - "avalanche_c_chain", - "base", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "tempo", + network: Union[ + Literal[ + "arbitrum", + "avalanche_c_chain", + "base", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "tempo", + ], + str, ] """ The blockchain network of the crypto wallet. diff --git a/stripe/params/v2/money_management/_financial_address_list_params.py b/stripe/params/v2/money_management/_financial_address_list_params.py index 478acda0d..cf7737b0d 100644 --- a/stripe/params/v2/money_management/_financial_address_list_params.py +++ b/stripe/params/v2/money_management/_financial_address_list_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -11,11 +11,14 @@ class FinancialAddressListParams(TypedDict): """ include: NotRequired[ List[ - Literal[ - "credentials.ca_bank_account.account_number", - "credentials.gb_bank_account.account_number", - "credentials.sepa_bank_account.iban", - "credentials.us_bank_account.account_number", + Union[ + Literal[ + "credentials.ca_bank_account.account_number", + "credentials.gb_bank_account.account_number", + "credentials.sepa_bank_account.iban", + "credentials.us_bank_account.account_number", + ], + str, ] ] ] diff --git a/stripe/params/v2/money_management/_financial_address_retrieve_params.py b/stripe/params/v2/money_management/_financial_address_retrieve_params.py index 2f8d7ec5d..86fd9a9e5 100644 --- a/stripe/params/v2/money_management/_financial_address_retrieve_params.py +++ b/stripe/params/v2/money_management/_financial_address_retrieve_params.py @@ -1,17 +1,20 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict class FinancialAddressRetrieveParams(TypedDict): include: NotRequired[ List[ - Literal[ - "credentials.ca_bank_account.account_number", - "credentials.gb_bank_account.account_number", - "credentials.sepa_bank_account.iban", - "credentials.us_bank_account.account_number", + Union[ + Literal[ + "credentials.ca_bank_account.account_number", + "credentials.gb_bank_account.account_number", + "credentials.sepa_bank_account.iban", + "credentials.us_bank_account.account_number", + ], + str, ] ] ] diff --git a/stripe/params/v2/money_management/_outbound_payment_create_params.py b/stripe/params/v2/money_management/_outbound_payment_create_params.py index e222cf35e..1259ace88 100644 --- a/stripe/params/v2/money_management/_outbound_payment_create_params.py +++ b/stripe/params/v2/money_management/_outbound_payment_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject from stripe.v2._amount import AmountParam -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict _OutboundPaymentCreateParamsBase = TypedDict( @@ -61,7 +61,7 @@ class OutboundPaymentCreateParams(_OutboundPaymentCreateParamsBase): class OutboundPaymentCreateParamsDeliveryOptions(TypedDict): - bank_account: NotRequired[Literal["automatic", "local", "wire"]] + bank_account: NotRequired["Literal['automatic', 'local', 'wire']|str"] """ Open Enum. Method for bank account. """ @@ -71,7 +71,9 @@ class OutboundPaymentCreateParamsDeliveryOptions(TypedDict): """ Delivery options for paper check. """ - speed: NotRequired[Literal["instant", "next_business_day", "standard"]] + speed: NotRequired[ + "Literal['instant', 'next_business_day', 'standard']|str" + ] """ Open Enum. Speed of the payout. """ @@ -86,7 +88,7 @@ class OutboundPaymentCreateParamsDeliveryOptionsPaperCheck(TypedDict): """ Memo printed on the memo field of the check. """ - shipping_speed: NotRequired[Literal["priority", "standard"]] + shipping_speed: NotRequired["Literal['priority', 'standard']|str"] """ Open Enum. Shipping speed of the paper check. Defaults to standard. """ @@ -159,17 +161,20 @@ class OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccount(TypedDict): Per-network configuration options. """ preferred_networks: List[ - Literal[ - "ach", - "becs", - "eft", - "fedwire", - "fps", - "npp", - "rtp", - "sepa_credit", - "sepa_instant", - "swift", + Union[ + Literal[ + "ach", + "becs", + "eft", + "fedwire", + "fps", + "npp", + "rtp", + "sepa_credit", + "sepa_instant", + "swift", + ], + str, ] ] """ @@ -191,7 +196,7 @@ class OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetwor class OutboundPaymentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch( TypedDict, ): - submission: NotRequired[Literal["next_day", "same_day"]] + submission: NotRequired["Literal['next_day', 'same_day']|str"] """ Open Enum. ACH submission timing. """ diff --git a/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py b/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py index ca920f463..c225923c1 100644 --- a/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py +++ b/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py @@ -27,11 +27,13 @@ class OutboundPaymentQuoteCreateParams(_OutboundPaymentQuoteCreateParamsBase): class OutboundPaymentQuoteCreateParamsDeliveryOptions(TypedDict): - bank_account: NotRequired[Literal["automatic", "local", "wire"]] + bank_account: NotRequired["Literal['automatic', 'local', 'wire']|str"] """ Open Enum. Method for bank account. """ - speed: NotRequired[Literal["instant", "next_business_day", "standard"]] + speed: NotRequired[ + "Literal['instant', 'next_business_day', 'standard']|str" + ] """ Open Enum. Speed of the payout. """ diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py index b809adc74..05f8a925e 100644 --- a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py +++ b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from typing import Union from typing_extensions import Literal, NotRequired, TypedDict @@ -40,11 +41,14 @@ class OutboundSetupIntentCreateParamsPayoutMethodData(TypedDict): """ The type specific details of the crypto wallet payout method. """ - type: Literal[ - "bank_account", - "card", - "crypto_wallet", - "network_business_profile_wallet", + type: Union[ + Literal[ + "bank_account", + "card", + "crypto_wallet", + "network_business_profile_wallet", + ], + str, ] """ Closed Enum. The type of payout method to be created. @@ -112,16 +116,19 @@ class OutboundSetupIntentCreateParamsPayoutMethodDataCryptoWallet(TypedDict): """ Optional field, required if network supports memos (only "stellar" currently). """ - network: Literal[ - "arbitrum", - "avalanche_c_chain", - "base", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "tempo", + network: Union[ + Literal[ + "arbitrum", + "avalanche_c_chain", + "base", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "tempo", + ], + str, ] """ Which rail we should use to make an Outbound money movement to this wallet. diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py index 3dbcc9a10..14e8425e6 100644 --- a/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py +++ b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from typing import Union from typing_extensions import Literal, NotRequired, TypedDict @@ -29,11 +30,14 @@ class OutboundSetupIntentUpdateParamsPayoutMethodData(TypedDict): """ The type specific details of the card payout method. """ - type: Literal[ - "bank_account", - "card", - "crypto_wallet", - "network_business_profile_wallet", + type: Union[ + Literal[ + "bank_account", + "card", + "crypto_wallet", + "network_business_profile_wallet", + ], + str, ] """ Closed Enum. The type of payout method to be created/updated. diff --git a/stripe/params/v2/money_management/_outbound_transfer_create_params.py b/stripe/params/v2/money_management/_outbound_transfer_create_params.py index fb83b8c8e..7ac99060c 100644 --- a/stripe/params/v2/money_management/_outbound_transfer_create_params.py +++ b/stripe/params/v2/money_management/_outbound_transfer_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject from stripe.v2._amount import AmountParam -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict _OutboundTransferCreateParamsBase = TypedDict( @@ -45,7 +45,7 @@ class OutboundTransferCreateParams(_OutboundTransferCreateParamsBase): class OutboundTransferCreateParamsDeliveryOptions(TypedDict): - bank_account: NotRequired[Literal["automatic", "local", "wire"]] + bank_account: NotRequired["Literal['automatic', 'local', 'wire']|str"] """ Open Enum. Method for bank account. """ @@ -96,17 +96,20 @@ class OutboundTransferCreateParamsToPayoutMethodOptions(TypedDict): class OutboundTransferCreateParamsToPayoutMethodOptionsBankAccount(TypedDict): preferred_networks: List[ - Literal[ - "ach", - "becs", - "eft", - "fedwire", - "fps", - "npp", - "rtp", - "sepa_credit", - "sepa_instant", - "swift", + Union[ + Literal[ + "ach", + "becs", + "eft", + "fedwire", + "fps", + "npp", + "rtp", + "sepa_credit", + "sepa_instant", + "swift", + ], + str, ] ] """ diff --git a/stripe/params/v2/money_management/_payout_intent_create_params.py b/stripe/params/v2/money_management/_payout_intent_create_params.py index ab0a58950..bb68c9490 100644 --- a/stripe/params/v2/money_management/_payout_intent_create_params.py +++ b/stripe/params/v2/money_management/_payout_intent_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject from stripe.v2._amount import AmountParam -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict _PayoutIntentCreateParamsBase = TypedDict( @@ -108,17 +108,20 @@ class PayoutIntentCreateParamsToPayoutMethodOptionsBankAccount(TypedDict): Per-network configuration options. """ preferred_networks: List[ - Literal[ - "ach", - "becs", - "eft", - "fedwire", - "fps", - "npp", - "rtp", - "sepa_credit", - "sepa_instant", - "swift", + Union[ + Literal[ + "ach", + "becs", + "eft", + "fedwire", + "fps", + "npp", + "rtp", + "sepa_credit", + "sepa_instant", + "swift", + ], + str, ] ] """ @@ -140,7 +143,7 @@ class PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOp class PayoutIntentCreateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch( TypedDict, ): - submission: NotRequired[Literal["next_day", "same_day"]] + submission: NotRequired["Literal['next_day', 'same_day']|str"] """ Open Enum. ACH submission timing. """ diff --git a/stripe/params/v2/money_management/_payout_intent_update_params.py b/stripe/params/v2/money_management/_payout_intent_update_params.py index a8ebf1705..43475e8cc 100644 --- a/stripe/params/v2/money_management/_payout_intent_update_params.py +++ b/stripe/params/v2/money_management/_payout_intent_update_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject from stripe.v2._amount import AmountParam -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict _PayoutIntentUpdateParamsBase = TypedDict( @@ -108,17 +108,20 @@ class PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccount(TypedDict): Per-network configuration options. """ preferred_networks: List[ - Literal[ - "ach", - "becs", - "eft", - "fedwire", - "fps", - "npp", - "rtp", - "sepa_credit", - "sepa_instant", - "swift", + Union[ + Literal[ + "ach", + "becs", + "eft", + "fedwire", + "fps", + "npp", + "rtp", + "sepa_credit", + "sepa_instant", + "swift", + ], + str, ] ] """ @@ -140,7 +143,7 @@ class PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOp class PayoutIntentUpdateParamsToPayoutMethodOptionsBankAccountPreferredNetworkOptionsAch( TypedDict, ): - submission: NotRequired[Literal["next_day", "same_day"]] + submission: NotRequired["Literal['next_day', 'same_day']|str"] """ Open Enum. ACH submission timing. """ diff --git a/stripe/params/v2/payments/_off_session_payment_create_params.py b/stripe/params/v2/payments/_off_session_payment_create_params.py index 64be5381f..7673e477d 100644 --- a/stripe/params/v2/payments/_off_session_payment_create_params.py +++ b/stripe/params/v2/payments/_off_session_payment_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject from stripe.v2._amount import AmountParam -from typing import Dict, List +from typing import Dict, List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -20,7 +20,7 @@ class OffSessionPaymentCreateParams(TypedDict): The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. """ - cadence: Literal["recurring", "unscheduled"] + cadence: Union[Literal["recurring", "unscheduled"], str] """ The frequency of the underlying payment. """ @@ -189,7 +189,7 @@ class OffSessionPaymentCreateParamsAmountDetailsTax(TypedDict): class OffSessionPaymentCreateParamsCapture(TypedDict): - capture_method: Literal["automatic", "manual"] + capture_method: Union[Literal["automatic", "manual"], str] """ The method to use to capture the payment. """ @@ -328,7 +328,7 @@ class OffSessionPaymentCreateParamsRetryDetails(TypedDict): """ The pre-configured retry policy to use for the payment. """ - retry_strategy: NotRequired[Literal["best_available", "none"]] + retry_strategy: NotRequired["Literal['best_available', 'none']|str"] """ Indicates the strategy for how you want Stripe to retry the payment. """ diff --git a/stripe/params/v2/payments/_settlement_allocation_intent_list_params.py b/stripe/params/v2/payments/_settlement_allocation_intent_list_params.py index 473120952..0818f9209 100644 --- a/stripe/params/v2/payments/_settlement_allocation_intent_list_params.py +++ b/stripe/params/v2/payments/_settlement_allocation_intent_list_params.py @@ -33,9 +33,7 @@ class SettlementAllocationIntentListParams(TypedDict): The page size. """ status: NotRequired[ - Literal[ - "canceled", "errored", "matched", "pending", "settled", "submitted" - ] + "Literal['canceled', 'errored', 'matched', 'pending', 'settled', 'submitted']|str" ] """ Filter the SettlementAllocationIntents by status. diff --git a/stripe/params/v2/payments/settlement_allocation_intents/_split_create_params.py b/stripe/params/v2/payments/settlement_allocation_intents/_split_create_params.py index c42bd4926..956deb5a6 100644 --- a/stripe/params/v2/payments/settlement_allocation_intents/_split_create_params.py +++ b/stripe/params/v2/payments/settlement_allocation_intents/_split_create_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject from stripe.v2._amount import AmountParam -from typing import Dict +from typing import Dict, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -19,7 +19,7 @@ class SplitCreateParams(TypedDict): """ Metadata associated with the SettlementAllocationIntentSplit. """ - type: Literal["credit", "debit"] + type: Union[Literal["credit", "debit"], str] """ The type of the fund transfer. """ diff --git a/stripe/params/v2/payments/settlement_allocation_intents/_split_list_params.py b/stripe/params/v2/payments/settlement_allocation_intents/_split_list_params.py index ed9918c0c..800f1b61f 100644 --- a/stripe/params/v2/payments/settlement_allocation_intents/_split_list_params.py +++ b/stripe/params/v2/payments/settlement_allocation_intents/_split_list_params.py @@ -8,7 +8,7 @@ class SplitListParams(TypedDict): """ The page size. """ - status: NotRequired[Literal["canceled", "pending", "settled"]] + status: NotRequired["Literal['canceled', 'pending', 'settled']|str"] """ Filter the SettlementAllocationIntentSplits by status. """ diff --git a/stripe/params/v2/signals/_account_signal_list_params.py b/stripe/params/v2/signals/_account_signal_list_params.py index 1b3be95fa..35d441617 100644 --- a/stripe/params/v2/signals/_account_signal_list_params.py +++ b/stripe/params/v2/signals/_account_signal_list_params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from typing import List +from typing import List, Union from typing_extensions import Literal, NotRequired, TypedDict @@ -14,7 +14,9 @@ class AccountSignalListParams(TypedDict): """ Maximum number of results to return per page. Defaults to 20. """ - type: List[Literal["fraudulent_merchant", "merchant_delinquency"]] + type: List[ + Union[Literal["fraudulent_merchant", "merchant_delinquency"], str] + ] """ Signal types to filter by. """ diff --git a/stripe/params/v2/test_helpers/_financial_address_credit_params.py b/stripe/params/v2/test_helpers/_financial_address_credit_params.py index e45e8d5e8..c60b165f7 100644 --- a/stripe/params/v2/test_helpers/_financial_address_credit_params.py +++ b/stripe/params/v2/test_helpers/_financial_address_credit_params.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe.v2._amount import AmountParam +from typing import Union from typing_extensions import Literal, NotRequired, TypedDict @@ -9,8 +10,17 @@ class FinancialAddressCreditParams(TypedDict): """ Object containing the amount value and currency to credit. """ - network: Literal[ - "ach", "acss", "chaps", "fps", "rtp", "sepa_credit_transfer", "wire" + network: Union[ + Literal[ + "ach", + "acss", + "chaps", + "fps", + "rtp", + "sepa_credit_transfer", + "wire", + ], + str, ] """ Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit. diff --git a/stripe/privacy/_redaction_job.py b/stripe/privacy/_redaction_job.py index 48a3a1ce5..c3804e7ef 100644 --- a/stripe/privacy/_redaction_job.py +++ b/stripe/privacy/_redaction_job.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -115,20 +115,23 @@ class Objects(StripeObject): """ The objects to redact in this job. """ - status: Literal[ - "canceled", - "canceling", - "created", - "failed", - "ready", - "redacting", - "succeeded", - "validating", + status: Union[ + Literal[ + "canceled", + "canceling", + "created", + "failed", + "ready", + "redacting", + "succeeded", + "validating", + ], + str, ] """ The status of the job. """ - validation_behavior: Optional[Literal["error", "fix"]] + validation_behavior: Optional[Union[Literal["error", "fix"], str]] """ Validation behavior determines how a job validates objects for redaction eligibility. Default is `error`. """ diff --git a/stripe/privacy/_redaction_job_validation_error.py b/stripe/privacy/_redaction_job_validation_error.py index 0c1193e3e..d3b6e20ae 100644 --- a/stripe/privacy/_redaction_job_validation_error.py +++ b/stripe/privacy/_redaction_job_validation_error.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -26,12 +26,15 @@ class ErroringObject(StripeObject): Erroring object type """ - code: Literal[ - "invalid_cascading_source", - "invalid_file_purpose", - "invalid_state", - "locked_by_other_job", - "too_many_objects", + code: Union[ + Literal[ + "invalid_cascading_source", + "invalid_file_purpose", + "invalid_state", + "locked_by_other_job", + "too_many_objects", + ], + str, ] """ A code indicating the reason for the error. diff --git a/stripe/product_catalog/_trial_offer.py b/stripe/product_catalog/_trial_offer.py index f154f5e52..8cecdce5a 100644 --- a/stripe/product_catalog/_trial_offer.py +++ b/stripe/product_catalog/_trial_offer.py @@ -3,7 +3,7 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -34,7 +34,7 @@ class Relative(StripeObject): """ relative: Optional[Relative] - type: Literal["relative", "timestamp"] + type: Union[Literal["relative", "timestamp"], str] """ The type of trial offer duration. """ diff --git a/stripe/radar/_customer_evaluation.py b/stripe/radar/_customer_evaluation.py index 61405fd17..ebd2356a7 100644 --- a/stripe/radar/_customer_evaluation.py +++ b/stripe/radar/_customer_evaluation.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -72,13 +72,16 @@ class AccountSharing(StripeObject): Time at which the signal was evaluated. Measured in seconds since the Unix epoch. """ risk_level: Optional[ - Literal[ - "elevated", - "highest", - "low", - "normal", - "not_assessed", - "unknown", + Union[ + Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ], + str, ] ] """ @@ -95,13 +98,16 @@ class MultiAccounting(StripeObject): Time at which the signal was evaluated. Measured in seconds since the Unix epoch. """ risk_level: Optional[ - Literal[ - "elevated", - "highest", - "low", - "normal", - "not_assessed", - "unknown", + Union[ + Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ], + str, ] ] """ @@ -127,7 +133,7 @@ class MultiAccounting(StripeObject): """ The ID of the Customer to associate with this CustomerEvaluation. """ - event_type: Literal["login", "registration"] + event_type: Union[Literal["login", "registration"], str] """ The type of evaluation event. """ diff --git a/stripe/radar/_issuing_authorization_evaluation.py b/stripe/radar/_issuing_authorization_evaluation.py index bf2e32e83..69a821b99 100644 --- a/stripe/radar/_issuing_authorization_evaluation.py +++ b/stripe/radar/_issuing_authorization_evaluation.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -28,7 +28,10 @@ class AuthorizationDetails(StripeObject): The total amount of the authorization in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). """ authorization_method: Optional[ - Literal["chip", "contactless", "keyed_in", "online", "swipe"] + Union[ + Literal["chip", "contactless", "keyed_in", "online", "swipe"], + str, + ] ] """ How the card details were provided. @@ -38,16 +41,19 @@ class AuthorizationDetails(StripeObject): Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ entry_mode: Optional[ - Literal[ - "contactless", - "contactless_magstripe", - "credential_on_file", - "integrated_circuit_card", - "magstripe", - "magstripe_no_cvv", - "manual", - "other", - "unknown", + Union[ + Literal[ + "contactless", + "contactless_magstripe", + "credential_on_file", + "integrated_circuit_card", + "magstripe", + "magstripe_no_cvv", + "manual", + "other", + "unknown", + ], + str, ] ] """ @@ -62,17 +68,20 @@ class AuthorizationDetails(StripeObject): The time the authorization was initiated, as a Unix timestamp in seconds. """ point_of_sale_condition: Optional[ - Literal[ - "account_verification", - "card_not_present", - "card_present", - "e_commerce", - "key_entered_pos", - "missing", - "moto", - "other", - "pin_entered", - "recurring", + Union[ + Literal[ + "account_verification", + "card_not_present", + "card_present", + "e_commerce", + "key_entered_pos", + "missing", + "moto", + "other", + "pin_entered", + "recurring", + ], + str, ] ] """ @@ -96,7 +105,7 @@ class CardDetails(StripeObject): """ The two-letter country code of the BIN issuer. """ - card_type: Literal["physical", "virtual"] + card_type: Union[Literal["physical", "virtual"], str] """ The type of the card. """ @@ -151,14 +160,17 @@ class NetworkDetails(StripeObject): Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be null. """ routed_network: Optional[ - Literal[ - "cirrus", - "interlink", - "maestro", - "mastercard", - "other", - "plus", - "visa", + Union[ + Literal[ + "cirrus", + "interlink", + "maestro", + "mastercard", + "other", + "plus", + "visa", + ], + str, ] ] """ @@ -172,13 +184,16 @@ class Data(StripeObject): """ The time when this signal was evaluated. """ - level: Literal[ - "elevated", - "highest", - "low", - "normal", - "not_assessed", - "unknown", + level: Union[ + Literal[ + "elevated", + "highest", + "low", + "normal", + "not_assessed", + "unknown", + ], + str, ] """ Risk level, based on the score. @@ -196,7 +211,7 @@ class Data(StripeObject): """ Details of an error that prevented reporting this signal. """ - status: Literal["error", "success"] + status: Union[Literal["error", "success"], str] """ The status of this signal. """ @@ -217,19 +232,24 @@ class TokenDetails(StripeObject): """ User's specified unique ID of the card token for this authorization attempt (e.g., RRN or internal reference). """ - wallet: Optional[Literal["apple_pay", "google_pay", "samsung_pay"]] + wallet: Optional[ + Union[Literal["apple_pay", "google_pay", "samsung_pay"], str] + ] """ The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. """ class VerificationDetails(StripeObject): three_d_secure_result: Optional[ - Literal[ - "attempt_acknowledged", - "authenticated", - "exempted", - "failed", - "required", + Union[ + Literal[ + "attempt_acknowledged", + "authenticated", + "exempted", + "failed", + "required", + ], + str, ] ] """ diff --git a/stripe/radar/_payment_evaluation.py b/stripe/radar/_payment_evaluation.py index db4c0c833..30ad630c5 100644 --- a/stripe/radar/_payment_evaluation.py +++ b/stripe/radar/_payment_evaluation.py @@ -3,7 +3,7 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._expandable_field import ExpandableField from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -29,7 +29,9 @@ class Data(StripeObject): The IP address of the client device. """ pasted_fields: Optional[ - List[Literal["cvc", "exp", "number", "other", "zip"]] + List[ + Union[Literal["cvc", "exp", "number", "other", "zip"], str] + ] ] """ Pasted fields from the checkout flow. @@ -89,29 +91,35 @@ class DisputeOpened(StripeObject): """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ - reason: Literal[ - "account_not_available", - "credit_not_processed", - "customer_initiated", - "duplicate", - "fraudulent", - "general", - "noncompliant", - "product_not_received", - "product_unacceptable", - "subscription_canceled", - "unrecognized", + reason: Union[ + Literal[ + "account_not_available", + "credit_not_processed", + "customer_initiated", + "duplicate", + "fraudulent", + "general", + "noncompliant", + "product_not_received", + "product_unacceptable", + "subscription_canceled", + "unrecognized", + ], + str, ] """ Reason given by cardholder for dispute. """ class EarlyFraudWarningReceived(StripeObject): - fraud_type: Literal[ - "made_with_lost_card", - "made_with_stolen_card", - "other", - "unauthorized_use_of_card", + fraud_type: Union[ + Literal[ + "made_with_lost_card", + "made_with_stolen_card", + "other", + "unauthorized_use_of_card", + ], + str, ] """ The type of fraud labeled by the issuer. @@ -126,8 +134,11 @@ class Refunded(StripeObject): """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). """ - reason: Literal[ - "duplicate", "fraudulent", "other", "requested_by_customer" + reason: Union[ + Literal[ + "duplicate", "fraudulent", "other", "requested_by_customer" + ], + str, ] """ Indicates the reason for the refund. @@ -148,7 +159,7 @@ class Custom(StripeObject): """ Unique identifier for the user intervention event. """ - type: Literal["3ds", "captcha", "custom"] + type: Union[Literal["3ds", "captcha", "custom"], str] """ Type of user intervention raised. """ @@ -159,7 +170,9 @@ class UserInterventionResolved(StripeObject): """ Unique ID of this intervention. Use this to provide the result. """ - outcome: Optional[Literal["abandoned", "failed", "passed"]] + outcome: Optional[ + Union[Literal["abandoned", "failed", "passed"], str] + ] """ Result of the intervention if it has been completed. """ @@ -180,12 +193,15 @@ class UserInterventionResolved(StripeObject): """ Refunded Event details attached to this payment evaluation. """ - type: Literal[ - "dispute_opened", - "early_fraud_warning_received", - "refunded", - "user_intervention_raised", - "user_intervention_resolved", + type: Union[ + Literal[ + "dispute_opened", + "early_fraud_warning_received", + "refunded", + "user_intervention_raised", + "user_intervention_resolved", + ], + str, ] """ Indicates the type of event attached to the payment evaluation. @@ -208,11 +224,14 @@ class UserInterventionResolved(StripeObject): class Outcome(StripeObject): class MerchantBlocked(StripeObject): - reason: Literal[ - "authentication_required", - "blocked_for_fraud", - "invalid_payment", - "other", + reason: Union[ + Literal[ + "authentication_required", + "blocked_for_fraud", + "invalid_payment", + "other", + ], + str, ] """ The reason the payment was blocked by the merchant. @@ -220,36 +239,41 @@ class MerchantBlocked(StripeObject): class Rejected(StripeObject): class Card(StripeObject): - address_line1_check: Literal[ - "fail", "pass", "unavailable", "unchecked" + address_line1_check: Union[ + Literal["fail", "pass", "unavailable", "unchecked"], str ] """ Result of the address line 1 check. """ - address_postal_code_check: Literal[ - "fail", "pass", "unavailable", "unchecked" + address_postal_code_check: Union[ + Literal["fail", "pass", "unavailable", "unchecked"], str ] """ Indicates whether the cardholder provided a postal code and if it matched the cardholder's billing address. """ - cvc_check: Literal["fail", "pass", "unavailable", "unchecked"] + cvc_check: Union[ + Literal["fail", "pass", "unavailable", "unchecked"], str + ] """ Result of the CVC check. """ - reason: Literal[ - "authentication_failed", - "do_not_honor", - "expired", - "incorrect_cvc", - "incorrect_number", - "incorrect_postal_code", - "insufficient_funds", - "invalid_account", - "lost_card", - "other", - "processing_error", - "reported_stolen", - "try_again_later", + reason: Union[ + Literal[ + "authentication_failed", + "do_not_honor", + "expired", + "incorrect_cvc", + "incorrect_number", + "incorrect_postal_code", + "insufficient_funds", + "invalid_account", + "lost_card", + "other", + "processing_error", + "reported_stolen", + "try_again_later", + ], + str, ] """ Card issuer's reason for the network decline. @@ -263,19 +287,21 @@ class Card(StripeObject): class Succeeded(StripeObject): class Card(StripeObject): - address_line1_check: Literal[ - "fail", "pass", "unavailable", "unchecked" + address_line1_check: Union[ + Literal["fail", "pass", "unavailable", "unchecked"], str ] """ Result of the address line 1 check. """ - address_postal_code_check: Literal[ - "fail", "pass", "unavailable", "unchecked" + address_postal_code_check: Union[ + Literal["fail", "pass", "unavailable", "unchecked"], str ] """ Indicates whether the cardholder provided a postal code and if it matched the cardholder's billing address. """ - cvc_check: Literal["fail", "pass", "unavailable", "unchecked"] + cvc_check: Union[ + Literal["fail", "pass", "unavailable", "unchecked"], str + ] """ Result of the CVC check. """ @@ -302,7 +328,9 @@ class Card(StripeObject): """ Details of a succeeded outcome attached to this payment evaluation. """ - type: Literal["failed", "merchant_blocked", "rejected", "succeeded"] + type: Union[ + Literal["failed", "merchant_blocked", "rejected", "succeeded"], str + ] """ Indicates the outcome of the payment evaluation. """ @@ -316,17 +344,20 @@ class PaymentDetails(StripeObject): class MoneyMovementDetails(StripeObject): class Card(StripeObject): customer_presence: Optional[ - Literal["off_session", "on_session"] + Union[Literal["off_session", "on_session"], str] ] """ Describes the presence of the customer during the payment. """ payment_type: Optional[ - Literal[ - "one_off", - "recurring", - "setup_one_off", - "setup_recurring", + Union[ + Literal[ + "one_off", + "recurring", + "setup_one_off", + "setup_recurring", + ], + str, ] ] """ @@ -542,7 +573,7 @@ class FraudulentPayment(StripeObject): """ Payment details attached to this payment evaluation. """ - recommended_action: Literal["block", "continue"] + recommended_action: Union[Literal["block", "continue"], str] """ Recommended action based on the score of the `fraudulent_payment` signal. Possible values are `block`, `continue` and `request_three_d_secure`. """ diff --git a/stripe/radar/_value_list.py b/stripe/radar/_value_list.py index d72089440..956947e0f 100644 --- a/stripe/radar/_value_list.py +++ b/stripe/radar/_value_list.py @@ -7,7 +7,7 @@ from stripe._stripe_object import UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -60,19 +60,22 @@ class ValueList( """ Unique identifier for the object. """ - item_type: Literal[ - "account", - "card_bin", - "card_fingerprint", - "case_sensitive_string", - "country", - "crypto_fingerprint", - "customer_id", - "email", - "ip_address", - "sepa_debit_fingerprint", - "string", - "us_bank_account_fingerprint", + item_type: Union[ + Literal[ + "account", + "card_bin", + "card_fingerprint", + "case_sensitive_string", + "country", + "crypto_fingerprint", + "customer_id", + "email", + "ip_address", + "sepa_debit_fingerprint", + "string", + "us_bank_account_fingerprint", + ], + str, ] """ The type of items in the value list. One of `card_fingerprint`, `card_bin`, `crypto_fingerprint`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `account`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. diff --git a/stripe/radar/_value_list_item.py b/stripe/radar/_value_list_item.py index 4821c9740..6426d7119 100644 --- a/stripe/radar/_value_list_item.py +++ b/stripe/radar/_value_list_item.py @@ -6,7 +6,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -40,7 +40,7 @@ class ValueListItem( ) class Redaction(StripeObject): - status: Literal["processing", "redacted", "validated"] + status: Union[Literal["processing", "redacted", "validated"], str] """ Indicates whether this object and its related objects have been redacted or not. """ diff --git a/stripe/reserve/_hold.py b/stripe/reserve/_hold.py index eab3c0731..d8ca77852 100644 --- a/stripe/reserve/_hold.py +++ b/stripe/reserve/_hold.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -53,7 +53,7 @@ class ReleaseSchedule(StripeObject): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ - created_by: Literal["application", "stripe"] + created_by: Union[Literal["application", "stripe"], str] """ Indicates which party created this ReserveHold. """ @@ -81,7 +81,7 @@ class ReleaseSchedule(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - reason: Literal["charge", "standalone"] + reason: Union[Literal["charge", "standalone"], str] """ The reason for the ReserveHold. """ @@ -98,7 +98,7 @@ class ReleaseSchedule(StripeObject): """ The Charge which funded this ReserveHold (e.g., ch_123) """ - source_type: Literal["bank_account", "card", "fpx"] + source_type: Union[Literal["bank_account", "card", "fpx"], str] """ Which source balance type this ReserveHold reserves funds from. One of `bank_account`, `card`, or `fpx`. """ diff --git a/stripe/reserve/_plan.py b/stripe/reserve/_plan.py index d2eef75c2..3314d5cf6 100644 --- a/stripe/reserve/_plan.py +++ b/stripe/reserve/_plan.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._api_resource import APIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -40,7 +40,7 @@ class RollingRelease(StripeObject): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ - created_by: Literal["application", "stripe"] + created_by: Union[Literal["application", "stripe"], str] """ Indicates which party created this ReservePlan. """ @@ -74,11 +74,11 @@ class RollingRelease(StripeObject): The percent of each Charge to reserve. """ rolling_release: Optional[RollingRelease] - status: Literal["active", "disabled", "expired"] + status: Union[Literal["active", "disabled", "expired"], str] """ The current status of the ReservePlan. The ReservePlan only affects charges if it is `active`. """ - type: Literal["fixed_release", "rolling_release"] + type: Union[Literal["fixed_release", "rolling_release"], str] """ The type of the ReservePlan. """ diff --git a/stripe/reserve/_release.py b/stripe/reserve/_release.py index 40520e093..e7fdc2626 100644 --- a/stripe/reserve/_release.py +++ b/stripe/reserve/_release.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -34,7 +34,7 @@ class SourceTransaction(StripeObject): """ The ID of the refund. """ - type: Literal["dispute", "refund"] + type: Union[Literal["dispute", "refund"], str] """ The type of source transaction. """ @@ -47,7 +47,7 @@ class SourceTransaction(StripeObject): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ - created_by: Literal["application", "stripe"] + created_by: Union[Literal["application", "stripe"], str] """ Indicates which party created this ReserveRelease. """ @@ -71,11 +71,14 @@ class SourceTransaction(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - reason: Literal[ - "bulk_hold_expiry", - "hold_released_early", - "hold_reversed", - "plan_disabled", + reason: Union[ + Literal[ + "bulk_hold_expiry", + "hold_released_early", + "hold_reversed", + "plan_disabled", + ], + str, ] """ The reason for the ReserveRelease, indicating why the funds were released. diff --git a/stripe/shared_payment/_granted_token.py b/stripe/shared_payment/_granted_token.py index 85c879445..e141be681 100644 --- a/stripe/shared_payment/_granted_token.py +++ b/stripe/shared_payment/_granted_token.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -490,8 +490,11 @@ class Offline(StripeObject): """ class Wallet(StripeObject): - type: Literal[ - "apple_pay", "google_pay", "samsung_pay", "unknown" + type: Union[ + Literal[ + "apple_pay", "google_pay", "samsung_pay", "unknown" + ], + str, ] """ The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. @@ -560,12 +563,15 @@ class Wallet(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -699,7 +705,9 @@ class Grabpay(StripeObject): pass class IdBankTransfer(StripeObject): - bank: Optional[Literal["bca", "bni", "bri", "cimb", "permata"]] + bank: Optional[ + Union[Literal["bca", "bni", "bri", "cimb", "permata"], str] + ] bank_code: Optional[str] bank_name: Optional[str] display_name: Optional[str] @@ -827,12 +835,15 @@ class Networks(StripeObject): The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. """ read_method: Optional[ - Literal[ - "contact_emv", - "contactless_emv", - "contactless_magstripe_mode", - "magnetic_stripe_fallback", - "magnetic_stripe_track2", + Union[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ], + str, ] ] """ @@ -869,29 +880,32 @@ class Konbini(StripeObject): class KrCard(StripeObject): brand: Optional[ - Literal[ - "bc", - "citi", - "hana", - "hyundai", - "jeju", - "jeonbuk", - "kakaobank", - "kbank", - "kdbbank", - "kookmin", - "kwangju", - "lotte", - "mg", - "nh", - "post", - "samsung", - "savingsbank", - "shinhan", - "shinhyup", - "suhyup", - "tossbank", - "woori", + Union[ + Literal[ + "bc", + "citi", + "hana", + "hyundai", + "jeju", + "jeonbuk", + "kakaobank", + "kbank", + "kdbbank", + "kookmin", + "kwangju", + "lotte", + "mg", + "nh", + "post", + "samsung", + "savingsbank", + "shinhan", + "shinhyup", + "suhyup", + "tossbank", + "woori", + ], + str, ] ] """ @@ -926,7 +940,7 @@ class NaverPay(StripeObject): """ Uniquely identifies this particular Naver Pay account. You can use this attribute to check whether two Naver Pay accounts are the same. """ - funding: Literal["card", "points"] + funding: Union[Literal["card", "points"], str] """ Whether to fund this transaction with Naver Pay points or a card. """ @@ -962,33 +976,36 @@ class Oxxo(StripeObject): class P24(StripeObject): bank: Optional[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", + Union[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ], + str, ] ] """ @@ -1175,33 +1192,39 @@ class Networks(StripeObject): class StatusDetails(StripeObject): class Blocked(StripeObject): network_code: Optional[ - Literal[ - "R02", - "R03", - "R04", - "R05", - "R07", - "R08", - "R10", - "R11", - "R16", - "R20", - "R29", - "R31", + Union[ + Literal[ + "R02", + "R03", + "R04", + "R05", + "R07", + "R08", + "R10", + "R11", + "R16", + "R20", + "R29", + "R31", + ], + str, ] ] """ The ACH network code that resulted in this block. """ reason: Optional[ - Literal[ - "bank_account_closed", - "bank_account_frozen", - "bank_account_invalid_details", - "bank_account_restricted", - "bank_account_unusable", - "debit_not_authorized", - "tokenized_account_number_deactivated", + Union[ + Literal[ + "bank_account_closed", + "bank_account_frozen", + "bank_account_invalid_details", + "bank_account_restricted", + "bank_account_unusable", + "debit_not_authorized", + "tokenized_account_number_deactivated", + ], + str, ] ] """ @@ -1211,7 +1234,9 @@ class Blocked(StripeObject): blocked: Optional[Blocked] _inner_class_types = {"blocked": Blocked} - account_holder_type: Optional[Literal["company", "individual"]] + account_holder_type: Optional[ + Union[Literal["company", "individual"], str] + ] """ Account holder type: individual or company. """ @@ -1219,7 +1244,7 @@ class Blocked(StripeObject): """ Account number of the bank account. """ - account_type: Optional[Literal["checking", "savings"]] + account_type: Optional[Union[Literal["checking", "savings"], str]] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -1327,73 +1352,76 @@ class Zip(StripeObject): swish: Optional[Swish] tamara: Optional[Tamara] twint: Optional[Twint] - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "bizum", - "blik", - "boleto", - "card", - "card_present", - "cashapp", - "crypto", - "custom", - "customer_balance", - "eps", - "fpx", - "gift_card", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "interac_present", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "sunbit", - "swish", - "tamara", - "twint", - "upi", - "us_bank_account", - "wechat_pay", - "zip", + type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "bizum", + "blik", + "boleto", + "card", + "card_present", + "cashapp", + "crypto", + "custom", + "customer_balance", + "eps", + "fpx", + "gift_card", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "sunbit", + "swish", + "tamara", + "twint", + "upi", + "us_bank_account", + "wechat_pay", + "zip", + ], + str, ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. @@ -1587,7 +1615,9 @@ class UsageLimits(StripeObject): """ Max amount that can be captured using this SharedPaymentToken. """ - recurring_interval: Optional[Literal["month", "week", "year"]] + recurring_interval: Optional[ + Union[Literal["month", "week", "year"], str] + ] """ The recurring interval at which the shared payment token's amount usage restrictions reset. """ @@ -1605,7 +1635,7 @@ class UsageLimits(StripeObject): Time at which this SharedPaymentGrantedToken expires and can no longer be used to confirm a PaymentIntent. """ deactivated_reason: Optional[ - Literal["consumed", "expired", "resolved", "revoked"] + Union[Literal["consumed", "expired", "resolved", "revoked"], str] ] """ The reason why the SharedPaymentGrantedToken has been deactivated. diff --git a/stripe/shared_payment/_issued_token.py b/stripe/shared_payment/_issued_token.py index 2fe4e3f09..ad1edab70 100644 --- a/stripe/shared_payment/_issued_token.py +++ b/stripe/shared_payment/_issued_token.py @@ -3,7 +3,7 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -48,7 +48,7 @@ class UseStripeSdk(StripeObject): """ Contains details for handling the next action by redirecting the customer. Present when `next_action.type` is `redirect_to_url`. """ - type: Literal["redirect_to_url", "use_stripe_sdk"] + type: Union[Literal["redirect_to_url", "use_stripe_sdk"], str] """ Specifies the type of next action required. Determines which child attribute contains action details. """ @@ -187,7 +187,9 @@ class UsageLimits(StripeObject): """ Max amount that can be captured using this SharedPaymentToken. """ - recurring_interval: Optional[Literal["month", "week", "year"]] + recurring_interval: Optional[ + Union[Literal["month", "week", "year"], str] + ] """ The recurring interval at which the shared payment token's amount usage restrictions reset. """ @@ -201,7 +203,7 @@ class UsageLimits(StripeObject): Time at which this SharedPaymentIssuedToken was deactivated. """ deactivated_reason: Optional[ - Literal["consumed", "expired", "resolved", "revoked"] + Union[Literal["consumed", "expired", "resolved", "revoked"], str] ] """ The reason why the SharedPaymentIssuedToken has been deactivated. @@ -246,7 +248,9 @@ class UsageLimits(StripeObject): """ Metadata about the SharedPaymentIssuedToken. """ - status: Optional[Literal["active", "deactivated", "requires_action"]] + status: Optional[ + Union[Literal["active", "deactivated", "requires_action"], str] + ] """ Status of this SharedPaymentIssuedToken, one of `active`, `requires_action`, or `deactivated`. """ diff --git a/stripe/tax/_association.py b/stripe/tax/_association.py index a44800b1f..8a44a3fee 100644 --- a/stripe/tax/_association.py +++ b/stripe/tax/_association.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._api_resource import APIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -26,12 +26,15 @@ class Committed(StripeObject): """ class Errored(StripeObject): - reason: Literal[ - "another_payment_associated_with_calculation", - "calculation_expired", - "currency_mismatch", - "original_transaction_voided", - "unique_reference_violation", + reason: Union[ + Literal[ + "another_payment_associated_with_calculation", + "calculation_expired", + "currency_mismatch", + "original_transaction_voided", + "unique_reference_violation", + ], + str, ] """ Details on why we couldn't commit the tax transaction. diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index 859cbe6a4..f4bc1a9dc 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -189,7 +189,7 @@ class TaxId(StripeObject): """ The customer's postal address (for example, home or business location). """ - address_source: Optional[Literal["billing", "shipping"]] + address_source: Optional[Union[Literal["billing", "shipping"], str]] """ The type of customer address provided. """ @@ -201,8 +201,8 @@ class TaxId(StripeObject): """ The customer's tax IDs (for example, EU VAT numbers). """ - taxability_override: Literal[ - "customer_exempt", "none", "reverse_charge" + taxability_override: Union[ + Literal["customer_exempt", "none", "reverse_charge"], str ] """ The taxability override used for taxation. @@ -250,8 +250,9 @@ class Jurisdiction(StripeObject): """ A human-readable name for the jurisdiction imposing the tax. """ - level: Literal[ - "city", "country", "county", "district", "state" + level: Union[ + Literal["city", "country", "county", "district", "state"], + str, ] """ Indicates the level of the jurisdiction imposing the tax. @@ -313,22 +314,25 @@ class TaxRateDetails(StripeObject): """ Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. """ - taxability_reason: Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + taxability_reason: Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] """ The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. @@ -354,7 +358,7 @@ class TaxRateDetails(StripeObject): """ The ID of an existing [ShippingRate](https://docs.stripe.com/api/shipping_rates/object). """ - tax_behavior: Literal["exclusive", "inclusive"] + tax_behavior: Union[Literal["exclusive", "inclusive"], str] """ Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. """ @@ -392,7 +396,9 @@ class FlatAmount(StripeObject): """ The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. """ - rate_type: Optional[Literal["flat_amount", "percentage"]] + rate_type: Optional[ + Union[Literal["flat_amount", "percentage"], str] + ] """ Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. This field is only present for TaxRates created by Stripe Tax. """ @@ -442,22 +448,25 @@ class FlatAmount(StripeObject): Specifies whether the tax amount is included in the line item amount. """ tax_rate_details: TaxRateDetails - taxability_reason: Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + taxability_reason: Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] """ The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules. diff --git a/stripe/tax/_calculation_line_item.py b/stripe/tax/_calculation_line_item.py index 58eed5b3d..45d6202e5 100644 --- a/stripe/tax/_calculation_line_item.py +++ b/stripe/tax/_calculation_line_item.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -50,7 +50,9 @@ class Jurisdiction(StripeObject): """ A human-readable name for the jurisdiction imposing the tax. """ - level: Literal["city", "country", "county", "district", "state"] + level: Union[ + Literal["city", "country", "county", "district", "state"], str + ] """ Indicates the level of the jurisdiction imposing the tax. """ @@ -111,22 +113,25 @@ class TaxRateDetails(StripeObject): """ Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. """ - taxability_reason: Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + taxability_reason: Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] """ The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. @@ -184,7 +189,7 @@ class TaxRateDetails(StripeObject): """ A custom identifier for this line item. """ - tax_behavior: Literal["exclusive", "inclusive"] + tax_behavior: Union[Literal["exclusive", "inclusive"], str] """ Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. """ diff --git a/stripe/tax/_form.py b/stripe/tax/_form.py index c96db9566..b7a90f9e4 100644 --- a/stripe/tax/_form.py +++ b/stripe/tax/_form.py @@ -5,7 +5,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import Any, ClassVar, List, Optional, cast, overload +from typing import Any, ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -60,7 +60,7 @@ class Jurisdiction(StripeObject): """ Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). """ - level: Literal["country", "state"] + level: Union[Literal["country", "state"], str] """ Indicates the level of the jurisdiction where the form was filed. """ @@ -74,7 +74,7 @@ class Jurisdiction(StripeObject): Time when the filing status was updated. """ jurisdiction: Jurisdiction - value: Literal["accepted", "filed", "rejected"] + value: Union[Literal["accepted", "filed", "rejected"], str] """ The current status of the filed form. """ @@ -109,7 +109,7 @@ class Payee(StripeObject): """ The external reference to this payee. """ - type: Literal["account", "external_reference"] + type: Union[Literal["account", "external_reference"], str] """ Either `account` or `external_reference`. """ @@ -162,15 +162,18 @@ class Us1099Nec(StripeObject): String representing the object's type. Objects of the same type share the same value. """ payee: Payee - type: Literal[ - "au_serr", - "ca_mrdp", - "eu_dac7", - "gb_mrdp", - "nz_mrdp", - "us_1099_k", - "us_1099_misc", - "us_1099_nec", + type: Union[ + Literal[ + "au_serr", + "ca_mrdp", + "eu_dac7", + "gb_mrdp", + "nz_mrdp", + "us_1099_k", + "us_1099_misc", + "us_1099_nec", + ], + str, ] """ The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type. diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index 9f542c843..2ef2b2a4b 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -6,7 +6,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -42,7 +42,9 @@ class Registration( class CountryOptions(StripeObject): class Ae(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] + place_of_supply_scheme: Union[ + Literal["inbound_goods", "standard"], str + ] """ Place of supply scheme used in an Default standard registration. """ @@ -74,15 +76,17 @@ class Ao(StripeObject): class At(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -90,7 +94,9 @@ class Standard(StripeObject): class Au(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] + place_of_supply_scheme: Union[ + Literal["inbound_goods", "standard"], str + ] """ Place of supply scheme used in an Default standard registration. """ @@ -134,15 +140,17 @@ class Bd(StripeObject): class Be(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -156,15 +164,17 @@ class Bf(StripeObject): class Bg(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -202,7 +212,9 @@ class ProvinceStandard(StripeObject): """ province_standard: Optional[ProvinceStandard] - type: Literal["province_standard", "simplified", "standard"] + type: Union[ + Literal["province_standard", "simplified", "standard"], str + ] """ Type of registration in Canada. """ @@ -216,7 +228,9 @@ class Cd(StripeObject): class Ch(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] + place_of_supply_scheme: Union[ + Literal["inbound_goods", "standard"], str + ] """ Place of supply scheme used in an Default standard registration. """ @@ -260,15 +274,17 @@ class Cv(StripeObject): class Cy(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -276,15 +292,17 @@ class Standard(StripeObject): class Cz(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -292,15 +310,17 @@ class Standard(StripeObject): class De(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -308,15 +328,17 @@ class Standard(StripeObject): class Dk(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -330,15 +352,17 @@ class Ec(StripeObject): class Ee(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -352,15 +376,17 @@ class Eg(StripeObject): class Es(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -374,15 +400,17 @@ class Et(StripeObject): class Fi(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -390,15 +418,17 @@ class Standard(StripeObject): class Fr(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -406,7 +436,9 @@ class Standard(StripeObject): class Gb(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] + place_of_supply_scheme: Union[ + Literal["inbound_goods", "standard"], str + ] """ Place of supply scheme used in an Default standard registration. """ @@ -432,15 +464,17 @@ class Gn(StripeObject): class Gr(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -448,15 +482,17 @@ class Standard(StripeObject): class Hr(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -464,15 +500,17 @@ class Standard(StripeObject): class Hu(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -486,15 +524,17 @@ class Id(StripeObject): class Ie(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -514,15 +554,17 @@ class Is(StripeObject): class It(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -530,7 +572,9 @@ class Standard(StripeObject): class Jp(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] + place_of_supply_scheme: Union[ + Literal["inbound_goods", "standard"], str + ] """ Place of supply scheme used in an Default standard registration. """ @@ -586,15 +630,17 @@ class Lk(StripeObject): class Lt(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -602,15 +648,17 @@ class Standard(StripeObject): class Lu(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -618,15 +666,17 @@ class Standard(StripeObject): class Lv(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -664,15 +714,17 @@ class Mr(StripeObject): class Mt(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -698,15 +750,17 @@ class Ng(StripeObject): class Nl(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -714,7 +768,9 @@ class Standard(StripeObject): class No(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] + place_of_supply_scheme: Union[ + Literal["inbound_goods", "standard"], str + ] """ Place of supply scheme used in an Default standard registration. """ @@ -734,7 +790,9 @@ class Np(StripeObject): class Nz(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] + place_of_supply_scheme: Union[ + Literal["inbound_goods", "standard"], str + ] """ Place of supply scheme used in an Default standard registration. """ @@ -766,15 +824,17 @@ class Ph(StripeObject): class Pl(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -782,15 +842,17 @@ class Standard(StripeObject): class Pt(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -798,15 +860,17 @@ class Standard(StripeObject): class Ro(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -832,15 +896,17 @@ class Sa(StripeObject): class Se(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -848,7 +914,9 @@ class Standard(StripeObject): class Sg(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal["inbound_goods", "standard"] + place_of_supply_scheme: Union[ + Literal["inbound_goods", "standard"], str + ] """ Place of supply scheme used in an Default standard registration. """ @@ -862,15 +930,17 @@ class Standard(StripeObject): class Si(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -878,15 +948,17 @@ class Standard(StripeObject): class Sk(StripeObject): class Standard(StripeObject): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" + place_of_supply_scheme: Union[ + Literal["inbound_goods", "small_seller", "standard"], str ] """ Place of supply scheme used in an EU standard registration. """ standard: Optional[Standard] - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + type: Union[ + Literal["ioss", "oss_non_union", "oss_union", "standard"], str + ] """ Type of registration in an EU country. """ @@ -1025,10 +1097,13 @@ class Election(StripeObject): """ A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. """ - type: Literal[ - "local_use_tax", - "simplified_sellers_use_tax", - "single_local_use_tax", + type: Union[ + Literal[ + "local_use_tax", + "simplified_sellers_use_tax", + "single_local_use_tax", + ], + str, ] """ The type of the election for the state sales tax registration. @@ -1373,7 +1448,7 @@ class Zw(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - status: Literal["active", "expired", "scheduled"] + status: Union[Literal["active", "expired", "scheduled"], str] """ The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. """ diff --git a/stripe/tax/_settings.py b/stripe/tax/_settings.py index 1fefd5321..c180373d6 100644 --- a/stripe/tax/_settings.py +++ b/stripe/tax/_settings.py @@ -3,7 +3,7 @@ from stripe._singleton_api_resource import SingletonAPIResource from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource -from typing import ClassVar, List, Optional, cast +from typing import ClassVar, List, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -26,12 +26,14 @@ class Settings( OBJECT_NAME: ClassVar[Literal["tax.settings"]] = "tax.settings" class Defaults(StripeObject): - provider: Literal["anrok", "avalara", "sphere", "stripe"] + provider: Union[Literal["anrok", "avalara", "sphere", "stripe"], str] """ The tax calculation provider this account uses. Defaults to `stripe` when not using a [third-party provider](https://docs.stripe.com/tax/third-party-apps). """ tax_behavior: Optional[ - Literal["exclusive", "inclusive", "inferred_by_currency"] + Union[ + Literal["exclusive", "inclusive", "inferred_by_currency"], str + ] ] """ Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior. @@ -98,7 +100,7 @@ class Pending(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - status: Literal["active", "pending"] + status: Union[Literal["active", "pending"], str] """ The status of the Tax `Settings`. """ diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index f603e1003..0b0383896 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -192,7 +192,7 @@ class TaxId(StripeObject): """ The customer's postal address (for example, home or business location). """ - address_source: Optional[Literal["billing", "shipping"]] + address_source: Optional[Union[Literal["billing", "shipping"], str]] """ The type of customer address provided. """ @@ -204,8 +204,8 @@ class TaxId(StripeObject): """ The customer's tax IDs (for example, EU VAT numbers). """ - taxability_override: Literal[ - "customer_exempt", "none", "reverse_charge" + taxability_override: Union[ + Literal["customer_exempt", "none", "reverse_charge"], str ] """ The taxability override used for taxation. @@ -259,8 +259,9 @@ class Jurisdiction(StripeObject): """ A human-readable name for the jurisdiction imposing the tax. """ - level: Literal[ - "city", "country", "county", "district", "state" + level: Union[ + Literal["city", "country", "county", "district", "state"], + str, ] """ Indicates the level of the jurisdiction imposing the tax. @@ -322,22 +323,25 @@ class TaxRateDetails(StripeObject): """ Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. """ - taxability_reason: Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", + taxability_reason: Union[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ], + str, ] """ The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. @@ -363,7 +367,7 @@ class TaxRateDetails(StripeObject): """ The ID of an existing [ShippingRate](https://docs.stripe.com/api/shipping_rates/object). """ - tax_behavior: Literal["exclusive", "inclusive"] + tax_behavior: Union[Literal["exclusive", "inclusive"], str] """ Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. """ @@ -434,7 +438,7 @@ class TaxRateDetails(StripeObject): """ The calculation uses the tax rules and rates that are in effect at this timestamp. You can use a date up to 31 days in the past or up to 31 days in the future. If you use a future date, Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules and rate that will be in effect on that date. We deploy tax changes before their effective date, but not within a fixed window. """ - type: Literal["reversal", "transaction"] + type: Union[Literal["reversal", "transaction"], str] """ If `reversal`, this transaction reverses an earlier transaction. """ diff --git a/stripe/tax/_transaction_line_item.py b/stripe/tax/_transaction_line_item.py index 2caa89d1e..679492e18 100644 --- a/stripe/tax/_transaction_line_item.py +++ b/stripe/tax/_transaction_line_item.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -56,7 +56,7 @@ class Reversal(StripeObject): """ If `type=reversal`, contains information about what was reversed. """ - tax_behavior: Literal["exclusive", "inclusive"] + tax_behavior: Union[Literal["exclusive", "inclusive"], str] """ Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. """ @@ -64,7 +64,7 @@ class Reversal(StripeObject): """ The [tax code](https://docs.stripe.com/tax/tax-categories) ID used for this resource. """ - type: Literal["reversal", "transaction"] + type: Union[Literal["reversal", "transaction"], str] """ If `reversal`, this line item reverses an earlier transaction. """ diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index 833ffb0d6..fd47c40b0 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -8,7 +8,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -521,8 +521,11 @@ class PersonalPsk(StripeObject): enterprise_eap_peap: Optional[EnterpriseEapPeap] enterprise_eap_tls: Optional[EnterpriseEapTls] personal_psk: Optional[PersonalPsk] - type: Literal[ - "enterprise_eap_peap", "enterprise_eap_tls", "personal_psk" + type: Union[ + Literal[ + "enterprise_eap_peap", "enterprise_eap_tls", "personal_psk" + ], + str, ] """ Security type of the WiFi network. The hash with the corresponding name contains the credentials for this security type. diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 4f9e3c35c..d865e3cce 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -478,7 +478,9 @@ class Choice(StripeObject): """ The identifier for the selected choice. Maximum 50 characters. """ - style: Optional[Literal["primary", "secondary"]] + style: Optional[ + Union[Literal["primary", "secondary"], str] + ] """ The button style for the choice. Can be `primary` or `secondary`. """ @@ -514,7 +516,9 @@ class Text(StripeObject): """ class Toggle(StripeObject): - default_value: Optional[Literal["disabled", "enabled"]] + default_value: Optional[ + Union[Literal["disabled", "enabled"], str] + ] """ The toggle's default value. Can be `enabled` or `disabled`. """ @@ -526,7 +530,7 @@ class Toggle(StripeObject): """ The toggle's title text. Maximum 50 characters. """ - value: Optional[Literal["disabled", "enabled"]] + value: Optional[Union[Literal["disabled", "enabled"], str]] """ The toggle's collected value. Can be `enabled` or `disabled`. """ @@ -937,24 +941,27 @@ class LineItem(StripeObject): """ Represents a reader action to set the reader display """ - status: Literal["failed", "in_progress", "succeeded"] + status: Union[Literal["failed", "in_progress", "succeeded"], str] """ Status of the action performed by the reader. """ - type: Literal[ - "activate_gift_card", - "cashout_gift_card", - "check_gift_card_balance", - "collect_inputs", - "collect_payment_method", - "confirm_payment_intent", - "deactivate_gift_card", - "print_content", - "process_payment_intent", - "process_setup_intent", - "refund_payment", - "reload_gift_card", - "set_reader_display", + type: Union[ + Literal[ + "activate_gift_card", + "cashout_gift_card", + "check_gift_card_balance", + "collect_inputs", + "collect_payment_method", + "confirm_payment_intent", + "deactivate_gift_card", + "print_content", + "process_payment_intent", + "process_setup_intent", + "refund_payment", + "reload_gift_card", + "set_reader_display", + ], + str, ] """ Type of action performed by the reader. @@ -988,26 +995,29 @@ class LineItem(StripeObject): """ The current software version of the reader. """ - device_type: Literal[ - "bbpos_chipper2x", - "bbpos_wisepad3", - "bbpos_wisepos_e", - "mobile_phone_reader", - "simulated_stripe_s700", - "simulated_stripe_s710", - "simulated_verifone_m425", - "simulated_verifone_p630", - "simulated_verifone_ux700", - "simulated_verifone_v660p", - "simulated_wisepos_e", - "stripe_m2", - "stripe_s700", - "stripe_s710", - "verifone_P400", - "verifone_m425", - "verifone_p630", - "verifone_ux700", - "verifone_v660p", + device_type: Union[ + Literal[ + "bbpos_chipper2x", + "bbpos_wisepad3", + "bbpos_wisepos_e", + "mobile_phone_reader", + "simulated_stripe_s700", + "simulated_stripe_s710", + "simulated_verifone_m425", + "simulated_verifone_p630", + "simulated_verifone_ux700", + "simulated_verifone_v660p", + "simulated_wisepos_e", + "stripe_m2", + "stripe_s700", + "stripe_s710", + "verifone_P400", + "verifone_m425", + "verifone_p630", + "verifone_ux700", + "verifone_v660p", + ], + str, ] """ Device type of the reader. diff --git a/stripe/test_helpers/_test_clock.py b/stripe/test_helpers/_test_clock.py index 7e011186b..e0aa91ed9 100644 --- a/stripe/test_helpers/_test_clock.py +++ b/stripe/test_helpers/_test_clock.py @@ -6,7 +6,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -84,7 +84,7 @@ class Advancing(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - status: Literal["advancing", "internal_failure", "ready"] + status: Union[Literal["advancing", "internal_failure", "ready"], str] """ The status of the Test Clock. """ diff --git a/stripe/treasury/_credit_reversal.py b/stripe/treasury/_credit_reversal.py index bfaab89ed..7e5076478 100644 --- a/stripe/treasury/_credit_reversal.py +++ b/stripe/treasury/_credit_reversal.py @@ -5,7 +5,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -71,7 +71,7 @@ class StatusTransitions(StripeObject): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. """ - network: Literal["ach", "stripe"] + network: Union[Literal["ach", "stripe"], str] """ The rails used to reverse the funds. """ @@ -83,7 +83,7 @@ class StatusTransitions(StripeObject): """ The ReceivedCredit being reversed. """ - status: Literal["canceled", "posted", "processing"] + status: Union[Literal["canceled", "posted", "processing"], str] """ Status of the CreditReversal """ diff --git a/stripe/treasury/_debit_reversal.py b/stripe/treasury/_debit_reversal.py index 06377a3d4..39e149e11 100644 --- a/stripe/treasury/_debit_reversal.py +++ b/stripe/treasury/_debit_reversal.py @@ -5,7 +5,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -81,7 +81,7 @@ class StatusTransitions(StripeObject): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. """ - network: Literal["ach", "card"] + network: Union[Literal["ach", "card"], str] """ The rails used to reverse the funds. """ @@ -93,7 +93,7 @@ class StatusTransitions(StripeObject): """ The ReceivedDebit being reversed. """ - status: Literal["failed", "processing", "succeeded"] + status: Union[Literal["failed", "processing", "succeeded"], str] """ Status of the DebitReversal """ diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 4ef9021b1..3b4959aa3 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -6,7 +6,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload +from typing import ClassVar, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -91,7 +91,9 @@ class Aba(StripeObject): """ ABA Records contain U.S. bank account details per the ABA format. """ - supported_networks: Optional[List[Literal["ach", "us_domestic_wire"]]] + supported_networks: Optional[ + List[Union[Literal["ach", "us_domestic_wire"], str]] + ] """ The list of networks that the address supports """ @@ -102,11 +104,15 @@ class Aba(StripeObject): _inner_class_types = {"aba": Aba} class PlatformRestrictions(StripeObject): - inbound_flows: Optional[Literal["restricted", "unrestricted"]] + inbound_flows: Optional[ + Union[Literal["restricted", "unrestricted"], str] + ] """ Restricts all inbound money movement. """ - outbound_flows: Optional[Literal["restricted", "unrestricted"]] + outbound_flows: Optional[ + Union[Literal["restricted", "unrestricted"], str] + ] """ Restricts all outbound money movement. """ @@ -114,7 +120,10 @@ class PlatformRestrictions(StripeObject): class StatusDetails(StripeObject): class Closed(StripeObject): reasons: List[ - Literal["account_rejected", "closed_by_platform", "other"] + Union[ + Literal["account_rejected", "closed_by_platform", "other"], + str, + ] ] """ The array that contains reasons for a FinancialAccount closure. @@ -128,18 +137,21 @@ class Closed(StripeObject): active_features: Optional[ List[ - Literal[ - "card_issuing", - "deposit_insurance", - "financial_addresses.aba", - "financial_addresses.aba.forwarding", - "inbound_transfers.ach", - "intra_stripe_flows", - "outbound_payments.ach", - "outbound_payments.us_domestic_wire", - "outbound_transfers.ach", - "outbound_transfers.us_domestic_wire", - "remote_deposit_capture", + Union[ + Literal[ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "financial_addresses.aba.forwarding", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture", + ], + str, ] ] ] @@ -194,18 +206,21 @@ class Closed(StripeObject): """ pending_features: Optional[ List[ - Literal[ - "card_issuing", - "deposit_insurance", - "financial_addresses.aba", - "financial_addresses.aba.forwarding", - "inbound_transfers.ach", - "intra_stripe_flows", - "outbound_payments.ach", - "outbound_payments.us_domestic_wire", - "outbound_transfers.ach", - "outbound_transfers.us_domestic_wire", - "remote_deposit_capture", + Union[ + Literal[ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "financial_addresses.aba.forwarding", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture", + ], + str, ] ] ] @@ -218,25 +233,28 @@ class Closed(StripeObject): """ restricted_features: Optional[ List[ - Literal[ - "card_issuing", - "deposit_insurance", - "financial_addresses.aba", - "financial_addresses.aba.forwarding", - "inbound_transfers.ach", - "intra_stripe_flows", - "outbound_payments.ach", - "outbound_payments.us_domestic_wire", - "outbound_transfers.ach", - "outbound_transfers.us_domestic_wire", - "remote_deposit_capture", + Union[ + Literal[ + "card_issuing", + "deposit_insurance", + "financial_addresses.aba", + "financial_addresses.aba.forwarding", + "inbound_transfers.ach", + "intra_stripe_flows", + "outbound_payments.ach", + "outbound_payments.us_domestic_wire", + "outbound_transfers.ach", + "outbound_transfers.us_domestic_wire", + "remote_deposit_capture", + ], + str, ] ] ] """ The array of paths to restricted Features in the Features hash. """ - status: Literal["closed", "open"] + status: Union[Literal["closed", "open"], str] """ Status of this FinancialAccount. """ diff --git a/stripe/treasury/_financial_account_features.py b/stripe/treasury/_financial_account_features.py index bf811f8eb..9786cab2e 100644 --- a/stripe/treasury/_financial_account_features.py +++ b/stripe/treasury/_financial_account_features.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -17,31 +17,39 @@ class FinancialAccountFeatures(StripeObject): class CardIssuing(StripeObject): class StatusDetail(StripeObject): - code: Literal[ - "activating", - "capability_not_requested", - "financial_account_closed", - "rejected_other", - "rejected_unsupported_business", - "requirements_past_due", - "requirements_pending_verification", - "restricted_by_platform", - "restricted_other", + code: Union[ + Literal[ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other", + ], + str, ] """ Represents the reason why the status is `pending` or `restricted`. """ resolution: Optional[ - Literal[ - "contact_stripe", - "provide_information", - "remove_restriction", + Union[ + Literal[ + "contact_stripe", + "provide_information", + "remove_restriction", + ], + str, ] ] """ Represents what the user should do, if anything, to activate the Feature. """ - restriction: Optional[Literal["inbound_flows", "outbound_flows"]] + restriction: Optional[ + Union[Literal["inbound_flows", "outbound_flows"], str] + ] """ The `platform_restrictions` that are restricting this Feature. """ @@ -50,7 +58,7 @@ class StatusDetail(StripeObject): """ Whether the FinancialAccount should have the Feature. """ - status: Literal["active", "pending", "restricted"] + status: Union[Literal["active", "pending", "restricted"], str] """ Whether the Feature is operational. """ @@ -62,31 +70,39 @@ class StatusDetail(StripeObject): class DepositInsurance(StripeObject): class StatusDetail(StripeObject): - code: Literal[ - "activating", - "capability_not_requested", - "financial_account_closed", - "rejected_other", - "rejected_unsupported_business", - "requirements_past_due", - "requirements_pending_verification", - "restricted_by_platform", - "restricted_other", + code: Union[ + Literal[ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other", + ], + str, ] """ Represents the reason why the status is `pending` or `restricted`. """ resolution: Optional[ - Literal[ - "contact_stripe", - "provide_information", - "remove_restriction", + Union[ + Literal[ + "contact_stripe", + "provide_information", + "remove_restriction", + ], + str, ] ] """ Represents what the user should do, if anything, to activate the Feature. """ - restriction: Optional[Literal["inbound_flows", "outbound_flows"]] + restriction: Optional[ + Union[Literal["inbound_flows", "outbound_flows"], str] + ] """ The `platform_restrictions` that are restricting this Feature. """ @@ -95,7 +111,7 @@ class StatusDetail(StripeObject): """ Whether the FinancialAccount should have the Feature. """ - status: Literal["active", "pending", "restricted"] + status: Union[Literal["active", "pending", "restricted"], str] """ Whether the Feature is operational. """ @@ -108,38 +124,46 @@ class StatusDetail(StripeObject): class FinancialAddresses(StripeObject): class Aba(StripeObject): class StatusDetail(StripeObject): - code: Literal[ - "activating", - "capability_not_requested", - "financial_account_closed", - "rejected_other", - "rejected_unsupported_business", - "requirements_past_due", - "requirements_pending_verification", - "restricted_by_platform", - "restricted_other", + code: Union[ + Literal[ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other", + ], + str, ] """ Represents the reason why the status is `pending` or `restricted`. """ resolution: Optional[ - Literal[ - "contact_stripe", - "provide_information", - "remove_restriction", + Union[ + Literal[ + "contact_stripe", + "provide_information", + "remove_restriction", + ], + str, ] ] """ Represents what the user should do, if anything, to activate the Feature. """ restriction: Optional[ - Literal["inbound_flows", "outbound_flows"] + Union[Literal["inbound_flows", "outbound_flows"], str] ] """ The `platform_restrictions` that are restricting this Feature. """ - bank: Optional[Literal["evolve", "fifth_third", "goldman_sachs"]] + bank: Optional[ + Union[Literal["evolve", "fifth_third", "goldman_sachs"], str] + ] """ Requested bank partner for this Financial Account """ @@ -147,7 +171,7 @@ class StatusDetail(StripeObject): """ Whether the FinancialAccount should have the Feature. """ - status: Literal["active", "pending", "restricted"] + status: Union[Literal["active", "pending", "restricted"], str] """ Whether the Feature is operational. """ @@ -166,32 +190,38 @@ class StatusDetail(StripeObject): class InboundTransfers(StripeObject): class Ach(StripeObject): class StatusDetail(StripeObject): - code: Literal[ - "activating", - "capability_not_requested", - "financial_account_closed", - "rejected_other", - "rejected_unsupported_business", - "requirements_past_due", - "requirements_pending_verification", - "restricted_by_platform", - "restricted_other", + code: Union[ + Literal[ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other", + ], + str, ] """ Represents the reason why the status is `pending` or `restricted`. """ resolution: Optional[ - Literal[ - "contact_stripe", - "provide_information", - "remove_restriction", + Union[ + Literal[ + "contact_stripe", + "provide_information", + "remove_restriction", + ], + str, ] ] """ Represents what the user should do, if anything, to activate the Feature. """ restriction: Optional[ - Literal["inbound_flows", "outbound_flows"] + Union[Literal["inbound_flows", "outbound_flows"], str] ] """ The `platform_restrictions` that are restricting this Feature. @@ -201,7 +231,7 @@ class StatusDetail(StripeObject): """ Whether the FinancialAccount should have the Feature. """ - status: Literal["active", "pending", "restricted"] + status: Union[Literal["active", "pending", "restricted"], str] """ Whether the Feature is operational. """ @@ -219,31 +249,39 @@ class StatusDetail(StripeObject): class IntraStripeFlows(StripeObject): class StatusDetail(StripeObject): - code: Literal[ - "activating", - "capability_not_requested", - "financial_account_closed", - "rejected_other", - "rejected_unsupported_business", - "requirements_past_due", - "requirements_pending_verification", - "restricted_by_platform", - "restricted_other", + code: Union[ + Literal[ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other", + ], + str, ] """ Represents the reason why the status is `pending` or `restricted`. """ resolution: Optional[ - Literal[ - "contact_stripe", - "provide_information", - "remove_restriction", + Union[ + Literal[ + "contact_stripe", + "provide_information", + "remove_restriction", + ], + str, ] ] """ Represents what the user should do, if anything, to activate the Feature. """ - restriction: Optional[Literal["inbound_flows", "outbound_flows"]] + restriction: Optional[ + Union[Literal["inbound_flows", "outbound_flows"], str] + ] """ The `platform_restrictions` that are restricting this Feature. """ @@ -252,7 +290,7 @@ class StatusDetail(StripeObject): """ Whether the FinancialAccount should have the Feature. """ - status: Literal["active", "pending", "restricted"] + status: Union[Literal["active", "pending", "restricted"], str] """ Whether the Feature is operational. """ @@ -265,32 +303,38 @@ class StatusDetail(StripeObject): class OutboundPayments(StripeObject): class Ach(StripeObject): class StatusDetail(StripeObject): - code: Literal[ - "activating", - "capability_not_requested", - "financial_account_closed", - "rejected_other", - "rejected_unsupported_business", - "requirements_past_due", - "requirements_pending_verification", - "restricted_by_platform", - "restricted_other", + code: Union[ + Literal[ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other", + ], + str, ] """ Represents the reason why the status is `pending` or `restricted`. """ resolution: Optional[ - Literal[ - "contact_stripe", - "provide_information", - "remove_restriction", + Union[ + Literal[ + "contact_stripe", + "provide_information", + "remove_restriction", + ], + str, ] ] """ Represents what the user should do, if anything, to activate the Feature. """ restriction: Optional[ - Literal["inbound_flows", "outbound_flows"] + Union[Literal["inbound_flows", "outbound_flows"], str] ] """ The `platform_restrictions` that are restricting this Feature. @@ -300,7 +344,7 @@ class StatusDetail(StripeObject): """ Whether the FinancialAccount should have the Feature. """ - status: Literal["active", "pending", "restricted"] + status: Union[Literal["active", "pending", "restricted"], str] """ Whether the Feature is operational. """ @@ -312,32 +356,38 @@ class StatusDetail(StripeObject): class UsDomesticWire(StripeObject): class StatusDetail(StripeObject): - code: Literal[ - "activating", - "capability_not_requested", - "financial_account_closed", - "rejected_other", - "rejected_unsupported_business", - "requirements_past_due", - "requirements_pending_verification", - "restricted_by_platform", - "restricted_other", + code: Union[ + Literal[ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other", + ], + str, ] """ Represents the reason why the status is `pending` or `restricted`. """ resolution: Optional[ - Literal[ - "contact_stripe", - "provide_information", - "remove_restriction", + Union[ + Literal[ + "contact_stripe", + "provide_information", + "remove_restriction", + ], + str, ] ] """ Represents what the user should do, if anything, to activate the Feature. """ restriction: Optional[ - Literal["inbound_flows", "outbound_flows"] + Union[Literal["inbound_flows", "outbound_flows"], str] ] """ The `platform_restrictions` that are restricting this Feature. @@ -347,7 +397,7 @@ class StatusDetail(StripeObject): """ Whether the FinancialAccount should have the Feature. """ - status: Literal["active", "pending", "restricted"] + status: Union[Literal["active", "pending", "restricted"], str] """ Whether the Feature is operational. """ @@ -370,32 +420,38 @@ class StatusDetail(StripeObject): class OutboundTransfers(StripeObject): class Ach(StripeObject): class StatusDetail(StripeObject): - code: Literal[ - "activating", - "capability_not_requested", - "financial_account_closed", - "rejected_other", - "rejected_unsupported_business", - "requirements_past_due", - "requirements_pending_verification", - "restricted_by_platform", - "restricted_other", + code: Union[ + Literal[ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other", + ], + str, ] """ Represents the reason why the status is `pending` or `restricted`. """ resolution: Optional[ - Literal[ - "contact_stripe", - "provide_information", - "remove_restriction", + Union[ + Literal[ + "contact_stripe", + "provide_information", + "remove_restriction", + ], + str, ] ] """ Represents what the user should do, if anything, to activate the Feature. """ restriction: Optional[ - Literal["inbound_flows", "outbound_flows"] + Union[Literal["inbound_flows", "outbound_flows"], str] ] """ The `platform_restrictions` that are restricting this Feature. @@ -405,7 +461,7 @@ class StatusDetail(StripeObject): """ Whether the FinancialAccount should have the Feature. """ - status: Literal["active", "pending", "restricted"] + status: Union[Literal["active", "pending", "restricted"], str] """ Whether the Feature is operational. """ @@ -417,32 +473,38 @@ class StatusDetail(StripeObject): class UsDomesticWire(StripeObject): class StatusDetail(StripeObject): - code: Literal[ - "activating", - "capability_not_requested", - "financial_account_closed", - "rejected_other", - "rejected_unsupported_business", - "requirements_past_due", - "requirements_pending_verification", - "restricted_by_platform", - "restricted_other", + code: Union[ + Literal[ + "activating", + "capability_not_requested", + "financial_account_closed", + "rejected_other", + "rejected_unsupported_business", + "requirements_past_due", + "requirements_pending_verification", + "restricted_by_platform", + "restricted_other", + ], + str, ] """ Represents the reason why the status is `pending` or `restricted`. """ resolution: Optional[ - Literal[ - "contact_stripe", - "provide_information", - "remove_restriction", + Union[ + Literal[ + "contact_stripe", + "provide_information", + "remove_restriction", + ], + str, ] ] """ Represents what the user should do, if anything, to activate the Feature. """ restriction: Optional[ - Literal["inbound_flows", "outbound_flows"] + Union[Literal["inbound_flows", "outbound_flows"], str] ] """ The `platform_restrictions` that are restricting this Feature. @@ -452,7 +514,7 @@ class StatusDetail(StripeObject): """ Whether the FinancialAccount should have the Feature. """ - status: Literal["active", "pending", "restricted"] + status: Union[Literal["active", "pending", "restricted"], str] """ Whether the Feature is operational. """ diff --git a/stripe/treasury/_inbound_transfer.py b/stripe/treasury/_inbound_transfer.py index 4790ddb2b..1c3b31675 100644 --- a/stripe/treasury/_inbound_transfer.py +++ b/stripe/treasury/_inbound_transfer.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -51,20 +51,23 @@ class InboundTransfer( ) class FailureDetails(StripeObject): - code: Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "debit_not_authorized", - "incorrect_account_holder_address", - "incorrect_account_holder_name", - "incorrect_account_holder_tax_id", - "insufficient_funds", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", + code: Union[ + Literal[ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "debit_not_authorized", + "incorrect_account_holder_address", + "incorrect_account_holder_name", + "incorrect_account_holder_tax_id", + "insufficient_funds", + "invalid_account_number", + "invalid_currency", + "no_account", + "other", + ], + str, ] """ Reason for the failure. @@ -116,11 +119,13 @@ class Address(StripeObject): _inner_class_types = {"address": Address} class UsBankAccount(StripeObject): - account_holder_type: Optional[Literal["company", "individual"]] + account_holder_type: Optional[ + Union[Literal["company", "individual"], str] + ] """ Account holder type: individual or company. """ - account_type: Optional[Literal["checking", "savings"]] + account_type: Optional[Union[Literal["checking", "savings"], str]] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -239,7 +244,9 @@ class StatusTransitions(StripeObject): """ Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. """ - status: Literal["canceled", "failed", "processing", "succeeded"] + status: Union[ + Literal["canceled", "failed", "processing", "succeeded"], str + ] """ Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. """ diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index e3177e83d..6cc41a812 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -105,11 +105,13 @@ class FinancialAccount(StripeObject): """ class UsBankAccount(StripeObject): - account_holder_type: Optional[Literal["company", "individual"]] + account_holder_type: Optional[ + Union[Literal["company", "individual"], str] + ] """ Account holder type: individual or company. """ - account_type: Optional[Literal["checking", "savings"]] + account_type: Optional[Union[Literal["checking", "savings"], str]] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -129,7 +131,7 @@ class UsBankAccount(StripeObject): """ ID of the mandate used to make this payment. """ - network: Literal["ach", "us_domestic_wire"] + network: Union[Literal["ach", "us_domestic_wire"], str] """ The network rails used. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. """ @@ -140,7 +142,7 @@ class UsBankAccount(StripeObject): billing_details: BillingDetails financial_account: Optional[FinancialAccount] - type: Literal["financial_account", "us_bank_account"] + type: Union[Literal["financial_account", "us_bank_account"], str] """ The type of the payment method used in the OutboundPayment. """ @@ -162,17 +164,20 @@ class EndUserDetails(StripeObject): """ class ReturnedDetails(StripeObject): - code: Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "declined", - "incorrect_account_holder_name", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", + code: Union[ + Literal[ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other", + ], + str, ] """ Reason for the return. @@ -222,7 +227,7 @@ class UsDomesticWire(StripeObject): """ ach: Optional[Ach] - type: Literal["ach", "us_domestic_wire"] + type: Union[Literal["ach", "us_domestic_wire"], str] """ The US bank account network used to send funds. """ @@ -307,7 +312,9 @@ class UsDomesticWire(StripeObject): """ The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). """ - status: Literal["canceled", "failed", "posted", "processing", "returned"] + status: Union[ + Literal["canceled", "failed", "posted", "processing", "returned"], str + ] """ Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. """ diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py index 16c01ab99..414884ba1 100644 --- a/stripe/treasury/_outbound_transfer.py +++ b/stripe/treasury/_outbound_transfer.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Optional, cast, overload +from typing import ClassVar, Optional, Union, cast, overload from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -105,11 +105,13 @@ class FinancialAccount(StripeObject): """ class UsBankAccount(StripeObject): - account_holder_type: Optional[Literal["company", "individual"]] + account_holder_type: Optional[ + Union[Literal["company", "individual"], str] + ] """ Account holder type: individual or company. """ - account_type: Optional[Literal["checking", "savings"]] + account_type: Optional[Union[Literal["checking", "savings"], str]] """ Account type: checkings or savings. Defaults to checking if omitted. """ @@ -129,7 +131,7 @@ class UsBankAccount(StripeObject): """ ID of the mandate used to make this payment. """ - network: Literal["ach", "us_domestic_wire"] + network: Union[Literal["ach", "us_domestic_wire"], str] """ The network rails used. See the [docs](https://docs.stripe.com/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. """ @@ -140,7 +142,7 @@ class UsBankAccount(StripeObject): billing_details: BillingDetails financial_account: Optional[FinancialAccount] - type: Literal["financial_account", "us_bank_account"] + type: Union[Literal["financial_account", "us_bank_account"], str] """ The type of the payment method used in the OutboundTransfer. """ @@ -169,17 +171,20 @@ class Ach(StripeObject): _inner_class_types = {"ach": Ach} class ReturnedDetails(StripeObject): - code: Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "declined", - "incorrect_account_holder_name", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", + code: Union[ + Literal[ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other", + ], + str, ] """ Reason for the return. @@ -229,7 +234,7 @@ class UsDomesticWire(StripeObject): """ ach: Optional[Ach] - type: Literal["ach", "us_domestic_wire"] + type: Union[Literal["ach", "us_domestic_wire"], str] """ The US bank account network used to send funds. """ @@ -301,7 +306,9 @@ class UsDomesticWire(StripeObject): """ Information about the OutboundTransfer to be sent to the recipient account. """ - status: Literal["canceled", "failed", "posted", "processing", "returned"] + status: Union[ + Literal["canceled", "failed", "posted", "processing", "returned"], str + ] """ Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. """ diff --git a/stripe/treasury/_received_credit.py b/stripe/treasury/_received_credit.py index 112c27a03..15978760f 100644 --- a/stripe/treasury/_received_credit.py +++ b/stripe/treasury/_received_credit.py @@ -5,7 +5,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -107,12 +107,15 @@ class UsBankAccount(StripeObject): """ Set when `type` is `issuing_card`. This is an [Issuing Card](https://api.stripe.com#issuing_cards) ID. """ - type: Literal[ - "balance", - "financial_account", - "issuing_card", - "stripe", - "us_bank_account", + type: Union[ + Literal[ + "balance", + "financial_account", + "issuing_card", + "stripe", + "us_bank_account", + ], + str, ] """ Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. @@ -157,12 +160,15 @@ class SourceFlowDetails(StripeObject): Related guide: [Receiving payouts](https://docs.stripe.com/payouts) """ - type: Literal[ - "credit_reversal", - "other", - "outbound_payment", - "outbound_transfer", - "payout", + type: Union[ + Literal[ + "credit_reversal", + "other", + "outbound_payment", + "outbound_transfer", + "payout", + ], + str, ] """ The type of the source flow that originated the ReceivedCredit. @@ -217,12 +223,15 @@ class ReversalDetails(StripeObject): Time before which a ReceivedCredit can be reversed. """ restricted_reason: Optional[ - Literal[ - "already_reversed", - "deadline_passed", - "network_restricted", - "other", - "source_flow_restricted", + Union[ + Literal[ + "already_reversed", + "deadline_passed", + "network_restricted", + "other", + "source_flow_restricted", + ], + str, ] ] """ @@ -246,11 +255,14 @@ class ReversalDetails(StripeObject): An arbitrary string attached to the object. Often useful for displaying to users. """ failure_code: Optional[ - Literal[ - "account_closed", - "account_frozen", - "international_transaction", - "other", + Union[ + Literal[ + "account_closed", + "account_frozen", + "international_transaction", + "other", + ], + str, ] ] """ @@ -274,7 +286,7 @@ class ReversalDetails(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ - network: Literal["ach", "card", "stripe", "us_domestic_wire"] + network: Union[Literal["ach", "card", "stripe", "us_domestic_wire"], str] """ The rails used to send the funds. """ @@ -290,7 +302,7 @@ class ReversalDetails(StripeObject): """ Details describing when a ReceivedCredit may be reversed. """ - status: Literal["failed", "succeeded"] + status: Union[Literal["failed", "succeeded"], str] """ Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. """ diff --git a/stripe/treasury/_received_debit.py b/stripe/treasury/_received_debit.py index 98b5a2517..cceae3a07 100644 --- a/stripe/treasury/_received_debit.py +++ b/stripe/treasury/_received_debit.py @@ -5,7 +5,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers -from typing import ClassVar, Optional, cast +from typing import ClassVar, Optional, Union, cast from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -103,12 +103,15 @@ class UsBankAccount(StripeObject): """ Set when `type` is `issuing_card`. This is an [Issuing Card](https://api.stripe.com#issuing_cards) ID. """ - type: Literal[ - "balance", - "financial_account", - "issuing_card", - "stripe", - "us_bank_account", + type: Union[ + Literal[ + "balance", + "financial_account", + "issuing_card", + "stripe", + "us_bank_account", + ], + str, ] """ Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. @@ -173,12 +176,15 @@ class ReversalDetails(StripeObject): Time before which a ReceivedDebit can be reversed. """ restricted_reason: Optional[ - Literal[ - "already_reversed", - "deadline_passed", - "network_restricted", - "other", - "source_flow_restricted", + Union[ + Literal[ + "already_reversed", + "deadline_passed", + "network_restricted", + "other", + "source_flow_restricted", + ], + str, ] ] """ @@ -202,12 +208,15 @@ class ReversalDetails(StripeObject): An arbitrary string attached to the object. Often useful for displaying to users. """ failure_code: Optional[ - Literal[ - "account_closed", - "account_frozen", - "insufficient_funds", - "international_transaction", - "other", + Union[ + Literal[ + "account_closed", + "account_frozen", + "insufficient_funds", + "international_transaction", + "other", + ], + str, ] ] """ @@ -231,7 +240,7 @@ class ReversalDetails(StripeObject): """ If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. """ - network: Literal["ach", "card", "stripe"] + network: Union[Literal["ach", "card", "stripe"], str] """ The network used for the ReceivedDebit. """ @@ -247,7 +256,7 @@ class ReversalDetails(StripeObject): """ Details describing when a ReceivedDebit might be reversed. """ - status: Literal["failed", "succeeded"] + status: Union[Literal["failed", "succeeded"], str] """ Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. """ diff --git a/stripe/treasury/_transaction.py b/stripe/treasury/_transaction.py index 69837c541..baac71327 100644 --- a/stripe/treasury/_transaction.py +++ b/stripe/treasury/_transaction.py @@ -3,7 +3,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -94,16 +94,19 @@ class FlowDetails(StripeObject): """ ReceivedDebits represent funds pulled from a [FinancialAccount](https://api.stripe.com#financial_accounts). These are not initiated from the FinancialAccount. """ - type: Literal[ - "credit_reversal", - "debit_reversal", - "inbound_transfer", - "issuing_authorization", - "other", - "outbound_payment", - "outbound_transfer", - "received_credit", - "received_debit", + type: Union[ + Literal[ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit", + ], + str, ] """ Type of the flow that created the Transaction. Set to the same value as `flow_type`. @@ -155,16 +158,19 @@ class StatusTransitions(StripeObject): """ Details of the flow that created the Transaction. """ - flow_type: Literal[ - "credit_reversal", - "debit_reversal", - "inbound_transfer", - "issuing_authorization", - "other", - "outbound_payment", - "outbound_transfer", - "received_credit", - "received_debit", + flow_type: Union[ + Literal[ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit", + ], + str, ] """ Type of the flow that created the Transaction. @@ -181,7 +187,7 @@ class StatusTransitions(StripeObject): """ String representing the object's type. Objects of the same type share the same value. """ - status: Literal["open", "posted", "void"] + status: Union[Literal["open", "posted", "void"], str] """ Status of the Transaction. """ diff --git a/stripe/treasury/_transaction_entry.py b/stripe/treasury/_transaction_entry.py index 1a4bb4568..b52cd2f7b 100644 --- a/stripe/treasury/_transaction_entry.py +++ b/stripe/treasury/_transaction_entry.py @@ -4,7 +4,7 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -95,16 +95,19 @@ class FlowDetails(StripeObject): """ ReceivedDebits represent funds pulled from a [FinancialAccount](https://api.stripe.com#financial_accounts). These are not initiated from the FinancialAccount. """ - type: Literal[ - "credit_reversal", - "debit_reversal", - "inbound_transfer", - "issuing_authorization", - "other", - "outbound_payment", - "outbound_transfer", - "received_credit", - "received_debit", + type: Union[ + Literal[ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit", + ], + str, ] """ Type of the flow that created the Transaction. Set to the same value as `flow_type`. @@ -138,16 +141,19 @@ class FlowDetails(StripeObject): """ Details of the flow associated with the TransactionEntry. """ - flow_type: Literal[ - "credit_reversal", - "debit_reversal", - "inbound_transfer", - "issuing_authorization", - "other", - "outbound_payment", - "outbound_transfer", - "received_credit", - "received_debit", + flow_type: Union[ + Literal[ + "credit_reversal", + "debit_reversal", + "inbound_transfer", + "issuing_authorization", + "other", + "outbound_payment", + "outbound_transfer", + "received_credit", + "received_debit", + ], + str, ] """ Type of the flow associated with the TransactionEntry. @@ -168,27 +174,30 @@ class FlowDetails(StripeObject): """ The Transaction associated with this object. """ - type: Literal[ - "credit_reversal", - "credit_reversal_posting", - "debit_reversal", - "inbound_transfer", - "inbound_transfer_return", - "issuing_authorization_hold", - "issuing_authorization_release", - "other", - "outbound_payment", - "outbound_payment_cancellation", - "outbound_payment_failure", - "outbound_payment_posting", - "outbound_payment_return", - "outbound_transfer", - "outbound_transfer_cancellation", - "outbound_transfer_failure", - "outbound_transfer_posting", - "outbound_transfer_return", - "received_credit", - "received_debit", + type: Union[ + Literal[ + "credit_reversal", + "credit_reversal_posting", + "debit_reversal", + "inbound_transfer", + "inbound_transfer_return", + "issuing_authorization_hold", + "issuing_authorization_release", + "other", + "outbound_payment", + "outbound_payment_cancellation", + "outbound_payment_failure", + "outbound_payment_posting", + "outbound_payment_return", + "outbound_transfer", + "outbound_transfer_cancellation", + "outbound_transfer_failure", + "outbound_transfer_posting", + "outbound_transfer_return", + "received_credit", + "received_debit", + ], + str, ] """ The specific money movement that generated the TransactionEntry. diff --git a/stripe/v2/billing/_bill_setting.py b/stripe/v2/billing/_bill_setting.py index 0f3921468..68070f5dd 100644 --- a/stripe/v2/billing/_bill_setting.py +++ b/stripe/v2/billing/_bill_setting.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -16,7 +16,7 @@ class BillSetting(StripeObject): class Calculation(StripeObject): class Tax(StripeObject): - type: Literal["automatic", "manual"] + type: Union[Literal["automatic", "manual"], str] """ Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual". """ diff --git a/stripe/v2/billing/_bill_setting_version.py b/stripe/v2/billing/_bill_setting_version.py index 602aaf9fa..99cf020c5 100644 --- a/stripe/v2/billing/_bill_setting_version.py +++ b/stripe/v2/billing/_bill_setting_version.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -16,7 +16,7 @@ class BillSettingVersion(StripeObject): class Calculation(StripeObject): class Tax(StripeObject): - type: Literal["automatic", "manual"] + type: Union[Literal["automatic", "manual"], str] """ Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual". """ diff --git a/stripe/v2/billing/_cadence.py b/stripe/v2/billing/_cadence.py index 3c0a2987a..7d52123d2 100644 --- a/stripe/v2/billing/_cadence.py +++ b/stripe/v2/billing/_cadence.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -152,7 +152,7 @@ class Time(StripeObject): """ Specific configuration for determining billing dates when type=month. """ - type: Literal["day", "month", "week", "year"] + type: Union[Literal["day", "month", "week", "year"], str] """ The frequency at which a cadence bills. """ @@ -253,7 +253,7 @@ class SettingsData(StripeObject): class Bill(StripeObject): class Calculation(StripeObject): class Tax(StripeObject): - type: Literal["automatic", "manual"] + type: Union[Literal["automatic", "manual"], str] """ Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual". """ @@ -321,7 +321,7 @@ class PaymentMethodOptions(StripeObject): class AcssDebit(StripeObject): class MandateOptions(StripeObject): transaction_type: Optional[ - Literal["business", "personal"] + Union[Literal["business", "personal"], str] ] """ Transaction type of the mandate. @@ -332,7 +332,10 @@ class MandateOptions(StripeObject): Additional fields for Mandate creation. """ verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[ + Literal["automatic", "instant", "microdeposits"], + str, + ] ] """ Verification method. @@ -341,7 +344,7 @@ class MandateOptions(StripeObject): class Bancontact(StripeObject): preferred_language: Optional[ - Literal["de", "en", "fr", "nl"] + Union[Literal["de", "en", "fr", "nl"], str] ] """ Preferred language of the Bancontact authorization page that the customer is redirected to. @@ -353,7 +356,9 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[ + Union[Literal["fixed", "maximum"], str] + ] """ The AmountType for the mandate. One of `fixed` or `maximum`. """ @@ -372,7 +377,7 @@ class MandateOptions(StripeObject): Selected network to process the payment on. Depends on the available networks of the card. """ request_three_d_secure: Optional[ - Literal["any", "automatic", "challenge"] + Union[Literal["any", "automatic", "challenge"], str] ] """ An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers @@ -385,8 +390,9 @@ class MandateOptions(StripeObject): class CustomerBalance(StripeObject): class BankTransfer(StripeObject): class EuBankTransfer(StripeObject): - country: Literal[ - "BE", "DE", "ES", "FR", "IE", "NL" + country: Union[ + Literal["BE", "DE", "ES", "FR", "IE", "NL"], + str, ] """ The desired country code of the bank account information. @@ -397,12 +403,15 @@ class EuBankTransfer(StripeObject): Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. """ type: Optional[ - Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] ] """ @@ -432,7 +441,7 @@ class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): account_subcategories: List[ - Literal["checking", "savings"] + Union[Literal["checking", "savings"], str] ] """ The account subcategories to use to filter for selectable accounts. @@ -443,18 +452,26 @@ class Filters(StripeObject): Provide filters for the linked accounts that the customer can select for the payment method. """ permissions: List[ - Literal[ - "balances", - "ownership", - "payment_method", - "transactions", + Union[ + Literal[ + "balances", + "ownership", + "payment_method", + "transactions", + ], + str, ] ] """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. """ prefetch: List[ - Literal["balances", "ownership", "transactions"] + Union[ + Literal[ + "balances", "ownership", "transactions" + ], + str, + ] ] """ List of data features that you would like to retrieve upon account creation. @@ -465,8 +482,8 @@ class Filters(StripeObject): """ Additional fields for Financial Connections Session creation. """ - verification_method: Literal[ - "automatic", "instant", "microdeposits" + verification_method: Union[ + Literal["automatic", "instant", "microdeposits"], str ] """ Verification method. @@ -595,7 +612,7 @@ class Filters(StripeObject): """ Settings data that contains expanded billing settings configuration with actual values. """ - status: Literal["active", "canceled"] + status: Union[Literal["active", "canceled"], str] """ The current status of the cadence. """ diff --git a/stripe/v2/billing/_collection_setting.py b/stripe/v2/billing/_collection_setting.py index 74b8fd9f9..910efe646 100644 --- a/stripe/v2/billing/_collection_setting.py +++ b/stripe/v2/billing/_collection_setting.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -34,7 +34,9 @@ class PaymentDue(StripeObject): class PaymentMethodOptions(StripeObject): class AcssDebit(StripeObject): class MandateOptions(StripeObject): - transaction_type: Optional[Literal["business", "personal"]] + transaction_type: Optional[ + Union[Literal["business", "personal"], str] + ] """ Transaction type of the mandate. """ @@ -44,7 +46,7 @@ class MandateOptions(StripeObject): Additional fields for Mandate creation. """ verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[Literal["automatic", "instant", "microdeposits"], str] ] """ Verification method. @@ -52,7 +54,9 @@ class MandateOptions(StripeObject): _inner_class_types = {"mandate_options": MandateOptions} class Bancontact(StripeObject): - preferred_language: Optional[Literal["de", "en", "fr", "nl"]] + preferred_language: Optional[ + Union[Literal["de", "en", "fr", "nl"], str] + ] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -63,7 +67,7 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ The AmountType for the mandate. One of `fixed` or `maximum`. """ @@ -82,7 +86,7 @@ class MandateOptions(StripeObject): Selected network to process the payment on. Depends on the available networks of the card. """ request_three_d_secure: Optional[ - Literal["any", "automatic", "challenge"] + Union[Literal["any", "automatic", "challenge"], str] ] """ An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers @@ -95,7 +99,9 @@ class MandateOptions(StripeObject): class CustomerBalance(StripeObject): class BankTransfer(StripeObject): class EuBankTransfer(StripeObject): - country: Literal["BE", "DE", "ES", "FR", "IE", "NL"] + country: Union[ + Literal["BE", "DE", "ES", "FR", "IE", "NL"], str + ] """ The desired country code of the bank account information. """ @@ -105,12 +111,15 @@ class EuBankTransfer(StripeObject): Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. """ type: Optional[ - Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] ] """ @@ -137,7 +146,9 @@ class SepaDebit(StripeObject): class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): - account_subcategories: List[Literal["checking", "savings"]] + account_subcategories: List[ + Union[Literal["checking", "savings"], str] + ] """ The account subcategories to use to filter for selectable accounts. """ @@ -147,18 +158,23 @@ class Filters(StripeObject): Provide filters for the linked accounts that the customer can select for the payment method. """ permissions: List[ - Literal[ - "balances", - "ownership", - "payment_method", - "transactions", + Union[ + Literal[ + "balances", + "ownership", + "payment_method", + "transactions", + ], + str, ] ] """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. """ prefetch: List[ - Literal["balances", "ownership", "transactions"] + Union[ + Literal["balances", "ownership", "transactions"], str + ] ] """ List of data features that you would like to retrieve upon account creation. @@ -169,8 +185,8 @@ class Filters(StripeObject): """ Additional fields for Financial Connections Session creation. """ - verification_method: Literal[ - "automatic", "instant", "microdeposits" + verification_method: Union[ + Literal["automatic", "instant", "microdeposits"], str ] """ Verification method. diff --git a/stripe/v2/billing/_collection_setting_version.py b/stripe/v2/billing/_collection_setting_version.py index 1b9e9efe2..9e7502b1c 100644 --- a/stripe/v2/billing/_collection_setting_version.py +++ b/stripe/v2/billing/_collection_setting_version.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -34,7 +34,9 @@ class PaymentDue(StripeObject): class PaymentMethodOptions(StripeObject): class AcssDebit(StripeObject): class MandateOptions(StripeObject): - transaction_type: Optional[Literal["business", "personal"]] + transaction_type: Optional[ + Union[Literal["business", "personal"], str] + ] """ Transaction type of the mandate. """ @@ -44,7 +46,7 @@ class MandateOptions(StripeObject): Additional fields for Mandate creation. """ verification_method: Optional[ - Literal["automatic", "instant", "microdeposits"] + Union[Literal["automatic", "instant", "microdeposits"], str] ] """ Verification method. @@ -52,7 +54,9 @@ class MandateOptions(StripeObject): _inner_class_types = {"mandate_options": MandateOptions} class Bancontact(StripeObject): - preferred_language: Optional[Literal["de", "en", "fr", "nl"]] + preferred_language: Optional[ + Union[Literal["de", "en", "fr", "nl"], str] + ] """ Preferred language of the Bancontact authorization page that the customer is redirected to. """ @@ -63,7 +67,7 @@ class MandateOptions(StripeObject): """ Amount to be charged for future payments. """ - amount_type: Optional[Literal["fixed", "maximum"]] + amount_type: Optional[Union[Literal["fixed", "maximum"], str]] """ The AmountType for the mandate. One of `fixed` or `maximum`. """ @@ -82,7 +86,7 @@ class MandateOptions(StripeObject): Selected network to process the payment on. Depends on the available networks of the card. """ request_three_d_secure: Optional[ - Literal["any", "automatic", "challenge"] + Union[Literal["any", "automatic", "challenge"], str] ] """ An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers @@ -95,7 +99,9 @@ class MandateOptions(StripeObject): class CustomerBalance(StripeObject): class BankTransfer(StripeObject): class EuBankTransfer(StripeObject): - country: Literal["BE", "DE", "ES", "FR", "IE", "NL"] + country: Union[ + Literal["BE", "DE", "ES", "FR", "IE", "NL"], str + ] """ The desired country code of the bank account information. """ @@ -105,12 +111,15 @@ class EuBankTransfer(StripeObject): Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. """ type: Optional[ - Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", + Union[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ], + str, ] ] """ @@ -137,7 +146,9 @@ class SepaDebit(StripeObject): class UsBankAccount(StripeObject): class FinancialConnections(StripeObject): class Filters(StripeObject): - account_subcategories: List[Literal["checking", "savings"]] + account_subcategories: List[ + Union[Literal["checking", "savings"], str] + ] """ The account subcategories to use to filter for selectable accounts. """ @@ -147,18 +158,23 @@ class Filters(StripeObject): Provide filters for the linked accounts that the customer can select for the payment method. """ permissions: List[ - Literal[ - "balances", - "ownership", - "payment_method", - "transactions", + Union[ + Literal[ + "balances", + "ownership", + "payment_method", + "transactions", + ], + str, ] ] """ The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. """ prefetch: List[ - Literal["balances", "ownership", "transactions"] + Union[ + Literal["balances", "ownership", "transactions"], str + ] ] """ List of data features that you would like to retrieve upon account creation. @@ -169,8 +185,8 @@ class Filters(StripeObject): """ Additional fields for Financial Connections Session creation. """ - verification_method: Literal[ - "automatic", "instant", "microdeposits" + verification_method: Union[ + Literal["automatic", "instant", "microdeposits"], str ] """ Verification method. diff --git a/stripe/v2/billing/_contract.py b/stripe/v2/billing/_contract.py index 2bd119831..5864503a8 100644 --- a/stripe/v2/billing/_contract.py +++ b/stripe/v2/billing/_contract.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -261,7 +261,7 @@ class Criterion(StripeObject): """ Filter by pricing line lookup keys. """ - type: Literal["exclude", "include"] + type: Union[Literal["exclude", "include"], str] """ Whether to include or exclude items matching these criteria. """ @@ -384,7 +384,7 @@ class StatusTransitions(StripeObject): """ The pricing overrides. Only populated when `pricing_overrides` is passed in the `include` parameter. """ - status: Literal["active", "canceled", "draft", "ended"] + status: Union[Literal["active", "canceled", "draft", "ended"], str] """ The current status of the contract. """ diff --git a/stripe/v2/billing/_intent.py b/stripe/v2/billing/_intent.py index 3dd0afbd3..928bfc650 100644 --- a/stripe/v2/billing/_intent.py +++ b/stripe/v2/billing/_intent.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -180,7 +180,7 @@ class Time(StripeObject): """ Specific configuration for determining billing dates when type=month. """ - type: Literal["day", "month", "week", "year"] + type: Union[Literal["day", "month", "week", "year"], str] """ The frequency at which a cadence bills. """ diff --git a/stripe/v2/billing/_intent_action.py b/stripe/v2/billing/_intent_action.py index c262c1c2f..69c69ac78 100644 --- a/stripe/v2/billing/_intent_action.py +++ b/stripe/v2/billing/_intent_action.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -171,8 +171,11 @@ class CustomPricingUnitOverageRate(StripeObject): """ Details for applying a spend modifier rule. Only present if type is spend_modifier_rule. """ - type: Literal[ - "discount", "invoice_discount_rule", "spend_modifier_rule" + type: Union[ + Literal[ + "discount", "invoice_discount_rule", "spend_modifier_rule" + ], + str, ] """ Type of the apply action details. @@ -191,15 +194,18 @@ class CancellationDetails(StripeObject): Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. """ feedback: Optional[ - Literal[ - "customer_service", - "low_quality", - "missing_features", - "other", - "switched_service", - "too_complex", - "too_expensive", - "unused", + Union[ + Literal[ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused", + ], + str, ] ] """ @@ -211,11 +217,14 @@ class EffectiveAt(StripeObject): """ The timestamp at which the deactivate action takes effect. Only present if type is timestamp. """ - type: Literal[ - "current_billing_period_end", - "current_billing_period_start", - "on_reserve", - "timestamp", + type: Union[ + Literal[ + "current_billing_period_end", + "current_billing_period_start", + "on_reserve", + "timestamp", + ], + str, ] """ When the deactivate action takes effect. @@ -225,7 +234,9 @@ class PricingPlanSubscriptionDetails(StripeObject): class Overrides(StripeObject): class PartialPeriodBehavior(StripeObject): class LicenseFee(StripeObject): - credit_proration_behavior: Literal["none", "prorated"] + credit_proration_behavior: Union[ + Literal["none", "prorated"], str + ] """ The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user is deactivating. If not specified, defaults to none. """ @@ -234,7 +245,9 @@ class LicenseFee(StripeObject): """ Overrides the behavior for license fee components when the action takes effect during the service period. """ - type: Literal["license_fee", "recurring_credit_grant"] + type: Union[ + Literal["license_fee", "recurring_credit_grant"], str + ] """ The type of behavior to override. """ @@ -262,7 +275,7 @@ class LicenseFee(StripeObject): """ Details about why the cancellation was requested by the user. """ - collect_at: Literal["next_billing_date", "on_effective_at"] + collect_at: Union[Literal["next_billing_date", "on_effective_at"], str] """ Allows users to override the collect at behavior. """ @@ -294,8 +307,11 @@ class EffectiveAt(StripeObject): """ The timestamp at which the modify action takes effect. Only present if type is timestamp. """ - type: Literal[ - "current_billing_period_start", "on_reserve", "timestamp" + type: Union[ + Literal[ + "current_billing_period_start", "on_reserve", "timestamp" + ], + str, ] """ When the modify action takes effect. @@ -319,17 +335,23 @@ class ComponentConfiguration(StripeObject): class Overrides(StripeObject): class PartialPeriodBehavior(StripeObject): class LicenseFee(StripeObject): - credit_proration_behavior: Literal["none", "prorated"] + credit_proration_behavior: Union[ + Literal["none", "prorated"], str + ] """ The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user modifies the subscription. If not specified, defaults to prorated. """ - debit_proration_behavior: Literal["none", "prorated"] + debit_proration_behavior: Union[ + Literal["none", "prorated"], str + ] """ The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user modifies the subscription. If not specified, defaults to prorated. """ class RecurringCreditGrant(StripeObject): - create_behavior: Literal["full_credits", "none"] + create_behavior: Union[ + Literal["full_credits", "none"], str + ] """ Controls credit grant creation behavior during partial periods. If not specified, defaults to full_credits. """ @@ -342,7 +364,9 @@ class RecurringCreditGrant(StripeObject): """ Overrides the behavior for recurring credit grant components when the action takes effect during the service period. """ - type: Literal["license_fee", "recurring_credit_grant"] + type: Union[ + Literal["license_fee", "recurring_credit_grant"], str + ] """ The type of behavior to override. """ @@ -384,7 +408,7 @@ class RecurringCreditGrant(StripeObject): "overrides": Overrides, } - collect_at: Literal["next_billing_date", "on_effective_at"] + collect_at: Union[Literal["next_billing_date", "on_effective_at"], str] """ Allows users to override the collect at behavior. """ @@ -411,7 +435,9 @@ class RecurringCreditGrant(StripeObject): class Remove(StripeObject): class EffectiveAt(StripeObject): - type: Literal["current_billing_period_end", "on_reserve"] + type: Union[ + Literal["current_billing_period_end", "on_reserve"], str + ] """ When the remove action takes effect. """ @@ -428,7 +454,9 @@ class EffectiveAt(StripeObject): """ The ID of the spend modifier rule removed. """ - type: Literal["invoice_discount_rule", "spend_modifier_rule"] + type: Union[ + Literal["invoice_discount_rule", "spend_modifier_rule"], str + ] """ Type of the remove action. """ @@ -440,8 +468,11 @@ class EffectiveAt(StripeObject): """ The timestamp at which the subscribe action takes effect. Only present if type is timestamp. """ - type: Literal[ - "current_billing_period_start", "on_reserve", "timestamp" + type: Union[ + Literal[ + "current_billing_period_start", "on_reserve", "timestamp" + ], + str, ] """ When the subscribe action takes effect. @@ -465,13 +496,17 @@ class ComponentConfiguration(StripeObject): class Overrides(StripeObject): class PartialPeriodBehavior(StripeObject): class LicenseFee(StripeObject): - debit_proration_behavior: Literal["none", "prorated"] + debit_proration_behavior: Union[ + Literal["none", "prorated"], str + ] """ The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user is subscribing. If not specified, defaults to prorated. """ class RecurringCreditGrant(StripeObject): - create_behavior: Literal["full_credits", "none"] + create_behavior: Union[ + Literal["full_credits", "none"], str + ] """ Controls credit grant creation behavior during partial periods. If not specified, defaults to full_credits. """ @@ -484,7 +519,9 @@ class RecurringCreditGrant(StripeObject): """ Overrides the behavior for recurring credit grant components when the action takes effect during the service period. """ - type: Literal["license_fee", "recurring_credit_grant"] + type: Union[ + Literal["license_fee", "recurring_credit_grant"], str + ] """ The type of behavior to override. """ @@ -560,7 +597,7 @@ class Item(StripeObject): """ _inner_class_types = {"items": Item} - collect_at: Literal["next_billing_date", "on_effective_at"] + collect_at: Union[Literal["next_billing_date", "on_effective_at"], str] """ Allows users to override the collect at behavior. """ @@ -626,7 +663,9 @@ class Item(StripeObject): """ Details for a subscribe action. """ - type: Literal["apply", "deactivate", "modify", "remove", "subscribe"] + type: Union[ + Literal["apply", "deactivate", "modify", "remove", "subscribe"], str + ] """ Type of the Billing Intent Action. """ diff --git a/stripe/v2/billing/_meter_event_adjustment.py b/stripe/v2/billing/_meter_event_adjustment.py index a8bdf3068..741df9078 100644 --- a/stripe/v2/billing/_meter_event_adjustment.py +++ b/stripe/v2/billing/_meter_event_adjustment.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar +from typing import ClassVar, Union from typing_extensions import Literal @@ -44,7 +44,7 @@ class Cancel(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ - status: Literal["complete", "pending"] + status: Union[Literal["complete", "pending"], str] """ Open Enum. The meter event adjustment's status. """ diff --git a/stripe/v2/billing/_pricing_plan_subscription.py b/stripe/v2/billing/_pricing_plan_subscription.py index 4facaf009..dce05a1b5 100644 --- a/stripe/v2/billing/_pricing_plan_subscription.py +++ b/stripe/v2/billing/_pricing_plan_subscription.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe.v2._amount import Amount as V2AmountResource -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -29,15 +29,18 @@ class CancellationDetails(StripeObject): Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. """ feedback: Optional[ - Literal[ - "customer_service", - "low_quality", - "missing_features", - "other", - "switched_service", - "too_complex", - "too_expensive", - "unused", + Union[ + Literal[ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused", + ], + str, ] ] """ @@ -264,7 +267,9 @@ class CustomPricingUnit(StripeObject): """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[ + Literal["custom_pricing_unit", "monetary"], str + ] """ The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. """ @@ -340,7 +345,9 @@ class CustomPricingUnit(StripeObject): """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[ + Literal["custom_pricing_unit", "monetary"], str + ] """ The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. """ @@ -418,7 +425,9 @@ class ServiceCycle(StripeObject): """ The service cycle configuration. """ - type: Literal["credit_grant", "credit_grant_per_tenant"] + type: Union[ + Literal["credit_grant", "credit_grant_per_tenant"], str + ] """ The type of the recurring credit grant. """ diff --git a/stripe/v2/billing/_profile.py b/stripe/v2/billing/_profile.py index 958120cf7..45fa9b44a 100644 --- a/stripe/v2/billing/_profile.py +++ b/stripe/v2/billing/_profile.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -49,7 +49,7 @@ class Profile(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ - status: Literal["active", "inactive"] + status: Union[Literal["active", "inactive"], str] """ The current status of the billing profile. """ diff --git a/stripe/v2/billing/_service_action.py b/stripe/v2/billing/_service_action.py index 374b756ff..263bf5a53 100644 --- a/stripe/v2/billing/_service_action.py +++ b/stripe/v2/billing/_service_action.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._stripe_object import StripeObject from stripe.v2._amount import Amount as V2AmountResource -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: @@ -48,7 +48,7 @@ class CustomPricingUnit(StripeObject): """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[Literal["custom_pricing_unit", "monetary"], str] """ The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. """ @@ -134,7 +134,7 @@ class CustomPricingUnit(StripeObject): """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ - type: Literal["custom_pricing_unit", "monetary"] + type: Union[Literal["custom_pricing_unit", "monetary"], str] """ The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. """ @@ -229,7 +229,7 @@ class ExpiryConfig(StripeObject): """ The length of the interval for assessing service. """ - type: Literal["credit_grant", "credit_grant_per_tenant"] + type: Union[Literal["credit_grant", "credit_grant_per_tenant"], str] """ The type of the service action. """ diff --git a/stripe/v2/commerce/_product_catalog_import.py b/stripe/v2/commerce/_product_catalog_import.py index 3f4229c32..53335ea53 100644 --- a/stripe/v2/commerce/_product_catalog_import.py +++ b/stripe/v2/commerce/_product_catalog_import.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -33,7 +33,10 @@ class UploadUrl(StripeObject): _inner_class_types = {"upload_url": UploadUrl} class Failed(StripeObject): - code: Literal["file_not_found", "internal_error", "invalid_file"] + code: Union[ + Literal["file_not_found", "internal_error", "invalid_file"], + str, + ] """ The error code for this product catalog processing failure. """ @@ -41,7 +44,7 @@ class Failed(StripeObject): """ A message explaining why the import failed. """ - type: Literal["cannot_proceed", "transient_failure"] + type: Union[Literal["cannot_proceed", "transient_failure"], str] """ The error type for this product catalog processing failure. """ @@ -167,7 +170,9 @@ class Sample(StripeObject): """ The time this ProductCatalogImport was created. """ - feed_type: Literal["inventory", "pricing", "product", "promotion"] + feed_type: Union[ + Literal["inventory", "pricing", "product", "promotion"], str + ] """ The type of feed data being imported into the product catalog. """ @@ -183,7 +188,7 @@ class Sample(StripeObject): """ Additional information about the object in a structured format. """ - mode: Literal["replace", "upsert"] + mode: Union[Literal["replace", "upsert"], str] """ The import strategy for handling existing catalog data. """ diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index ec4de30d6..a27fdb221 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -7389,22 +7389,25 @@ class RegulatedActivity(StripeObject): """ high_risk_activities: Optional[ List[ - Literal[ - "adult_entertainment", - "gambling", - "hold_client_funds", - "investment_services", - "lending_banking", - "marijuana_or_related_services", - "money_services", - "nicotine_tobacco_or_related_services", - "none", - "operate_foreign_exchange_virtual_currencies_brokerage_otc", - "pharmaceuticals", - "precious_metals_precious_stones_jewelry", - "safe_deposit_box_rentals", - "third_party_payment_processing", - "weapons_firearms_and_explosives", + Union[ + Literal[ + "adult_entertainment", + "gambling", + "hold_client_funds", + "investment_services", + "lending_banking", + "marijuana_or_related_services", + "money_services", + "nicotine_tobacco_or_related_services", + "none", + "operate_foreign_exchange_virtual_currencies_brokerage_otc", + "pharmaceuticals", + "precious_metals_precious_stones_jewelry", + "safe_deposit_box_rentals", + "third_party_payment_processing", + "weapons_firearms_and_explosives", + ], + str, ] ] ] @@ -7428,20 +7431,23 @@ class RegulatedActivity(StripeObject): Does the business participate in any regulated activity. """ purpose_of_funds: Optional[ - Literal[ - "charitable_donations", - "ecommerce_retail_payments", - "investment_purposes", - "other", - "payments_to_friends_or_family_abroad", - "payroll", - "personal_or_living_expenses", - "protect_wealth", - "purchase_goods_and_services", - "receive_payments_for_goods_and_services", - "tax_optimization", - "third_party_money_transmission", - "treasury_management", + Union[ + Literal[ + "charitable_donations", + "ecommerce_retail_payments", + "investment_purposes", + "other", + "payments_to_friends_or_family_abroad", + "payroll", + "personal_or_living_expenses", + "protect_wealth", + "purchase_goods_and_services", + "receive_payments_for_goods_and_services", + "tax_optimization", + "third_party_money_transmission", + "treasury_management", + ], + str, ] ] """ @@ -7456,19 +7462,22 @@ class RegulatedActivity(StripeObject): Details of the regulated activity if the business participates in one. """ source_of_funds: Optional[ - Literal[ - "business_loans", - "grants", - "inter_company_funds", - "investment_proceeds", - "legal_settlement", - "owners_capital", - "pension_retirement", - "sales_of_assets", - "sales_of_goods_and_services", - "tax_refund", - "third_party_funds", - "treasury_reserves", + Union[ + Literal[ + "business_loans", + "grants", + "inter_company_funds", + "investment_proceeds", + "legal_settlement", + "owners_capital", + "pension_retirement", + "sales_of_assets", + "sales_of_goods_and_services", + "tax_refund", + "third_party_funds", + "treasury_reserves", + ], + str, ] ] """ @@ -9132,91 +9141,94 @@ class Responsibilities(StripeObject): """ locales: Optional[ List[ - Literal[ - "ar-SA", - "bg", - "bg-BG", - "cs", - "cs-CZ", - "da", - "da-DK", - "de", - "de-DE", - "el", - "el-GR", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-IE", - "en-IN", - "en-NZ", - "en-SG", - "en-US", - "es", - "es-419", - "es-ES", - "et", - "et-EE", - "fi", - "fil", - "fil-PH", - "fi-FI", - "fr", - "fr-CA", - "fr-FR", - "he-IL", - "hr", - "hr-HR", - "hu", - "hu-HU", - "id", - "id-ID", - "it", - "it-IT", - "ja", - "ja-JP", - "ko", - "ko-KR", - "lt", - "lt-LT", - "lv", - "lv-LV", - "ms", - "ms-MY", - "mt", - "mt-MT", - "nb", - "nb-NO", - "nl", - "nl-NL", - "pl", - "pl-PL", - "pt", - "pt-BR", - "pt-PT", - "ro", - "ro-RO", - "ru", - "ru-RU", - "sk", - "sk-SK", - "sl", - "sl-SI", - "sv", - "sv-SE", - "th", - "th-TH", - "tr", - "tr-TR", - "vi", - "vi-VN", - "zh", - "zh-Hans", - "zh-Hant-HK", - "zh-Hant-TW", - "zh-HK", - "zh-TW", + Union[ + Literal[ + "ar-SA", + "bg", + "bg-BG", + "cs", + "cs-CZ", + "da", + "da-DK", + "de", + "de-DE", + "el", + "el-GR", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "en-US", + "es", + "es-419", + "es-ES", + "et", + "et-EE", + "fi", + "fil", + "fil-PH", + "fi-FI", + "fr", + "fr-CA", + "fr-FR", + "he-IL", + "hr", + "hr-HR", + "hu", + "hu-HU", + "id", + "id-ID", + "it", + "it-IT", + "ja", + "ja-JP", + "ko", + "ko-KR", + "lt", + "lt-LT", + "lv", + "lv-LV", + "ms", + "ms-MY", + "mt", + "mt-MT", + "nb", + "nb-NO", + "nl", + "nl-NL", + "pl", + "pl-PL", + "pt", + "pt-BR", + "pt-PT", + "ro", + "ro-RO", + "ru", + "ru-RU", + "sk", + "sk-SK", + "sl", + "sl-SI", + "sv", + "sv-SE", + "th", + "th-TH", + "tr", + "tr-TR", + "vi", + "vi-VN", + "zh", + "zh-Hans", + "zh-Hant-HK", + "zh-Hant-TW", + "zh-HK", + "zh-TW", + ], + str, ] ] ] @@ -9243,103 +9255,106 @@ class Responsibilities(StripeObject): class FutureRequirements(StripeObject): class Entry(StripeObject): class Error(StripeObject): - code: Literal[ - "invalid_address_city_state_postal_code", - "invalid_address_highway_contract_box", - "invalid_address_private_mailbox", - "invalid_business_profile_name", - "invalid_business_profile_name_denylisted", - "invalid_company_name_denylisted", - "invalid_dob_age_over_maximum", - "invalid_dob_age_under_18", - "invalid_dob_age_under_minimum", - "invalid_product_description_length", - "invalid_product_description_url_match", - "invalid_representative_country", - "invalid_statement_descriptor_business_mismatch", - "invalid_statement_descriptor_denylisted", - "invalid_statement_descriptor_length", - "invalid_statement_descriptor_prefix_denylisted", - "invalid_statement_descriptor_prefix_mismatch", - "invalid_street_address", - "invalid_tax_id", - "invalid_tax_id_format", - "invalid_tos_acceptance", - "invalid_url_denylisted", - "invalid_url_format", - "invalid_url_website_business_information_mismatch", - "invalid_url_website_empty", - "invalid_url_website_inaccessible", - "invalid_url_website_inaccessible_geoblocked", - "invalid_url_website_inaccessible_password_protected", - "invalid_url_website_incomplete", - "invalid_url_website_incomplete_cancellation_policy", - "invalid_url_website_incomplete_customer_service_details", - "invalid_url_website_incomplete_legal_restrictions", - "invalid_url_website_incomplete_refund_policy", - "invalid_url_website_incomplete_return_policy", - "invalid_url_website_incomplete_terms_and_conditions", - "invalid_url_website_incomplete_under_construction", - "invalid_url_website_other", - "invalid_url_web_presence_detected", - "invalid_value_other", - "unresolvable_ip_address", - "unresolvable_postal_code", - "verification_directors_mismatch", - "verification_document_address_mismatch", - "verification_document_address_missing", - "verification_document_corrupt", - "verification_document_country_not_supported", - "verification_document_directors_mismatch", - "verification_document_dob_mismatch", - "verification_document_duplicate_type", - "verification_document_expired", - "verification_document_failed_copy", - "verification_document_failed_greyscale", - "verification_document_failed_other", - "verification_document_failed_test_mode", - "verification_document_fraudulent", - "verification_document_id_number_mismatch", - "verification_document_id_number_missing", - "verification_document_incomplete", - "verification_document_invalid", - "verification_document_issue_or_expiry_date_missing", - "verification_document_manipulated", - "verification_document_missing_back", - "verification_document_missing_front", - "verification_document_name_mismatch", - "verification_document_name_missing", - "verification_document_nationality_mismatch", - "verification_document_not_readable", - "verification_document_not_signed", - "verification_document_not_uploaded", - "verification_document_photo_mismatch", - "verification_document_too_large", - "verification_document_type_not_supported", - "verification_extraneous_directors", - "verification_failed_address_match", - "verification_failed_business_iec_number", - "verification_failed_document_match", - "verification_failed_id_number_match", - "verification_failed_keyed_identity", - "verification_failed_keyed_match", - "verification_failed_name_match", - "verification_failed_other", - "verification_failed_representative_authority", - "verification_failed_residential_address", - "verification_failed_tax_id_match", - "verification_failed_tax_id_not_issued", - "verification_missing_directors", - "verification_missing_executives", - "verification_missing_owners", - "verification_requires_additional_memorandum_of_associations", - "verification_requires_additional_proof_of_registration", - "verification_selfie_document_missing_photo", - "verification_selfie_face_mismatch", - "verification_selfie_manipulated", - "verification_selfie_unverified_other", - "verification_supportability", - "verification_token_stale", + code: Union[ + Literal[ + "invalid_address_city_state_postal_code", + "invalid_address_highway_contract_box", + "invalid_address_private_mailbox", + "invalid_business_profile_name", + "invalid_business_profile_name_denylisted", + "invalid_company_name_denylisted", + "invalid_dob_age_over_maximum", + "invalid_dob_age_under_18", + "invalid_dob_age_under_minimum", + "invalid_product_description_length", + "invalid_product_description_url_match", + "invalid_representative_country", + "invalid_statement_descriptor_business_mismatch", + "invalid_statement_descriptor_denylisted", + "invalid_statement_descriptor_length", + "invalid_statement_descriptor_prefix_denylisted", + "invalid_statement_descriptor_prefix_mismatch", + "invalid_street_address", + "invalid_tax_id", + "invalid_tax_id_format", + "invalid_tos_acceptance", + "invalid_url_denylisted", + "invalid_url_format", + "invalid_url_website_business_information_mismatch", + "invalid_url_website_empty", + "invalid_url_website_inaccessible", + "invalid_url_website_inaccessible_geoblocked", + "invalid_url_website_inaccessible_password_protected", + "invalid_url_website_incomplete", + "invalid_url_website_incomplete_cancellation_policy", + "invalid_url_website_incomplete_customer_service_details", + "invalid_url_website_incomplete_legal_restrictions", + "invalid_url_website_incomplete_refund_policy", + "invalid_url_website_incomplete_return_policy", + "invalid_url_website_incomplete_terms_and_conditions", + "invalid_url_website_incomplete_under_construction", + "invalid_url_website_other", + "invalid_url_web_presence_detected", + "invalid_value_other", + "unresolvable_ip_address", + "unresolvable_postal_code", + "verification_directors_mismatch", + "verification_document_address_mismatch", + "verification_document_address_missing", + "verification_document_corrupt", + "verification_document_country_not_supported", + "verification_document_directors_mismatch", + "verification_document_dob_mismatch", + "verification_document_duplicate_type", + "verification_document_expired", + "verification_document_failed_copy", + "verification_document_failed_greyscale", + "verification_document_failed_other", + "verification_document_failed_test_mode", + "verification_document_fraudulent", + "verification_document_id_number_mismatch", + "verification_document_id_number_missing", + "verification_document_incomplete", + "verification_document_invalid", + "verification_document_issue_or_expiry_date_missing", + "verification_document_manipulated", + "verification_document_missing_back", + "verification_document_missing_front", + "verification_document_name_mismatch", + "verification_document_name_missing", + "verification_document_nationality_mismatch", + "verification_document_not_readable", + "verification_document_not_signed", + "verification_document_not_uploaded", + "verification_document_photo_mismatch", + "verification_document_too_large", + "verification_document_type_not_supported", + "verification_extraneous_directors", + "verification_failed_address_match", + "verification_failed_business_iec_number", + "verification_failed_document_match", + "verification_failed_id_number_match", + "verification_failed_keyed_identity", + "verification_failed_keyed_match", + "verification_failed_name_match", + "verification_failed_other", + "verification_failed_representative_authority", + "verification_failed_residential_address", + "verification_failed_tax_id_match", + "verification_failed_tax_id_not_issued", + "verification_missing_directors", + "verification_missing_executives", + "verification_missing_owners", + "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", + "verification_selfie_document_missing_photo", + "verification_selfie_face_mismatch", + "verification_selfie_manipulated", + "verification_selfie_unverified_other", + "verification_supportability", + "verification_token_stale", + ], + str, ] """ Machine-readable code describing the error. @@ -9359,116 +9374,122 @@ class Deadline(StripeObject): The current status of the requirement's impact. """ - capability: Literal[ - "ach_debit_payments", - "acss_debit_payments", - "affirm_payments", - "afterpay_clearpay_payments", - "alma_payments", - "amazon_pay_payments", - "automatic_indirect_tax", - "au_becs_debit_payments", - "bacs_debit_payments", - "bancontact_payments", - "bank_accounts.ach", - "bank_accounts.becs", - "bank_accounts.eft", - "bank_accounts.fedwire", - "bank_accounts.fps", - "bank_accounts.instant", - "bank_accounts.local", - "bank_accounts.npp", - "bank_accounts.rtp", - "bank_accounts.sepa_credit", - "bank_accounts.sepa_instant", - "bank_accounts.swift", - "bank_accounts.wire", - "blik_payments", - "boleto_payments", - "business_storage.inbound.eur", - "business_storage.inbound.gbp", - "business_storage.inbound.usd", - "business_storage.outbound.eur", - "business_storage.outbound.gbp", - "business_storage.outbound.usd", - "cards", - "card_payments", - "cartes_bancaires_payments", - "cashapp_payments", - "commercial.celtic.charge_card", - "commercial.celtic.spend_card", - "commercial.cross_river_bank.charge_card", - "commercial.cross_river_bank.prepaid_card", - "commercial.cross_river_bank.spend_card", - "commercial.fifth_third.charge_card", - "commercial.lead.prepaid_card", - "commercial.stripe.charge_card", - "commercial.stripe.prepaid_card", - "consumer.celtic.revolving_credit_card", - "consumer.cross_river_bank.prepaid_card", - "consumer.holds_currencies.usd", - "consumer.lead.debit_card", - "consumer.lead.prepaid_card", - "consumer_storage.inbound.usd", - "consumer_storage.outbound.usd", - "crypto_wallets", - "eps_payments", - "financial_addresses.bank_accounts", - "fpx_payments", - "gb_bank_transfer_payments", - "grabpay_payments", - "holds_currencies.eur", - "holds_currencies.gbp", - "holds_currencies.usd", - "ideal_payments", - "inbound_transfers.financial_accounts", - "jcb_payments", - "jp_bank_transfer_payments", - "kakao_pay_payments", - "klarna_payments", - "konbini_payments", - "kr_card_payments", - "link_payments", - "mobilepay_payments", - "multibanco_payments", - "mx_bank_transfer_payments", - "naver_pay_payments", - "outbound_payments.bank_accounts", - "outbound_payments.cards", - "outbound_payments.financial_accounts", - "outbound_payments.paper_checks", - "outbound_transfers.bank_accounts", - "outbound_transfers.financial_accounts", - "oxxo_payments", - "p24_payments", - "paper_checks", - "payco_payments", - "paynow_payments", - "pay_by_bank_payments", - "promptpay_payments", - "received_credits.bank_accounts", - "received_debits.bank_accounts", - "revolut_pay_payments", - "samsung_pay_payments", - "sepa_bank_transfer_payments", - "sepa_debit_payments", - "stripe_balance.payouts", - "stripe_balance.stripe_transfers", - "swish_payments", - "twint_payments", - "us_bank_transfer_payments", - "zip_payments", + capability: Union[ + Literal[ + "ach_debit_payments", + "acss_debit_payments", + "affirm_payments", + "afterpay_clearpay_payments", + "alma_payments", + "amazon_pay_payments", + "automatic_indirect_tax", + "au_becs_debit_payments", + "bacs_debit_payments", + "bancontact_payments", + "bank_accounts.ach", + "bank_accounts.becs", + "bank_accounts.eft", + "bank_accounts.fedwire", + "bank_accounts.fps", + "bank_accounts.instant", + "bank_accounts.local", + "bank_accounts.npp", + "bank_accounts.rtp", + "bank_accounts.sepa_credit", + "bank_accounts.sepa_instant", + "bank_accounts.swift", + "bank_accounts.wire", + "blik_payments", + "boleto_payments", + "business_storage.inbound.eur", + "business_storage.inbound.gbp", + "business_storage.inbound.usd", + "business_storage.outbound.eur", + "business_storage.outbound.gbp", + "business_storage.outbound.usd", + "cards", + "card_payments", + "cartes_bancaires_payments", + "cashapp_payments", + "commercial.celtic.charge_card", + "commercial.celtic.spend_card", + "commercial.cross_river_bank.charge_card", + "commercial.cross_river_bank.prepaid_card", + "commercial.cross_river_bank.spend_card", + "commercial.fifth_third.charge_card", + "commercial.lead.prepaid_card", + "commercial.stripe.charge_card", + "commercial.stripe.prepaid_card", + "consumer.celtic.revolving_credit_card", + "consumer.cross_river_bank.prepaid_card", + "consumer.holds_currencies.usd", + "consumer.lead.debit_card", + "consumer.lead.prepaid_card", + "consumer_storage.inbound.usd", + "consumer_storage.outbound.usd", + "crypto_wallets", + "eps_payments", + "financial_addresses.bank_accounts", + "fpx_payments", + "gb_bank_transfer_payments", + "grabpay_payments", + "holds_currencies.eur", + "holds_currencies.gbp", + "holds_currencies.usd", + "ideal_payments", + "inbound_transfers.financial_accounts", + "jcb_payments", + "jp_bank_transfer_payments", + "kakao_pay_payments", + "klarna_payments", + "konbini_payments", + "kr_card_payments", + "link_payments", + "mobilepay_payments", + "multibanco_payments", + "mx_bank_transfer_payments", + "naver_pay_payments", + "outbound_payments.bank_accounts", + "outbound_payments.cards", + "outbound_payments.financial_accounts", + "outbound_payments.paper_checks", + "outbound_transfers.bank_accounts", + "outbound_transfers.financial_accounts", + "oxxo_payments", + "p24_payments", + "paper_checks", + "payco_payments", + "paynow_payments", + "pay_by_bank_payments", + "promptpay_payments", + "received_credits.bank_accounts", + "received_debits.bank_accounts", + "revolut_pay_payments", + "samsung_pay_payments", + "sepa_bank_transfer_payments", + "sepa_debit_payments", + "stripe_balance.payouts", + "stripe_balance.stripe_transfers", + "swish_payments", + "twint_payments", + "us_bank_transfer_payments", + "zip_payments", + ], + str, ] """ The name of the Capability which will be restricted. """ - configuration: Literal[ - "card_creator", - "customer", - "merchant", - "money_manager", - "recipient", - "storer", + configuration: Union[ + Literal[ + "card_creator", + "customer", + "merchant", + "money_manager", + "recipient", + "storer", + ], + str, ] """ The configuration which specifies the Capability which will be restricted. @@ -9502,7 +9523,9 @@ class Reference(StripeObject): """ If `resource` is the type, the resource token. """ - type: Literal["inquiry", "payment_method", "person"] + type: Union[ + Literal["inquiry", "payment_method", "person"], str + ] """ The type of the reference. If the type is "inquiry", the inquiry token can be found in the "inquiry" field. Otherwise the type is an API resource, the token for which can be found in the "resource" field. @@ -11063,147 +11086,150 @@ class IdNumber(StripeObject): """ The registrar of the ID number (Only valid for DE ID number types). """ - type: Literal[ - "ae_crn", - "ae_vat", - "ao_nif", - "ar_cuit", - "at_fn", - "at_stn", - "at_vat", - "au_abn", - "au_acn", - "au_in", - "az_tin", - "bd_etin", - "be_cbe", - "be_vat", - "bg_uic", - "bg_vat", - "bm_crn", - "bo_tin", - "br_cnpj", - "bt_tpn", - "ca_cn", - "ca_crarr", - "ca_gst_hst", - "ca_neq", - "ca_rid", - "ch_chid", - "ch_uid", - "co_nit", - "cr_cpj", - "cr_nite", - "cy_he", - "cy_tic", - "cy_vat", - "cz_ico", - "cz_vat", - "de_hrn", - "de_stn", - "de_vat", - "dk_cvr", - "dk_vat", - "do_rcn", - "ec_ruc", - "ee_rk", - "ee_vat", - "eg_tin", - "es_cif", - "es_vat", - "fi_vat", - "fi_yt", - "fr_rna", - "fr_siren", - "fr_vat", - "gb_crn", - "gb_vat", - "gh_tin", - "gi_crn", - "gr_afm", - "gr_gemi", - "gr_vat", - "gt_nit", - "gy_tin", - "hk_br", - "hk_cr", - "hn_rtn", - "hr_mbs", - "hr_oib", - "hr_vat", - "hu_cjs", - "hu_tin", - "hu_vat", - "ie_crn", - "ie_trn", - "ie_vat", - "it_rea", - "it_vat", - "jm_trn", - "jo_crn", - "jp_cn", - "ke_pin", - "ky_crn", - "kz_bin", - "li_uid", - "lk_tin", - "lt_ccrn", - "lt_vat", - "lu_nif", - "lu_rcs", - "lu_vat", - "lv_urn", - "lv_vat", - "mo_tin", - "mt_crn", - "mt_tin", - "mt_vat", - "mv_tin", - "mx_rfc", - "my_brn", - "my_coid", - "my_itn", - "my_sst", - "mz_nuit", - "ng_tin", - "nl_kvk", - "nl_rsin", - "nl_vat", - "no_orgnr", - "nz_bn", - "nz_ird", - "pa_ruc", - "pe_ruc", - "ph_tin", - "pk_ntn", - "pl_nip", - "pl_regon", - "pl_vat", - "pt_vat", - "py_ruc", - "ro_cui", - "ro_orc", - "ro_vat", - "sa_crn", - "sa_tin", - "se_orgnr", - "se_vat", - "sg_uen", - "si_msp", - "si_tin", - "si_vat", - "sk_dic", - "sk_ico", - "sk_vat", - "sl_tin", - "sv_nit", - "th_crn", - "th_prn", - "th_tin", - "us_ein", - "uy_ruc", - "vg_cn", - "za_tin", + type: Union[ + Literal[ + "ae_crn", + "ae_vat", + "ao_nif", + "ar_cuit", + "at_fn", + "at_stn", + "at_vat", + "au_abn", + "au_acn", + "au_in", + "az_tin", + "bd_etin", + "be_cbe", + "be_vat", + "bg_uic", + "bg_vat", + "bm_crn", + "bo_tin", + "br_cnpj", + "bt_tpn", + "ca_cn", + "ca_crarr", + "ca_gst_hst", + "ca_neq", + "ca_rid", + "ch_chid", + "ch_uid", + "co_nit", + "cr_cpj", + "cr_nite", + "cy_he", + "cy_tic", + "cy_vat", + "cz_ico", + "cz_vat", + "de_hrn", + "de_stn", + "de_vat", + "dk_cvr", + "dk_vat", + "do_rcn", + "ec_ruc", + "ee_rk", + "ee_vat", + "eg_tin", + "es_cif", + "es_vat", + "fi_vat", + "fi_yt", + "fr_rna", + "fr_siren", + "fr_vat", + "gb_crn", + "gb_vat", + "gh_tin", + "gi_crn", + "gr_afm", + "gr_gemi", + "gr_vat", + "gt_nit", + "gy_tin", + "hk_br", + "hk_cr", + "hn_rtn", + "hr_mbs", + "hr_oib", + "hr_vat", + "hu_cjs", + "hu_tin", + "hu_vat", + "ie_crn", + "ie_trn", + "ie_vat", + "it_rea", + "it_vat", + "jm_trn", + "jo_crn", + "jp_cn", + "ke_pin", + "ky_crn", + "kz_bin", + "li_uid", + "lk_tin", + "lt_ccrn", + "lt_vat", + "lu_nif", + "lu_rcs", + "lu_vat", + "lv_urn", + "lv_vat", + "mo_tin", + "mt_crn", + "mt_tin", + "mt_vat", + "mv_tin", + "mx_rfc", + "my_brn", + "my_coid", + "my_itn", + "my_sst", + "mz_nuit", + "ng_tin", + "nl_kvk", + "nl_rsin", + "nl_vat", + "no_orgnr", + "nz_bn", + "nz_ird", + "pa_ruc", + "pe_ruc", + "ph_tin", + "pk_ntn", + "pl_nip", + "pl_regon", + "pl_vat", + "pt_vat", + "py_ruc", + "ro_cui", + "ro_orc", + "ro_vat", + "sa_crn", + "sa_tin", + "se_orgnr", + "se_vat", + "sg_uen", + "si_msp", + "si_tin", + "si_vat", + "sk_dic", + "sk_ico", + "sk_vat", + "sl_tin", + "sv_nit", + "th_crn", + "th_prn", + "th_tin", + "us_ein", + "uy_ruc", + "vg_cn", + "za_tin", + ], + str, ] """ Open Enum. The ID number type of a business entity. @@ -11372,34 +11398,37 @@ class Kanji(StripeObject): The business legal name in non latin script. """ structure: Optional[ - Literal[ - "cooperative", - "free_zone_establishment", - "free_zone_llc", - "governmental_unit", - "government_instrumentality", - "incorporated_association", - "incorporated_non_profit", - "incorporated_partnership", - "limited_liability_partnership", - "llc", - "multi_member_llc", - "private_company", - "private_corporation", - "private_partnership", - "public_company", - "public_corporation", - "public_listed_corporation", - "public_partnership", - "registered_charity", - "single_member_llc", - "sole_establishment", - "sole_proprietorship", - "tax_exempt_government_instrumentality", - "trust", - "unincorporated_association", - "unincorporated_non_profit", - "unincorporated_partnership", + Union[ + Literal[ + "cooperative", + "free_zone_establishment", + "free_zone_llc", + "governmental_unit", + "government_instrumentality", + "incorporated_association", + "incorporated_non_profit", + "incorporated_partnership", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_listed_corporation", + "public_partnership", + "registered_charity", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "trust", + "unincorporated_association", + "unincorporated_non_profit", + "unincorporated_partnership", + ], + str, ] ] """ @@ -11636,104 +11665,107 @@ class Visa(StripeObject): } class IdNumber(StripeObject): - type: Literal[ - "ae_eid", - "ao_nif", - "ar_cuil", - "ar_dni", - "at_stn", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "be_nrn", - "bg_ucn", - "bm_pp", - "bn_nric", - "bo_ci", - "br_cpf", - "bt_cid", - "ca_sin", - "ch_oasi", - "cl_rut", - "cn_pp", - "co_nuip", - "cr_ci", - "cr_cpf", - "cr_dimex", - "cr_nite", - "cy_tic", - "cz_rc", - "de_stn", - "dk_cpr", - "do_cie", - "do_rcn", - "ec_ci", - "ee_ik", - "eg_tin", - "es_nif", - "fi_hetu", - "fr_nir", - "gb_nino", - "gh_pin", - "gr_afm", - "gt_nit", - "gy_tin", - "hk_id", - "hn_rtn", - "hr_oib", - "hu_ad", - "id_nik", - "ie_ppsn", - "is_kt", - "it_cf", - "jm_trn", - "jo_pin", - "jp_inc", - "ke_pin", - "ky_pp", - "kz_iin", - "li_peid", - "lk_nic", - "lt_ak", - "lu_nif", - "lv_pk", - "mo_bir", - "mt_nic", - "mv_tin", - "mx_rfc", - "my_nric", - "mz_nuit", - "ng_nin", - "nl_bsn", - "no_nin", - "nz_ird", - "pa_ruc", - "pe_dni", - "ph_tin", - "pk_cnic", - "pk_snic", - "pl_pesel", - "pt_nif", - "py_ruc", - "ro_cnp", - "sa_tin", - "se_pin", - "sg_fin", - "sg_nric", - "si_pin", - "sk_dic", - "sv_nit", - "th_lc", - "th_pin", - "tr_tin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - "uy_dni", - "vg_pp", - "za_id", + type: Union[ + Literal[ + "ae_eid", + "ao_nif", + "ar_cuil", + "ar_dni", + "at_stn", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "be_nrn", + "bg_ucn", + "bm_pp", + "bn_nric", + "bo_ci", + "br_cpf", + "bt_cid", + "ca_sin", + "ch_oasi", + "cl_rut", + "cn_pp", + "co_nuip", + "cr_ci", + "cr_cpf", + "cr_dimex", + "cr_nite", + "cy_tic", + "cz_rc", + "de_stn", + "dk_cpr", + "do_cie", + "do_rcn", + "ec_ci", + "ee_ik", + "eg_tin", + "es_nif", + "fi_hetu", + "fr_nir", + "gb_nino", + "gh_pin", + "gr_afm", + "gt_nit", + "gy_tin", + "hk_id", + "hn_rtn", + "hr_oib", + "hu_ad", + "id_nik", + "ie_ppsn", + "is_kt", + "it_cf", + "jm_trn", + "jo_pin", + "jp_inc", + "ke_pin", + "ky_pp", + "kz_iin", + "li_peid", + "lk_nic", + "lt_ak", + "lu_nif", + "lv_pk", + "mo_bir", + "mt_nic", + "mv_tin", + "mx_rfc", + "my_nric", + "mz_nuit", + "ng_nin", + "nl_bsn", + "no_nin", + "nz_ird", + "pa_ruc", + "pe_dni", + "ph_tin", + "pk_cnic", + "pk_snic", + "pl_pesel", + "pt_nif", + "py_ruc", + "ro_cnp", + "sa_tin", + "se_pin", + "sg_fin", + "sg_nric", + "si_pin", + "sk_dic", + "sv_nit", + "th_lc", + "th_pin", + "tr_tin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + "uy_dni", + "vg_pp", + "za_id", + ], + str, ] """ The ID number type of an individual. @@ -11924,7 +11956,7 @@ class Kanji(StripeObject): """ The identification numbers (e.g., SSN) associated with the individual. """ - legal_gender: Optional[Literal["female", "male"]] + legal_gender: Optional[Union[Literal["female", "male"], str]] """ The individual's gender (International regulations require either "male” or "female"). """ @@ -11944,7 +11976,9 @@ class Kanji(StripeObject): """ The individual's phone number. """ - political_exposure: Optional[Literal["existing", "none"]] + political_exposure: Optional[ + Union[Literal["existing", "none"], str] + ] """ Indicates if the individual or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. """ @@ -11994,7 +12028,12 @@ class Kanji(StripeObject): The country in which the account holder resides, or in which the business is legally established. This should be an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. """ entity_type: Optional[ - Literal["company", "government_entity", "individual", "non_profit"] + Union[ + Literal[ + "company", "government_entity", "individual", "non_profit" + ], + str, + ] ] """ The entity type represented by the Account. Ensure this field is accurate before adding configurations that rely on identity information, as it determines which identity fields apply and how the Account is validated. @@ -12014,7 +12053,7 @@ class RelatedNetworkObject(StripeObject): """ The ID of the network business profile associated with this Account. """ - type: Literal["link", "network_business_profile"] + type: Union[Literal["link", "network_business_profile"], str] """ Closed Enum. The type of related network object. """ @@ -12022,103 +12061,106 @@ class RelatedNetworkObject(StripeObject): class Requirements(StripeObject): class Entry(StripeObject): class Error(StripeObject): - code: Literal[ - "invalid_address_city_state_postal_code", - "invalid_address_highway_contract_box", - "invalid_address_private_mailbox", - "invalid_business_profile_name", - "invalid_business_profile_name_denylisted", - "invalid_company_name_denylisted", - "invalid_dob_age_over_maximum", - "invalid_dob_age_under_18", - "invalid_dob_age_under_minimum", - "invalid_product_description_length", - "invalid_product_description_url_match", - "invalid_representative_country", - "invalid_statement_descriptor_business_mismatch", - "invalid_statement_descriptor_denylisted", - "invalid_statement_descriptor_length", - "invalid_statement_descriptor_prefix_denylisted", - "invalid_statement_descriptor_prefix_mismatch", - "invalid_street_address", - "invalid_tax_id", - "invalid_tax_id_format", - "invalid_tos_acceptance", - "invalid_url_denylisted", - "invalid_url_format", - "invalid_url_website_business_information_mismatch", - "invalid_url_website_empty", - "invalid_url_website_inaccessible", - "invalid_url_website_inaccessible_geoblocked", - "invalid_url_website_inaccessible_password_protected", - "invalid_url_website_incomplete", - "invalid_url_website_incomplete_cancellation_policy", - "invalid_url_website_incomplete_customer_service_details", - "invalid_url_website_incomplete_legal_restrictions", - "invalid_url_website_incomplete_refund_policy", - "invalid_url_website_incomplete_return_policy", - "invalid_url_website_incomplete_terms_and_conditions", - "invalid_url_website_incomplete_under_construction", - "invalid_url_website_other", - "invalid_url_web_presence_detected", - "invalid_value_other", - "unresolvable_ip_address", - "unresolvable_postal_code", - "verification_directors_mismatch", - "verification_document_address_mismatch", - "verification_document_address_missing", - "verification_document_corrupt", - "verification_document_country_not_supported", - "verification_document_directors_mismatch", - "verification_document_dob_mismatch", - "verification_document_duplicate_type", - "verification_document_expired", - "verification_document_failed_copy", - "verification_document_failed_greyscale", - "verification_document_failed_other", - "verification_document_failed_test_mode", - "verification_document_fraudulent", - "verification_document_id_number_mismatch", - "verification_document_id_number_missing", - "verification_document_incomplete", - "verification_document_invalid", - "verification_document_issue_or_expiry_date_missing", - "verification_document_manipulated", - "verification_document_missing_back", - "verification_document_missing_front", - "verification_document_name_mismatch", - "verification_document_name_missing", - "verification_document_nationality_mismatch", - "verification_document_not_readable", - "verification_document_not_signed", - "verification_document_not_uploaded", - "verification_document_photo_mismatch", - "verification_document_too_large", - "verification_document_type_not_supported", - "verification_extraneous_directors", - "verification_failed_address_match", - "verification_failed_business_iec_number", - "verification_failed_document_match", - "verification_failed_id_number_match", - "verification_failed_keyed_identity", - "verification_failed_keyed_match", - "verification_failed_name_match", - "verification_failed_other", - "verification_failed_representative_authority", - "verification_failed_residential_address", - "verification_failed_tax_id_match", - "verification_failed_tax_id_not_issued", - "verification_missing_directors", - "verification_missing_executives", - "verification_missing_owners", - "verification_requires_additional_memorandum_of_associations", - "verification_requires_additional_proof_of_registration", - "verification_selfie_document_missing_photo", - "verification_selfie_face_mismatch", - "verification_selfie_manipulated", - "verification_selfie_unverified_other", - "verification_supportability", - "verification_token_stale", + code: Union[ + Literal[ + "invalid_address_city_state_postal_code", + "invalid_address_highway_contract_box", + "invalid_address_private_mailbox", + "invalid_business_profile_name", + "invalid_business_profile_name_denylisted", + "invalid_company_name_denylisted", + "invalid_dob_age_over_maximum", + "invalid_dob_age_under_18", + "invalid_dob_age_under_minimum", + "invalid_product_description_length", + "invalid_product_description_url_match", + "invalid_representative_country", + "invalid_statement_descriptor_business_mismatch", + "invalid_statement_descriptor_denylisted", + "invalid_statement_descriptor_length", + "invalid_statement_descriptor_prefix_denylisted", + "invalid_statement_descriptor_prefix_mismatch", + "invalid_street_address", + "invalid_tax_id", + "invalid_tax_id_format", + "invalid_tos_acceptance", + "invalid_url_denylisted", + "invalid_url_format", + "invalid_url_website_business_information_mismatch", + "invalid_url_website_empty", + "invalid_url_website_inaccessible", + "invalid_url_website_inaccessible_geoblocked", + "invalid_url_website_inaccessible_password_protected", + "invalid_url_website_incomplete", + "invalid_url_website_incomplete_cancellation_policy", + "invalid_url_website_incomplete_customer_service_details", + "invalid_url_website_incomplete_legal_restrictions", + "invalid_url_website_incomplete_refund_policy", + "invalid_url_website_incomplete_return_policy", + "invalid_url_website_incomplete_terms_and_conditions", + "invalid_url_website_incomplete_under_construction", + "invalid_url_website_other", + "invalid_url_web_presence_detected", + "invalid_value_other", + "unresolvable_ip_address", + "unresolvable_postal_code", + "verification_directors_mismatch", + "verification_document_address_mismatch", + "verification_document_address_missing", + "verification_document_corrupt", + "verification_document_country_not_supported", + "verification_document_directors_mismatch", + "verification_document_dob_mismatch", + "verification_document_duplicate_type", + "verification_document_expired", + "verification_document_failed_copy", + "verification_document_failed_greyscale", + "verification_document_failed_other", + "verification_document_failed_test_mode", + "verification_document_fraudulent", + "verification_document_id_number_mismatch", + "verification_document_id_number_missing", + "verification_document_incomplete", + "verification_document_invalid", + "verification_document_issue_or_expiry_date_missing", + "verification_document_manipulated", + "verification_document_missing_back", + "verification_document_missing_front", + "verification_document_name_mismatch", + "verification_document_name_missing", + "verification_document_nationality_mismatch", + "verification_document_not_readable", + "verification_document_not_signed", + "verification_document_not_uploaded", + "verification_document_photo_mismatch", + "verification_document_too_large", + "verification_document_type_not_supported", + "verification_extraneous_directors", + "verification_failed_address_match", + "verification_failed_business_iec_number", + "verification_failed_document_match", + "verification_failed_id_number_match", + "verification_failed_keyed_identity", + "verification_failed_keyed_match", + "verification_failed_name_match", + "verification_failed_other", + "verification_failed_representative_authority", + "verification_failed_residential_address", + "verification_failed_tax_id_match", + "verification_failed_tax_id_not_issued", + "verification_missing_directors", + "verification_missing_executives", + "verification_missing_owners", + "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", + "verification_selfie_document_missing_photo", + "verification_selfie_face_mismatch", + "verification_selfie_manipulated", + "verification_selfie_unverified_other", + "verification_supportability", + "verification_token_stale", + ], + str, ] """ Machine-readable code describing the error. @@ -12138,116 +12180,122 @@ class Deadline(StripeObject): The current status of the requirement's impact. """ - capability: Literal[ - "ach_debit_payments", - "acss_debit_payments", - "affirm_payments", - "afterpay_clearpay_payments", - "alma_payments", - "amazon_pay_payments", - "automatic_indirect_tax", - "au_becs_debit_payments", - "bacs_debit_payments", - "bancontact_payments", - "bank_accounts.ach", - "bank_accounts.becs", - "bank_accounts.eft", - "bank_accounts.fedwire", - "bank_accounts.fps", - "bank_accounts.instant", - "bank_accounts.local", - "bank_accounts.npp", - "bank_accounts.rtp", - "bank_accounts.sepa_credit", - "bank_accounts.sepa_instant", - "bank_accounts.swift", - "bank_accounts.wire", - "blik_payments", - "boleto_payments", - "business_storage.inbound.eur", - "business_storage.inbound.gbp", - "business_storage.inbound.usd", - "business_storage.outbound.eur", - "business_storage.outbound.gbp", - "business_storage.outbound.usd", - "cards", - "card_payments", - "cartes_bancaires_payments", - "cashapp_payments", - "commercial.celtic.charge_card", - "commercial.celtic.spend_card", - "commercial.cross_river_bank.charge_card", - "commercial.cross_river_bank.prepaid_card", - "commercial.cross_river_bank.spend_card", - "commercial.fifth_third.charge_card", - "commercial.lead.prepaid_card", - "commercial.stripe.charge_card", - "commercial.stripe.prepaid_card", - "consumer.celtic.revolving_credit_card", - "consumer.cross_river_bank.prepaid_card", - "consumer.holds_currencies.usd", - "consumer.lead.debit_card", - "consumer.lead.prepaid_card", - "consumer_storage.inbound.usd", - "consumer_storage.outbound.usd", - "crypto_wallets", - "eps_payments", - "financial_addresses.bank_accounts", - "fpx_payments", - "gb_bank_transfer_payments", - "grabpay_payments", - "holds_currencies.eur", - "holds_currencies.gbp", - "holds_currencies.usd", - "ideal_payments", - "inbound_transfers.financial_accounts", - "jcb_payments", - "jp_bank_transfer_payments", - "kakao_pay_payments", - "klarna_payments", - "konbini_payments", - "kr_card_payments", - "link_payments", - "mobilepay_payments", - "multibanco_payments", - "mx_bank_transfer_payments", - "naver_pay_payments", - "outbound_payments.bank_accounts", - "outbound_payments.cards", - "outbound_payments.financial_accounts", - "outbound_payments.paper_checks", - "outbound_transfers.bank_accounts", - "outbound_transfers.financial_accounts", - "oxxo_payments", - "p24_payments", - "paper_checks", - "payco_payments", - "paynow_payments", - "pay_by_bank_payments", - "promptpay_payments", - "received_credits.bank_accounts", - "received_debits.bank_accounts", - "revolut_pay_payments", - "samsung_pay_payments", - "sepa_bank_transfer_payments", - "sepa_debit_payments", - "stripe_balance.payouts", - "stripe_balance.stripe_transfers", - "swish_payments", - "twint_payments", - "us_bank_transfer_payments", - "zip_payments", + capability: Union[ + Literal[ + "ach_debit_payments", + "acss_debit_payments", + "affirm_payments", + "afterpay_clearpay_payments", + "alma_payments", + "amazon_pay_payments", + "automatic_indirect_tax", + "au_becs_debit_payments", + "bacs_debit_payments", + "bancontact_payments", + "bank_accounts.ach", + "bank_accounts.becs", + "bank_accounts.eft", + "bank_accounts.fedwire", + "bank_accounts.fps", + "bank_accounts.instant", + "bank_accounts.local", + "bank_accounts.npp", + "bank_accounts.rtp", + "bank_accounts.sepa_credit", + "bank_accounts.sepa_instant", + "bank_accounts.swift", + "bank_accounts.wire", + "blik_payments", + "boleto_payments", + "business_storage.inbound.eur", + "business_storage.inbound.gbp", + "business_storage.inbound.usd", + "business_storage.outbound.eur", + "business_storage.outbound.gbp", + "business_storage.outbound.usd", + "cards", + "card_payments", + "cartes_bancaires_payments", + "cashapp_payments", + "commercial.celtic.charge_card", + "commercial.celtic.spend_card", + "commercial.cross_river_bank.charge_card", + "commercial.cross_river_bank.prepaid_card", + "commercial.cross_river_bank.spend_card", + "commercial.fifth_third.charge_card", + "commercial.lead.prepaid_card", + "commercial.stripe.charge_card", + "commercial.stripe.prepaid_card", + "consumer.celtic.revolving_credit_card", + "consumer.cross_river_bank.prepaid_card", + "consumer.holds_currencies.usd", + "consumer.lead.debit_card", + "consumer.lead.prepaid_card", + "consumer_storage.inbound.usd", + "consumer_storage.outbound.usd", + "crypto_wallets", + "eps_payments", + "financial_addresses.bank_accounts", + "fpx_payments", + "gb_bank_transfer_payments", + "grabpay_payments", + "holds_currencies.eur", + "holds_currencies.gbp", + "holds_currencies.usd", + "ideal_payments", + "inbound_transfers.financial_accounts", + "jcb_payments", + "jp_bank_transfer_payments", + "kakao_pay_payments", + "klarna_payments", + "konbini_payments", + "kr_card_payments", + "link_payments", + "mobilepay_payments", + "multibanco_payments", + "mx_bank_transfer_payments", + "naver_pay_payments", + "outbound_payments.bank_accounts", + "outbound_payments.cards", + "outbound_payments.financial_accounts", + "outbound_payments.paper_checks", + "outbound_transfers.bank_accounts", + "outbound_transfers.financial_accounts", + "oxxo_payments", + "p24_payments", + "paper_checks", + "payco_payments", + "paynow_payments", + "pay_by_bank_payments", + "promptpay_payments", + "received_credits.bank_accounts", + "received_debits.bank_accounts", + "revolut_pay_payments", + "samsung_pay_payments", + "sepa_bank_transfer_payments", + "sepa_debit_payments", + "stripe_balance.payouts", + "stripe_balance.stripe_transfers", + "swish_payments", + "twint_payments", + "us_bank_transfer_payments", + "zip_payments", + ], + str, ] """ The name of the Capability which will be restricted. """ - configuration: Literal[ - "card_creator", - "customer", - "merchant", - "money_manager", - "recipient", - "storer", + configuration: Union[ + Literal[ + "card_creator", + "customer", + "merchant", + "money_manager", + "recipient", + "storer", + ], + str, ] """ The configuration which specifies the Capability which will be restricted. @@ -12281,7 +12329,9 @@ class Reference(StripeObject): """ If `resource` is the type, the resource token. """ - type: Literal["inquiry", "payment_method", "person"] + type: Union[ + Literal["inquiry", "payment_method", "person"], str + ] """ The type of the reference. If the type is "inquiry", the inquiry token can be found in the "inquiry" field. Otherwise the type is an API resource, the token for which can be found in the "resource" field. diff --git a/stripe/v2/core/_account_link.py b/stripe/v2/core/_account_link.py index 32d536d73..0e92b7ab1 100644 --- a/stripe/v2/core/_account_link.py +++ b/stripe/v2/core/_account_link.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -17,11 +17,15 @@ class AccountLink(StripeObject): class UseCase(StripeObject): class AccountOnboarding(StripeObject): class CollectionOptions(StripeObject): - fields: Optional[Literal["currently_due", "eventually_due"]] + fields: Optional[ + Union[Literal["currently_due", "eventually_due"], str] + ] """ Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify collection_options, the default value is currently_due. """ - future_requirements: Optional[Literal["include", "omit"]] + future_requirements: Optional[ + Union[Literal["include", "omit"], str] + ] """ Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. """ @@ -31,12 +35,15 @@ class CollectionOptions(StripeObject): Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ configurations: List[ - Literal[ - "customer", - "merchant", - "money_manager", - "recipient", - "storer", + Union[ + Literal[ + "customer", + "merchant", + "money_manager", + "recipient", + "storer", + ], + str, ] ] """ @@ -54,11 +61,15 @@ class CollectionOptions(StripeObject): class AccountUpdate(StripeObject): class CollectionOptions(StripeObject): - fields: Optional[Literal["currently_due", "eventually_due"]] + fields: Optional[ + Union[Literal["currently_due", "eventually_due"], str] + ] """ Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). The default value is `currently_due`. """ - future_requirements: Optional[Literal["include", "omit"]] + future_requirements: Optional[ + Union[Literal["include", "omit"], str] + ] """ Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. """ @@ -68,12 +79,15 @@ class CollectionOptions(StripeObject): Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. """ configurations: List[ - Literal[ - "customer", - "merchant", - "money_manager", - "recipient", - "storer", + Union[ + Literal[ + "customer", + "merchant", + "money_manager", + "recipient", + "storer", + ], + str, ] ] """ @@ -91,11 +105,15 @@ class CollectionOptions(StripeObject): class RecipientOnboarding(StripeObject): class CollectionOptions(StripeObject): - fields: Optional[Literal["currently_due", "eventually_due"]] + fields: Optional[ + Union[Literal["currently_due", "eventually_due"], str] + ] """ Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify collection_options, the default value is currently_due. """ - future_requirements: Optional[Literal["include", "omit"]] + future_requirements: Optional[ + Union[Literal["include", "omit"], str] + ] """ Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. """ @@ -120,11 +138,15 @@ class CollectionOptions(StripeObject): class RecipientUpdate(StripeObject): class CollectionOptions(StripeObject): - fields: Optional[Literal["currently_due", "eventually_due"]] + fields: Optional[ + Union[Literal["currently_due", "eventually_due"], str] + ] """ Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). The default value is `currently_due`. """ - future_requirements: Optional[Literal["include", "omit"]] + future_requirements: Optional[ + Union[Literal["include", "omit"], str] + ] """ Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. """ @@ -163,11 +185,14 @@ class CollectionOptions(StripeObject): """ Hash containing configuration options for an Account Link that updates an existing recipient. """ - type: Literal[ - "account_onboarding", - "account_update", - "recipient_onboarding", - "recipient_update", + type: Union[ + Literal[ + "account_onboarding", + "account_update", + "recipient_onboarding", + "recipient_update", + ], + str, ] """ Open Enum. The type of Account Link the user is requesting. diff --git a/stripe/v2/core/_account_person.py b/stripe/v2/core/_account_person.py index 2b136f1b8..fc5826ae6 100644 --- a/stripe/v2/core/_account_person.py +++ b/stripe/v2/core/_account_person.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -234,104 +234,107 @@ class Visa(StripeObject): } class IdNumber(StripeObject): - type: Literal[ - "ae_eid", - "ao_nif", - "ar_cuil", - "ar_dni", - "at_stn", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "be_nrn", - "bg_ucn", - "bm_pp", - "bn_nric", - "bo_ci", - "br_cpf", - "bt_cid", - "ca_sin", - "ch_oasi", - "cl_rut", - "cn_pp", - "co_nuip", - "cr_ci", - "cr_cpf", - "cr_dimex", - "cr_nite", - "cy_tic", - "cz_rc", - "de_stn", - "dk_cpr", - "do_cie", - "do_rcn", - "ec_ci", - "ee_ik", - "eg_tin", - "es_nif", - "fi_hetu", - "fr_nir", - "gb_nino", - "gh_pin", - "gr_afm", - "gt_nit", - "gy_tin", - "hk_id", - "hn_rtn", - "hr_oib", - "hu_ad", - "id_nik", - "ie_ppsn", - "is_kt", - "it_cf", - "jm_trn", - "jo_pin", - "jp_inc", - "ke_pin", - "ky_pp", - "kz_iin", - "li_peid", - "lk_nic", - "lt_ak", - "lu_nif", - "lv_pk", - "mo_bir", - "mt_nic", - "mv_tin", - "mx_rfc", - "my_nric", - "mz_nuit", - "ng_nin", - "nl_bsn", - "no_nin", - "nz_ird", - "pa_ruc", - "pe_dni", - "ph_tin", - "pk_cnic", - "pk_snic", - "pl_pesel", - "pt_nif", - "py_ruc", - "ro_cnp", - "sa_tin", - "se_pin", - "sg_fin", - "sg_nric", - "si_pin", - "sk_dic", - "sv_nit", - "th_lc", - "th_pin", - "tr_tin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - "uy_dni", - "vg_pp", - "za_id", + type: Union[ + Literal[ + "ae_eid", + "ao_nif", + "ar_cuil", + "ar_dni", + "at_stn", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "be_nrn", + "bg_ucn", + "bm_pp", + "bn_nric", + "bo_ci", + "br_cpf", + "bt_cid", + "ca_sin", + "ch_oasi", + "cl_rut", + "cn_pp", + "co_nuip", + "cr_ci", + "cr_cpf", + "cr_dimex", + "cr_nite", + "cy_tic", + "cz_rc", + "de_stn", + "dk_cpr", + "do_cie", + "do_rcn", + "ec_ci", + "ee_ik", + "eg_tin", + "es_nif", + "fi_hetu", + "fr_nir", + "gb_nino", + "gh_pin", + "gr_afm", + "gt_nit", + "gy_tin", + "hk_id", + "hn_rtn", + "hr_oib", + "hu_ad", + "id_nik", + "ie_ppsn", + "is_kt", + "it_cf", + "jm_trn", + "jo_pin", + "jp_inc", + "ke_pin", + "ky_pp", + "kz_iin", + "li_peid", + "lk_nic", + "lt_ak", + "lu_nif", + "lv_pk", + "mo_bir", + "mt_nic", + "mv_tin", + "mx_rfc", + "my_nric", + "mz_nuit", + "ng_nin", + "nl_bsn", + "no_nin", + "nz_ird", + "pa_ruc", + "pe_dni", + "ph_tin", + "pk_cnic", + "pk_snic", + "pl_pesel", + "pt_nif", + "py_ruc", + "ro_cnp", + "sa_tin", + "se_pin", + "sg_fin", + "sg_nric", + "si_pin", + "sk_dic", + "sv_nit", + "th_lc", + "th_pin", + "tr_tin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + "uy_dni", + "vg_pp", + "za_id", + ], + str, ] """ The ID number type of an individual. @@ -522,7 +525,7 @@ class Kanji(StripeObject): """ The identification numbers (e.g., SSN) associated with the person. """ - legal_gender: Optional[Literal["female", "male"]] + legal_gender: Optional[Union[Literal["female", "male"], str]] """ The person's gender (International regulations require either "male" or "female"). """ @@ -546,7 +549,7 @@ class Kanji(StripeObject): """ The person's phone number. """ - political_exposure: Optional[Literal["existing", "none"]] + political_exposure: Optional[Union[Literal["existing", "none"], str]] """ The person's political exposure. """ diff --git a/stripe/v2/core/_approval_request.py b/stripe/v2/core/_approval_request.py index dd016b4f0..b00e72fbf 100644 --- a/stripe/v2/core/_approval_request.py +++ b/stripe/v2/core/_approval_request.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -225,23 +225,26 @@ class StatusTransitions(StripeObject): Timestamp when the approval request succeeded. """ - action: Literal[ - "charge.create", - "dispute.close", - "inbound_transfers.money_management.create", - "invoice.create", - "outbound_payments.money_management.create", - "outbound_transfers.money_management.create", - "payment_intent.create", - "payment_intent.update", - "payout.create", - "price.update", - "refund.create", - "setup_intent.create", - "subscription.create", - "subscription.update", - "topup.create", - "transfer.create", + action: Union[ + Literal[ + "charge.create", + "dispute.close", + "inbound_transfers.money_management.create", + "invoice.create", + "outbound_payments.money_management.create", + "outbound_transfers.money_management.create", + "payment_intent.create", + "payment_intent.update", + "payout.create", + "price.update", + "refund.create", + "setup_intent.create", + "subscription.create", + "subscription.update", + "topup.create", + "transfer.create", + ], + str, ] """ The action that was requested. @@ -286,19 +289,22 @@ class StatusTransitions(StripeObject): """ The rule associated with this ApprovalRequest. """ - status: Literal[ - "approved", - "canceled", - "execution_failed", - "execution_started", - "execution_succeeded", - "expired", - "failed", - "pending", - "rejected", - "requires_execution", - "requires_review", - "succeeded", + status: Union[ + Literal[ + "approved", + "canceled", + "execution_failed", + "execution_started", + "execution_succeeded", + "expired", + "failed", + "pending", + "rejected", + "requires_execution", + "requires_review", + "succeeded", + ], + str, ] """ The status of this ApprovalRequest. diff --git a/stripe/v2/core/_event.py b/stripe/v2/core/_event.py index 8a476fa2e..96bf58a3b 100644 --- a/stripe/v2/core/_event.py +++ b/stripe/v2/core/_event.py @@ -62,7 +62,9 @@ class StripeAction(StripeObject): """ Stripe action that triggered the event. """ - type: Literal["api_key", "dashboard_user", "stripe_action"] + type: Union[ + Literal["api_key", "dashboard_user", "stripe_action"], str + ] """ The type of the client. """ diff --git a/stripe/v2/core/_event_destination.py b/stripe/v2/core/_event_destination.py index b61edab49..c1ecbbcdd 100644 --- a/stripe/v2/core/_event_destination.py +++ b/stripe/v2/core/_event_destination.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -35,8 +35,8 @@ class AzureEventGrid(StripeObject): """ The name of the Azure partner topic. """ - azure_partner_topic_status: Literal[ - "activated", "deleted", "never_activated", "unknown" + azure_partner_topic_status: Union[ + Literal["activated", "deleted", "never_activated", "unknown"], str ] """ The status of the Azure partner topic. @@ -56,10 +56,13 @@ class AzureEventGrid(StripeObject): class StatusDetails(StripeObject): class Disabled(StripeObject): - reason: Literal[ - "no_aws_event_source_exists", - "no_azure_partner_topic_exists", - "user", + reason: Union[ + Literal[ + "no_aws_event_source_exists", + "no_azure_partner_topic_exists", + "user", + ], + str, ] """ Reason event destination has been disabled. @@ -145,7 +148,10 @@ class WebhookEndpoint(StripeObject): """ Additional information about event destination status. """ - type: Literal["amazon_eventbridge", "azure_event_grid", "webhook_endpoint"] + type: Union[ + Literal["amazon_eventbridge", "azure_event_grid", "webhook_endpoint"], + str, + ] """ Event destination type. """ diff --git a/stripe/v2/core/_fee_batch.py b/stripe/v2/core/_fee_batch.py index 0f512afed..c65c057fc 100644 --- a/stripe/v2/core/_fee_batch.py +++ b/stripe/v2/core/_fee_batch.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -45,7 +45,7 @@ class Amount(StripeObject): """ class CollectedBy(StripeObject): - type: Literal["application", "network", "stripe"] + type: Union[Literal["application", "network", "stripe"], str] """ The type of entity that collected this batch. """ @@ -106,11 +106,14 @@ class Amount(StripeObject): """ The tax amount collected via this record. """ - type: Literal[ - "balance_transaction", - "credit_transaction", - "money_management_transaction", - "payable_invoice", + type: Union[ + Literal[ + "balance_transaction", + "credit_transaction", + "money_management_transaction", + "payable_invoice", + ], + str, ] """ The type of money movement object. @@ -174,7 +177,7 @@ class Amount(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ - status: Literal["billed", "pending"] + status: Union[Literal["billed", "pending"], str] """ The current state of this batch. """ diff --git a/stripe/v2/core/_fee_entry.py b/stripe/v2/core/_fee_entry.py index f77690127..860c3719c 100644 --- a/stripe/v2/core/_fee_entry.py +++ b/stripe/v2/core/_fee_entry.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -55,7 +55,7 @@ class Stripe(StripeObject): """ Details for a fee charged by Stripe. """ - type: Literal["application", "network", "stripe"] + type: Union[Literal["application", "network", "stripe"], str] """ The type of entity that charged this fee. """ @@ -134,13 +134,16 @@ class Amount(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ - reason: Literal[ - "other", - "processing_fee", - "refund", - "refund_failure", - "reprice", - "tier_true_up", + reason: Union[ + Literal[ + "other", + "processing_fee", + "refund", + "refund_failure", + "reprice", + "tier_true_up", + ], + str, ] """ The reason this fee entry was created. @@ -149,7 +152,9 @@ class Amount(StripeObject): """ The tax portion of the fee, if applicable. """ - type: Literal["application_fee", "passthrough_fee", "stripe_fee"] + type: Union[ + Literal["application_fee", "passthrough_fee", "stripe_fee"], str + ] """ The category of this fee. """ diff --git a/stripe/v2/core/health/_alert.py b/stripe/v2/core/health/_alert.py index f5258c852..074b9065f 100644 --- a/stripe/v2/core/health/_alert.py +++ b/stripe/v2/core/health/_alert.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._stripe_object import StripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -42,7 +42,7 @@ class TopImpactedAccount(StripeObject): """ The error code. """ - http_method: Literal["DELETE", "GET", "POST", "PUT"] + http_method: Union[Literal["DELETE", "GET", "POST", "PUT"], str] """ The HTTP method. """ @@ -87,7 +87,7 @@ class TopImpactedAccount(StripeObject): """ The canonical path. """ - http_method: Literal["DELETE", "GET", "POST", "PUT"] + http_method: Union[Literal["DELETE", "GET", "POST", "PUT"], str] """ The HTTP method. """ @@ -121,7 +121,7 @@ class Dimension(StripeObject): The type of the dimension. Determines which field in dimension_details is populated. """ - charge_type: Literal["money_moving", "validation"] + charge_type: Union[Literal["money_moving", "validation"], str] """ The type of the charge. """ @@ -133,76 +133,79 @@ class Dimension(StripeObject): """ Dimensions that describe what subset of payments are impacted. """ - payment_method_type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "apple_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "card_present", - "cartes_bancaires", - "cashapp", - "crypto", - "dummy_passthrough_card", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "interac_present", - "kakao_pay", - "klarna", - "konbini", - "kriya", - "kr_card", - "link", - "mb_way", - "mobilepay", - "mondu", - "multibanco", - "naver_pay", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "oxxo", - "p24", - "paper_check", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pay_by_bank", - "pix", - "promptpay", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "vipps", - "wechat_pay", - "zip", + payment_method_type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "apple_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cartes_bancaires", + "cashapp", + "crypto", + "dummy_passthrough_card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kriya", + "kr_card", + "link", + "mb_way", + "mobilepay", + "mondu", + "multibanco", + "naver_pay", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "oxxo", + "p24", + "paper_check", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pay_by_bank", + "pix", + "promptpay", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "vipps", + "wechat_pay", + "zip", + ], + str, ] """ The type of the payment method. @@ -228,7 +231,9 @@ class DocumentationLink(StripeObject): """ class ElementsError(StripeObject): - element_type: Optional[Literal["expressCheckout", "payment"]] + element_type: Optional[ + Union[Literal["expressCheckout", "payment"], str] + ] """ The type of the element. """ @@ -267,7 +272,7 @@ class RelatedObject(StripeObject): _inner_class_types = {"related_object": RelatedObject} class FraudRate(StripeObject): - attack_type: Literal["spike", "sustained_attack"] + attack_type: Union[Literal["spike", "sustained_attack"], str] """ Fraud attack type. """ @@ -341,11 +346,14 @@ class MeterEventSummariesDelayed(StripeObject): """ class MetronomeNotificationLatency(StripeObject): - pipeline: Literal[ - "configuration_triggered", - "high_cardinality_usage_triggered", - "standard_usage_triggered", - "time_triggered", + pipeline: Union[ + Literal[ + "configuration_triggered", + "high_cardinality_usage_triggered", + "standard_usage_triggered", + "time_triggered", + ], + str, ] """ The impacted Metronome billing pipeline. @@ -381,76 +389,79 @@ class TopImpactedAccount(StripeObject): """ The percentage of impacted requests. """ - payment_method_type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "apple_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "card_present", - "cartes_bancaires", - "cashapp", - "crypto", - "dummy_passthrough_card", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "interac_present", - "kakao_pay", - "klarna", - "konbini", - "kriya", - "kr_card", - "link", - "mb_way", - "mobilepay", - "mondu", - "multibanco", - "naver_pay", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "oxxo", - "p24", - "paper_check", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pay_by_bank", - "pix", - "promptpay", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "vipps", - "wechat_pay", - "zip", + payment_method_type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "apple_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cartes_bancaires", + "cashapp", + "crypto", + "dummy_passthrough_card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kriya", + "kr_card", + "link", + "mb_way", + "mobilepay", + "mondu", + "multibanco", + "naver_pay", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "oxxo", + "p24", + "paper_check", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pay_by_bank", + "pix", + "promptpay", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "vipps", + "wechat_pay", + "zip", + ], + str, ] """ The type of the payment method. @@ -533,7 +544,7 @@ class WebhookLatency(StripeObject): """ The grouping key for the alert. """ - grouping_type: Literal["incident", "standalone"] + grouping_type: Union[Literal["incident", "standalone"], str] """ Whether the alert is linked to an incident or is a self-contained problem. """ @@ -585,7 +596,7 @@ class WebhookLatency(StripeObject): """ Populated when type is sepa_debit_delayed. """ - severity: Literal["critical", "non_critical"] + severity: Union[Literal["critical", "non_critical"], str] """ The severity of the alert. """ @@ -593,7 +604,7 @@ class WebhookLatency(StripeObject): """ The time when impact on the user experience was first detected. """ - status: Literal["open", "resolved"] + status: Union[Literal["open", "resolved"], str] """ The current status of the alert. """ @@ -605,22 +616,25 @@ class WebhookLatency(StripeObject): """ Populated when type is traffic_volume_drop. """ - type: Literal[ - "api_error", - "api_latency", - "authorization_rate_drop", - "elements_error", - "event_generation_failure", - "fraud_rate", - "invoice_count_dropped", - "issuing_authorization_request_errors", - "issuing_authorization_request_timeout", - "meter_event_summaries_delayed", - "metronome_notification_latency", - "payment_method_error", - "sepa_debit_delayed", - "traffic_volume_drop", - "webhook_latency", + type: Union[ + Literal[ + "api_error", + "api_latency", + "authorization_rate_drop", + "elements_error", + "event_generation_failure", + "fraud_rate", + "invoice_count_dropped", + "issuing_authorization_request_errors", + "issuing_authorization_request_timeout", + "meter_event_summaries_delayed", + "metronome_notification_latency", + "payment_method_error", + "sepa_debit_delayed", + "traffic_volume_drop", + "webhook_latency", + ], + str, ] """ The type of the alert. Determines which sub-hash field is populated. diff --git a/stripe/v2/core/health/_alert_history_entry.py b/stripe/v2/core/health/_alert_history_entry.py index 97e1edb55..0648f86a2 100644 --- a/stripe/v2/core/health/_alert_history_entry.py +++ b/stripe/v2/core/health/_alert_history_entry.py @@ -3,7 +3,7 @@ from decimal import Decimal from stripe._stripe_object import StripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -42,7 +42,7 @@ class TopImpactedAccount(StripeObject): """ The error code. """ - http_method: Literal["DELETE", "GET", "POST", "PUT"] + http_method: Union[Literal["DELETE", "GET", "POST", "PUT"], str] """ The HTTP method. """ @@ -87,7 +87,7 @@ class TopImpactedAccount(StripeObject): """ The canonical path. """ - http_method: Literal["DELETE", "GET", "POST", "PUT"] + http_method: Union[Literal["DELETE", "GET", "POST", "PUT"], str] """ The HTTP method. """ @@ -121,7 +121,7 @@ class Dimension(StripeObject): The type of the dimension. Determines which field in dimension_details is populated. """ - charge_type: Literal["money_moving", "validation"] + charge_type: Union[Literal["money_moving", "validation"], str] """ The type of the charge. """ @@ -133,76 +133,79 @@ class Dimension(StripeObject): """ Dimensions that describe what subset of payments are impacted. """ - payment_method_type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "apple_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "card_present", - "cartes_bancaires", - "cashapp", - "crypto", - "dummy_passthrough_card", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "interac_present", - "kakao_pay", - "klarna", - "konbini", - "kriya", - "kr_card", - "link", - "mb_way", - "mobilepay", - "mondu", - "multibanco", - "naver_pay", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "oxxo", - "p24", - "paper_check", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pay_by_bank", - "pix", - "promptpay", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "vipps", - "wechat_pay", - "zip", + payment_method_type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "apple_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cartes_bancaires", + "cashapp", + "crypto", + "dummy_passthrough_card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kriya", + "kr_card", + "link", + "mb_way", + "mobilepay", + "mondu", + "multibanco", + "naver_pay", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "oxxo", + "p24", + "paper_check", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pay_by_bank", + "pix", + "promptpay", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "vipps", + "wechat_pay", + "zip", + ], + str, ] """ The type of the payment method. @@ -218,7 +221,9 @@ class Dimension(StripeObject): } class ElementsError(StripeObject): - element_type: Optional[Literal["expressCheckout", "payment"]] + element_type: Optional[ + Union[Literal["expressCheckout", "payment"], str] + ] """ The type of the element. """ @@ -257,7 +262,7 @@ class RelatedObject(StripeObject): _inner_class_types = {"related_object": RelatedObject} class FraudRate(StripeObject): - attack_type: Literal["spike", "sustained_attack"] + attack_type: Union[Literal["spike", "sustained_attack"], str] """ Fraud attack type. """ @@ -331,11 +336,14 @@ class MeterEventSummariesDelayed(StripeObject): """ class MetronomeNotificationLatency(StripeObject): - pipeline: Literal[ - "configuration_triggered", - "high_cardinality_usage_triggered", - "standard_usage_triggered", - "time_triggered", + pipeline: Union[ + Literal[ + "configuration_triggered", + "high_cardinality_usage_triggered", + "standard_usage_triggered", + "time_triggered", + ], + str, ] """ The impacted Metronome billing pipeline. @@ -371,76 +379,79 @@ class TopImpactedAccount(StripeObject): """ The percentage of impacted requests. """ - payment_method_type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "apple_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "card_present", - "cartes_bancaires", - "cashapp", - "crypto", - "dummy_passthrough_card", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "interac_present", - "kakao_pay", - "klarna", - "konbini", - "kriya", - "kr_card", - "link", - "mb_way", - "mobilepay", - "mondu", - "multibanco", - "naver_pay", - "ng_bank", - "ng_bank_transfer", - "ng_card", - "ng_market", - "ng_ussd", - "ng_wallet", - "oxxo", - "p24", - "paper_check", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pay_by_bank", - "pix", - "promptpay", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "scalapay", - "sepa_debit", - "sequra", - "sofort", - "sunbit", - "swish", - "twint", - "upi", - "us_bank_account", - "vipps", - "wechat_pay", - "zip", + payment_method_type: Union[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "apple_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "card_present", + "cartes_bancaires", + "cashapp", + "crypto", + "dummy_passthrough_card", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "interac_present", + "kakao_pay", + "klarna", + "konbini", + "kriya", + "kr_card", + "link", + "mb_way", + "mobilepay", + "mondu", + "multibanco", + "naver_pay", + "ng_bank", + "ng_bank_transfer", + "ng_card", + "ng_market", + "ng_ussd", + "ng_wallet", + "oxxo", + "p24", + "paper_check", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pay_by_bank", + "pix", + "promptpay", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "scalapay", + "sepa_debit", + "sequra", + "sofort", + "sunbit", + "swish", + "twint", + "upi", + "us_bank_account", + "vipps", + "wechat_pay", + "zip", + ], + str, ] """ The type of the payment method. @@ -563,26 +574,29 @@ class WebhookLatency(StripeObject): """ Populated when type is traffic_volume_drop. """ - transition: Literal["impact_updated", "opened", "resolved"] + transition: Union[Literal["impact_updated", "opened", "resolved"], str] """ The type of transition that occurred. """ - type: Literal[ - "api_error", - "api_latency", - "authorization_rate_drop", - "elements_error", - "event_generation_failure", - "fraud_rate", - "invoice_count_dropped", - "issuing_authorization_request_errors", - "issuing_authorization_request_timeout", - "meter_event_summaries_delayed", - "metronome_notification_latency", - "payment_method_error", - "sepa_debit_delayed", - "traffic_volume_drop", - "webhook_latency", + type: Union[ + Literal[ + "api_error", + "api_latency", + "authorization_rate_drop", + "elements_error", + "event_generation_failure", + "fraud_rate", + "invoice_count_dropped", + "issuing_authorization_request_errors", + "issuing_authorization_request_timeout", + "meter_event_summaries_delayed", + "metronome_notification_latency", + "payment_method_error", + "sepa_debit_delayed", + "traffic_volume_drop", + "webhook_latency", + ], + str, ] """ The type of the alert. Determines which sub-hash field is populated. diff --git a/stripe/v2/core/vault/_gb_bank_account.py b/stripe/v2/core/vault/_gb_bank_account.py index ae69da68b..4f725809f 100644 --- a/stripe/v2/core/vault/_gb_bank_account.py +++ b/stripe/v2/core/vault/_gb_bank_account.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -19,7 +19,7 @@ class AlternativeReference(StripeObject): """ The ID of the alternative resource being referenced. """ - type: Literal["external_account", "payment_method"] + type: Union[Literal["external_account", "payment_method"], str] """ The type of the alternative reference (e.g., external_account for V1 external accounts). """ diff --git a/stripe/v2/core/vault/_us_bank_account.py b/stripe/v2/core/vault/_us_bank_account.py index 00d58cd2c..7ddd8efa6 100644 --- a/stripe/v2/core/vault/_us_bank_account.py +++ b/stripe/v2/core/vault/_us_bank_account.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -19,7 +19,7 @@ class AlternativeReference(StripeObject): """ The ID of the alternative resource being referenced. """ - type: Literal["external_account", "payment_method"] + type: Union[Literal["external_account", "payment_method"], str] """ The type of the alternative reference (e.g., external_account for V1 external accounts). """ diff --git a/stripe/v2/data/reporting/_query_run.py b/stripe/v2/data/reporting/_query_run.py index 89ce62a9a..ed8e1fecd 100644 --- a/stripe/v2/data/reporting/_query_run.py +++ b/stripe/v2/data/reporting/_query_run.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -39,7 +39,7 @@ class Schema(StripeObject): The type of the column. """ - content_type: Literal["csv", "zip"] + content_type: Union[Literal["csv", "zip"], str] """ The content type of the file. """ @@ -81,7 +81,7 @@ class ResultOptions(StripeObject): class StatusDetails(StripeObject): error_code: Optional[ - Literal["file_size_above_limit", "internal_error"] + Union[Literal["file_size_above_limit", "internal_error"], str] ] """ Error code categorizing the reason the `QueryRun` failed. diff --git a/stripe/v2/extend/_workflow.py b/stripe/v2/extend/_workflow.py index ad325b2ff..659943c3c 100644 --- a/stripe/v2/extend/_workflow.py +++ b/stripe/v2/extend/_workflow.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -35,7 +35,7 @@ class Manual(StripeObject): """ The Workflow can be launched through a direct call, using either the Dashboard or the Stripe API. """ - type: Literal["event_trigger", "manual"] + type: Union[Literal["event_trigger", "manual"], str] """ Which type of trigger this is. """ @@ -57,7 +57,7 @@ class Manual(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ - status: Literal["active", "archived", "draft", "inactive"] + status: Union[Literal["active", "archived", "draft", "inactive"], str] """ Whether this Workflow is active, inactive, or in some other state. Only active Workflows may be invoked. """ diff --git a/stripe/v2/extend/_workflow_run.py b/stripe/v2/extend/_workflow_run.py index c2e377b4d..5d611e7da 100644 --- a/stripe/v2/extend/_workflow_run.py +++ b/stripe/v2/extend/_workflow_run.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import Any, ClassVar, Optional +from typing import Any, ClassVar, Optional, Union from typing_extensions import Literal @@ -88,7 +88,7 @@ class Manual(StripeObject): """ The Workflow Run was launched through a direct call, using either the Dashboard or the Stripe API. """ - type: Literal["event_trigger", "manual"] + type: Union[Literal["event_trigger", "manual"], str] """ Which type of trigger this is. """ @@ -110,7 +110,7 @@ class Manual(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ - status: Literal["failed", "started", "succeeded"] + status: Union[Literal["failed", "started", "succeeded"], str] """ The current Workflow Run execution status. """ diff --git a/stripe/v2/iam/_activity_log.py b/stripe/v2/iam/_activity_log.py index b136cd457..ccb522b4e 100644 --- a/stripe/v2/iam/_activity_log.py +++ b/stripe/v2/iam/_activity_log.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -126,7 +126,7 @@ class UserRoles(StripeObject): """ Details of an API key action. """ - type: Literal["api_key", "user_invite", "user_roles"] + type: Union[Literal["api_key", "user_invite", "user_roles"], str] """ The action group type of the activity log entry. """ @@ -172,16 +172,19 @@ class UserRoles(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ - type: Literal[ - "api_key_created", - "api_key_deleted", - "api_key_updated", - "api_key_viewed", - "user_invite_accepted", - "user_invite_created", - "user_invite_deleted", - "user_roles_deleted", - "user_roles_updated", + type: Union[ + Literal[ + "api_key_created", + "api_key_deleted", + "api_key_updated", + "api_key_viewed", + "user_invite_accepted", + "user_invite_created", + "user_invite_deleted", + "user_roles_deleted", + "user_roles_updated", + ], + str, ] """ The type of action that was performed. diff --git a/stripe/v2/iam/_api_key.py b/stripe/v2/iam/_api_key.py index cab895883..dc0eba1e6 100644 --- a/stripe/v2/iam/_api_key.py +++ b/stripe/v2/iam/_api_key.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -120,11 +120,11 @@ class EncryptedSecret(StripeObject): """ Token set for a secret key. """ - status: Literal["active", "expired"] + status: Union[Literal["active", "expired"], str] """ Current status of the API key (e.g., active, expired). """ - type: Literal["publishable_key", "secret_key"] + type: Union[Literal["publishable_key", "secret_key"], str] """ Type of the API key. """ diff --git a/stripe/v2/money_management/_debit_dispute.py b/stripe/v2/money_management/_debit_dispute.py index 4b142d266..ef7a4e7a6 100644 --- a/stripe/v2/money_management/_debit_dispute.py +++ b/stripe/v2/money_management/_debit_dispute.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject from stripe.v2._amount import Amount -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -20,7 +20,9 @@ class BankTransfer(StripeObject): """ The bank network the dispute was originated on. """ - reason: Optional[Literal["incorrect_amount_or_date", "unauthorized"]] + reason: Optional[ + Union[Literal["incorrect_amount_or_date", "unauthorized"], str] + ] """ The reason for the dispute. """ @@ -88,7 +90,7 @@ class StatusTransitions(StripeObject): """ The ID of the ReceivedDebit that was disputed. """ - status: Literal["failed", "submitted", "succeeded"] + status: Union[Literal["failed", "submitted", "succeeded"], str] """ The status of the DebitDispute. """ diff --git a/stripe/v2/money_management/_financial_account.py b/stripe/v2/money_management/_financial_account.py index 85351d152..d4b6fcf89 100644 --- a/stripe/v2/money_management/_financial_account.py +++ b/stripe/v2/money_management/_financial_account.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -51,7 +51,7 @@ class Platform(StripeObject): """ Details for platform-funded credit FinancialAccounts. """ - type: Literal["platform", "stripe"] + type: Union[Literal["platform", "stripe"], str] """ The type of funding source for this credit FinancialAccount. """ @@ -189,7 +189,7 @@ class ForwardingSettings(StripeObject): _inner_class_types = {"closed": Closed} class Storage(StripeObject): - funds_usage_type: Optional[Literal["business", "consumer"]] + funds_usage_type: Optional[Union[Literal["business", "consumer"], str]] """ The usage type for funds in this FinancialAccount. Can be used to specify that the funds are for Consumer activity. """ diff --git a/stripe/v2/money_management/_financial_address.py b/stripe/v2/money_management/_financial_address.py index 01528e856..f740eef14 100644 --- a/stripe/v2/money_management/_financial_address.py +++ b/stripe/v2/money_management/_financial_address.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -51,16 +51,19 @@ class CryptoWallet(StripeObject): """ Required if the network supports memos (e.g. Stellar). """ - network: Literal[ - "arbitrum", - "avalanche_c_chain", - "base", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "tempo", + network: Union[ + Literal[ + "arbitrum", + "avalanche_c_chain", + "base", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "tempo", + ], + str, ] """ The blockchain network of the crypto wallet. @@ -206,13 +209,16 @@ class AccountHolderAddress(StripeObject): """ The credentials of the SEPA Bank Account for the FinancialAddress. This contains unique banking details such as the IBAN, BIC, etc. of a SEPA bank account. """ - type: Literal[ - "ca_bank_account", - "crypto_wallet", - "gb_bank_account", - "mx_bank_account", - "sepa_bank_account", - "us_bank_account", + type: Union[ + Literal[ + "ca_bank_account", + "crypto_wallet", + "gb_bank_account", + "mx_bank_account", + "sepa_bank_account", + "us_bank_account", + ], + str, ] """ Open Enum. The type of Credentials that are provisioned for the FinancialAddress. diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py index 4158db10b..43678a62e 100644 --- a/stripe/v2/money_management/_inbound_transfer.py +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -49,12 +49,15 @@ class To(StripeObject): class TransferHistory(StripeObject): class BankDebitFailed(StripeObject): - failure_reason: Literal[ - "bank_account_closed", - "bank_account_not_found", - "bank_debit_could_not_be_processed", - "bank_debit_not_authorized", - "insufficient_funds", + failure_reason: Union[ + Literal[ + "bank_account_closed", + "bank_account_not_found", + "bank_debit_could_not_be_processed", + "bank_debit_not_authorized", + "insufficient_funds", + ], + str, ] """ Open Enum. The return reason for the failed InboundTransfer. @@ -67,12 +70,15 @@ class BankDebitQueued(StripeObject): pass class BankDebitReturned(StripeObject): - return_reason: Literal[ - "bank_account_closed", - "bank_account_not_found", - "bank_debit_could_not_be_processed", - "bank_debit_not_authorized", - "insufficient_funds", + return_reason: Union[ + Literal[ + "bank_account_closed", + "bank_account_not_found", + "bank_debit_could_not_be_processed", + "bank_debit_not_authorized", + "insufficient_funds", + ], + str, ] """ Open Enum. The return reason for the returned InboundTransfer. @@ -113,16 +119,19 @@ class BankDebitSucceeded(StripeObject): """ A unique ID for the HistoryEntry. """ - level: Literal["canonical", "debug"] + level: Union[Literal["canonical", "debug"], str] """ Open Enum. The Level of the HistoryEntry. """ - type: Literal[ - "bank_debit_failed", - "bank_debit_processing", - "bank_debit_queued", - "bank_debit_returned", - "bank_debit_succeeded", + type: Union[ + Literal[ + "bank_debit_failed", + "bank_debit_processing", + "bank_debit_queued", + "bank_debit_returned", + "bank_debit_succeeded", + ], + str, ] """ Open Enum. The type of the HistoryEntry. diff --git a/stripe/v2/money_management/_outbound_payment.py b/stripe/v2/money_management/_outbound_payment.py index e310bafe0..927e05777 100644 --- a/stripe/v2/money_management/_outbound_payment.py +++ b/stripe/v2/money_management/_outbound_payment.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -25,7 +25,7 @@ class PaperCheck(StripeObject): """ Memo printed on the memo field of the check. """ - shipping_speed: Literal["priority", "standard"] + shipping_speed: Union[Literal["priority", "standard"], str] """ Open Enum. Shipping speed of the paper check. """ @@ -34,7 +34,9 @@ class PaperCheck(StripeObject): Signature for the paper check. """ - bank_account: Optional[Literal["automatic", "local", "wire"]] + bank_account: Optional[ + Union[Literal["automatic", "local", "wire"], str] + ] """ Open Enum. Method for bank account. """ @@ -42,7 +44,9 @@ class PaperCheck(StripeObject): """ Delivery options for paper check. """ - speed: Optional[Literal["instant", "next_business_day", "standard"]] + speed: Optional[ + Union[Literal["instant", "next_business_day", "standard"], str] + ] """ Open Enum. Speed of the payout. """ @@ -67,19 +71,22 @@ class RecipientNotification(StripeObject): class StatusDetails(StripeObject): class Failed(StripeObject): - reason: Literal[ - "fx_rate_drift_exceeded_after_review", - "paper_check_attachment_too_large", - "paper_check_expired", - "paper_check_undeliverable", - "payout_method_amount_limit_exceeded", - "payout_method_declined", - "payout_method_does_not_exist", - "payout_method_expired", - "payout_method_unsupported", - "payout_method_usage_frequency_limit_exceeded", - "review_rejected", - "unknown_failure", + reason: Union[ + Literal[ + "fx_rate_drift_exceeded_after_review", + "paper_check_attachment_too_large", + "paper_check_expired", + "paper_check_undeliverable", + "payout_method_amount_limit_exceeded", + "payout_method_declined", + "payout_method_does_not_exist", + "payout_method_expired", + "payout_method_unsupported", + "payout_method_usage_frequency_limit_exceeded", + "review_rejected", + "unknown_failure", + ], + str, ] """ Open Enum. The `failed` status reason. @@ -92,18 +99,21 @@ class Processing(StripeObject): """ class Returned(StripeObject): - reason: Literal[ - "payout_method_canceled_by_customer", - "payout_method_closed", - "payout_method_currency_unsupported", - "payout_method_does_not_exist", - "payout_method_holder_address_incorrect", - "payout_method_holder_details_incorrect", - "payout_method_holder_name_incorrect", - "payout_method_invalid_account_number", - "payout_method_restricted", - "recalled", - "unknown_failure", + reason: Union[ + Literal[ + "payout_method_canceled_by_customer", + "payout_method_closed", + "payout_method_currency_unsupported", + "payout_method_does_not_exist", + "payout_method_holder_address_incorrect", + "payout_method_holder_details_incorrect", + "payout_method_holder_name_incorrect", + "payout_method_invalid_account_number", + "payout_method_restricted", + "recalled", + "unknown_failure", + ], + str, ] """ Open Enum. The `returned` status reason. @@ -154,7 +164,9 @@ class PayoutMethodOptions(StripeObject): class BankAccount(StripeObject): class PreferredNetworkOptions(StripeObject): class Ach(StripeObject): - submission: Optional[Literal["next_day", "same_day"]] + submission: Optional[ + Union[Literal["next_day", "same_day"], str] + ] """ Open Enum. ACH submission timing. """ @@ -174,17 +186,20 @@ class Ach(StripeObject): Per-network configuration options. """ preferred_networks: List[ - Literal[ - "ach", - "becs", - "eft", - "fedwire", - "fps", - "npp", - "rtp", - "sepa_credit", - "sepa_instant", - "swift", + Union[ + Literal[ + "ach", + "becs", + "eft", + "fedwire", + "fps", + "npp", + "rtp", + "sepa_credit", + "sepa_instant", + "swift", + ], + str, ] ] """ @@ -219,7 +234,7 @@ class Ach(StripeObject): _inner_class_types = {"payout_method_options": PayoutMethodOptions} class TraceId(StripeObject): - status: Literal["pending", "supported", "unsupported"] + status: Union[Literal["pending", "supported", "unsupported"], str] """ Possible values are `pending`, `supported`, and `unsupported`. Initially set to `pending`, it changes to `supported` when the recipient bank provides a trace ID, or `unsupported` if the recipient bank doesn't support it. @@ -259,7 +274,7 @@ class MailingAddress(StripeObject): State, county, province, or region. """ - carrier: Literal["fedex", "usps"] + carrier: Union[Literal["fedex", "usps"], str] """ Open Enum. Carrier of the paper check. """ @@ -279,7 +294,9 @@ class MailingAddress(StripeObject): """ Tracking number for the check. """ - tracking_status: Literal["delivered", "in_transit", "mailed"] + tracking_status: Union[ + Literal["delivered", "in_transit", "mailed"], str + ] """ Open Enum. Tracking status of the paper check. """ diff --git a/stripe/v2/money_management/_outbound_payment_quote.py b/stripe/v2/money_management/_outbound_payment_quote.py index 404fe180a..5a1af81f8 100644 --- a/stripe/v2/money_management/_outbound_payment_quote.py +++ b/stripe/v2/money_management/_outbound_payment_quote.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -16,11 +16,15 @@ class OutboundPaymentQuote(StripeObject): ] = "v2.money_management.outbound_payment_quote" class DeliveryOptions(StripeObject): - bank_account: Optional[Literal["automatic", "local", "wire"]] + bank_account: Optional[ + Union[Literal["automatic", "local", "wire"], str] + ] """ Open Enum. Method for bank account. """ - speed: Optional[Literal["instant", "next_business_day", "standard"]] + speed: Optional[ + Union[Literal["instant", "next_business_day", "standard"], str] + ] """ Open Enum. Speed of the payout. """ @@ -30,14 +34,17 @@ class EstimatedFee(StripeObject): """ The fee amount for corresponding fee type. """ - type: Literal[ - "cross_border_payout_fee", - "foreign_exchange_fee", - "instant_payout_fee", - "next_day_payout_fee", - "real_time_payout_fee", - "standard_payout_fee", - "wire_payout_fee", + type: Union[ + Literal[ + "cross_border_payout_fee", + "foreign_exchange_fee", + "instant_payout_fee", + "next_day_payout_fee", + "real_time_payout_fee", + "standard_payout_fee", + "wire_payout_fee", + ], + str, ] """ The fee type. @@ -60,7 +67,7 @@ class Rates(StripeObject): The exchange rate going from_currency -> to_currency. """ - lock_duration: Literal["five_minutes", "none"] + lock_duration: Union[Literal["five_minutes", "none"], str] """ The duration the exchange rate lock remains valid from creation time. Allowed value is five_minutes or none. """ @@ -68,7 +75,7 @@ class Rates(StripeObject): """ Time at which the rate lock will expire, measured in seconds since the Unix epoch. Null when rate locking is not supported. """ - lock_status: Literal["active", "expired", "none"] + lock_status: Union[Literal["active", "expired", "none"], str] """ Lock status of the quote. Transitions from active to expired once past the lock_expires_at timestamp. Value can be active, expired or none. """ diff --git a/stripe/v2/money_management/_outbound_transfer.py b/stripe/v2/money_management/_outbound_transfer.py index a6c51ccd2..a985a394d 100644 --- a/stripe/v2/money_management/_outbound_transfer.py +++ b/stripe/v2/money_management/_outbound_transfer.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -16,7 +16,9 @@ class OutboundTransfer(StripeObject): ) class DeliveryOptions(StripeObject): - bank_account: Optional[Literal["automatic", "local", "wire"]] + bank_account: Optional[ + Union[Literal["automatic", "local", "wire"], str] + ] """ Open Enum. Method for bank account. """ @@ -33,16 +35,19 @@ class From(StripeObject): class StatusDetails(StripeObject): class Failed(StripeObject): - reason: Literal[ - "fx_rate_drift_exceeded_after_review", - "payout_method_amount_limit_exceeded", - "payout_method_declined", - "payout_method_does_not_exist", - "payout_method_expired", - "payout_method_unsupported", - "payout_method_usage_frequency_limit_exceeded", - "review_rejected", - "unknown_failure", + reason: Union[ + Literal[ + "fx_rate_drift_exceeded_after_review", + "payout_method_amount_limit_exceeded", + "payout_method_declined", + "payout_method_does_not_exist", + "payout_method_expired", + "payout_method_unsupported", + "payout_method_usage_frequency_limit_exceeded", + "review_rejected", + "unknown_failure", + ], + str, ] """ Open Enum. The `failed` status reason. @@ -55,18 +60,21 @@ class Processing(StripeObject): """ class Returned(StripeObject): - reason: Literal[ - "payout_method_canceled_by_customer", - "payout_method_closed", - "payout_method_currency_unsupported", - "payout_method_does_not_exist", - "payout_method_holder_address_incorrect", - "payout_method_holder_details_incorrect", - "payout_method_holder_name_incorrect", - "payout_method_invalid_account_number", - "payout_method_restricted", - "recalled", - "unknown_failure", + reason: Union[ + Literal[ + "payout_method_canceled_by_customer", + "payout_method_closed", + "payout_method_currency_unsupported", + "payout_method_does_not_exist", + "payout_method_holder_address_incorrect", + "payout_method_holder_details_incorrect", + "payout_method_holder_name_incorrect", + "payout_method_invalid_account_number", + "payout_method_restricted", + "recalled", + "unknown_failure", + ], + str, ] """ Open Enum. The `returned` status reason. @@ -116,17 +124,20 @@ class To(StripeObject): class PayoutMethodOptions(StripeObject): class BankAccount(StripeObject): preferred_networks: List[ - Literal[ - "ach", - "becs", - "eft", - "fedwire", - "fps", - "npp", - "rtp", - "sepa_credit", - "sepa_instant", - "swift", + Union[ + Literal[ + "ach", + "becs", + "eft", + "fedwire", + "fps", + "npp", + "rtp", + "sepa_credit", + "sepa_instant", + "swift", + ], + str, ] ] """ @@ -154,7 +165,7 @@ class BankAccount(StripeObject): _inner_class_types = {"payout_method_options": PayoutMethodOptions} class TraceId(StripeObject): - status: Literal["pending", "supported", "unsupported"] + status: Union[Literal["pending", "supported", "unsupported"], str] """ Possible values are `pending`, `supported`, and `unsupported`. Initially set to `pending`, it changes to `supported` when the recipient bank provides a trace ID, or `unsupported` if the recipient bank doesn't support it. diff --git a/stripe/v2/money_management/_payout_intent.py b/stripe/v2/money_management/_payout_intent.py index 6fc40b247..89667f888 100644 --- a/stripe/v2/money_management/_payout_intent.py +++ b/stripe/v2/money_management/_payout_intent.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -34,39 +34,42 @@ class LatestPayout(StripeObject): """ The ID of the OutboundTransfer, if applicable. """ - type: Literal["outbound_payment", "outbound_transfer"] + type: Union[Literal["outbound_payment", "outbound_transfer"], str] """ The type of payout. """ class NextAction(StripeObject): class HandleFailure(StripeObject): - failure_reason: Literal[ - "account_not_configured_as_recipient", - "currency_not_supported_for_financial_account_balance", - "currency_required", - "feature_not_active_for_recipient", - "fx_rate_drift_exceeded_after_review", - "insufficient_funds", - "payout_method_account_type_incorrect", - "payout_method_amount_limit_exceeded", - "payout_method_canceled_by_customer", - "payout_method_closed", - "payout_method_currency_unsupported", - "payout_method_declined", - "payout_method_does_not_exist", - "payout_method_expired", - "payout_method_holder_address_incorrect", - "payout_method_holder_details_incorrect", - "payout_method_holder_name_incorrect", - "payout_method_invalid_account_number", - "payout_method_restricted", - "payout_method_unsupported", - "payout_method_usage_frequency_limit_exceeded", - "recalled", - "review_rejected", - "to_destination_invalid", - "unknown_failure", + failure_reason: Union[ + Literal[ + "account_not_configured_as_recipient", + "currency_not_supported_for_financial_account_balance", + "currency_required", + "feature_not_active_for_recipient", + "fx_rate_drift_exceeded_after_review", + "insufficient_funds", + "payout_method_account_type_incorrect", + "payout_method_amount_limit_exceeded", + "payout_method_canceled_by_customer", + "payout_method_closed", + "payout_method_currency_unsupported", + "payout_method_declined", + "payout_method_does_not_exist", + "payout_method_expired", + "payout_method_holder_address_incorrect", + "payout_method_holder_details_incorrect", + "payout_method_holder_name_incorrect", + "payout_method_invalid_account_number", + "payout_method_restricted", + "payout_method_unsupported", + "payout_method_usage_frequency_limit_exceeded", + "recalled", + "review_rejected", + "to_destination_invalid", + "unknown_failure", + ], + str, ] """ Open Enum. The reason for the failure. @@ -122,7 +125,9 @@ class PayoutMethodOptions(StripeObject): class BankAccount(StripeObject): class PreferredNetworkOptions(StripeObject): class Ach(StripeObject): - submission: Optional[Literal["next_day", "same_day"]] + submission: Optional[ + Union[Literal["next_day", "same_day"], str] + ] """ Open Enum. ACH submission timing. """ @@ -142,17 +147,20 @@ class Ach(StripeObject): Per-network configuration options. """ preferred_networks: List[ - Literal[ - "ach", - "becs", - "eft", - "fedwire", - "fps", - "npp", - "rtp", - "sepa_credit", - "sepa_instant", - "swift", + Union[ + Literal[ + "ach", + "becs", + "eft", + "fedwire", + "fps", + "npp", + "rtp", + "sepa_credit", + "sepa_instant", + "swift", + ], + str, ] ] """ @@ -239,8 +247,11 @@ class Ach(StripeObject): """ The description that appears on the receiving end for the payout (for example, on a bank statement). """ - status: Literal[ - "canceled", "pending", "posted", "processing", "requires_action" + status: Union[ + Literal[ + "canceled", "pending", "posted", "processing", "requires_action" + ], + str, ] """ Open Enum. Current status of the PayoutIntent: `pending`, `processing`, `posted`, `canceled`, `requires_action`. diff --git a/stripe/v2/money_management/_payout_method.py b/stripe/v2/money_management/_payout_method.py index 1a858f92a..97767d561 100644 --- a/stripe/v2/money_management/_payout_method.py +++ b/stripe/v2/money_management/_payout_method.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -19,7 +19,7 @@ class AlternativeReference(StripeObject): """ The ID of the alternative resource being referenced. """ - type: Literal["external_account", "payment_method"] + type: Union[Literal["external_account", "payment_method"], str] """ The type of the alternative reference (e.g., external_account for V1 external accounts). """ @@ -116,16 +116,19 @@ class CryptoWallet(StripeObject): """ Optional field, required if network supports memos (only "stellar" currently). """ - network: Literal[ - "arbitrum", - "avalanche_c_chain", - "base", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "tempo", + network: Union[ + Literal[ + "arbitrum", + "avalanche_c_chain", + "base", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "tempo", + ], + str, ] """ Which rail is being used to make an outbound money movement to this wallet. @@ -196,11 +199,14 @@ class UsageStatus(StripeObject): Whether the Payout Method is currently unusable for money movement, despite potentially being correctly set up. Please reach out to Stripe Support for more information. """ - type: Literal[ - "bank_account", - "card", - "crypto_wallet", - "network_business_profile_wallet", + type: Union[ + Literal[ + "bank_account", + "card", + "crypto_wallet", + "network_business_profile_wallet", + ], + str, ] """ Closed Enum. The type of payout method. diff --git a/stripe/v2/money_management/_received_credit.py b/stripe/v2/money_management/_received_credit.py index e51cb7a3e..03c4ba22a 100644 --- a/stripe/v2/money_management/_received_credit.py +++ b/stripe/v2/money_management/_received_credit.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject from stripe.v2._amount import Amount -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -36,8 +36,14 @@ class BalanceTransfer(StripeObject): """ The ID of the v1 transfer object that originated the ReceivedCredit. """ - type: Literal[ - "outbound_payment", "outbound_transfer", "transfer", "payout_v1" + type: Union[ + Literal[ + "outbound_payment", + "outbound_transfer", + "transfer", + "payout_v1", + ], + str, ] """ Open Enum. The type of Stripe Money Movement that originated the ReceivedCredit. @@ -98,7 +104,7 @@ class GbBankAccount(StripeObject): """ The last 4 digits of the account number that originated the transfer. """ - network: Literal["chaps", "fps"] + network: Union[Literal["chaps", "fps"], str] """ Open Enum. The money transmission network used to send funds for this ReceivedCredit. """ @@ -164,7 +170,7 @@ class UsBankAccount(StripeObject): """ The last 4 digits of the account number that originated the transfer. """ - network: Literal["ach", "rtp", "us_domestic_wire"] + network: Union[Literal["ach", "rtp", "us_domestic_wire"], str] """ Open Enum. The money transmission network used to send funds for this ReceivedCredit. """ @@ -193,14 +199,17 @@ class UsBankAccount(StripeObject): """ Hash containing the transaction bank details. Present if `origin_type` field value is `mx_bank_account`. """ - origin_type: Literal[ - "ca_bank_account", - "crypto_wallet", - "eu_bank_account", - "gb_bank_account", - "mx_bank_account", - "sepa_bank_account", - "us_bank_account", + origin_type: Union[ + Literal[ + "ca_bank_account", + "crypto_wallet", + "eu_bank_account", + "gb_bank_account", + "mx_bank_account", + "sepa_bank_account", + "us_bank_account", + ], + str, ] """ Open Enum. Indicates the origin of source from which external funds originated from. @@ -263,16 +272,19 @@ class CryptoWallet(StripeObject): """ A memo also for identifying the recipient for memo-based blockchains (e.g., Stellar),. """ - network: Literal[ - "arbitrum", - "avalanche_c_chain", - "base", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - "tempo", + network: Union[ + Literal[ + "arbitrum", + "avalanche_c_chain", + "base", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + "tempo", + ], + str, ] """ The network the crypto was received from. @@ -286,14 +298,17 @@ class CryptoWallet(StripeObject): """ Financial Address on which funds for ReceivedCredit were received. """ - origin_type: Literal[ - "ca_bank_account", - "crypto_wallet", - "eu_bank_account", - "gb_bank_account", - "mx_bank_account", - "sepa_bank_account", - "us_bank_account", + origin_type: Union[ + Literal[ + "ca_bank_account", + "crypto_wallet", + "eu_bank_account", + "gb_bank_account", + "mx_bank_account", + "sepa_bank_account", + "us_bank_account", + ], + str, ] """ Open Enum. Indicates the origin of source from which external funds originated from. @@ -306,11 +321,14 @@ class CryptoWallet(StripeObject): class StatusDetails(StripeObject): class Failed(StripeObject): - reason: Literal[ - "capability_inactive", - "currency_unsupported_on_financial_address", - "financial_address_inactive", - "stripe_rejected", + reason: Union[ + Literal[ + "capability_inactive", + "currency_unsupported_on_financial_address", + "financial_address_inactive", + "stripe_rejected", + ], + str, ] """ Open Enum. The `failed` status reason. @@ -430,7 +448,7 @@ class From(StripeObject): """ A hosted transaction receipt URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. """ - status: Literal["failed", "pending", "returned", "succeeded"] + status: Union[Literal["failed", "pending", "returned", "succeeded"], str] """ Open Enum. The status of the ReceivedCredit. """ @@ -450,14 +468,17 @@ class From(StripeObject): """ This object stores details about the Stripe network transfer that resulted in the ReceivedCredit. Present if `type` field value is `stripe_network_transfer`. """ - type: Literal[ - "balance_transfer", - "bank_transfer", - "card_spend", - "crypto_wallet_transfer", - "external_credit", - "stripe_balance_payment", - "stripe_network_transfer", + type: Union[ + Literal[ + "balance_transfer", + "bank_transfer", + "card_spend", + "crypto_wallet_transfer", + "external_credit", + "stripe_balance_payment", + "stripe_network_transfer", + ], + str, ] """ Open Enum. The type of flow that caused the ReceivedCredit. diff --git a/stripe/v2/money_management/_received_debit.py b/stripe/v2/money_management/_received_debit.py index 7c22293c7..dc99ca45d 100644 --- a/stripe/v2/money_management/_received_debit.py +++ b/stripe/v2/money_management/_received_debit.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -112,11 +112,14 @@ class DisputeDetails(StripeObject): class StatusDetails(StripeObject): class Failed(StripeObject): - reason: Literal[ - "capability_inactive", - "financial_address_inactive", - "insufficient_funds", - "stripe_rejected", + reason: Union[ + Literal[ + "capability_inactive", + "financial_address_inactive", + "insufficient_funds", + "stripe_rejected", + ], + str, ] """ Open Enum. The reason for the failure of the ReceivedDebit. @@ -225,7 +228,9 @@ class StripeBalancePayment(StripeObject): """ A link to the Stripe-hosted receipt for this ReceivedDebit. """ - status: Literal["canceled", "failed", "pending", "returned", "succeeded"] + status: Union[ + Literal["canceled", "failed", "pending", "returned", "succeeded"], str + ] """ Open Enum. The status of the ReceivedDebit. """ @@ -241,12 +246,15 @@ class StripeBalancePayment(StripeObject): """ This object stores details about the Stripe Balance Payment that resulted in the ReceivedDebit. """ - type: Literal[ - "balance_transfer", - "bank_transfer", - "card_spend", - "external_debit", - "stripe_balance_payment", + type: Union[ + Literal[ + "balance_transfer", + "bank_transfer", + "card_spend", + "external_debit", + "stripe_balance_payment", + ], + str, ] """ Open Enum. The type of the ReceivedDebit. diff --git a/stripe/v2/money_management/_transaction.py b/stripe/v2/money_management/_transaction.py index 8011e637a..2272da10c 100644 --- a/stripe/v2/money_management/_transaction.py +++ b/stripe/v2/money_management/_transaction.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject from stripe.v2._amount import Amount -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -168,40 +168,43 @@ class Flow(StripeObject): """ If applicable, the ID of the Treasury ReceivedDebit that created this Transaction. """ - type: Literal[ - "adjustment", - "application_fee", - "application_fee_refund", - "charge", - "currency_conversion", - "debit_dispute", - "dispute", - "fee_transaction", - "inbound_transfer", - "issuing_authorization", - "issuing_dispute", - "issuing_transaction", - "outbound_payment", - "outbound_transfer", - "payout", - "received_credit", - "received_debit", - "refund", - "reserve_hold", - "reserve_release", - "tax_fund", - "topup", - "transfer", - "transfer_reversal", - "treasury_credit_reversal", - "treasury_debit_reversal", - "treasury_inbound_transfer", - "treasury_issuing_authorization", - "treasury_other", - "treasury_outbound_payment", - "treasury_outbound_transfer", - "treasury_received_credit", - "treasury_received_debit", + type: Union[ + Literal[ + "adjustment", + "application_fee", + "application_fee_refund", + "charge", + "currency_conversion", + "debit_dispute", + "dispute", + "fee_transaction", + "inbound_transfer", + "issuing_authorization", + "issuing_dispute", + "issuing_transaction", + "outbound_payment", + "outbound_transfer", + "payout", + "received_credit", + "received_debit", + "refund", + "reserve_hold", + "reserve_release", + "tax_fund", + "topup", + "transfer", + "transfer_reversal", + "treasury_credit_reversal", + "treasury_debit_reversal", + "treasury_inbound_transfer", + "treasury_issuing_authorization", + "treasury_other", + "treasury_outbound_payment", + "treasury_outbound_transfer", + "treasury_received_credit", + "treasury_received_debit", + ], + str, ] """ Open Enum. Type of the flow that created the Transaction. The field matching this value will contain the ID of the flow. @@ -226,62 +229,65 @@ class StatusTransitions(StripeObject): The delta to the FinancialAccount's balance. The balance_impact for the Transaction is equal to sum of its TransactionEntries that have `effective_at`s in the past. """ - category: Literal[ - "adjustment", - "advance", - "anticipation_repayment", - "balance_transfer", - "climate_order_purchase", - "climate_order_refund", - "connect_collection_transfer", - "connect_reserved_funds", - "contribution", - "currency_conversion", - "debit_dispute", - "dispute", - "dispute_reversal", - "financing_paydown", - "financing_paydown_reversal", - "inbound_payment", - "inbound_payment_failure", - "inbound_transfer", - "inbound_transfer_reversal", - "india_mdr_processing_fee", - "issuing_authorization", - "issuing_dispute", - "issuing_dispute_fraud_liability_debit", - "issuing_dispute_provisional_credit", - "issuing_dispute_provisional_credit_reversal", - "issuing_transaction", - "minimum_balance_hold", - "network_cost", - "obligation", - "outbound_payment", - "outbound_payment_reversal", - "outbound_transfer", - "outbound_transfer_reversal", - "partial_capture_reversal", - "payment_method_passthrough_fee", - "payment_network_reserved_funds", - "platform_earning", - "platform_earning_refund", - "platform_fee", - "platform_funded_credit_transaction", - "received_credit", - "received_credit_reversal", - "received_debit", - "received_debit_reversal", - "refund", - "refund_failure", - "risk_reserved_funds", - "stripe_balance_payment_debit", - "stripe_balance_payment_debit_reversal", - "stripe_fee", - "stripe_fee_tax", - "tax_fund", - "tax_withholding", - "transfer_reversal", - "unreconciled_customer_funds", + category: Union[ + Literal[ + "adjustment", + "advance", + "anticipation_repayment", + "balance_transfer", + "climate_order_purchase", + "climate_order_refund", + "connect_collection_transfer", + "connect_reserved_funds", + "contribution", + "currency_conversion", + "debit_dispute", + "dispute", + "dispute_reversal", + "financing_paydown", + "financing_paydown_reversal", + "inbound_payment", + "inbound_payment_failure", + "inbound_transfer", + "inbound_transfer_reversal", + "india_mdr_processing_fee", + "issuing_authorization", + "issuing_dispute", + "issuing_dispute_fraud_liability_debit", + "issuing_dispute_provisional_credit", + "issuing_dispute_provisional_credit_reversal", + "issuing_transaction", + "minimum_balance_hold", + "network_cost", + "obligation", + "outbound_payment", + "outbound_payment_reversal", + "outbound_transfer", + "outbound_transfer_reversal", + "partial_capture_reversal", + "payment_method_passthrough_fee", + "payment_network_reserved_funds", + "platform_earning", + "platform_earning_refund", + "platform_fee", + "platform_funded_credit_transaction", + "received_credit", + "received_credit_reversal", + "received_debit", + "received_debit_reversal", + "refund", + "refund_failure", + "risk_reserved_funds", + "stripe_balance_payment_debit", + "stripe_balance_payment_debit_reversal", + "stripe_fee", + "stripe_fee_tax", + "tax_fund", + "tax_withholding", + "transfer_reversal", + "unreconciled_customer_funds", + ], + str, ] """ Open Enum. A descriptive category used to classify the Transaction. diff --git a/stripe/v2/money_management/_transaction_entry.py b/stripe/v2/money_management/_transaction_entry.py index 3a82e3328..b39241e73 100644 --- a/stripe/v2/money_management/_transaction_entry.py +++ b/stripe/v2/money_management/_transaction_entry.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject from stripe.v2._amount import Amount -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -163,101 +163,107 @@ class Flow(StripeObject): """ If applicable, the ID of the Treasury ReceivedDebit that created this Transaction. """ - type: Literal[ + type: Union[ + Literal[ + "adjustment", + "application_fee", + "application_fee_refund", + "charge", + "currency_conversion", + "debit_dispute", + "dispute", + "fee_transaction", + "inbound_transfer", + "issuing_authorization", + "issuing_dispute", + "issuing_transaction", + "outbound_payment", + "outbound_transfer", + "payout", + "received_credit", + "received_debit", + "refund", + "reserve_hold", + "reserve_release", + "tax_fund", + "topup", + "transfer", + "transfer_reversal", + "treasury_credit_reversal", + "treasury_debit_reversal", + "treasury_inbound_transfer", + "treasury_issuing_authorization", + "treasury_other", + "treasury_outbound_payment", + "treasury_outbound_transfer", + "treasury_received_credit", + "treasury_received_debit", + ], + str, + ] + """ + Open Enum. Type of the flow that created the Transaction. The field matching this value will contain the ID of the flow. + """ + + category: Union[ + Literal[ "adjustment", - "application_fee", - "application_fee_refund", - "charge", + "advance", + "anticipation_repayment", + "balance_transfer", + "climate_order_purchase", + "climate_order_refund", + "connect_collection_transfer", + "connect_reserved_funds", + "contribution", "currency_conversion", "debit_dispute", "dispute", - "fee_transaction", + "dispute_reversal", + "financing_paydown", + "financing_paydown_reversal", + "inbound_payment", + "inbound_payment_failure", "inbound_transfer", + "inbound_transfer_reversal", + "india_mdr_processing_fee", "issuing_authorization", "issuing_dispute", + "issuing_dispute_fraud_liability_debit", + "issuing_dispute_provisional_credit", + "issuing_dispute_provisional_credit_reversal", "issuing_transaction", + "minimum_balance_hold", + "network_cost", + "obligation", "outbound_payment", + "outbound_payment_reversal", "outbound_transfer", - "payout", + "outbound_transfer_reversal", + "partial_capture_reversal", + "payment_method_passthrough_fee", + "payment_network_reserved_funds", + "platform_earning", + "platform_earning_refund", + "platform_fee", + "platform_funded_credit_transaction", "received_credit", + "received_credit_reversal", "received_debit", + "received_debit_reversal", "refund", - "reserve_hold", - "reserve_release", + "refund_failure", + "risk_reserved_funds", + "stripe_balance_payment_debit", + "stripe_balance_payment_debit_reversal", + "stripe_fee", + "stripe_fee_tax", "tax_fund", - "topup", - "transfer", + "tax_withholding", "transfer_reversal", - "treasury_credit_reversal", - "treasury_debit_reversal", - "treasury_inbound_transfer", - "treasury_issuing_authorization", - "treasury_other", - "treasury_outbound_payment", - "treasury_outbound_transfer", - "treasury_received_credit", - "treasury_received_debit", - ] - """ - Open Enum. Type of the flow that created the Transaction. The field matching this value will contain the ID of the flow. - """ - - category: Literal[ - "adjustment", - "advance", - "anticipation_repayment", - "balance_transfer", - "climate_order_purchase", - "climate_order_refund", - "connect_collection_transfer", - "connect_reserved_funds", - "contribution", - "currency_conversion", - "debit_dispute", - "dispute", - "dispute_reversal", - "financing_paydown", - "financing_paydown_reversal", - "inbound_payment", - "inbound_payment_failure", - "inbound_transfer", - "inbound_transfer_reversal", - "india_mdr_processing_fee", - "issuing_authorization", - "issuing_dispute", - "issuing_dispute_fraud_liability_debit", - "issuing_dispute_provisional_credit", - "issuing_dispute_provisional_credit_reversal", - "issuing_transaction", - "minimum_balance_hold", - "network_cost", - "obligation", - "outbound_payment", - "outbound_payment_reversal", - "outbound_transfer", - "outbound_transfer_reversal", - "partial_capture_reversal", - "payment_method_passthrough_fee", - "payment_network_reserved_funds", - "platform_earning", - "platform_earning_refund", - "platform_fee", - "platform_funded_credit_transaction", - "received_credit", - "received_credit_reversal", - "received_debit", - "received_debit_reversal", - "refund", - "refund_failure", - "risk_reserved_funds", - "stripe_balance_payment_debit", - "stripe_balance_payment_debit_reversal", - "stripe_fee", - "stripe_fee_tax", - "tax_fund", - "tax_withholding", - "transfer_reversal", - "unreconciled_customer_funds", + "unreconciled_customer_funds", + ], + str, ] """ Closed Enum for now, and will be turned into an Open Enum soon. A descriptive category used to classify the Transaction. diff --git a/stripe/v2/payments/_off_session_payment.py b/stripe/v2/payments/_off_session_payment.py index 0214ab388..1b98ee7c6 100644 --- a/stripe/v2/payments/_off_session_payment.py +++ b/stripe/v2/payments/_off_session_payment.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -23,9 +23,12 @@ class OffSessionPayment(StripeObject): class AmountDetails(StripeObject): class Error(StripeObject): code: Optional[ - Literal[ - "amount_details_amount_mismatch", - "amount_details_amount_greater_than_tax_shipping_discount", + Union[ + Literal[ + "amount_details_amount_mismatch", + "amount_details_amount_greater_than_tax_shipping_discount", + ], + str, ] ] """ @@ -126,7 +129,7 @@ class Capture(StripeObject): """ The timestamp when this payment is no longer eligible to be captured. """ - capture_method: Literal["automatic", "manual"] + capture_method: Union[Literal["automatic", "manual"], str] """ The method to use to capture the payment. """ @@ -157,7 +160,9 @@ class RetryDetails(StripeObject): """ The pre-configured retry policy to use for the payment. """ - retry_strategy: Literal["heuristic", "none", "scheduled", "smart"] + retry_strategy: Union[ + Literal["heuristic", "none", "scheduled", "smart"], str + ] """ Indicates the strategy for how you want Stripe to retry the payment. """ @@ -199,7 +204,7 @@ class TransferData(StripeObject): """ The amount of the application fee requested to be applied to the payment. """ - cadence: Literal["recurring", "unscheduled"] + cadence: Union[Literal["recurring", "unscheduled"], str] """ The frequency of the underlying payment. """ @@ -221,12 +226,15 @@ class TransferData(StripeObject): An arbitrary string attached to the object. Often useful for displaying to users. """ failure_reason: Optional[ - Literal[ - "authorization_expired", - "exceeded_retry_window", - "no_valid_payment_method", - "rejected_by_partner", - "retries_exhausted", + Union[ + Literal[ + "authorization_expired", + "exceeded_retry_window", + "no_valid_payment_method", + "rejected_by_partner", + "retries_exhausted", + ], + str, ] ] """ @@ -296,15 +304,18 @@ class TransferData(StripeObject): [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. """ - status: Literal[ - "canceled", - "failed", - "paused", - "pending", - "pending_retry", - "processing", - "requires_capture", - "succeeded", + status: Union[ + Literal[ + "canceled", + "failed", + "paused", + "pending", + "pending_retry", + "processing", + "requires_capture", + "succeeded", + ], + str, ] """ Status of this OffSessionPayment, one of `pending`, `pending_retry`, `processing`, diff --git a/stripe/v2/payments/_settlement_allocation_intent.py b/stripe/v2/payments/_settlement_allocation_intent.py index d372f711a..c3d6e469e 100644 --- a/stripe/v2/payments/_settlement_allocation_intent.py +++ b/stripe/v2/payments/_settlement_allocation_intent.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe.v2._amount import Amount -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -76,8 +76,11 @@ class Errored(StripeObject): """ Reference for the SettlementAllocationIntent. This is the transaction reference used by payments processor to send funds to Stripe . """ - status: Literal[ - "canceled", "errored", "matched", "pending", "settled", "submitted" + status: Union[ + Literal[ + "canceled", "errored", "matched", "pending", "settled", "submitted" + ], + str, ] """ SettlementAllocationIntent status. diff --git a/stripe/v2/payments/_settlement_allocation_intent_split.py b/stripe/v2/payments/_settlement_allocation_intent_split.py index 72fd310e6..dcda2bef2 100644 --- a/stripe/v2/payments/_settlement_allocation_intent_split.py +++ b/stripe/v2/payments/_settlement_allocation_intent_split.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe.v2._amount import Amount -from typing import ClassVar, Optional +from typing import ClassVar, Optional, Union from typing_extensions import Literal @@ -28,8 +28,11 @@ class Flow(StripeObject): """ If applicable, the ID of the ReceivedCredit that created this transaction. """ - type: Literal[ - "outbound_payment", "outbound_transfer", "received_credit" + type: Union[ + Literal[ + "outbound_payment", "outbound_transfer", "received_credit" + ], + str, ] """ Type of the flow linked to the transaction which settled the SettlementAllocationIntentSplit. The field matching this value will contain the ID of the flow. @@ -71,11 +74,11 @@ class Flow(StripeObject): """ The ID of the SettlementAllocationIntent that this split belongs to. """ - status: Literal["canceled", "pending", "settled"] + status: Union[Literal["canceled", "pending", "settled"], str] """ The status of the SettlementAllocationIntentSplit. """ - type: Literal["credit", "debit"] + type: Union[Literal["credit", "debit"], str] """ The type of the SettlementAllocationIntentSplit. """ diff --git a/stripe/v2/reporting/_report_run.py b/stripe/v2/reporting/_report_run.py index fdc392f40..3a664d6e9 100644 --- a/stripe/v2/reporting/_report_run.py +++ b/stripe/v2/reporting/_report_run.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject, UntypedStripeObject -from typing import Any, ClassVar, List, Optional +from typing import Any, ClassVar, List, Optional, Union from typing_extensions import Literal @@ -40,7 +40,7 @@ class Schema(StripeObject): The type of the column. """ - content_type: Literal["csv", "zip"] + content_type: Union[Literal["csv", "zip"], str] """ The content type of the file. """ diff --git a/stripe/v2/signals/_account_signal.py b/stripe/v2/signals/_account_signal.py index ab7fe445a..4ae812866 100644 --- a/stripe/v2/signals/_account_signal.py +++ b/stripe/v2/signals/_account_signal.py @@ -2,13 +2,16 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal class AccountSignal(StripeObject): """ - An automatically evaluated signal on a v2 account. + An automatically evaluated signal on an account. Each Account Signal object corresponds to + exactly one signal type, indicated by type. Only the type-specific field is populated; other + type-specific payload fields are null. If an account has multiple signals, Stripe creates + separate account signal objects. """ OBJECT_NAME: ClassVar[Literal["v2.signals.account_signal"]] = ( @@ -152,7 +155,7 @@ class Indicator(StripeObject): """ String representing the object's type. Objects of the same type share the same value of the object field. """ - type: Literal["fraudulent_merchant", "merchant_delinquency"] + type: Union[Literal["fraudulent_merchant", "merchant_delinquency"], str] """ The type of signal. """ diff --git a/stripe/v2/signals/_account_signal_service.py b/stripe/v2/signals/_account_signal_service.py index e363cc6a7..c453b115b 100644 --- a/stripe/v2/signals/_account_signal_service.py +++ b/stripe/v2/signals/_account_signal_service.py @@ -24,7 +24,7 @@ def list( options: Optional["RequestOptions"] = None, ) -> "ListObject[AccountSignal]": """ - Lists AccountSignals for a given account or customer, filtered by signal type. + Lists the latest AccountSignals for a given account or customer, filtered by signal type. Note that this endpoint returns only the latest signal for each requested signal type. """ return cast( "ListObject[AccountSignal]", @@ -43,7 +43,7 @@ async def list_async( options: Optional["RequestOptions"] = None, ) -> "ListObject[AccountSignal]": """ - Lists AccountSignals for a given account or customer, filtered by signal type. + Lists the latest AccountSignals for a given account or customer, filtered by signal type. Note that this endpoint returns only the latest signal for each requested signal type. """ return cast( "ListObject[AccountSignal]", diff --git a/stripe/v2/tax/_manual_rule.py b/stripe/v2/tax/_manual_rule.py index 7ff62493a..e1a67d0ef 100644 --- a/stripe/v2/tax/_manual_rule.py +++ b/stripe/v2/tax/_manual_rule.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from decimal import Decimal from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List, Optional, Union from typing_extensions import Literal @@ -107,7 +107,7 @@ class Rate(StripeObject): """ Tax rates to be applied. """ - status: Literal["active", "inactive"] + status: Union[Literal["active", "inactive"], str] """ The status of the ManualRule object. """ From d5424e4c82cc1e0e50fd78d584ac110b10caa667 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2026 18:47:23 +0000 Subject: [PATCH 2/2] Update generated code for v2344 and 60b37acb4b1f57a9727a389192ff553e45234e63 --- CODEGEN_VERSION | 2 +- stripe/v2/core/_event.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 00cedf976..a75ac409c 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -b7168aabb0ad2d376d2f6d2e5ec34e5e55d1f702 \ No newline at end of file +60b37acb4b1f57a9727a389192ff553e45234e63 \ No newline at end of file diff --git a/stripe/v2/core/_event.py b/stripe/v2/core/_event.py index 96bf58a3b..4be975bc9 100644 --- a/stripe/v2/core/_event.py +++ b/stripe/v2/core/_event.py @@ -3,7 +3,7 @@ # -*- coding: utf-8 -*- import json -from typing import Any, ClassVar, Dict, Optional, cast +from typing import Any, ClassVar, Dict, Optional, cast, Union from typing_extensions import Literal, TYPE_CHECKING