├── .coveragerc ├── .editorconfig ├── .flake8 ├── .git-blame-ignore-revs ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ ├── config.yml │ └── feature_request.yml ├── pull_request_template.md └── workflows │ ├── ci.yml │ └── rules.yml ├── .gitignore ├── .vscode ├── extensions.json └── settings.json ├── CHANGELOG ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── LONG_DESCRIPTION.rst ├── MANIFEST.in ├── OPENAPI_VERSION ├── README.md ├── VERSION ├── deps ├── build-requirements.txt ├── dev-requirements.txt └── test-requirements.txt ├── examples ├── README.md ├── charge.py ├── example_template.py ├── meter_event_stream.py ├── oauth.py ├── proxy.py ├── raw_request.py ├── thinevent_webhook_handler.py └── webhooks.py ├── flake8_stripe └── flake8_stripe.py ├── justfile ├── pyproject.toml ├── setup.cfg ├── setup.py ├── stripe ├── __init__.py ├── _account.py ├── _account_capability_service.py ├── _account_external_account_service.py ├── _account_link.py ├── _account_link_service.py ├── _account_login_link_service.py ├── _account_person_service.py ├── _account_service.py ├── _account_session.py ├── _account_session_service.py ├── _any_iterator.py ├── _api_mode.py ├── _api_requestor.py ├── _api_resource.py ├── _api_version.py ├── _app_info.py ├── _apple_pay_domain.py ├── _apple_pay_domain_service.py ├── _application.py ├── _application_fee.py ├── _application_fee_refund.py ├── _application_fee_refund_service.py ├── _application_fee_service.py ├── _apps_service.py ├── _balance.py ├── _balance_service.py ├── _balance_transaction.py ├── _balance_transaction_service.py ├── _bank_account.py ├── _base_address.py ├── _billing_portal_service.py ├── _billing_service.py ├── _capability.py ├── _card.py ├── _cash_balance.py ├── _charge.py ├── _charge_service.py ├── _checkout_service.py ├── _client_options.py ├── _climate_service.py ├── _confirmation_token.py ├── _confirmation_token_service.py ├── _connect_collection_transfer.py ├── _country_spec.py ├── _country_spec_service.py ├── _coupon.py ├── _coupon_service.py ├── _createable_api_resource.py ├── _credit_note.py ├── _credit_note_line_item.py ├── _credit_note_line_item_service.py ├── _credit_note_preview_lines_service.py ├── _credit_note_service.py ├── _custom_method.py ├── _customer.py ├── _customer_balance_transaction.py ├── _customer_balance_transaction_service.py ├── _customer_cash_balance_service.py ├── _customer_cash_balance_transaction.py ├── _customer_cash_balance_transaction_service.py ├── _customer_funding_instructions_service.py ├── _customer_payment_method_service.py ├── _customer_payment_source_service.py ├── _customer_service.py ├── _customer_session.py ├── _customer_session_service.py ├── _customer_tax_id_service.py ├── _deletable_api_resource.py ├── _discount.py ├── _dispute.py ├── _dispute_service.py ├── _encode.py ├── _entitlements_service.py ├── _ephemeral_key.py ├── _ephemeral_key_service.py ├── _error.py ├── _error_object.py ├── _event.py ├── _event_service.py ├── _exchange_rate.py ├── _exchange_rate_service.py ├── _expandable_field.py ├── _file.py ├── _file_link.py ├── _file_link_service.py ├── _file_service.py ├── _financial_connections_service.py ├── _forwarding_service.py ├── _funding_instructions.py ├── _http_client.py ├── _identity_service.py ├── _invoice.py ├── _invoice_item.py ├── _invoice_item_service.py ├── _invoice_line_item.py ├── _invoice_line_item_service.py ├── _invoice_payment.py ├── _invoice_payment_service.py ├── _invoice_rendering_template.py ├── _invoice_rendering_template_service.py ├── _invoice_service.py ├── _issuing_service.py ├── _line_item.py ├── _list_object.py ├── _listable_api_resource.py ├── _login_link.py ├── _mandate.py ├── _mandate_service.py ├── _multipart_data_generator.py ├── _nested_resource_class_methods.py ├── _oauth.py ├── _oauth_service.py ├── _object_classes.py ├── _payment_intent.py ├── _payment_intent_service.py ├── _payment_link.py ├── _payment_link_line_item_service.py ├── _payment_link_service.py ├── _payment_method.py ├── _payment_method_configuration.py ├── _payment_method_configuration_service.py ├── _payment_method_domain.py ├── _payment_method_domain_service.py ├── _payment_method_service.py ├── _payout.py ├── _payout_service.py ├── _person.py ├── _plan.py ├── _plan_service.py ├── _price.py ├── _price_service.py ├── _product.py ├── _product_feature.py ├── _product_feature_service.py ├── _product_service.py ├── _promotion_code.py ├── _promotion_code_service.py ├── _quote.py ├── _quote_computed_upfront_line_items_service.py ├── _quote_line_item_service.py ├── _quote_service.py ├── _radar_service.py ├── _refund.py ├── _refund_service.py ├── _reporting_service.py ├── _request_metrics.py ├── _request_options.py ├── _requestor_options.py ├── _reserve_transaction.py ├── _reversal.py ├── _review.py ├── _review_service.py ├── _search_result_object.py ├── _searchable_api_resource.py ├── _setup_attempt.py ├── _setup_attempt_service.py ├── _setup_intent.py ├── _setup_intent_service.py ├── _shipping_rate.py ├── _shipping_rate_service.py ├── _sigma_service.py ├── _singleton_api_resource.py ├── _source.py ├── _source_mandate_notification.py ├── _source_service.py ├── _source_transaction.py ├── _source_transaction_service.py ├── _stripe_client.py ├── _stripe_object.py ├── _stripe_response.py ├── _stripe_service.py ├── _subscription.py ├── _subscription_item.py ├── _subscription_item_service.py ├── _subscription_schedule.py ├── _subscription_schedule_service.py ├── _subscription_service.py ├── _tax_code.py ├── _tax_code_service.py ├── _tax_deducted_at_source.py ├── _tax_id.py ├── _tax_id_service.py ├── _tax_rate.py ├── _tax_rate_service.py ├── _tax_service.py ├── _terminal_service.py ├── _test_helpers.py ├── _test_helpers_service.py ├── _token.py ├── _token_service.py ├── _topup.py ├── _topup_service.py ├── _transfer.py ├── _transfer_reversal_service.py ├── _transfer_service.py ├── _treasury_service.py ├── _updateable_api_resource.py ├── _util.py ├── _v2_services.py ├── _verify_mixin.py ├── _version.py ├── _webhook.py ├── _webhook_endpoint.py ├── _webhook_endpoint_service.py ├── api_resources │ ├── __init__.py │ ├── abstract │ │ ├── __init__.py │ │ ├── api_resource.py │ │ ├── createable_api_resource.py │ │ ├── custom_method.py │ │ ├── deletable_api_resource.py │ │ ├── listable_api_resource.py │ │ ├── nested_resource_class_methods.py │ │ ├── searchable_api_resource.py │ │ ├── singleton_api_resource.py │ │ ├── test_helpers.py │ │ ├── updateable_api_resource.py │ │ └── verify_mixin.py │ ├── account.py │ ├── account_link.py │ ├── account_session.py │ ├── apple_pay_domain.py │ ├── application.py │ ├── application_fee.py │ ├── application_fee_refund.py │ ├── apps │ │ ├── __init__.py │ │ └── secret.py │ ├── balance.py │ ├── balance_transaction.py │ ├── bank_account.py │ ├── billing │ │ ├── __init__.py │ │ ├── alert.py │ │ ├── alert_triggered.py │ │ ├── credit_balance_summary.py │ │ ├── credit_balance_transaction.py │ │ ├── credit_grant.py │ │ ├── meter.py │ │ ├── meter_event.py │ │ ├── meter_event_adjustment.py │ │ └── meter_event_summary.py │ ├── billing_portal │ │ ├── __init__.py │ │ ├── configuration.py │ │ └── session.py │ ├── capability.py │ ├── card.py │ ├── cash_balance.py │ ├── charge.py │ ├── checkout │ │ ├── __init__.py │ │ └── session.py │ ├── climate │ │ ├── __init__.py │ │ ├── order.py │ │ ├── product.py │ │ └── supplier.py │ ├── confirmation_token.py │ ├── connect_collection_transfer.py │ ├── country_spec.py │ ├── coupon.py │ ├── credit_note.py │ ├── credit_note_line_item.py │ ├── customer.py │ ├── customer_balance_transaction.py │ ├── customer_cash_balance_transaction.py │ ├── customer_session.py │ ├── discount.py │ ├── dispute.py │ ├── entitlements │ │ ├── __init__.py │ │ ├── active_entitlement.py │ │ ├── active_entitlement_summary.py │ │ └── feature.py │ ├── ephemeral_key.py │ ├── error_object.py │ ├── event.py │ ├── exchange_rate.py │ ├── file.py │ ├── file_link.py │ ├── financial_connections │ │ ├── __init__.py │ │ ├── account.py │ │ ├── account_owner.py │ │ ├── account_ownership.py │ │ ├── session.py │ │ └── transaction.py │ ├── forwarding │ │ ├── __init__.py │ │ └── request.py │ ├── funding_instructions.py │ ├── identity │ │ ├── __init__.py │ │ ├── verification_report.py │ │ └── verification_session.py │ ├── invoice.py │ ├── invoice_item.py │ ├── invoice_line_item.py │ ├── invoice_payment.py │ ├── invoice_rendering_template.py │ ├── issuing │ │ ├── __init__.py │ │ ├── authorization.py │ │ ├── card.py │ │ ├── cardholder.py │ │ ├── dispute.py │ │ ├── personalization_design.py │ │ ├── physical_bundle.py │ │ ├── token.py │ │ └── transaction.py │ ├── line_item.py │ ├── list_object.py │ ├── login_link.py │ ├── mandate.py │ ├── payment_intent.py │ ├── payment_link.py │ ├── payment_method.py │ ├── payment_method_configuration.py │ ├── payment_method_domain.py │ ├── payout.py │ ├── person.py │ ├── plan.py │ ├── price.py │ ├── product.py │ ├── product_feature.py │ ├── promotion_code.py │ ├── quote.py │ ├── radar │ │ ├── __init__.py │ │ ├── early_fraud_warning.py │ │ ├── value_list.py │ │ └── value_list_item.py │ ├── recipient_transfer.py │ ├── refund.py │ ├── reporting │ │ ├── __init__.py │ │ ├── report_run.py │ │ └── report_type.py │ ├── reserve_transaction.py │ ├── reversal.py │ ├── review.py │ ├── search_result_object.py │ ├── setup_attempt.py │ ├── setup_intent.py │ ├── shipping_rate.py │ ├── sigma │ │ ├── __init__.py │ │ └── scheduled_query_run.py │ ├── source.py │ ├── source_mandate_notification.py │ ├── source_transaction.py │ ├── subscription.py │ ├── subscription_item.py │ ├── subscription_schedule.py │ ├── tax │ │ ├── __init__.py │ │ ├── calculation.py │ │ ├── calculation_line_item.py │ │ ├── registration.py │ │ ├── settings.py │ │ ├── transaction.py │ │ └── transaction_line_item.py │ ├── tax_code.py │ ├── tax_deducted_at_source.py │ ├── tax_id.py │ ├── tax_rate.py │ ├── terminal │ │ ├── __init__.py │ │ ├── configuration.py │ │ ├── connection_token.py │ │ ├── location.py │ │ └── reader.py │ ├── test_helpers │ │ ├── __init__.py │ │ └── test_clock.py │ ├── token.py │ ├── topup.py │ ├── transfer.py │ ├── treasury │ │ ├── __init__.py │ │ ├── credit_reversal.py │ │ ├── debit_reversal.py │ │ ├── financial_account.py │ │ ├── financial_account_features.py │ │ ├── inbound_transfer.py │ │ ├── outbound_payment.py │ │ ├── outbound_transfer.py │ │ ├── received_credit.py │ │ ├── received_debit.py │ │ ├── transaction.py │ │ └── transaction_entry.py │ └── webhook_endpoint.py ├── api_version.py ├── app_info.py ├── apps │ ├── __init__.py │ ├── _secret.py │ └── _secret_service.py ├── billing │ ├── __init__.py │ ├── _alert.py │ ├── _alert_service.py │ ├── _alert_triggered.py │ ├── _credit_balance_summary.py │ ├── _credit_balance_summary_service.py │ ├── _credit_balance_transaction.py │ ├── _credit_balance_transaction_service.py │ ├── _credit_grant.py │ ├── _credit_grant_service.py │ ├── _meter.py │ ├── _meter_event.py │ ├── _meter_event_adjustment.py │ ├── _meter_event_adjustment_service.py │ ├── _meter_event_service.py │ ├── _meter_event_summary.py │ ├── _meter_event_summary_service.py │ └── _meter_service.py ├── billing_portal │ ├── __init__.py │ ├── _configuration.py │ ├── _configuration_service.py │ ├── _session.py │ └── _session_service.py ├── checkout │ ├── __init__.py │ ├── _session.py │ ├── _session_line_item_service.py │ └── _session_service.py ├── climate │ ├── __init__.py │ ├── _order.py │ ├── _order_service.py │ ├── _product.py │ ├── _product_service.py │ ├── _supplier.py │ └── _supplier_service.py ├── data │ └── ca-certificates.crt ├── entitlements │ ├── __init__.py │ ├── _active_entitlement.py │ ├── _active_entitlement_service.py │ ├── _active_entitlement_summary.py │ ├── _feature.py │ └── _feature_service.py ├── error.py ├── events │ ├── __init__.py │ ├── _event_classes.py │ ├── _v1_billing_meter_error_report_triggered_event.py │ ├── _v1_billing_meter_no_meter_found_event.py │ └── _v2_core_event_destination_ping_event.py ├── financial_connections │ ├── __init__.py │ ├── _account.py │ ├── _account_owner.py │ ├── _account_owner_service.py │ ├── _account_ownership.py │ ├── _account_service.py │ ├── _session.py │ ├── _session_service.py │ ├── _transaction.py │ └── _transaction_service.py ├── forwarding │ ├── __init__.py │ ├── _request.py │ └── _request_service.py ├── http_client.py ├── identity │ ├── __init__.py │ ├── _verification_report.py │ ├── _verification_report_service.py │ ├── _verification_session.py │ └── _verification_session_service.py ├── issuing │ ├── __init__.py │ ├── _authorization.py │ ├── _authorization_service.py │ ├── _card.py │ ├── _card_service.py │ ├── _cardholder.py │ ├── _cardholder_service.py │ ├── _dispute.py │ ├── _dispute_service.py │ ├── _personalization_design.py │ ├── _personalization_design_service.py │ ├── _physical_bundle.py │ ├── _physical_bundle_service.py │ ├── _token.py │ ├── _token_service.py │ ├── _transaction.py │ └── _transaction_service.py ├── multipart_data_generator.py ├── oauth.py ├── oauth_error.py ├── py.typed ├── radar │ ├── __init__.py │ ├── _early_fraud_warning.py │ ├── _early_fraud_warning_service.py │ ├── _value_list.py │ ├── _value_list_item.py │ ├── _value_list_item_service.py │ └── _value_list_service.py ├── reporting │ ├── __init__.py │ ├── _report_run.py │ ├── _report_run_service.py │ ├── _report_type.py │ └── _report_type_service.py ├── request_metrics.py ├── request_options.py ├── sigma │ ├── __init__.py │ ├── _scheduled_query_run.py │ └── _scheduled_query_run_service.py ├── stripe_object.py ├── stripe_response.py ├── tax │ ├── __init__.py │ ├── _calculation.py │ ├── _calculation_line_item.py │ ├── _calculation_line_item_service.py │ ├── _calculation_service.py │ ├── _registration.py │ ├── _registration_service.py │ ├── _settings.py │ ├── _settings_service.py │ ├── _transaction.py │ ├── _transaction_line_item.py │ ├── _transaction_line_item_service.py │ └── _transaction_service.py ├── terminal │ ├── __init__.py │ ├── _configuration.py │ ├── _configuration_service.py │ ├── _connection_token.py │ ├── _connection_token_service.py │ ├── _location.py │ ├── _location_service.py │ ├── _reader.py │ └── _reader_service.py ├── test_helpers │ ├── __init__.py │ ├── _confirmation_token_service.py │ ├── _customer_service.py │ ├── _issuing_service.py │ ├── _refund_service.py │ ├── _terminal_service.py │ ├── _test_clock.py │ ├── _test_clock_service.py │ ├── _treasury_service.py │ ├── issuing │ │ ├── __init__.py │ │ ├── _authorization_service.py │ │ ├── _card_service.py │ │ ├── _personalization_design_service.py │ │ └── _transaction_service.py │ ├── terminal │ │ ├── __init__.py │ │ └── _reader_service.py │ └── treasury │ │ ├── __init__.py │ │ ├── _inbound_transfer_service.py │ │ ├── _outbound_payment_service.py │ │ ├── _outbound_transfer_service.py │ │ ├── _received_credit_service.py │ │ └── _received_debit_service.py ├── treasury │ ├── __init__.py │ ├── _credit_reversal.py │ ├── _credit_reversal_service.py │ ├── _debit_reversal.py │ ├── _debit_reversal_service.py │ ├── _financial_account.py │ ├── _financial_account_features.py │ ├── _financial_account_features_service.py │ ├── _financial_account_service.py │ ├── _inbound_transfer.py │ ├── _inbound_transfer_service.py │ ├── _outbound_payment.py │ ├── _outbound_payment_service.py │ ├── _outbound_transfer.py │ ├── _outbound_transfer_service.py │ ├── _received_credit.py │ ├── _received_credit_service.py │ ├── _received_debit.py │ ├── _received_debit_service.py │ ├── _transaction.py │ ├── _transaction_entry.py │ ├── _transaction_entry_service.py │ └── _transaction_service.py ├── util.py ├── v2 │ ├── __init__.py │ ├── _amount.py │ ├── _billing_service.py │ ├── _core_service.py │ ├── _event.py │ ├── _event_destination.py │ ├── _list_object.py │ ├── billing │ │ ├── __init__.py │ │ ├── _meter_event.py │ │ ├── _meter_event_adjustment.py │ │ ├── _meter_event_adjustment_service.py │ │ ├── _meter_event_service.py │ │ ├── _meter_event_session.py │ │ ├── _meter_event_session_service.py │ │ └── _meter_event_stream_service.py │ └── core │ │ ├── __init__.py │ │ ├── _event_destination_service.py │ │ └── _event_service.py ├── version.py └── webhook.py └── tests ├── __init__.py ├── api_resources ├── __init__.py ├── abstract │ ├── __init__.py │ ├── test_api_resource.py │ ├── test_createable_api_resource.py │ ├── test_custom_method.py │ ├── test_deletable_api_resource.py │ ├── test_listable_api_resource.py │ ├── test_nested_resource_class_methods.py │ ├── test_searchable_api_resource.py │ ├── test_singleton_api_resource.py │ ├── test_test_helpers_api_resource.py │ └── test_updateable_api_resource.py ├── billing_portal │ ├── __init__.py │ ├── test_configuration.py │ └── test_session.py ├── checkout │ ├── __init__.py │ └── test_session.py ├── identity │ ├── test_verification_report.py │ └── test_verification_session.py ├── issuing │ ├── __init__.py │ ├── test_authorization.py │ ├── test_card.py │ ├── test_cardholder.py │ ├── test_dispute.py │ └── test_transaction.py ├── radar │ ├── __init__.py │ ├── test_early_fraud_warning.py │ ├── test_value_list.py │ └── test_value_list_item.py ├── reporting │ ├── __init__.py │ ├── test_report_run.py │ └── test_report_type.py ├── sigma │ ├── __init__.py │ └── test_scheduled_query_run.py ├── terminal │ ├── __init__.py │ ├── test_connection_token.py │ ├── test_location.py │ └── test_reader.py ├── test_account.py ├── test_account_link.py ├── test_apple_pay_domain.py ├── test_application_fee.py ├── test_application_fee_refund.py ├── test_balance.py ├── test_balance_transaction.py ├── test_bank_account.py ├── test_capability.py ├── test_card.py ├── test_charge.py ├── test_country_spec.py ├── test_coupon.py ├── test_credit_note.py ├── test_customer.py ├── test_customer_balance_transaction.py ├── test_dispute.py ├── test_ephemeral_key.py ├── test_event.py ├── test_exchange_rate.py ├── test_file.py ├── test_file_link.py ├── test_file_upload.py ├── test_invoice.py ├── test_invoice_item.py ├── test_invoice_line_item.py ├── test_list_object.py ├── test_list_object_v2.py ├── test_mandate.py ├── test_payment_intent.py ├── test_payment_method.py ├── test_payout.py ├── test_person.py ├── test_plan.py ├── test_price.py ├── test_product.py ├── test_promotion_code.py ├── test_quote.py ├── test_refund.py ├── test_reversal.py ├── test_review.py ├── test_search_result_object.py ├── test_setup_attempt.py ├── test_setup_intent.py ├── test_source.py ├── test_source_transaction.py ├── test_subscription.py ├── test_subscription_item.py ├── test_subscription_schedule.py ├── test_tax_code.py ├── test_tax_id.py ├── test_tax_rate.py ├── test_topup.py ├── test_transfer.py └── test_webhook_endpoint.py ├── conftest.py ├── http_client_mock.py ├── openapi └── README.md ├── request_mock.py ├── services ├── test_file_upload.py ├── test_oauth.py └── test_quote.py ├── stripe_mock.py ├── test_api_requestor.py ├── test_error.py ├── test_exports.py ├── test_generated_examples.py ├── test_http_client.py ├── test_integration.py ├── test_multipart_data_generator.py ├── test_oauth.py ├── test_oauth_error.py ├── test_raw_request.py ├── test_request_options.py ├── test_requestor_options.py ├── test_stripe_client.py ├── test_stripe_object.py ├── test_stripe_response.py ├── test_util.py ├── test_v2_error.py ├── test_v2_event.py └── test_webhook.py /.coveragerc: -------------------------------------------------------------------------------- 1 | [paths] 2 | source = 3 | stripe 4 | */site-packages 5 | 6 | [run] 7 | branch = true 8 | parallel = true 9 | source = stripe 10 | omit = 11 | stripe/six.py 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | ; https://editorconfig.org/ 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 4 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | end_of_line = lf 11 | charset = utf-8 12 | 13 | [*.{cfg,ini,json,toml,yml}] 14 | indent_size = 2 15 | 16 | [Makefile] 17 | indent_style = tab 18 | -------------------------------------------------------------------------------- /.git-blame-ignore-revs: -------------------------------------------------------------------------------- 1 | # .git-blame-ignore-revs 2 | # mass formatted w/ ruff (2024-05-10) 3 | c46b4b950ea77e9d18ab98885cda721b3de247c0 4 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # All files should be reviewed by a member of the SDKs team 2 | * @stripe/api-library-reviewers 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Stripe support 4 | url: https://support.stripe.com/ 5 | about: | 6 | Please only file issues here that you believe represent actual bugs or feature requests for the Stripe Python library. 7 | 8 | If you're having general trouble with your Stripe integration, please reach out to support. 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest an idea for this library 3 | labels: ["feature-request"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thanks for taking the time to fill out this feature request! 9 | - type: textarea 10 | id: problem 11 | attributes: 12 | label: Is your feature request related to a problem? Please describe. 13 | description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 14 | - type: textarea 15 | id: solution 16 | attributes: 17 | label: Describe the solution you'd like 18 | description: A clear and concise description of what you want to happen. 19 | - type: textarea 20 | id: alternatives 21 | attributes: 22 | label: Describe alternatives you've considered 23 | description: A clear and concise description of any alternative solutions or features you've considered. 24 | - type: textarea 25 | id: context 26 | attributes: 27 | label: Additional context 28 | description: Add any other context about the feature request here. 29 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Why? 2 | 3 | 4 | ### What? 5 | 9 | 10 | ### See Also 11 | 12 | -------------------------------------------------------------------------------- /.github/workflows/rules.yml: -------------------------------------------------------------------------------- 1 | 2 | name: rules 3 | 4 | on: 5 | workflow_dispatch: {} 6 | pull_request: 7 | types: 8 | - auto_merge_enabled 9 | 10 | jobs: 11 | require_merge_commit_on_merge_script_pr: 12 | name: Merge script PRs must create merge commits 13 | if: ${{ contains(github.head_ref, '/merge-') }} 14 | runs-on: ubuntu-latest 15 | steps: 16 | - run: | 17 | if ${{ github.event.pull_request.auto_merge.merge_method != 'merge' }}; then 18 | echo "Auto-merge method must be 'merge' instead of '${{github.event.pull_request.auto_merge.merge_method}}'" 19 | exit 1 20 | fi 21 | 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # Unit test / coverage reports 31 | htmlcov/ 32 | .tox/ 33 | .nox/ 34 | .coverage 35 | .coverage.* 36 | .cache 37 | nosetests.xml 38 | coverage.xml 39 | *.cover 40 | .hypothesis/ 41 | .pytest_cache/ 42 | 43 | # pyenv 44 | .python-version 45 | 46 | # Environments 47 | .env 48 | .venv 49 | env/ 50 | venv/ 51 | ENV/ 52 | env.bak/ 53 | venv.bak/ 54 | 55 | # Visual Studio Code 56 | .vscode/* 57 | !.vscode/settings.json 58 | !.vscode/tasks.json 59 | !.vscode/launch.json 60 | !.vscode/extensions.json 61 | /.idea 62 | 63 | # Git 64 | *.orig 65 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "EditorConfig.editorconfig", // default 4 | "ms-python.python", // intellisense 5 | "ms-python.flake8", // linting 6 | "charliermarsh.ruff" // formatting 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | // Show the path in the top window bar. 3 | "window.title": "${rootName}${separator}${activeEditorMedium}", 4 | 5 | "editor.renderWhitespace": "all", 6 | "files.exclude": { 7 | "**/*.pyc": true, 8 | "**/__pycache__": true, 9 | ".pytest_cache": true, 10 | ".mypy_cache": true, 11 | ".ruff_cache": true, 12 | ".tox": true, 13 | "*.egg-info": true, 14 | "venv": true 15 | }, 16 | // uses default venv name from Makefile 17 | "python.defaultInterpreterPath": "./venv/bin/python", 18 | 19 | // Formatting 20 | "editor.formatOnSave": true, 21 | "[python]": { 22 | "editor.defaultFormatter": "charliermarsh.ruff", 23 | "editor.codeActionsOnSave": { 24 | "source.organizeImports": "never" 25 | } 26 | }, 27 | 28 | // Tests 29 | "python.testing.unittestEnabled": false, 30 | "python.testing.pytestEnabled": true, 31 | 32 | "python.terminal.activateEnvironment": true, 33 | "python.analysis.diagnosticMode": "workspace", 34 | "python.analysis.typeCheckingMode": "basic", 35 | "ruff.lint.enable": false // in favor of flake8 36 | } 37 | -------------------------------------------------------------------------------- /CHANGELOG: -------------------------------------------------------------------------------- 1 | CHANGELOG has changed to be Markdown-formatted. Please see CHANGELOG.md. 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2010-2018 Stripe (http://stripe.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /LONG_DESCRIPTION.rst: -------------------------------------------------------------------------------- 1 | Official Stripe Bindings for Python 2 | =================================== 3 | 4 | A Python library for Stripe's API. 5 | 6 | 7 | Setup 8 | ----- 9 | 10 | You can install this package by using the pip tool and installing: 11 | 12 | $ pip install stripe 13 | 14 | Or: 15 | 16 | $ easy_install stripe 17 | 18 | 19 | Setting up a Stripe Account 20 | --------------------------- 21 | 22 | Sign up for Stripe at https://dashboard.stripe.com/register. 23 | 24 | Using the Stripe API 25 | -------------------- 26 | 27 | Documentation for the python bindings can be found alongside Stripe's other bindings here: 28 | 29 | - https://stripe.com/docs 30 | - https://stripe.com/docs/api/?lang=python 31 | 32 | In the standard documentation (the first link), most of the reference pages will have examples in Stripe's official bindings (including Python). Just click on the Python tab to get the relevant documentation. 33 | 34 | In the full API reference for python (the second link), the right half of the page will provide example requests and responses for various API calls. 35 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | # this file specifies what's included in a source distribution (https://packaging.python.org/en/latest/glossary/#term-Source-Distribution-or-sdist) 2 | # see also: https://setuptools.pypa.io/en/latest/userguide/miscellaneous.html 3 | include .flake8 CHANGELOG.md LICENSE LONG_DESCRIPTION.rst README.md VERSION pytest.ini justfile 4 | recursive-include tests *.py 5 | recursive-include examples *.txt *.py 6 | -------------------------------------------------------------------------------- /OPENAPI_VERSION: -------------------------------------------------------------------------------- 1 | v1773 -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 12.2.0 2 | -------------------------------------------------------------------------------- /deps/build-requirements.txt: -------------------------------------------------------------------------------- 1 | # packages needed to package & release 2 | 3 | # pinned to latest as of 2025-04-08; nothing special about these versions 4 | twine == 6.1.0 5 | build == 1.2.2 6 | -------------------------------------------------------------------------------- /deps/dev-requirements.txt: -------------------------------------------------------------------------------- 1 | # packages needed to run static analysis (lints, types, etc) 2 | # version requirements: any modern python version (currently 3.10) 3 | 4 | # typechecking for all versions 5 | # can't use `>=1.1.339` since it flags override issues, e.g.: 6 | # > Method "_cls_delete" overrides class "DeletableAPIResource" in an incompatible manner Parameter "**params" has no corresponding parameter Pylance(reportIncompatibleMethodOverride) 7 | # can probably fix/ignore these issues and move forward, but we're stuck until then 8 | pyright == 1.1.336 9 | # general typechecking 10 | mypy == 1.7.0 11 | # formatting 12 | ruff == 0.9.6 13 | # linting 14 | # flake8 7.2.0 bumped to pyflakes 3.3.0, which adds a new lint error around global usage which will need to be manually fixed 15 | flake8==7.1.2 16 | -------------------------------------------------------------------------------- /deps/test-requirements.txt: -------------------------------------------------------------------------------- 1 | # packages needed to run unit tests (including extra supported http libraries) 2 | # version requirements: all supported versions (currently 3.6-3.12) 3 | 4 | # This is the last version of httpx compatible with Python 3.6 5 | httpx == 0.22.0; python_version == "3.6" 6 | httpx >= 0.24.1; python_version == "3.7" 7 | httpx >= 0.27.0; python_version >= "3.8" 8 | aiohttp == 3.8.6; python_version <= "3.7" 9 | aiohttp == 3.9.4; python_version > "3.7" 10 | anyio[trio] == 3.6.2 11 | 12 | pytest-mock >= 2.0.0 13 | mock >= 4.0; python_version < "3.8" 14 | pytest-xdist >= 1.31.0 15 | pytest >= 6.0.0 16 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | ## Running an example 2 | 3 | From the examples folder, run: 4 | `PYTHONPATH=../ python your_example.py` 5 | 6 | e.g. 7 | 8 | `PYTHONPATH=../ python thinevent_webhook_handler.py` 9 | 10 | ## Adding a new example 11 | 12 | 1. Clone example_template.py 13 | 2. Implement your example 14 | 3. Fill out the file comment. Include a description and key steps that are being demonstrated. 15 | 4. Run it (as per above) 16 | 5. 👍 17 | -------------------------------------------------------------------------------- /examples/charge.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import stripe 4 | 5 | 6 | stripe.api_key = os.environ.get("STRIPE_SECRET_KEY") 7 | 8 | print("Attempting charge...") 9 | 10 | resp = stripe.Charge.create( 11 | amount=200, 12 | currency="usd", 13 | card="tok_visa", 14 | description="customer@gmail.com", 15 | ) 16 | 17 | print("Success: %r" % (resp)) 18 | -------------------------------------------------------------------------------- /examples/example_template.py: -------------------------------------------------------------------------------- 1 | """ 2 | example_template.py - This is a template for defining new examples. It is not intended to be used directly. 3 | 4 | 5 | 6 | In this example, we: 7 | - 8 | - 13 | """ 14 | 15 | import stripe 16 | 17 | # Set your API key here 18 | api_key = "{{API_KEY}}" 19 | 20 | print("Hello world") 21 | # client = stripe.StripeClient(api_key) 22 | # client.v2.... 23 | -------------------------------------------------------------------------------- /examples/proxy.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import stripe 4 | 5 | 6 | stripe.api_key = os.environ.get("STRIPE_SECRET_KEY") 7 | 8 | print("Attempting charge...") 9 | 10 | proxy = { 11 | "http": "http://:@:", 12 | "https": "http://:@:", 13 | } 14 | 15 | clients = ( 16 | stripe.http_client.RequestsClient( 17 | verify_ssl_certs=stripe.verify_ssl_certs, proxy=proxy 18 | ), 19 | stripe.http_client.PycurlClient( 20 | verify_ssl_certs=stripe.verify_ssl_certs, proxy=proxy 21 | ), 22 | stripe.http_client.Urllib2Client( 23 | verify_ssl_certs=stripe.verify_ssl_certs, proxy=proxy 24 | ), 25 | ) 26 | 27 | for c in clients: 28 | stripe.default_http_client = c 29 | resp = stripe.Charge.create( 30 | amount=200, 31 | currency="usd", 32 | card="tok_visa", 33 | description="customer@gmail.com", 34 | ) 35 | print("Success: %s, %r" % (c.name, resp)) 36 | -------------------------------------------------------------------------------- /examples/raw_request.py: -------------------------------------------------------------------------------- 1 | from stripe import StripeClient 2 | 3 | # Set your API key here 4 | api_key = "{{API_KEY}}" 5 | 6 | client = StripeClient(api_key) 7 | response = client.raw_request( 8 | "post", 9 | "/v1/beta_endpoint", 10 | param=123, 11 | stripe_version="2022-11-15; feature_beta=v3", 12 | ) 13 | 14 | # (Optional) response is a StripeResponse. You can use `client.deserialize` to get a StripeObject. 15 | deserialized_resp = client.deserialize(response, api_mode="V1") 16 | -------------------------------------------------------------------------------- /examples/webhooks.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | import stripe 4 | from flask import Flask, request 5 | 6 | 7 | stripe.api_key = os.environ.get("STRIPE_SECRET_KEY") 8 | webhook_secret = os.environ.get("WEBHOOK_SECRET") 9 | 10 | app = Flask(__name__) 11 | 12 | 13 | @app.route("/webhooks", methods=["POST"]) 14 | def webhooks(): 15 | payload = request.data.decode("utf-8") 16 | received_sig = request.headers.get("Stripe-Signature", None) 17 | 18 | try: 19 | event = stripe.Webhook.construct_event( 20 | payload, received_sig, webhook_secret 21 | ) 22 | except ValueError: 23 | print("Error while decoding event!") 24 | return "Bad payload", 400 25 | except stripe.error.SignatureVerificationError: 26 | print("Invalid signature!") 27 | return "Bad signature", 400 28 | 29 | print( 30 | "Received event: id={id}, type={type}".format( 31 | id=event.id, type=event.type 32 | ) 33 | ) 34 | 35 | return "", 200 36 | 37 | 38 | if __name__ == "__main__": 39 | app.run(port=int(os.environ.get("PORT", 5000))) 40 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal = 1 3 | 4 | [metadata] 5 | license_file = LICENSE 6 | -------------------------------------------------------------------------------- /stripe/_api_mode.py: -------------------------------------------------------------------------------- 1 | from typing_extensions import Literal 2 | 3 | 4 | ApiMode = Literal["V1", "V2"] 5 | -------------------------------------------------------------------------------- /stripe/_api_version.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | class _ApiVersion: 4 | CURRENT = "2025-05-28.basil" 5 | -------------------------------------------------------------------------------- /stripe/_app_info.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | from typing_extensions import TypedDict 3 | 4 | 5 | class AppInfo(TypedDict): 6 | name: str 7 | partner_id: Optional[str] 8 | url: Optional[str] 9 | version: Optional[str] 10 | -------------------------------------------------------------------------------- /stripe/_application.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_object import StripeObject 4 | from typing import ClassVar, Optional 5 | from typing_extensions import Literal 6 | 7 | 8 | class Application(StripeObject): 9 | OBJECT_NAME: ClassVar[Literal["application"]] = "application" 10 | id: str 11 | """ 12 | Unique identifier for the object. 13 | """ 14 | name: Optional[str] 15 | """ 16 | The name of the application. 17 | """ 18 | object: Literal["application"] 19 | """ 20 | String representing the object's type. Objects of the same type share the same value. 21 | """ 22 | deleted: Optional[Literal[True]] 23 | """ 24 | Always true for a deleted object 25 | """ 26 | -------------------------------------------------------------------------------- /stripe/_apps_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.apps._secret_service import SecretService 5 | 6 | 7 | class AppsService(StripeService): 8 | def __init__(self, requestor): 9 | super().__init__(requestor) 10 | self.secrets = SecretService(self._requestor) 11 | -------------------------------------------------------------------------------- /stripe/_base_address.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | from typing_extensions import NotRequired, TypedDict, Literal 3 | 4 | 5 | BaseAddress = Literal["api", "files", "connect", "meter_events"] 6 | 7 | 8 | class BaseAddresses(TypedDict): 9 | api: NotRequired[Optional[str]] 10 | connect: NotRequired[Optional[str]] 11 | files: NotRequired[Optional[str]] 12 | meter_events: NotRequired[Optional[str]] 13 | -------------------------------------------------------------------------------- /stripe/_billing_portal_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.billing_portal._configuration_service import ConfigurationService 5 | from stripe.billing_portal._session_service import SessionService 6 | 7 | 8 | class BillingPortalService(StripeService): 9 | def __init__(self, requestor): 10 | super().__init__(requestor) 11 | self.configurations = ConfigurationService(self._requestor) 12 | self.sessions = SessionService(self._requestor) 13 | -------------------------------------------------------------------------------- /stripe/_checkout_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.checkout._session_service import SessionService 5 | 6 | 7 | class CheckoutService(StripeService): 8 | def __init__(self, requestor): 9 | super().__init__(requestor) 10 | self.sessions = SessionService(self._requestor) 11 | -------------------------------------------------------------------------------- /stripe/_client_options.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | 3 | 4 | class _ClientOptions(object): 5 | client_id: Optional[str] 6 | proxy: Optional[str] 7 | verify_ssl_certs: Optional[bool] 8 | 9 | def __init__( 10 | self, 11 | client_id: Optional[str] = None, 12 | proxy: Optional[str] = None, 13 | verify_ssl_certs: Optional[bool] = None, 14 | ): 15 | self.client_id = client_id 16 | self.proxy = proxy 17 | self.verify_ssl_certs = verify_ssl_certs 18 | -------------------------------------------------------------------------------- /stripe/_climate_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.climate._order_service import OrderService 5 | from stripe.climate._product_service import ProductService 6 | from stripe.climate._supplier_service import SupplierService 7 | 8 | 9 | class ClimateService(StripeService): 10 | def __init__(self, requestor): 11 | super().__init__(requestor) 12 | self.orders = OrderService(self._requestor) 13 | self.products = ProductService(self._requestor) 14 | self.suppliers = SupplierService(self._requestor) 15 | -------------------------------------------------------------------------------- /stripe/_createable_api_resource.py: -------------------------------------------------------------------------------- 1 | from stripe._api_resource import APIResource 2 | from typing import TypeVar, cast 3 | from stripe._stripe_object import StripeObject 4 | 5 | T = TypeVar("T", bound=StripeObject) 6 | 7 | 8 | class CreateableAPIResource(APIResource[T]): 9 | @classmethod 10 | def create(cls, **params) -> T: 11 | return cast( 12 | T, 13 | cls._static_request("post", cls.class_url(), params=params), 14 | ) 15 | -------------------------------------------------------------------------------- /stripe/_deletable_api_resource.py: -------------------------------------------------------------------------------- 1 | from stripe import _util 2 | from stripe._api_resource import APIResource 3 | from urllib.parse import quote_plus 4 | from typing import TypeVar, cast 5 | from stripe._stripe_object import StripeObject 6 | 7 | T = TypeVar("T", bound=StripeObject) 8 | 9 | 10 | class DeletableAPIResource(APIResource[T]): 11 | @classmethod 12 | def _cls_delete(cls, sid, **params) -> T: 13 | url = "%s/%s" % (cls.class_url(), quote_plus(sid)) 14 | return cast(T, cls._static_request("delete", url, params=params)) 15 | 16 | @_util.class_method_variant("_cls_delete") 17 | def delete(self, **params) -> T: 18 | return cast( 19 | T, 20 | self._request_and_refresh( 21 | "delete", self.instance_url(), params=params 22 | ), 23 | ) 24 | -------------------------------------------------------------------------------- /stripe/_entitlements_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.entitlements._active_entitlement_service import ( 5 | ActiveEntitlementService, 6 | ) 7 | from stripe.entitlements._feature_service import FeatureService 8 | 9 | 10 | class EntitlementsService(StripeService): 11 | def __init__(self, requestor): 12 | super().__init__(requestor) 13 | self.active_entitlements = ActiveEntitlementService(self._requestor) 14 | self.features = FeatureService(self._requestor) 15 | -------------------------------------------------------------------------------- /stripe/_expandable_field.py: -------------------------------------------------------------------------------- 1 | from typing import Union, TypeVar 2 | 3 | T = TypeVar("T") 4 | ExpandableField = Union[str, T] 5 | -------------------------------------------------------------------------------- /stripe/_financial_connections_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.financial_connections._account_service import AccountService 5 | from stripe.financial_connections._session_service import SessionService 6 | from stripe.financial_connections._transaction_service import ( 7 | TransactionService, 8 | ) 9 | 10 | 11 | class FinancialConnectionsService(StripeService): 12 | def __init__(self, requestor): 13 | super().__init__(requestor) 14 | self.accounts = AccountService(self._requestor) 15 | self.sessions = SessionService(self._requestor) 16 | self.transactions = TransactionService(self._requestor) 17 | -------------------------------------------------------------------------------- /stripe/_forwarding_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.forwarding._request_service import RequestService 5 | 6 | 7 | class ForwardingService(StripeService): 8 | def __init__(self, requestor): 9 | super().__init__(requestor) 10 | self.requests = RequestService(self._requestor) 11 | -------------------------------------------------------------------------------- /stripe/_identity_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.identity._verification_report_service import ( 5 | VerificationReportService, 6 | ) 7 | from stripe.identity._verification_session_service import ( 8 | VerificationSessionService, 9 | ) 10 | 11 | 12 | class IdentityService(StripeService): 13 | def __init__(self, requestor): 14 | super().__init__(requestor) 15 | self.verification_reports = VerificationReportService(self._requestor) 16 | self.verification_sessions = VerificationSessionService( 17 | self._requestor 18 | ) 19 | -------------------------------------------------------------------------------- /stripe/_listable_api_resource.py: -------------------------------------------------------------------------------- 1 | from stripe._api_resource import APIResource 2 | from stripe._list_object import ListObject 3 | from stripe._stripe_object import StripeObject 4 | from typing import TypeVar 5 | 6 | T = TypeVar("T", bound=StripeObject) 7 | 8 | # TODO(major): 1704 - remove this class and all internal usages. `.list` is already inlined into the resource classes. 9 | # Although we should inline .auto_paging_iter into the resource classes as well. 10 | 11 | 12 | class ListableAPIResource(APIResource[T]): 13 | @classmethod 14 | def auto_paging_iter(cls, **params): 15 | return cls.list(**params).auto_paging_iter() 16 | 17 | @classmethod 18 | def list(cls, **params) -> ListObject[T]: 19 | result = cls._static_request( 20 | "get", 21 | cls.class_url(), 22 | params=params, 23 | ) 24 | 25 | if not isinstance(result, ListObject): 26 | raise TypeError( 27 | "Expected list object from API, got %s" 28 | % (type(result).__name__,) 29 | ) 30 | 31 | return result 32 | -------------------------------------------------------------------------------- /stripe/_login_link.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_object import StripeObject 4 | from typing import ClassVar 5 | from typing_extensions import Literal 6 | 7 | 8 | class LoginLink(StripeObject): 9 | """ 10 | Login Links are single-use URLs that takes an Express account to the login page for their Stripe dashboard. 11 | A Login Link differs from an [Account Link](https://stripe.com/docs/api/account_links) in that it takes the user directly to their [Express dashboard for the specified account](https://stripe.com/docs/connect/integrate-express-dashboard#create-login-link) 12 | """ 13 | 14 | OBJECT_NAME: ClassVar[Literal["login_link"]] = "login_link" 15 | created: int 16 | """ 17 | Time at which the object was created. Measured in seconds since the Unix epoch. 18 | """ 19 | object: Literal["login_link"] 20 | """ 21 | String representing the object's type. Objects of the same type share the same value. 22 | """ 23 | url: str 24 | """ 25 | The URL for the login link. 26 | """ 27 | -------------------------------------------------------------------------------- /stripe/_radar_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.radar._early_fraud_warning_service import EarlyFraudWarningService 5 | from stripe.radar._value_list_item_service import ValueListItemService 6 | from stripe.radar._value_list_service import ValueListService 7 | 8 | 9 | class RadarService(StripeService): 10 | def __init__(self, requestor): 11 | super().__init__(requestor) 12 | self.early_fraud_warnings = EarlyFraudWarningService(self._requestor) 13 | self.value_lists = ValueListService(self._requestor) 14 | self.value_list_items = ValueListItemService(self._requestor) 15 | -------------------------------------------------------------------------------- /stripe/_reporting_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.reporting._report_run_service import ReportRunService 5 | from stripe.reporting._report_type_service import ReportTypeService 6 | 7 | 8 | class ReportingService(StripeService): 9 | def __init__(self, requestor): 10 | super().__init__(requestor) 11 | self.report_runs = ReportRunService(self._requestor) 12 | self.report_types = ReportTypeService(self._requestor) 13 | -------------------------------------------------------------------------------- /stripe/_request_metrics.py: -------------------------------------------------------------------------------- 1 | from typing import List, Optional 2 | 3 | 4 | class RequestMetrics(object): 5 | def __init__( 6 | self, 7 | request_id, 8 | request_duration_ms, 9 | usage: Optional[List[str]] = [], 10 | ): 11 | self.request_id = request_id 12 | self.request_duration_ms = request_duration_ms 13 | self.usage = usage 14 | 15 | def payload(self): 16 | ret = { 17 | "request_id": self.request_id, 18 | "request_duration_ms": self.request_duration_ms, 19 | } 20 | 21 | if self.usage is not None and len(self.usage) > 0: 22 | ret["usage"] = self.usage 23 | return ret 24 | -------------------------------------------------------------------------------- /stripe/_reserve_transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_object import StripeObject 4 | from typing import ClassVar, Optional 5 | from typing_extensions import Literal 6 | 7 | 8 | class ReserveTransaction(StripeObject): 9 | OBJECT_NAME: ClassVar[Literal["reserve_transaction"]] = ( 10 | "reserve_transaction" 11 | ) 12 | amount: int 13 | currency: str 14 | """ 15 | Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). 16 | """ 17 | description: Optional[str] 18 | """ 19 | An arbitrary string attached to the object. Often useful for displaying to users. 20 | """ 21 | id: str 22 | """ 23 | Unique identifier for the object. 24 | """ 25 | object: Literal["reserve_transaction"] 26 | """ 27 | String representing the object's type. Objects of the same type share the same value. 28 | """ 29 | -------------------------------------------------------------------------------- /stripe/_sigma_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.sigma._scheduled_query_run_service import ScheduledQueryRunService 5 | 6 | 7 | class SigmaService(StripeService): 8 | def __init__(self, requestor): 9 | super().__init__(requestor) 10 | self.scheduled_query_runs = ScheduledQueryRunService(self._requestor) 11 | -------------------------------------------------------------------------------- /stripe/_singleton_api_resource.py: -------------------------------------------------------------------------------- 1 | from stripe._api_resource import APIResource 2 | 3 | from typing import TypeVar 4 | from stripe._stripe_object import StripeObject 5 | 6 | T = TypeVar("T", bound=StripeObject) 7 | 8 | # TODO(major): 1704 - Inline into Tax.Settings and Balance, and remove this class. 9 | 10 | 11 | class SingletonAPIResource(APIResource[T]): 12 | @classmethod 13 | def retrieve(cls, **params) -> T: 14 | return super(SingletonAPIResource, cls).retrieve(None, **params) 15 | 16 | @classmethod 17 | def class_url(cls): 18 | if cls == SingletonAPIResource: 19 | raise NotImplementedError( 20 | "SingletonAPIResource is an abstract class. You should " 21 | "perform actions on its subclasses (e.g. Balance)" 22 | ) 23 | # Namespaces are separated in object names with periods (.) and in URLs 24 | # with forward slashes (/), so replace the former with the latter. 25 | base = cls.OBJECT_NAME.replace(".", "/") 26 | return "/v1/%s" % (base,) 27 | 28 | def instance_url(self): 29 | return self.class_url() 30 | -------------------------------------------------------------------------------- /stripe/_tax_deducted_at_source.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_object import StripeObject 4 | from typing import ClassVar 5 | from typing_extensions import Literal 6 | 7 | 8 | class TaxDeductedAtSource(StripeObject): 9 | OBJECT_NAME: ClassVar[Literal["tax_deducted_at_source"]] = ( 10 | "tax_deducted_at_source" 11 | ) 12 | id: str 13 | """ 14 | Unique identifier for the object. 15 | """ 16 | object: Literal["tax_deducted_at_source"] 17 | """ 18 | String representing the object's type. Objects of the same type share the same value. 19 | """ 20 | period_end: int 21 | """ 22 | The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. 23 | """ 24 | period_start: int 25 | """ 26 | The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. 27 | """ 28 | tax_deduction_account_number: str 29 | """ 30 | The TAN that was supplied to Stripe when TDS was assessed 31 | """ 32 | -------------------------------------------------------------------------------- /stripe/_tax_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.tax._calculation_service import CalculationService 5 | from stripe.tax._registration_service import RegistrationService 6 | from stripe.tax._settings_service import SettingsService 7 | from stripe.tax._transaction_service import TransactionService 8 | 9 | 10 | class TaxService(StripeService): 11 | def __init__(self, requestor): 12 | super().__init__(requestor) 13 | self.calculations = CalculationService(self._requestor) 14 | self.registrations = RegistrationService(self._requestor) 15 | self.settings = SettingsService(self._requestor) 16 | self.transactions = TransactionService(self._requestor) 17 | -------------------------------------------------------------------------------- /stripe/_terminal_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.terminal._configuration_service import ConfigurationService 5 | from stripe.terminal._connection_token_service import ConnectionTokenService 6 | from stripe.terminal._location_service import LocationService 7 | from stripe.terminal._reader_service import ReaderService 8 | 9 | 10 | class TerminalService(StripeService): 11 | def __init__(self, requestor): 12 | super().__init__(requestor) 13 | self.configurations = ConfigurationService(self._requestor) 14 | self.connection_tokens = ConnectionTokenService(self._requestor) 15 | self.locations = LocationService(self._requestor) 16 | self.readers = ReaderService(self._requestor) 17 | -------------------------------------------------------------------------------- /stripe/_v2_services.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.v2._billing_service import BillingService 5 | from stripe.v2._core_service import CoreService 6 | 7 | 8 | class V2Services(StripeService): 9 | def __init__(self, requestor): 10 | super().__init__(requestor) 11 | self.billing = BillingService(self._requestor) 12 | self.core = CoreService(self._requestor) 13 | -------------------------------------------------------------------------------- /stripe/_verify_mixin.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Dict 2 | from typing_extensions import Protocol 3 | 4 | from stripe._stripe_object import StripeObject 5 | 6 | 7 | class _Verifiable(Protocol): 8 | def instance_url(self) -> str: ... 9 | 10 | def _request( 11 | self, 12 | method: str, 13 | url: str, 14 | params: Dict[str, Any], 15 | ) -> StripeObject: ... 16 | 17 | 18 | class VerifyMixin(object): 19 | def verify(self: _Verifiable, **params): 20 | url = self.instance_url() + "/verify" 21 | return self._request("post", url, params=params) 22 | -------------------------------------------------------------------------------- /stripe/_version.py: -------------------------------------------------------------------------------- 1 | VERSION = "12.2.0" 2 | -------------------------------------------------------------------------------- /stripe/api_resources/abstract/api_resource.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.api_resource package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.api_resource import APIResource 12 | To: 13 | from stripe import APIResource 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._api_resource import ( # noqa 20 | APIResource, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/abstract/createable_api_resource.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.createable_api_resource package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.createable_api_resource import CreateableAPIResource 12 | To: 13 | from stripe import CreateableAPIResource 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._createable_api_resource import ( # noqa 20 | CreateableAPIResource, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/abstract/custom_method.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.custom_method package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.custom_method import custom_method 12 | To: 13 | from stripe import custom_method 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._custom_method import ( # noqa 20 | custom_method, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/abstract/deletable_api_resource.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.deletable_api_resource package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.deletable_api_resource import DeletableAPIResource 12 | To: 13 | from stripe import DeletableAPIResource 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._deletable_api_resource import ( # noqa 20 | DeletableAPIResource, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/abstract/listable_api_resource.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.listable_api_resource package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.listable_api_resource import ListableAPIResource 12 | To: 13 | from stripe import ListableAPIResource 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._listable_api_resource import ( # noqa 20 | ListableAPIResource, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/abstract/nested_resource_class_methods.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.nested_resource_class_methods package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.nested_resource_class_methods import nested_resource_class_methods 12 | To: 13 | from stripe import nested_resource_class_methods 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._nested_resource_class_methods import ( # noqa 20 | nested_resource_class_methods, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/abstract/searchable_api_resource.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.searchable_api_resource package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.searchable_api_resource import SearchableAPIResource 12 | To: 13 | from stripe import SearchableAPIResource 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._searchable_api_resource import ( # noqa 20 | SearchableAPIResource, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/abstract/singleton_api_resource.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.singleton_api_resource package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.singleton_api_resource import SingletonAPIResource 12 | To: 13 | from stripe import SingletonAPIResource 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._singleton_api_resource import ( # noqa 20 | SingletonAPIResource, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/abstract/test_helpers.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.test_helpers package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.test_helpers import APIResourceTestHelpers 12 | To: 13 | from stripe import APIResourceTestHelpers 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._test_helpers import ( # noqa 20 | APIResourceTestHelpers, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/abstract/updateable_api_resource.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.updateable_api_resource package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.updateable_api_resource import UpdateableAPIResource 12 | To: 13 | from stripe import UpdateableAPIResource 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._updateable_api_resource import ( # noqa 20 | UpdateableAPIResource, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/abstract/verify_mixin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.verify_mixin package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.verify_mixin import VerifyMixin 12 | To: 13 | from stripe import VerifyMixin 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._verify_mixin import ( # noqa 20 | VerifyMixin, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/account.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.account package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.account import Account 12 | To: 13 | from stripe import Account 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._account import ( # noqa 20 | Account, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/account_link.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.account_link package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.account_link import AccountLink 12 | To: 13 | from stripe import AccountLink 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._account_link import ( # noqa 20 | AccountLink, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/account_session.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.account_session package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.account_session import AccountSession 12 | To: 13 | from stripe import AccountSession 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._account_session import ( # noqa 20 | AccountSession, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/apple_pay_domain.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.apple_pay_domain package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.apple_pay_domain import ApplePayDomain 12 | To: 13 | from stripe import ApplePayDomain 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._apple_pay_domain import ( # noqa 20 | ApplePayDomain, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/application.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.application package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.application import Application 12 | To: 13 | from stripe import Application 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._application import ( # noqa 20 | Application, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/application_fee.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.application_fee package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.application_fee import ApplicationFee 12 | To: 13 | from stripe import ApplicationFee 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._application_fee import ( # noqa 20 | ApplicationFee, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/application_fee_refund.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.application_fee_refund package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.application_fee_refund import ApplicationFeeRefund 12 | To: 13 | from stripe import ApplicationFeeRefund 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._application_fee_refund import ( # noqa 20 | ApplicationFeeRefund, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/apps/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.apps package is deprecated, please change your 9 | imports to import from stripe.apps directly. 10 | From: 11 | from stripe.api_resources.apps import ... 12 | To: 13 | from stripe.apps import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.apps.secret import Secret 20 | -------------------------------------------------------------------------------- /stripe/api_resources/apps/secret.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.apps.secret package is deprecated, please change your 9 | imports to import from stripe.apps directly. 10 | From: 11 | from stripe.api_resources.apps.secret import Secret 12 | To: 13 | from stripe.apps import Secret 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.apps._secret import ( # noqa 20 | Secret, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/balance.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.balance package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.balance import Balance 12 | To: 13 | from stripe import Balance 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._balance import ( # noqa 20 | Balance, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/balance_transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.balance_transaction package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.balance_transaction import BalanceTransaction 12 | To: 13 | from stripe import BalanceTransaction 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._balance_transaction import ( # noqa 20 | BalanceTransaction, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/bank_account.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.bank_account package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.bank_account import BankAccount 12 | To: 13 | from stripe import BankAccount 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._bank_account import ( # noqa 20 | BankAccount, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/billing/alert.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing.alert package is deprecated, please change your 9 | imports to import from stripe.billing directly. 10 | From: 11 | from stripe.api_resources.billing.alert import Alert 12 | To: 13 | from stripe.billing import Alert 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.billing._alert import ( # noqa 20 | Alert, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/billing/alert_triggered.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing.alert_triggered package is deprecated, please change your 9 | imports to import from stripe.billing directly. 10 | From: 11 | from stripe.api_resources.billing.alert_triggered import AlertTriggered 12 | To: 13 | from stripe.billing import AlertTriggered 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.billing._alert_triggered import ( # noqa 20 | AlertTriggered, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/billing/credit_balance_summary.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing.credit_balance_summary package is deprecated, please change your 9 | imports to import from stripe.billing directly. 10 | From: 11 | from stripe.api_resources.billing.credit_balance_summary import CreditBalanceSummary 12 | To: 13 | from stripe.billing import CreditBalanceSummary 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.billing._credit_balance_summary import ( # noqa 20 | CreditBalanceSummary, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/billing/credit_balance_transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing.credit_balance_transaction package is deprecated, please change your 9 | imports to import from stripe.billing directly. 10 | From: 11 | from stripe.api_resources.billing.credit_balance_transaction import CreditBalanceTransaction 12 | To: 13 | from stripe.billing import CreditBalanceTransaction 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.billing._credit_balance_transaction import ( # noqa 20 | CreditBalanceTransaction, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/billing/credit_grant.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing.credit_grant package is deprecated, please change your 9 | imports to import from stripe.billing directly. 10 | From: 11 | from stripe.api_resources.billing.credit_grant import CreditGrant 12 | To: 13 | from stripe.billing import CreditGrant 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.billing._credit_grant import ( # noqa 20 | CreditGrant, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/billing/meter.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing.meter package is deprecated, please change your 9 | imports to import from stripe.billing directly. 10 | From: 11 | from stripe.api_resources.billing.meter import Meter 12 | To: 13 | from stripe.billing import Meter 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.billing._meter import ( # noqa 20 | Meter, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/billing/meter_event.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing.meter_event package is deprecated, please change your 9 | imports to import from stripe.billing directly. 10 | From: 11 | from stripe.api_resources.billing.meter_event import MeterEvent 12 | To: 13 | from stripe.billing import MeterEvent 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.billing._meter_event import ( # noqa 20 | MeterEvent, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/billing/meter_event_adjustment.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing.meter_event_adjustment package is deprecated, please change your 9 | imports to import from stripe.billing directly. 10 | From: 11 | from stripe.api_resources.billing.meter_event_adjustment import MeterEventAdjustment 12 | To: 13 | from stripe.billing import MeterEventAdjustment 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.billing._meter_event_adjustment import ( # noqa 20 | MeterEventAdjustment, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/billing/meter_event_summary.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing.meter_event_summary package is deprecated, please change your 9 | imports to import from stripe.billing directly. 10 | From: 11 | from stripe.api_resources.billing.meter_event_summary import MeterEventSummary 12 | To: 13 | from stripe.billing import MeterEventSummary 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.billing._meter_event_summary import ( # noqa 20 | MeterEventSummary, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/billing_portal/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing_portal package is deprecated, please change your 9 | imports to import from stripe.billing_portal directly. 10 | From: 11 | from stripe.api_resources.billing_portal import ... 12 | To: 13 | from stripe.billing_portal import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.billing_portal.configuration import Configuration 20 | from stripe.api_resources.billing_portal.session import Session 21 | -------------------------------------------------------------------------------- /stripe/api_resources/billing_portal/configuration.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing_portal.configuration package is deprecated, please change your 9 | imports to import from stripe.billing_portal directly. 10 | From: 11 | from stripe.api_resources.billing_portal.configuration import Configuration 12 | To: 13 | from stripe.billing_portal import Configuration 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.billing_portal._configuration import ( # noqa 20 | Configuration, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/billing_portal/session.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.billing_portal.session package is deprecated, please change your 9 | imports to import from stripe.billing_portal directly. 10 | From: 11 | from stripe.api_resources.billing_portal.session import Session 12 | To: 13 | from stripe.billing_portal import Session 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.billing_portal._session import ( # noqa 20 | Session, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/capability.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.capability package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.capability import Capability 12 | To: 13 | from stripe import Capability 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._capability import ( # noqa 20 | Capability, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/card.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.card package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.card import Card 12 | To: 13 | from stripe import Card 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._card import ( # noqa 20 | Card, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/cash_balance.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.cash_balance package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.cash_balance import CashBalance 12 | To: 13 | from stripe import CashBalance 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._cash_balance import ( # noqa 20 | CashBalance, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/charge.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.charge package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.charge import Charge 12 | To: 13 | from stripe import Charge 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._charge import ( # noqa 20 | Charge, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/checkout/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.checkout package is deprecated, please change your 9 | imports to import from stripe.checkout directly. 10 | From: 11 | from stripe.api_resources.checkout import ... 12 | To: 13 | from stripe.checkout import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.checkout.session import Session 20 | -------------------------------------------------------------------------------- /stripe/api_resources/checkout/session.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.checkout.session package is deprecated, please change your 9 | imports to import from stripe.checkout directly. 10 | From: 11 | from stripe.api_resources.checkout.session import Session 12 | To: 13 | from stripe.checkout import Session 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.checkout._session import ( # noqa 20 | Session, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/climate/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.climate package is deprecated, please change your 9 | imports to import from stripe.climate directly. 10 | From: 11 | from stripe.api_resources.climate import ... 12 | To: 13 | from stripe.climate import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.climate.order import Order 20 | from stripe.api_resources.climate.product import Product 21 | from stripe.api_resources.climate.supplier import Supplier 22 | -------------------------------------------------------------------------------- /stripe/api_resources/climate/order.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.climate.order package is deprecated, please change your 9 | imports to import from stripe.climate directly. 10 | From: 11 | from stripe.api_resources.climate.order import Order 12 | To: 13 | from stripe.climate import Order 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.climate._order import ( # noqa 20 | Order, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/climate/product.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.climate.product package is deprecated, please change your 9 | imports to import from stripe.climate directly. 10 | From: 11 | from stripe.api_resources.climate.product import Product 12 | To: 13 | from stripe.climate import Product 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.climate._product import ( # noqa 20 | Product, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/climate/supplier.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.climate.supplier package is deprecated, please change your 9 | imports to import from stripe.climate directly. 10 | From: 11 | from stripe.api_resources.climate.supplier import Supplier 12 | To: 13 | from stripe.climate import Supplier 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.climate._supplier import ( # noqa 20 | Supplier, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/confirmation_token.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.confirmation_token package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.confirmation_token import ConfirmationToken 12 | To: 13 | from stripe import ConfirmationToken 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._confirmation_token import ( # noqa 20 | ConfirmationToken, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/connect_collection_transfer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.connect_collection_transfer package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.connect_collection_transfer import ConnectCollectionTransfer 12 | To: 13 | from stripe import ConnectCollectionTransfer 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._connect_collection_transfer import ( # noqa 20 | ConnectCollectionTransfer, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/country_spec.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.country_spec package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.country_spec import CountrySpec 12 | To: 13 | from stripe import CountrySpec 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._country_spec import ( # noqa 20 | CountrySpec, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/coupon.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.coupon package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.coupon import Coupon 12 | To: 13 | from stripe import Coupon 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._coupon import ( # noqa 20 | Coupon, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/credit_note.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.credit_note package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.credit_note import CreditNote 12 | To: 13 | from stripe import CreditNote 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._credit_note import ( # noqa 20 | CreditNote, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/credit_note_line_item.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.credit_note_line_item package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.credit_note_line_item import CreditNoteLineItem 12 | To: 13 | from stripe import CreditNoteLineItem 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._credit_note_line_item import ( # noqa 20 | CreditNoteLineItem, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/customer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.customer package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.customer import Customer 12 | To: 13 | from stripe import Customer 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._customer import ( # noqa 20 | Customer, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/customer_balance_transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.customer_balance_transaction package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.customer_balance_transaction import CustomerBalanceTransaction 12 | To: 13 | from stripe import CustomerBalanceTransaction 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._customer_balance_transaction import ( # noqa 20 | CustomerBalanceTransaction, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/customer_cash_balance_transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.customer_cash_balance_transaction package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.customer_cash_balance_transaction import CustomerCashBalanceTransaction 12 | To: 13 | from stripe import CustomerCashBalanceTransaction 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._customer_cash_balance_transaction import ( # noqa 20 | CustomerCashBalanceTransaction, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/customer_session.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.customer_session package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.customer_session import CustomerSession 12 | To: 13 | from stripe import CustomerSession 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._customer_session import ( # noqa 20 | CustomerSession, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/discount.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.discount package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.discount import Discount 12 | To: 13 | from stripe import Discount 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._discount import ( # noqa 20 | Discount, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/dispute.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.dispute package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.dispute import Dispute 12 | To: 13 | from stripe import Dispute 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._dispute import ( # noqa 20 | Dispute, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/entitlements/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.entitlements package is deprecated, please change your 9 | imports to import from stripe.entitlements directly. 10 | From: 11 | from stripe.api_resources.entitlements import ... 12 | To: 13 | from stripe.entitlements import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.entitlements.active_entitlement import ( 20 | ActiveEntitlement, 21 | ) 22 | from stripe.api_resources.entitlements.active_entitlement_summary import ( 23 | ActiveEntitlementSummary, 24 | ) 25 | from stripe.api_resources.entitlements.feature import Feature 26 | -------------------------------------------------------------------------------- /stripe/api_resources/entitlements/active_entitlement.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.entitlements.active_entitlement package is deprecated, please change your 9 | imports to import from stripe.entitlements directly. 10 | From: 11 | from stripe.api_resources.entitlements.active_entitlement import ActiveEntitlement 12 | To: 13 | from stripe.entitlements import ActiveEntitlement 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.entitlements._active_entitlement import ( # noqa 20 | ActiveEntitlement, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/entitlements/active_entitlement_summary.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.entitlements.active_entitlement_summary package is deprecated, please change your 9 | imports to import from stripe.entitlements directly. 10 | From: 11 | from stripe.api_resources.entitlements.active_entitlement_summary import ActiveEntitlementSummary 12 | To: 13 | from stripe.entitlements import ActiveEntitlementSummary 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.entitlements._active_entitlement_summary import ( # noqa 20 | ActiveEntitlementSummary, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/entitlements/feature.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.entitlements.feature package is deprecated, please change your 9 | imports to import from stripe.entitlements directly. 10 | From: 11 | from stripe.api_resources.entitlements.feature import Feature 12 | To: 13 | from stripe.entitlements import Feature 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.entitlements._feature import ( # noqa 20 | Feature, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/ephemeral_key.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.ephemeral_key package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.ephemeral_key import EphemeralKey 12 | To: 13 | from stripe import EphemeralKey 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._ephemeral_key import ( # noqa 20 | EphemeralKey, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/error_object.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.api_resources.error_object package is deprecated, please change your 8 | imports to import from stripe directly. 9 | From: 10 | from stripe.api_resources.error_object import ErrorObject 11 | To: 12 | from stripe import ErrorObject 13 | """, 14 | DeprecationWarning, 15 | ) 16 | if not TYPE_CHECKING: 17 | from stripe._error_object import ( # noqa 18 | ErrorObject, 19 | OAuthErrorObject, 20 | ) 21 | -------------------------------------------------------------------------------- /stripe/api_resources/event.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.event package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.event import Event 12 | To: 13 | from stripe import Event 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._event import ( # noqa 20 | Event, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/exchange_rate.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.exchange_rate package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.exchange_rate import ExchangeRate 12 | To: 13 | from stripe import ExchangeRate 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._exchange_rate import ( # noqa 20 | ExchangeRate, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/file.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.file package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.file import File 12 | To: 13 | from stripe import File 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._file import ( # noqa 20 | File, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/file_link.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.file_link package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.file_link import FileLink 12 | To: 13 | from stripe import FileLink 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._file_link import ( # noqa 20 | FileLink, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/financial_connections/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.financial_connections package is deprecated, please change your 9 | imports to import from stripe.financial_connections directly. 10 | From: 11 | from stripe.api_resources.financial_connections import ... 12 | To: 13 | from stripe.financial_connections import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.financial_connections.account import Account 20 | from stripe.api_resources.financial_connections.account_owner import ( 21 | AccountOwner, 22 | ) 23 | from stripe.api_resources.financial_connections.account_ownership import ( 24 | AccountOwnership, 25 | ) 26 | from stripe.api_resources.financial_connections.session import Session 27 | from stripe.api_resources.financial_connections.transaction import ( 28 | Transaction, 29 | ) 30 | -------------------------------------------------------------------------------- /stripe/api_resources/financial_connections/account.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.financial_connections.account package is deprecated, please change your 9 | imports to import from stripe.financial_connections directly. 10 | From: 11 | from stripe.api_resources.financial_connections.account import Account 12 | To: 13 | from stripe.financial_connections import Account 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.financial_connections._account import ( # noqa 20 | Account, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/financial_connections/account_owner.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.financial_connections.account_owner package is deprecated, please change your 9 | imports to import from stripe.financial_connections directly. 10 | From: 11 | from stripe.api_resources.financial_connections.account_owner import AccountOwner 12 | To: 13 | from stripe.financial_connections import AccountOwner 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.financial_connections._account_owner import ( # noqa 20 | AccountOwner, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/financial_connections/account_ownership.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.financial_connections.account_ownership package is deprecated, please change your 9 | imports to import from stripe.financial_connections directly. 10 | From: 11 | from stripe.api_resources.financial_connections.account_ownership import AccountOwnership 12 | To: 13 | from stripe.financial_connections import AccountOwnership 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.financial_connections._account_ownership import ( # noqa 20 | AccountOwnership, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/financial_connections/session.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.financial_connections.session package is deprecated, please change your 9 | imports to import from stripe.financial_connections directly. 10 | From: 11 | from stripe.api_resources.financial_connections.session import Session 12 | To: 13 | from stripe.financial_connections import Session 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.financial_connections._session import ( # noqa 20 | Session, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/financial_connections/transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.financial_connections.transaction package is deprecated, please change your 9 | imports to import from stripe.financial_connections directly. 10 | From: 11 | from stripe.api_resources.financial_connections.transaction import Transaction 12 | To: 13 | from stripe.financial_connections import Transaction 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.financial_connections._transaction import ( # noqa 20 | Transaction, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/forwarding/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.forwarding package is deprecated, please change your 9 | imports to import from stripe.forwarding directly. 10 | From: 11 | from stripe.api_resources.forwarding import ... 12 | To: 13 | from stripe.forwarding import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.forwarding.request import Request 20 | -------------------------------------------------------------------------------- /stripe/api_resources/forwarding/request.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.forwarding.request package is deprecated, please change your 9 | imports to import from stripe.forwarding directly. 10 | From: 11 | from stripe.api_resources.forwarding.request import Request 12 | To: 13 | from stripe.forwarding import Request 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.forwarding._request import ( # noqa 20 | Request, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/funding_instructions.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.funding_instructions package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.funding_instructions import FundingInstructions 12 | To: 13 | from stripe import FundingInstructions 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._funding_instructions import ( # noqa 20 | FundingInstructions, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/identity/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.identity package is deprecated, please change your 9 | imports to import from stripe.identity directly. 10 | From: 11 | from stripe.api_resources.identity import ... 12 | To: 13 | from stripe.identity import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.identity.verification_report import ( 20 | VerificationReport, 21 | ) 22 | from stripe.api_resources.identity.verification_session import ( 23 | VerificationSession, 24 | ) 25 | -------------------------------------------------------------------------------- /stripe/api_resources/identity/verification_report.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.identity.verification_report package is deprecated, please change your 9 | imports to import from stripe.identity directly. 10 | From: 11 | from stripe.api_resources.identity.verification_report import VerificationReport 12 | To: 13 | from stripe.identity import VerificationReport 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.identity._verification_report import ( # noqa 20 | VerificationReport, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/identity/verification_session.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.identity.verification_session package is deprecated, please change your 9 | imports to import from stripe.identity directly. 10 | From: 11 | from stripe.api_resources.identity.verification_session import VerificationSession 12 | To: 13 | from stripe.identity import VerificationSession 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.identity._verification_session import ( # noqa 20 | VerificationSession, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/invoice.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.invoice package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.invoice import Invoice 12 | To: 13 | from stripe import Invoice 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._invoice import ( # noqa 20 | Invoice, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/invoice_item.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.invoice_item package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.invoice_item import InvoiceItem 12 | To: 13 | from stripe import InvoiceItem 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._invoice_item import ( # noqa 20 | InvoiceItem, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/invoice_line_item.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.invoice_line_item package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.invoice_line_item import InvoiceLineItem 12 | To: 13 | from stripe import InvoiceLineItem 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._invoice_line_item import ( # noqa 20 | InvoiceLineItem, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/invoice_payment.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.invoice_payment package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.invoice_payment import InvoicePayment 12 | To: 13 | from stripe import InvoicePayment 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._invoice_payment import ( # noqa 20 | InvoicePayment, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/invoice_rendering_template.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.invoice_rendering_template package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.invoice_rendering_template import InvoiceRenderingTemplate 12 | To: 13 | from stripe import InvoiceRenderingTemplate 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._invoice_rendering_template import ( # noqa 20 | InvoiceRenderingTemplate, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/issuing/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.issuing package is deprecated, please change your 9 | imports to import from stripe.issuing directly. 10 | From: 11 | from stripe.api_resources.issuing import ... 12 | To: 13 | from stripe.issuing import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.issuing.authorization import Authorization 20 | from stripe.api_resources.issuing.card import Card 21 | from stripe.api_resources.issuing.cardholder import Cardholder 22 | from stripe.api_resources.issuing.dispute import Dispute 23 | from stripe.api_resources.issuing.personalization_design import ( 24 | PersonalizationDesign, 25 | ) 26 | from stripe.api_resources.issuing.physical_bundle import PhysicalBundle 27 | from stripe.api_resources.issuing.token import Token 28 | from stripe.api_resources.issuing.transaction import Transaction 29 | -------------------------------------------------------------------------------- /stripe/api_resources/issuing/authorization.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.issuing.authorization package is deprecated, please change your 9 | imports to import from stripe.issuing directly. 10 | From: 11 | from stripe.api_resources.issuing.authorization import Authorization 12 | To: 13 | from stripe.issuing import Authorization 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.issuing._authorization import ( # noqa 20 | Authorization, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/issuing/card.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.issuing.card package is deprecated, please change your 9 | imports to import from stripe.issuing directly. 10 | From: 11 | from stripe.api_resources.issuing.card import Card 12 | To: 13 | from stripe.issuing import Card 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.issuing._card import ( # noqa 20 | Card, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/issuing/cardholder.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.issuing.cardholder package is deprecated, please change your 9 | imports to import from stripe.issuing directly. 10 | From: 11 | from stripe.api_resources.issuing.cardholder import Cardholder 12 | To: 13 | from stripe.issuing import Cardholder 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.issuing._cardholder import ( # noqa 20 | Cardholder, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/issuing/dispute.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.issuing.dispute package is deprecated, please change your 9 | imports to import from stripe.issuing directly. 10 | From: 11 | from stripe.api_resources.issuing.dispute import Dispute 12 | To: 13 | from stripe.issuing import Dispute 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.issuing._dispute import ( # noqa 20 | Dispute, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/issuing/personalization_design.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.issuing.personalization_design package is deprecated, please change your 9 | imports to import from stripe.issuing directly. 10 | From: 11 | from stripe.api_resources.issuing.personalization_design import PersonalizationDesign 12 | To: 13 | from stripe.issuing import PersonalizationDesign 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.issuing._personalization_design import ( # noqa 20 | PersonalizationDesign, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/issuing/physical_bundle.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.issuing.physical_bundle package is deprecated, please change your 9 | imports to import from stripe.issuing directly. 10 | From: 11 | from stripe.api_resources.issuing.physical_bundle import PhysicalBundle 12 | To: 13 | from stripe.issuing import PhysicalBundle 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.issuing._physical_bundle import ( # noqa 20 | PhysicalBundle, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/issuing/token.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.issuing.token package is deprecated, please change your 9 | imports to import from stripe.issuing directly. 10 | From: 11 | from stripe.api_resources.issuing.token import Token 12 | To: 13 | from stripe.issuing import Token 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.issuing._token import ( # noqa 20 | Token, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/issuing/transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.issuing.transaction package is deprecated, please change your 9 | imports to import from stripe.issuing directly. 10 | From: 11 | from stripe.api_resources.issuing.transaction import Transaction 12 | To: 13 | from stripe.issuing import Transaction 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.issuing._transaction import ( # noqa 20 | Transaction, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/line_item.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.line_item package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.line_item import LineItem 12 | To: 13 | from stripe import LineItem 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._line_item import ( # noqa 20 | LineItem, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/list_object.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.list_object package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.list_object import ListObject 12 | To: 13 | from stripe import ListObject 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._list_object import ( # noqa 20 | ListObject, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/login_link.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.login_link package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.login_link import LoginLink 12 | To: 13 | from stripe import LoginLink 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._login_link import ( # noqa 20 | LoginLink, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/mandate.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.mandate package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.mandate import Mandate 12 | To: 13 | from stripe import Mandate 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._mandate import ( # noqa 20 | Mandate, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/payment_intent.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.payment_intent package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.payment_intent import PaymentIntent 12 | To: 13 | from stripe import PaymentIntent 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._payment_intent import ( # noqa 20 | PaymentIntent, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/payment_link.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.payment_link package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.payment_link import PaymentLink 12 | To: 13 | from stripe import PaymentLink 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._payment_link import ( # noqa 20 | PaymentLink, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/payment_method.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.payment_method package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.payment_method import PaymentMethod 12 | To: 13 | from stripe import PaymentMethod 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._payment_method import ( # noqa 20 | PaymentMethod, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/payment_method_configuration.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.payment_method_configuration package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.payment_method_configuration import PaymentMethodConfiguration 12 | To: 13 | from stripe import PaymentMethodConfiguration 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._payment_method_configuration import ( # noqa 20 | PaymentMethodConfiguration, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/payment_method_domain.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.payment_method_domain package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.payment_method_domain import PaymentMethodDomain 12 | To: 13 | from stripe import PaymentMethodDomain 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._payment_method_domain import ( # noqa 20 | PaymentMethodDomain, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/payout.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.payout package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.payout import Payout 12 | To: 13 | from stripe import Payout 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._payout import ( # noqa 20 | Payout, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/person.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.person package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.person import Person 12 | To: 13 | from stripe import Person 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._person import ( # noqa 20 | Person, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/plan.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.plan package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.plan import Plan 12 | To: 13 | from stripe import Plan 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._plan import ( # noqa 20 | Plan, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/price.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.price package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.price import Price 12 | To: 13 | from stripe import Price 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._price import ( # noqa 20 | Price, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/product.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.product package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.product import Product 12 | To: 13 | from stripe import Product 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._product import ( # noqa 20 | Product, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/product_feature.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.product_feature package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.product_feature import ProductFeature 12 | To: 13 | from stripe import ProductFeature 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._product_feature import ( # noqa 20 | ProductFeature, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/promotion_code.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.promotion_code package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.promotion_code import PromotionCode 12 | To: 13 | from stripe import PromotionCode 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._promotion_code import ( # noqa 20 | PromotionCode, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/quote.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.quote package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.quote import Quote 12 | To: 13 | from stripe import Quote 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._quote import ( # noqa 20 | Quote, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/radar/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.radar package is deprecated, please change your 9 | imports to import from stripe.radar directly. 10 | From: 11 | from stripe.api_resources.radar import ... 12 | To: 13 | from stripe.radar import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.radar.early_fraud_warning import ( 20 | EarlyFraudWarning, 21 | ) 22 | from stripe.api_resources.radar.value_list import ValueList 23 | from stripe.api_resources.radar.value_list_item import ValueListItem 24 | -------------------------------------------------------------------------------- /stripe/api_resources/radar/early_fraud_warning.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.radar.early_fraud_warning package is deprecated, please change your 9 | imports to import from stripe.radar directly. 10 | From: 11 | from stripe.api_resources.radar.early_fraud_warning import EarlyFraudWarning 12 | To: 13 | from stripe.radar import EarlyFraudWarning 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.radar._early_fraud_warning import ( # noqa 20 | EarlyFraudWarning, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/radar/value_list.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.radar.value_list package is deprecated, please change your 9 | imports to import from stripe.radar directly. 10 | From: 11 | from stripe.api_resources.radar.value_list import ValueList 12 | To: 13 | from stripe.radar import ValueList 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.radar._value_list import ( # noqa 20 | ValueList, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/radar/value_list_item.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.radar.value_list_item package is deprecated, please change your 9 | imports to import from stripe.radar directly. 10 | From: 11 | from stripe.api_resources.radar.value_list_item import ValueListItem 12 | To: 13 | from stripe.radar import ValueListItem 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.radar._value_list_item import ( # noqa 20 | ValueListItem, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/recipient_transfer.py: -------------------------------------------------------------------------------- 1 | from stripe._stripe_object import StripeObject 2 | 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The RecipientTransfer class is deprecated and will be removed in a future 8 | """, 9 | DeprecationWarning, 10 | stacklevel=2, 11 | ) 12 | 13 | 14 | class RecipientTransfer(StripeObject): 15 | OBJECT_NAME = "recipient_transfer" 16 | -------------------------------------------------------------------------------- /stripe/api_resources/refund.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.refund package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.refund import Refund 12 | To: 13 | from stripe import Refund 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._refund import ( # noqa 20 | Refund, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/reporting/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.reporting package is deprecated, please change your 9 | imports to import from stripe.reporting directly. 10 | From: 11 | from stripe.api_resources.reporting import ... 12 | To: 13 | from stripe.reporting import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.reporting.report_run import ReportRun 20 | from stripe.api_resources.reporting.report_type import ReportType 21 | -------------------------------------------------------------------------------- /stripe/api_resources/reporting/report_run.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.reporting.report_run package is deprecated, please change your 9 | imports to import from stripe.reporting directly. 10 | From: 11 | from stripe.api_resources.reporting.report_run import ReportRun 12 | To: 13 | from stripe.reporting import ReportRun 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.reporting._report_run import ( # noqa 20 | ReportRun, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/reporting/report_type.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.reporting.report_type package is deprecated, please change your 9 | imports to import from stripe.reporting directly. 10 | From: 11 | from stripe.api_resources.reporting.report_type import ReportType 12 | To: 13 | from stripe.reporting import ReportType 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.reporting._report_type import ( # noqa 20 | ReportType, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/reserve_transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.reserve_transaction package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.reserve_transaction import ReserveTransaction 12 | To: 13 | from stripe import ReserveTransaction 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._reserve_transaction import ( # noqa 20 | ReserveTransaction, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/reversal.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.reversal package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.reversal import Reversal 12 | To: 13 | from stripe import Reversal 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._reversal import ( # noqa 20 | Reversal, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/review.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.review package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.review import Review 12 | To: 13 | from stripe import Review 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._review import ( # noqa 20 | Review, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/search_result_object.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.search_result_object package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.search_result_object import SearchResultObject 12 | To: 13 | from stripe import SearchResultObject 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._search_result_object import ( # noqa 20 | SearchResultObject, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/setup_attempt.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.setup_attempt package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.setup_attempt import SetupAttempt 12 | To: 13 | from stripe import SetupAttempt 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._setup_attempt import ( # noqa 20 | SetupAttempt, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/setup_intent.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.setup_intent package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.setup_intent import SetupIntent 12 | To: 13 | from stripe import SetupIntent 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._setup_intent import ( # noqa 20 | SetupIntent, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/shipping_rate.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.shipping_rate package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.shipping_rate import ShippingRate 12 | To: 13 | from stripe import ShippingRate 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._shipping_rate import ( # noqa 20 | ShippingRate, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/sigma/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.sigma package is deprecated, please change your 9 | imports to import from stripe.sigma directly. 10 | From: 11 | from stripe.api_resources.sigma import ... 12 | To: 13 | from stripe.sigma import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.sigma.scheduled_query_run import ( 20 | ScheduledQueryRun, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/sigma/scheduled_query_run.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.sigma.scheduled_query_run package is deprecated, please change your 9 | imports to import from stripe.sigma directly. 10 | From: 11 | from stripe.api_resources.sigma.scheduled_query_run import ScheduledQueryRun 12 | To: 13 | from stripe.sigma import ScheduledQueryRun 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.sigma._scheduled_query_run import ( # noqa 20 | ScheduledQueryRun, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/source.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.source package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.source import Source 12 | To: 13 | from stripe import Source 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._source import ( # noqa 20 | Source, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/source_mandate_notification.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.source_mandate_notification package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.source_mandate_notification import SourceMandateNotification 12 | To: 13 | from stripe import SourceMandateNotification 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._source_mandate_notification import ( # noqa 20 | SourceMandateNotification, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/source_transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.source_transaction package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.source_transaction import SourceTransaction 12 | To: 13 | from stripe import SourceTransaction 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._source_transaction import ( # noqa 20 | SourceTransaction, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/subscription.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.subscription package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.subscription import Subscription 12 | To: 13 | from stripe import Subscription 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._subscription import ( # noqa 20 | Subscription, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/subscription_item.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.subscription_item package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.subscription_item import SubscriptionItem 12 | To: 13 | from stripe import SubscriptionItem 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._subscription_item import ( # noqa 20 | SubscriptionItem, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/subscription_schedule.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.subscription_schedule package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.subscription_schedule import SubscriptionSchedule 12 | To: 13 | from stripe import SubscriptionSchedule 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._subscription_schedule import ( # noqa 20 | SubscriptionSchedule, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/tax/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.tax package is deprecated, please change your 9 | imports to import from stripe.tax directly. 10 | From: 11 | from stripe.api_resources.tax import ... 12 | To: 13 | from stripe.tax import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.tax.calculation import Calculation 20 | from stripe.api_resources.tax.calculation_line_item import ( 21 | CalculationLineItem, 22 | ) 23 | from stripe.api_resources.tax.registration import Registration 24 | from stripe.api_resources.tax.settings import Settings 25 | from stripe.api_resources.tax.transaction import Transaction 26 | from stripe.api_resources.tax.transaction_line_item import ( 27 | TransactionLineItem, 28 | ) 29 | -------------------------------------------------------------------------------- /stripe/api_resources/tax/calculation.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.tax.calculation package is deprecated, please change your 9 | imports to import from stripe.tax directly. 10 | From: 11 | from stripe.api_resources.tax.calculation import Calculation 12 | To: 13 | from stripe.tax import Calculation 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.tax._calculation import ( # noqa 20 | Calculation, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/tax/calculation_line_item.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.tax.calculation_line_item package is deprecated, please change your 9 | imports to import from stripe.tax directly. 10 | From: 11 | from stripe.api_resources.tax.calculation_line_item import CalculationLineItem 12 | To: 13 | from stripe.tax import CalculationLineItem 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.tax._calculation_line_item import ( # noqa 20 | CalculationLineItem, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/tax/registration.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.tax.registration package is deprecated, please change your 9 | imports to import from stripe.tax directly. 10 | From: 11 | from stripe.api_resources.tax.registration import Registration 12 | To: 13 | from stripe.tax import Registration 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.tax._registration import ( # noqa 20 | Registration, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/tax/settings.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.tax.settings package is deprecated, please change your 9 | imports to import from stripe.tax directly. 10 | From: 11 | from stripe.api_resources.tax.settings import Settings 12 | To: 13 | from stripe.tax import Settings 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.tax._settings import ( # noqa 20 | Settings, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/tax/transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.tax.transaction package is deprecated, please change your 9 | imports to import from stripe.tax directly. 10 | From: 11 | from stripe.api_resources.tax.transaction import Transaction 12 | To: 13 | from stripe.tax import Transaction 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.tax._transaction import ( # noqa 20 | Transaction, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/tax/transaction_line_item.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.tax.transaction_line_item package is deprecated, please change your 9 | imports to import from stripe.tax directly. 10 | From: 11 | from stripe.api_resources.tax.transaction_line_item import TransactionLineItem 12 | To: 13 | from stripe.tax import TransactionLineItem 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.tax._transaction_line_item import ( # noqa 20 | TransactionLineItem, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/tax_code.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.tax_code package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.tax_code import TaxCode 12 | To: 13 | from stripe import TaxCode 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._tax_code import ( # noqa 20 | TaxCode, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/tax_deducted_at_source.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.tax_deducted_at_source package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.tax_deducted_at_source import TaxDeductedAtSource 12 | To: 13 | from stripe import TaxDeductedAtSource 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._tax_deducted_at_source import ( # noqa 20 | TaxDeductedAtSource, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/tax_id.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.tax_id package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.tax_id import TaxId 12 | To: 13 | from stripe import TaxId 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._tax_id import ( # noqa 20 | TaxId, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/tax_rate.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.tax_rate package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.tax_rate import TaxRate 12 | To: 13 | from stripe import TaxRate 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._tax_rate import ( # noqa 20 | TaxRate, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/terminal/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.terminal package is deprecated, please change your 9 | imports to import from stripe.terminal directly. 10 | From: 11 | from stripe.api_resources.terminal import ... 12 | To: 13 | from stripe.terminal import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.terminal.configuration import Configuration 20 | from stripe.api_resources.terminal.connection_token import ConnectionToken 21 | from stripe.api_resources.terminal.location import Location 22 | from stripe.api_resources.terminal.reader import Reader 23 | -------------------------------------------------------------------------------- /stripe/api_resources/terminal/configuration.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.terminal.configuration package is deprecated, please change your 9 | imports to import from stripe.terminal directly. 10 | From: 11 | from stripe.api_resources.terminal.configuration import Configuration 12 | To: 13 | from stripe.terminal import Configuration 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.terminal._configuration import ( # noqa 20 | Configuration, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/terminal/connection_token.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.terminal.connection_token package is deprecated, please change your 9 | imports to import from stripe.terminal directly. 10 | From: 11 | from stripe.api_resources.terminal.connection_token import ConnectionToken 12 | To: 13 | from stripe.terminal import ConnectionToken 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.terminal._connection_token import ( # noqa 20 | ConnectionToken, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/terminal/location.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.terminal.location package is deprecated, please change your 9 | imports to import from stripe.terminal directly. 10 | From: 11 | from stripe.api_resources.terminal.location import Location 12 | To: 13 | from stripe.terminal import Location 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.terminal._location import ( # noqa 20 | Location, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/terminal/reader.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.terminal.reader package is deprecated, please change your 9 | imports to import from stripe.terminal directly. 10 | From: 11 | from stripe.api_resources.terminal.reader import Reader 12 | To: 13 | from stripe.terminal import Reader 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.terminal._reader import ( # noqa 20 | Reader, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/test_helpers/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.test_helpers package is deprecated, please change your 9 | imports to import from stripe.test_helpers directly. 10 | From: 11 | from stripe.api_resources.test_helpers import ... 12 | To: 13 | from stripe.test_helpers import ... 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.api_resources.test_helpers.test_clock import TestClock 20 | -------------------------------------------------------------------------------- /stripe/api_resources/test_helpers/test_clock.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.test_helpers.test_clock package is deprecated, please change your 9 | imports to import from stripe.test_helpers directly. 10 | From: 11 | from stripe.api_resources.test_helpers.test_clock import TestClock 12 | To: 13 | from stripe.test_helpers import TestClock 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.test_helpers._test_clock import ( # noqa 20 | TestClock, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/token.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.token package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.token import Token 12 | To: 13 | from stripe import Token 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._token import ( # noqa 20 | Token, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/topup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.topup package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.topup import Topup 12 | To: 13 | from stripe import Topup 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._topup import ( # noqa 20 | Topup, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/transfer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.transfer package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.transfer import Transfer 12 | To: 13 | from stripe import Transfer 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._transfer import ( # noqa 20 | Transfer, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/treasury/credit_reversal.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.treasury.credit_reversal package is deprecated, please change your 9 | imports to import from stripe.treasury directly. 10 | From: 11 | from stripe.api_resources.treasury.credit_reversal import CreditReversal 12 | To: 13 | from stripe.treasury import CreditReversal 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.treasury._credit_reversal import ( # noqa 20 | CreditReversal, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/treasury/debit_reversal.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.treasury.debit_reversal package is deprecated, please change your 9 | imports to import from stripe.treasury directly. 10 | From: 11 | from stripe.api_resources.treasury.debit_reversal import DebitReversal 12 | To: 13 | from stripe.treasury import DebitReversal 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.treasury._debit_reversal import ( # noqa 20 | DebitReversal, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/treasury/financial_account.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.treasury.financial_account package is deprecated, please change your 9 | imports to import from stripe.treasury directly. 10 | From: 11 | from stripe.api_resources.treasury.financial_account import FinancialAccount 12 | To: 13 | from stripe.treasury import FinancialAccount 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.treasury._financial_account import ( # noqa 20 | FinancialAccount, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/treasury/financial_account_features.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.treasury.financial_account_features package is deprecated, please change your 9 | imports to import from stripe.treasury directly. 10 | From: 11 | from stripe.api_resources.treasury.financial_account_features import FinancialAccountFeatures 12 | To: 13 | from stripe.treasury import FinancialAccountFeatures 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.treasury._financial_account_features import ( # noqa 20 | FinancialAccountFeatures, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/treasury/inbound_transfer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.treasury.inbound_transfer package is deprecated, please change your 9 | imports to import from stripe.treasury directly. 10 | From: 11 | from stripe.api_resources.treasury.inbound_transfer import InboundTransfer 12 | To: 13 | from stripe.treasury import InboundTransfer 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.treasury._inbound_transfer import ( # noqa 20 | InboundTransfer, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/treasury/outbound_payment.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.treasury.outbound_payment package is deprecated, please change your 9 | imports to import from stripe.treasury directly. 10 | From: 11 | from stripe.api_resources.treasury.outbound_payment import OutboundPayment 12 | To: 13 | from stripe.treasury import OutboundPayment 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.treasury._outbound_payment import ( # noqa 20 | OutboundPayment, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/treasury/outbound_transfer.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.treasury.outbound_transfer package is deprecated, please change your 9 | imports to import from stripe.treasury directly. 10 | From: 11 | from stripe.api_resources.treasury.outbound_transfer import OutboundTransfer 12 | To: 13 | from stripe.treasury import OutboundTransfer 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.treasury._outbound_transfer import ( # noqa 20 | OutboundTransfer, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/treasury/received_credit.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.treasury.received_credit package is deprecated, please change your 9 | imports to import from stripe.treasury directly. 10 | From: 11 | from stripe.api_resources.treasury.received_credit import ReceivedCredit 12 | To: 13 | from stripe.treasury import ReceivedCredit 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.treasury._received_credit import ( # noqa 20 | ReceivedCredit, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/treasury/received_debit.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.treasury.received_debit package is deprecated, please change your 9 | imports to import from stripe.treasury directly. 10 | From: 11 | from stripe.api_resources.treasury.received_debit import ReceivedDebit 12 | To: 13 | from stripe.treasury import ReceivedDebit 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.treasury._received_debit import ( # noqa 20 | ReceivedDebit, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/treasury/transaction.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.treasury.transaction package is deprecated, please change your 9 | imports to import from stripe.treasury directly. 10 | From: 11 | from stripe.api_resources.treasury.transaction import Transaction 12 | To: 13 | from stripe.treasury import Transaction 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.treasury._transaction import ( # noqa 20 | Transaction, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/treasury/transaction_entry.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.treasury.transaction_entry package is deprecated, please change your 9 | imports to import from stripe.treasury directly. 10 | From: 11 | from stripe.api_resources.treasury.transaction_entry import TransactionEntry 12 | To: 13 | from stripe.treasury import TransactionEntry 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe.treasury._transaction_entry import ( # noqa 20 | TransactionEntry, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_resources/webhook_endpoint.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from typing_extensions import TYPE_CHECKING 4 | from warnings import warn 5 | 6 | warn( 7 | """ 8 | The stripe.api_resources.webhook_endpoint package is deprecated, please change your 9 | imports to import from stripe directly. 10 | From: 11 | from stripe.api_resources.webhook_endpoint import WebhookEndpoint 12 | To: 13 | from stripe import WebhookEndpoint 14 | """, 15 | DeprecationWarning, 16 | stacklevel=2, 17 | ) 18 | if not TYPE_CHECKING: 19 | from stripe._webhook_endpoint import ( # noqa 20 | WebhookEndpoint, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/api_version.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.api_version package is deprecated and will become internal in the future. 8 | """, 9 | DeprecationWarning, 10 | ) 11 | 12 | if not TYPE_CHECKING: 13 | from stripe._api_version import ( # noqa 14 | _ApiVersion, 15 | ) 16 | -------------------------------------------------------------------------------- /stripe/app_info.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | The stripe.app_info package is deprecated, please change your 4 | imports to import from stripe directly. 5 | From: 6 | from stripe.app_info import AppInfo 7 | To: 8 | from stripe import AppInfo 9 | """ 10 | 11 | from typing_extensions import TYPE_CHECKING 12 | 13 | # No deprecation warning is raised here, because it would happen 14 | # on every import of `stripe/__init__.py` otherwise. Since that 15 | # module declares its own `app_info` name, this module becomes 16 | # practically impossible to import anyway. 17 | 18 | if not TYPE_CHECKING: 19 | from stripe._app_info import ( # noqa 20 | AppInfo, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/apps/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.apps._secret import Secret as Secret 4 | from stripe.apps._secret_service import SecretService as SecretService 5 | -------------------------------------------------------------------------------- /stripe/billing_portal/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.billing_portal._configuration import Configuration as Configuration 4 | from stripe.billing_portal._configuration_service import ( 5 | ConfigurationService as ConfigurationService, 6 | ) 7 | from stripe.billing_portal._session import Session as Session 8 | from stripe.billing_portal._session_service import ( 9 | SessionService as SessionService, 10 | ) 11 | -------------------------------------------------------------------------------- /stripe/checkout/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.checkout._session import Session as Session 4 | from stripe.checkout._session_line_item_service import ( 5 | SessionLineItemService as SessionLineItemService, 6 | ) 7 | from stripe.checkout._session_service import SessionService as SessionService 8 | -------------------------------------------------------------------------------- /stripe/climate/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.climate._order import Order as Order 4 | from stripe.climate._order_service import OrderService as OrderService 5 | from stripe.climate._product import Product as Product 6 | from stripe.climate._product_service import ProductService as ProductService 7 | from stripe.climate._supplier import Supplier as Supplier 8 | from stripe.climate._supplier_service import SupplierService as SupplierService 9 | -------------------------------------------------------------------------------- /stripe/entitlements/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.entitlements._active_entitlement import ( 4 | ActiveEntitlement as ActiveEntitlement, 5 | ) 6 | from stripe.entitlements._active_entitlement_service import ( 7 | ActiveEntitlementService as ActiveEntitlementService, 8 | ) 9 | from stripe.entitlements._active_entitlement_summary import ( 10 | ActiveEntitlementSummary as ActiveEntitlementSummary, 11 | ) 12 | from stripe.entitlements._feature import Feature as Feature 13 | from stripe.entitlements._feature_service import ( 14 | FeatureService as FeatureService, 15 | ) 16 | -------------------------------------------------------------------------------- /stripe/error.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.api_resources.error_object package is deprecated, please change your 8 | imports to import from stripe directly. 9 | From: 10 | from stripe.api_resources.error_object import ErrorObject 11 | To: 12 | from stripe import ErrorObject 13 | """, 14 | DeprecationWarning, 15 | ) 16 | 17 | if not TYPE_CHECKING: 18 | from stripe._error import StripeError # noqa 19 | from stripe._error import APIError # noqa 20 | from stripe._error import APIConnectionError # noqa 21 | from stripe._error import StripeErrorWithParamCode # noqa 22 | from stripe._error import CardError # noqa 23 | from stripe._error import IdempotencyError # noqa 24 | from stripe._error import InvalidRequestError # noqa 25 | from stripe._error import AuthenticationError # noqa 26 | from stripe._error import PermissionError # noqa 27 | from stripe._error import RateLimitError # noqa 28 | from stripe._error import SignatureVerificationError # noqa 29 | -------------------------------------------------------------------------------- /stripe/events/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.events._v1_billing_meter_error_report_triggered_event import ( 4 | V1BillingMeterErrorReportTriggeredEvent as V1BillingMeterErrorReportTriggeredEvent, 5 | ) 6 | from stripe.events._v1_billing_meter_no_meter_found_event import ( 7 | V1BillingMeterNoMeterFoundEvent as V1BillingMeterNoMeterFoundEvent, 8 | ) 9 | from stripe.events._v2_core_event_destination_ping_event import ( 10 | V2CoreEventDestinationPingEvent as V2CoreEventDestinationPingEvent, 11 | ) 12 | -------------------------------------------------------------------------------- /stripe/events/_event_classes.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.events._v1_billing_meter_error_report_triggered_event import ( 4 | V1BillingMeterErrorReportTriggeredEvent, 5 | ) 6 | from stripe.events._v1_billing_meter_no_meter_found_event import ( 7 | V1BillingMeterNoMeterFoundEvent, 8 | ) 9 | from stripe.events._v2_core_event_destination_ping_event import ( 10 | V2CoreEventDestinationPingEvent, 11 | ) 12 | 13 | 14 | THIN_EVENT_CLASSES = { 15 | V1BillingMeterErrorReportTriggeredEvent.LOOKUP_TYPE: V1BillingMeterErrorReportTriggeredEvent, 16 | V1BillingMeterNoMeterFoundEvent.LOOKUP_TYPE: V1BillingMeterNoMeterFoundEvent, 17 | V2CoreEventDestinationPingEvent.LOOKUP_TYPE: V2CoreEventDestinationPingEvent, 18 | } 19 | -------------------------------------------------------------------------------- /stripe/financial_connections/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.financial_connections._account import Account as Account 4 | from stripe.financial_connections._account_owner import ( 5 | AccountOwner as AccountOwner, 6 | ) 7 | from stripe.financial_connections._account_owner_service import ( 8 | AccountOwnerService as AccountOwnerService, 9 | ) 10 | from stripe.financial_connections._account_ownership import ( 11 | AccountOwnership as AccountOwnership, 12 | ) 13 | from stripe.financial_connections._account_service import ( 14 | AccountService as AccountService, 15 | ) 16 | from stripe.financial_connections._session import Session as Session 17 | from stripe.financial_connections._session_service import ( 18 | SessionService as SessionService, 19 | ) 20 | from stripe.financial_connections._transaction import ( 21 | Transaction as Transaction, 22 | ) 23 | from stripe.financial_connections._transaction_service import ( 24 | TransactionService as TransactionService, 25 | ) 26 | -------------------------------------------------------------------------------- /stripe/forwarding/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.forwarding._request import Request as Request 4 | from stripe.forwarding._request_service import RequestService as RequestService 5 | -------------------------------------------------------------------------------- /stripe/http_client.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.http_client package is deprecated, please change your 8 | imports to import from stripe directly. 9 | From: 10 | from stripe.http_client import HTTPClient 11 | To: 12 | from stripe import HTTPClient 13 | """, 14 | DeprecationWarning, 15 | stacklevel=2, 16 | ) 17 | 18 | if not TYPE_CHECKING: 19 | from stripe._http_client import * # noqa 20 | -------------------------------------------------------------------------------- /stripe/identity/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.identity._verification_report import ( 4 | VerificationReport as VerificationReport, 5 | ) 6 | from stripe.identity._verification_report_service import ( 7 | VerificationReportService as VerificationReportService, 8 | ) 9 | from stripe.identity._verification_session import ( 10 | VerificationSession as VerificationSession, 11 | ) 12 | from stripe.identity._verification_session_service import ( 13 | VerificationSessionService as VerificationSessionService, 14 | ) 15 | -------------------------------------------------------------------------------- /stripe/multipart_data_generator.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.multipart_data_generator package is deprecated and will become internal in the future. 8 | """, 9 | DeprecationWarning, 10 | ) 11 | 12 | if not TYPE_CHECKING: 13 | from stripe._multipart_data_generator import ( # noqa 14 | MultipartDataGenerator, 15 | ) 16 | -------------------------------------------------------------------------------- /stripe/oauth.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.oauth package is deprecated, please change your 8 | imports to import from stripe directly. 9 | From: 10 | from stripe.oauth import OAuth 11 | To: 12 | from stripe import OAuth 13 | """, 14 | DeprecationWarning, 15 | stacklevel=2, 16 | ) 17 | 18 | if not TYPE_CHECKING: 19 | from stripe._oauth import ( # noqa 20 | OAuth, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stripe/stripe-python/21bb0e0fcb0f0c1d87953b93100a16e3c0744993/stripe/py.typed -------------------------------------------------------------------------------- /stripe/radar/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.radar._early_fraud_warning import ( 4 | EarlyFraudWarning as EarlyFraudWarning, 5 | ) 6 | from stripe.radar._early_fraud_warning_service import ( 7 | EarlyFraudWarningService as EarlyFraudWarningService, 8 | ) 9 | from stripe.radar._value_list import ValueList as ValueList 10 | from stripe.radar._value_list_item import ValueListItem as ValueListItem 11 | from stripe.radar._value_list_item_service import ( 12 | ValueListItemService as ValueListItemService, 13 | ) 14 | from stripe.radar._value_list_service import ( 15 | ValueListService as ValueListService, 16 | ) 17 | -------------------------------------------------------------------------------- /stripe/reporting/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.reporting._report_run import ReportRun as ReportRun 4 | from stripe.reporting._report_run_service import ( 5 | ReportRunService as ReportRunService, 6 | ) 7 | from stripe.reporting._report_type import ReportType as ReportType 8 | from stripe.reporting._report_type_service import ( 9 | ReportTypeService as ReportTypeService, 10 | ) 11 | -------------------------------------------------------------------------------- /stripe/request_metrics.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.request_metrics package is deprecated and will become internal in the future. 8 | """, 9 | DeprecationWarning, 10 | ) 11 | 12 | if not TYPE_CHECKING: 13 | from stripe._request_metrics import ( # noqa 14 | RequestMetrics, 15 | ) 16 | -------------------------------------------------------------------------------- /stripe/request_options.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.request_options package is deprecated, please change your 8 | imports to import from stripe directly. 9 | From: 10 | from stripe.request_options import RequestOptions 11 | To: 12 | from stripe import RequestOptions 13 | """, 14 | DeprecationWarning, 15 | ) 16 | __deprecated__ = ["RequestOptions"] 17 | if not TYPE_CHECKING: 18 | from stripe._request_options import RequestOptions # noqa 19 | -------------------------------------------------------------------------------- /stripe/sigma/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.sigma._scheduled_query_run import ( 4 | ScheduledQueryRun as ScheduledQueryRun, 5 | ) 6 | from stripe.sigma._scheduled_query_run_service import ( 7 | ScheduledQueryRunService as ScheduledQueryRunService, 8 | ) 9 | -------------------------------------------------------------------------------- /stripe/stripe_object.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.stripe_object package is deprecated, please change your 8 | imports to import from stripe directly. 9 | From: 10 | from stripe.stripe_object import StripeObject 11 | To: 12 | from stripe import StripeObject 13 | """, 14 | DeprecationWarning, 15 | stacklevel=2, 16 | ) 17 | 18 | if not TYPE_CHECKING: 19 | from stripe._stripe_object import ( # noqa 20 | StripeObject, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/stripe_response.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.stripe_response package is deprecated, please change your 8 | imports to import from stripe directly. 9 | From: 10 | from stripe.stripe_response import StripeResponse 11 | To: 12 | from stripe import StripeResponse 13 | """, 14 | DeprecationWarning, 15 | ) 16 | 17 | if not TYPE_CHECKING: 18 | from stripe._stripe_response import StripeResponse # noqa: F401 19 | from stripe._stripe_response import StripeResponseBase # noqa: F401 20 | from stripe._stripe_response import StripeStreamResponse # noqa: F401 21 | -------------------------------------------------------------------------------- /stripe/terminal/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.terminal._configuration import Configuration as Configuration 4 | from stripe.terminal._configuration_service import ( 5 | ConfigurationService as ConfigurationService, 6 | ) 7 | from stripe.terminal._connection_token import ( 8 | ConnectionToken as ConnectionToken, 9 | ) 10 | from stripe.terminal._connection_token_service import ( 11 | ConnectionTokenService as ConnectionTokenService, 12 | ) 13 | from stripe.terminal._location import Location as Location 14 | from stripe.terminal._location_service import ( 15 | LocationService as LocationService, 16 | ) 17 | from stripe.terminal._reader import Reader as Reader 18 | from stripe.terminal._reader_service import ReaderService as ReaderService 19 | -------------------------------------------------------------------------------- /stripe/test_helpers/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.test_helpers import ( 4 | issuing as issuing, 5 | terminal as terminal, 6 | treasury as treasury, 7 | ) 8 | from stripe.test_helpers._confirmation_token_service import ( 9 | ConfirmationTokenService as ConfirmationTokenService, 10 | ) 11 | from stripe.test_helpers._customer_service import ( 12 | CustomerService as CustomerService, 13 | ) 14 | from stripe.test_helpers._issuing_service import ( 15 | IssuingService as IssuingService, 16 | ) 17 | from stripe.test_helpers._refund_service import RefundService as RefundService 18 | from stripe.test_helpers._terminal_service import ( 19 | TerminalService as TerminalService, 20 | ) 21 | from stripe.test_helpers._test_clock import TestClock as TestClock 22 | from stripe.test_helpers._test_clock_service import ( 23 | TestClockService as TestClockService, 24 | ) 25 | from stripe.test_helpers._treasury_service import ( 26 | TreasuryService as TreasuryService, 27 | ) 28 | -------------------------------------------------------------------------------- /stripe/test_helpers/_issuing_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.test_helpers.issuing._authorization_service import ( 5 | AuthorizationService, 6 | ) 7 | from stripe.test_helpers.issuing._card_service import CardService 8 | from stripe.test_helpers.issuing._personalization_design_service import ( 9 | PersonalizationDesignService, 10 | ) 11 | from stripe.test_helpers.issuing._transaction_service import TransactionService 12 | 13 | 14 | class IssuingService(StripeService): 15 | def __init__(self, requestor): 16 | super().__init__(requestor) 17 | self.authorizations = AuthorizationService(self._requestor) 18 | self.cards = CardService(self._requestor) 19 | self.personalization_designs = PersonalizationDesignService( 20 | self._requestor, 21 | ) 22 | self.transactions = TransactionService(self._requestor) 23 | -------------------------------------------------------------------------------- /stripe/test_helpers/_terminal_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.test_helpers.terminal._reader_service import ReaderService 5 | 6 | 7 | class TerminalService(StripeService): 8 | def __init__(self, requestor): 9 | super().__init__(requestor) 10 | self.readers = ReaderService(self._requestor) 11 | -------------------------------------------------------------------------------- /stripe/test_helpers/issuing/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.test_helpers.issuing._authorization_service import ( 4 | AuthorizationService as AuthorizationService, 5 | ) 6 | from stripe.test_helpers.issuing._card_service import ( 7 | CardService as CardService, 8 | ) 9 | from stripe.test_helpers.issuing._personalization_design_service import ( 10 | PersonalizationDesignService as PersonalizationDesignService, 11 | ) 12 | from stripe.test_helpers.issuing._transaction_service import ( 13 | TransactionService as TransactionService, 14 | ) 15 | -------------------------------------------------------------------------------- /stripe/test_helpers/terminal/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.test_helpers.terminal._reader_service import ( 4 | ReaderService as ReaderService, 5 | ) 6 | -------------------------------------------------------------------------------- /stripe/test_helpers/treasury/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.test_helpers.treasury._inbound_transfer_service import ( 4 | InboundTransferService as InboundTransferService, 5 | ) 6 | from stripe.test_helpers.treasury._outbound_payment_service import ( 7 | OutboundPaymentService as OutboundPaymentService, 8 | ) 9 | from stripe.test_helpers.treasury._outbound_transfer_service import ( 10 | OutboundTransferService as OutboundTransferService, 11 | ) 12 | from stripe.test_helpers.treasury._received_credit_service import ( 13 | ReceivedCreditService as ReceivedCreditService, 14 | ) 15 | from stripe.test_helpers.treasury._received_debit_service import ( 16 | ReceivedDebitService as ReceivedDebitService, 17 | ) 18 | -------------------------------------------------------------------------------- /stripe/util.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.util package is deprecated, please change your 8 | imports to import from stripe directly. 9 | From: 10 | from stripe.util import convert_to_stripe_object 11 | To: 12 | from stripe import convert_to_stripe_object 13 | """, 14 | DeprecationWarning, 15 | stacklevel=2, 16 | ) 17 | 18 | if not TYPE_CHECKING: 19 | from stripe._util import * # noqa 20 | -------------------------------------------------------------------------------- /stripe/v2/__init__.py: -------------------------------------------------------------------------------- 1 | from stripe.v2._list_object import ListObject as ListObject 2 | from stripe.v2._amount import Amount as Amount, AmountParam as AmountParam 3 | 4 | 5 | # The beginning of the section generated from our OpenAPI spec 6 | from stripe.v2 import billing as billing, core as core 7 | from stripe.v2._billing_service import BillingService as BillingService 8 | from stripe.v2._core_service import CoreService as CoreService 9 | from stripe.v2._event import Event as Event 10 | from stripe.v2._event_destination import EventDestination as EventDestination 11 | # The end of the section generated from our OpenAPI spec 12 | -------------------------------------------------------------------------------- /stripe/v2/_amount.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # NOT codegenned 3 | from typing_extensions import TypedDict 4 | from stripe._stripe_object import StripeObject 5 | 6 | 7 | class Amount(StripeObject): 8 | value: int 9 | currency: str 10 | 11 | 12 | class AmountParam(TypedDict): 13 | value: int 14 | currency: str 15 | -------------------------------------------------------------------------------- /stripe/v2/_billing_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.v2.billing._meter_event_adjustment_service import ( 5 | MeterEventAdjustmentService, 6 | ) 7 | from stripe.v2.billing._meter_event_service import MeterEventService 8 | from stripe.v2.billing._meter_event_session_service import ( 9 | MeterEventSessionService, 10 | ) 11 | from stripe.v2.billing._meter_event_stream_service import ( 12 | MeterEventStreamService, 13 | ) 14 | 15 | 16 | class BillingService(StripeService): 17 | def __init__(self, requestor): 18 | super().__init__(requestor) 19 | self.meter_event_session = MeterEventSessionService(self._requestor) 20 | self.meter_event_adjustments = MeterEventAdjustmentService( 21 | self._requestor, 22 | ) 23 | self.meter_event_stream = MeterEventStreamService(self._requestor) 24 | self.meter_events = MeterEventService(self._requestor) 25 | -------------------------------------------------------------------------------- /stripe/v2/_core_service.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe._stripe_service import StripeService 4 | from stripe.v2.core._event_destination_service import EventDestinationService 5 | from stripe.v2.core._event_service import EventService 6 | 7 | 8 | class CoreService(StripeService): 9 | def __init__(self, requestor): 10 | super().__init__(requestor) 11 | self.event_destinations = EventDestinationService(self._requestor) 12 | self.events = EventService(self._requestor) 13 | -------------------------------------------------------------------------------- /stripe/v2/billing/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.v2.billing._meter_event import MeterEvent as MeterEvent 4 | from stripe.v2.billing._meter_event_adjustment import ( 5 | MeterEventAdjustment as MeterEventAdjustment, 6 | ) 7 | from stripe.v2.billing._meter_event_adjustment_service import ( 8 | MeterEventAdjustmentService as MeterEventAdjustmentService, 9 | ) 10 | from stripe.v2.billing._meter_event_service import ( 11 | MeterEventService as MeterEventService, 12 | ) 13 | from stripe.v2.billing._meter_event_session import ( 14 | MeterEventSession as MeterEventSession, 15 | ) 16 | from stripe.v2.billing._meter_event_session_service import ( 17 | MeterEventSessionService as MeterEventSessionService, 18 | ) 19 | from stripe.v2.billing._meter_event_stream_service import ( 20 | MeterEventStreamService as MeterEventStreamService, 21 | ) 22 | -------------------------------------------------------------------------------- /stripe/v2/core/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # File generated from our OpenAPI spec 3 | from stripe.v2.core._event_destination_service import ( 4 | EventDestinationService as EventDestinationService, 5 | ) 6 | from stripe.v2.core._event_service import EventService as EventService 7 | -------------------------------------------------------------------------------- /stripe/version.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.version package is deprecated and will become internal in the future. 8 | Pleasse access the version via stripe.VERSION. 9 | """, 10 | DeprecationWarning, 11 | ) 12 | 13 | if not TYPE_CHECKING: 14 | from stripe._version import ( # noqa 15 | VERSION, 16 | ) 17 | -------------------------------------------------------------------------------- /stripe/webhook.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from typing_extensions import TYPE_CHECKING 3 | from warnings import warn 4 | 5 | warn( 6 | """ 7 | The stripe.webhook package is deprecated, please change your 8 | imports to import from stripe directly. 9 | From: 10 | from stripe.webhook import Webhook 11 | To: 12 | from stripe import Webhook 13 | """, 14 | DeprecationWarning, 15 | stacklevel=2, 16 | ) 17 | 18 | if not TYPE_CHECKING: 19 | from stripe._webhook import ( # noqa 20 | Webhook, 21 | WebhookSignature, 22 | ) 23 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stripe/stripe-python/21bb0e0fcb0f0c1d87953b93100a16e3c0744993/tests/__init__.py -------------------------------------------------------------------------------- /tests/api_resources/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stripe/stripe-python/21bb0e0fcb0f0c1d87953b93100a16e3c0744993/tests/api_resources/__init__.py -------------------------------------------------------------------------------- /tests/api_resources/abstract/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stripe/stripe-python/21bb0e0fcb0f0c1d87953b93100a16e3c0744993/tests/api_resources/abstract/__init__.py -------------------------------------------------------------------------------- /tests/api_resources/abstract/test_listable_api_resource.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | class TestListableAPIResource(object): 5 | class MyListable(stripe.api_resources.abstract.ListableAPIResource): 6 | OBJECT_NAME = "mylistable" 7 | 8 | def test_all(self, http_client_mock): 9 | http_client_mock.stub_request( 10 | "get", 11 | path="/v1/mylistables", 12 | rbody='{"object": "list", "data": [{"object": "charge", "name": "jose"}, {"object": "charge", "name": "curly"}], "url": "/v1/charges", "has_more": false}', 13 | rheaders={"request-id": "req_id"}, 14 | ) 15 | 16 | res = self.MyListable.list() 17 | http_client_mock.assert_requested( 18 | "get", path="/v1/mylistables", query_string="" 19 | ) 20 | assert len(res.data) == 2 21 | assert all(isinstance(obj, stripe.Charge) for obj in res.data) 22 | assert res.data[0].name == "jose" 23 | assert res.data[1].name == "curly" 24 | 25 | assert res.last_response is not None 26 | assert res.last_response.request_id == "req_id" 27 | -------------------------------------------------------------------------------- /tests/api_resources/abstract/test_singleton_api_resource.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | class TestSingletonAPIResource(object): 5 | class MySingleton(stripe.api_resources.abstract.SingletonAPIResource): 6 | OBJECT_NAME = "mysingleton" 7 | 8 | def test_retrieve(self, http_client_mock): 9 | http_client_mock.stub_request( 10 | "get", 11 | path="/v1/mysingleton", 12 | rbody='{"single": "ton"}', 13 | rheaders={"request-id": "req_id"}, 14 | ) 15 | 16 | res = self.MySingleton.retrieve() 17 | 18 | http_client_mock.assert_requested("get", path="/v1/mysingleton") 19 | assert res.single == "ton" 20 | 21 | assert res.last_response is not None 22 | assert res.last_response.request_id == "req_id" 23 | -------------------------------------------------------------------------------- /tests/api_resources/billing_portal/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stripe/stripe-python/21bb0e0fcb0f0c1d87953b93100a16e3c0744993/tests/api_resources/billing_portal/__init__.py -------------------------------------------------------------------------------- /tests/api_resources/billing_portal/test_session.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "pts_123" 5 | 6 | 7 | class TestSession(object): 8 | def test_is_creatable(self, http_client_mock): 9 | resource = stripe.billing_portal.Session.create( 10 | customer="cus_123", return_url="https://stripe.com/return" 11 | ) 12 | http_client_mock.assert_requested( 13 | "post", 14 | path="/v1/billing_portal/sessions", 15 | post_data="customer=cus_123&return_url=https://stripe.com/return", 16 | ) 17 | assert isinstance(resource, stripe.billing_portal.Session) 18 | -------------------------------------------------------------------------------- /tests/api_resources/checkout/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stripe/stripe-python/21bb0e0fcb0f0c1d87953b93100a16e3c0744993/tests/api_resources/checkout/__init__.py -------------------------------------------------------------------------------- /tests/api_resources/identity/test_verification_report.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "vs_123" 5 | 6 | 7 | class TestVerificationReport(object): 8 | def test_is_listable(self, http_client_mock): 9 | resources = stripe.identity.VerificationReport.list() 10 | http_client_mock.assert_requested( 11 | "get", path="/v1/identity/verification_reports" 12 | ) 13 | assert isinstance(resources.data, list) 14 | assert isinstance( 15 | resources.data[0], stripe.identity.VerificationReport 16 | ) 17 | 18 | def test_is_retrievable(self, http_client_mock): 19 | resource = stripe.identity.VerificationReport.retrieve( 20 | TEST_RESOURCE_ID 21 | ) 22 | http_client_mock.assert_requested( 23 | "get", 24 | path="/v1/identity/verification_reports/%s" % TEST_RESOURCE_ID, 25 | ) 26 | assert isinstance(resource, stripe.identity.VerificationReport) 27 | -------------------------------------------------------------------------------- /tests/api_resources/issuing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stripe/stripe-python/21bb0e0fcb0f0c1d87953b93100a16e3c0744993/tests/api_resources/issuing/__init__.py -------------------------------------------------------------------------------- /tests/api_resources/radar/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stripe/stripe-python/21bb0e0fcb0f0c1d87953b93100a16e3c0744993/tests/api_resources/radar/__init__.py -------------------------------------------------------------------------------- /tests/api_resources/radar/test_early_fraud_warning.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "issfr_123" 5 | 6 | 7 | class TestEarlyFraudWarning(object): 8 | def test_is_listable(self, http_client_mock): 9 | resources = stripe.radar.EarlyFraudWarning.list() 10 | http_client_mock.assert_requested( 11 | "get", path="/v1/radar/early_fraud_warnings" 12 | ) 13 | assert isinstance(resources.data, list) 14 | assert isinstance(resources.data[0], stripe.radar.EarlyFraudWarning) 15 | 16 | def test_is_retrievable(self, http_client_mock): 17 | resource = stripe.radar.EarlyFraudWarning.retrieve(TEST_RESOURCE_ID) 18 | http_client_mock.assert_requested( 19 | "get", path="/v1/radar/early_fraud_warnings/%s" % TEST_RESOURCE_ID 20 | ) 21 | assert isinstance(resource, stripe.radar.EarlyFraudWarning) 22 | -------------------------------------------------------------------------------- /tests/api_resources/reporting/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stripe/stripe-python/21bb0e0fcb0f0c1d87953b93100a16e3c0744993/tests/api_resources/reporting/__init__.py -------------------------------------------------------------------------------- /tests/api_resources/reporting/test_report_type.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "activity.summary.1" 5 | 6 | 7 | class TestReportType(object): 8 | def test_is_listable(self, http_client_mock): 9 | resources = stripe.reporting.ReportType.list() 10 | http_client_mock.assert_requested( 11 | "get", path="/v1/reporting/report_types" 12 | ) 13 | assert isinstance(resources.data, list) 14 | assert isinstance(resources.data[0], stripe.reporting.ReportType) 15 | 16 | def test_is_retrievable(self, http_client_mock): 17 | resource = stripe.reporting.ReportType.retrieve(TEST_RESOURCE_ID) 18 | http_client_mock.assert_requested( 19 | "get", path="/v1/reporting/report_types/%s" % TEST_RESOURCE_ID 20 | ) 21 | assert isinstance(resource, stripe.reporting.ReportType) 22 | -------------------------------------------------------------------------------- /tests/api_resources/sigma/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stripe/stripe-python/21bb0e0fcb0f0c1d87953b93100a16e3c0744993/tests/api_resources/sigma/__init__.py -------------------------------------------------------------------------------- /tests/api_resources/sigma/test_scheduled_query_run.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "sqr_123" 5 | 6 | 7 | class TestTransaction(object): 8 | def test_is_listable(self, http_client_mock): 9 | resources = stripe.sigma.ScheduledQueryRun.list() 10 | http_client_mock.assert_requested( 11 | "get", path="/v1/sigma/scheduled_query_runs" 12 | ) 13 | assert isinstance(resources.data, list) 14 | assert isinstance(resources.data[0], stripe.sigma.ScheduledQueryRun) 15 | 16 | def test_is_retrievable(self, http_client_mock): 17 | resource = stripe.sigma.ScheduledQueryRun.retrieve(TEST_RESOURCE_ID) 18 | http_client_mock.assert_requested( 19 | "get", path="/v1/sigma/scheduled_query_runs/%s" % TEST_RESOURCE_ID 20 | ) 21 | assert isinstance(resource, stripe.sigma.ScheduledQueryRun) 22 | -------------------------------------------------------------------------------- /tests/api_resources/terminal/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stripe/stripe-python/21bb0e0fcb0f0c1d87953b93100a16e3c0744993/tests/api_resources/terminal/__init__.py -------------------------------------------------------------------------------- /tests/api_resources/terminal/test_connection_token.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "rdr_123" 5 | 6 | 7 | class TestConnectionToken(object): 8 | def test_is_creatable(self, http_client_mock): 9 | resource = stripe.terminal.ConnectionToken.create() 10 | http_client_mock.assert_requested( 11 | "post", path="/v1/terminal/connection_tokens", post_data="" 12 | ) 13 | assert isinstance(resource, stripe.terminal.ConnectionToken) 14 | -------------------------------------------------------------------------------- /tests/api_resources/test_account_link.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | class TestAccountLink(object): 5 | def test_is_creatable(self, http_client_mock): 6 | resource = stripe.AccountLink.create( 7 | account="acct_123", 8 | refresh_url="https://stripe.com/failure", 9 | return_url="https://stripe.com/success", 10 | type="account_onboarding", 11 | ) 12 | http_client_mock.assert_requested("post", path="/v1/account_links") 13 | assert isinstance(resource, stripe.AccountLink) 14 | -------------------------------------------------------------------------------- /tests/api_resources/test_balance.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | class TestBalance(object): 5 | def test_is_retrievable(self, http_client_mock): 6 | resource = stripe.Balance.retrieve() 7 | http_client_mock.assert_requested("get", path="/v1/balance") 8 | assert isinstance(resource, stripe.Balance) 9 | -------------------------------------------------------------------------------- /tests/api_resources/test_balance_transaction.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "txn_123" 5 | 6 | 7 | class TestBalanceTransaction(object): 8 | def test_is_listable(self, http_client_mock): 9 | resources = stripe.BalanceTransaction.list() 10 | http_client_mock.assert_requested( 11 | "get", path="/v1/balance_transactions" 12 | ) 13 | assert isinstance(resources.data, list) 14 | assert isinstance(resources.data[0], stripe.BalanceTransaction) 15 | 16 | def test_is_retrievable(self, http_client_mock): 17 | resource = stripe.BalanceTransaction.retrieve(TEST_RESOURCE_ID) 18 | http_client_mock.assert_requested( 19 | "get", path="/v1/balance_transactions/%s" % TEST_RESOURCE_ID 20 | ) 21 | assert isinstance(resource, stripe.BalanceTransaction) 22 | -------------------------------------------------------------------------------- /tests/api_resources/test_country_spec.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "US" 5 | 6 | 7 | class TestCountrySpec(object): 8 | def test_is_listable(self, http_client_mock): 9 | resources = stripe.CountrySpec.list() 10 | http_client_mock.assert_requested("get", path="/v1/country_specs") 11 | assert isinstance(resources.data, list) 12 | assert isinstance(resources.data[0], stripe.CountrySpec) 13 | 14 | def test_is_retrievable(self, http_client_mock): 15 | resource = stripe.CountrySpec.retrieve(TEST_RESOURCE_ID) 16 | http_client_mock.assert_requested( 17 | "get", path="/v1/country_specs/%s" % TEST_RESOURCE_ID 18 | ) 19 | assert isinstance(resource, stripe.CountrySpec) 20 | -------------------------------------------------------------------------------- /tests/api_resources/test_customer_balance_transaction.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | 3 | import stripe 4 | 5 | 6 | TEST_RESOURCE_ID = "cbtxn_123" 7 | 8 | 9 | class TestCustomerBalanceTransaction(object): 10 | def construct_resource(self): 11 | tax_id_dict = { 12 | "id": TEST_RESOURCE_ID, 13 | "object": "customer_balance_transaction", 14 | "customer": "cus_123", 15 | } 16 | return stripe.CustomerBalanceTransaction.construct_from( 17 | tax_id_dict, stripe.api_key 18 | ) 19 | 20 | def test_has_instance_url(self): 21 | resource = self.construct_resource() 22 | assert ( 23 | resource.instance_url() 24 | == "/v1/customers/cus_123/balance_transactions/%s" 25 | % TEST_RESOURCE_ID 26 | ) 27 | 28 | def test_is_not_retrievable(self): 29 | with pytest.raises(NotImplementedError): 30 | stripe.CustomerBalanceTransaction.retrieve(TEST_RESOURCE_ID) 31 | -------------------------------------------------------------------------------- /tests/api_resources/test_event.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "evt_123" 5 | 6 | 7 | class TestEvent(object): 8 | def test_is_listable(self, http_client_mock): 9 | resources = stripe.Event.list() 10 | http_client_mock.assert_requested("get", path="/v1/events") 11 | assert isinstance(resources.data, list) 12 | assert isinstance(resources.data[0], stripe.Event) 13 | 14 | def test_is_retrievable(self, http_client_mock): 15 | resource = stripe.Event.retrieve(TEST_RESOURCE_ID) 16 | http_client_mock.assert_requested( 17 | "get", path="/v1/events/%s" % TEST_RESOURCE_ID 18 | ) 19 | assert isinstance(resource, stripe.Event) 20 | -------------------------------------------------------------------------------- /tests/api_resources/test_exchange_rate.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "usd" 5 | 6 | 7 | class TestExchangeRate(object): 8 | def test_is_listable(self, http_client_mock): 9 | resources = stripe.ExchangeRate.list() 10 | http_client_mock.assert_requested("get", path="/v1/exchange_rates") 11 | assert isinstance(resources.data, list) 12 | assert isinstance(resources.data[0], stripe.ExchangeRate) 13 | 14 | def test_is_retrievable(self, http_client_mock): 15 | resource = stripe.ExchangeRate.retrieve(TEST_RESOURCE_ID) 16 | http_client_mock.assert_requested( 17 | "get", path="/v1/exchange_rates/%s" % TEST_RESOURCE_ID 18 | ) 19 | assert isinstance(resource, stripe.ExchangeRate) 20 | -------------------------------------------------------------------------------- /tests/api_resources/test_invoice_line_item.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_INVOICE_ID = "in_123" 5 | 6 | 7 | class TestInvoiceLineItem(object): 8 | def test_deserialize(self): 9 | invoice = stripe.Invoice.retrieve(TEST_INVOICE_ID) 10 | assert isinstance(invoice.lines.data, list) 11 | assert isinstance(invoice.lines.data[0], stripe.InvoiceLineItem) 12 | -------------------------------------------------------------------------------- /tests/api_resources/test_mandate.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "mandate_123" 5 | 6 | 7 | class TestMandateSchedule(object): 8 | def test_is_retrievable(self, http_client_mock): 9 | resource = stripe.Mandate.retrieve(TEST_RESOURCE_ID) 10 | http_client_mock.assert_requested( 11 | "get", path="/v1/mandates/%s" % TEST_RESOURCE_ID 12 | ) 13 | assert isinstance(resource, stripe.Mandate) 14 | -------------------------------------------------------------------------------- /tests/api_resources/test_setup_attempt.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | class TestSetupAttempt(object): 5 | def test_is_listable(self, http_client_mock): 6 | resources = stripe.SetupAttempt.list(setup_intent="seti_123") 7 | http_client_mock.assert_requested( 8 | "get", 9 | path="/v1/setup_attempts", 10 | query_string="setup_intent=seti_123", 11 | ) 12 | assert isinstance(resources.data, list) 13 | assert isinstance(resources.data[0], stripe.SetupAttempt) 14 | -------------------------------------------------------------------------------- /tests/api_resources/test_source_transaction.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | class TestSourceTransaction(object): 5 | def test_is_listable(self, http_client_mock): 6 | source = stripe.Source.construct_from( 7 | {"id": "src_123", "object": "source"}, stripe.api_key 8 | ) 9 | source_transactions = source.list_source_transactions() 10 | http_client_mock.assert_requested( 11 | "get", path="/v1/sources/src_123/source_transactions" 12 | ) 13 | assert isinstance(source_transactions.data, list) 14 | assert isinstance( 15 | source_transactions.data[0], stripe.SourceTransaction 16 | ) 17 | -------------------------------------------------------------------------------- /tests/api_resources/test_tax_code.py: -------------------------------------------------------------------------------- 1 | import stripe 2 | 3 | 4 | TEST_RESOURCE_ID = "txcd_123" 5 | 6 | 7 | class TestTaxCode(object): 8 | def test_is_listable(self, http_client_mock): 9 | resources = stripe.TaxCode.list() 10 | http_client_mock.assert_requested("get", path="/v1/tax_codes") 11 | assert isinstance(resources.data, list) 12 | assert isinstance(resources.data[0], stripe.TaxCode) 13 | 14 | def test_is_retrievable(self, http_client_mock): 15 | resource = stripe.TaxCode.retrieve(TEST_RESOURCE_ID) 16 | http_client_mock.assert_requested( 17 | "get", path="/v1/tax_codes/%s" % TEST_RESOURCE_ID 18 | ) 19 | assert isinstance(resource, stripe.TaxCode) 20 | -------------------------------------------------------------------------------- /tests/openapi/README.md: -------------------------------------------------------------------------------- 1 | ## Using custom OpenAPI specification and fixtures files 2 | 3 | You can place custom OpenAPI specification and fixtures files in this 4 | directory. The files must be in JSON format, and must be named `spec3.json` 5 | and `fixtures3.json` respectively. 6 | 7 | If those files are present, the test suite will start its own stripe-mock 8 | process on a random available port. In order for this to work, `stripe-mock` 9 | must be on the `PATH` in the environment used to run the test suite. 10 | -------------------------------------------------------------------------------- /tests/test_oauth_error.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | 4 | from stripe import oauth_error 5 | 6 | 7 | class TestOAuthError(object): 8 | def test_error_object(self): 9 | err = oauth_error.OAuthError( 10 | "message", "description", json_body={"error": "some_oauth_error"} 11 | ) 12 | assert err.error is not None 13 | assert err.error.error == "some_oauth_error" 14 | --------------------------------------------------------------------------------