dodopayments 1.43.1__tar.gz → 1.47.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dodopayments might be problematic. Click here for more details.
- dodopayments-1.47.0/.release-please-manifest.json +3 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/CHANGELOG.md +24 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/PKG-INFO +1 -1
- {dodopayments-1.43.1 → dodopayments-1.47.0}/api.md +42 -6
- {dodopayments-1.43.1 → dodopayments-1.47.0}/pyproject.toml +2 -2
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_base_client.py +4 -1
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_client.py +20 -9
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_files.py +4 -4
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_version.py +1 -1
- dodopayments-1.47.0/src/dodopayments/pagination.py +107 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/__init__.py +27 -13
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/discounts.py +24 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/products/products.py +17 -1
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/subscriptions.py +4 -6
- dodopayments-1.47.0/src/dodopayments/resources/webhooks/__init__.py +33 -0
- dodopayments-1.47.0/src/dodopayments/resources/webhooks/headers.py +255 -0
- dodopayments-1.47.0/src/dodopayments/resources/webhooks/webhooks.py +676 -0
- dodopayments-1.47.0/src/dodopayments/resources/your_webhook_url.py +224 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/__init__.py +17 -3
- dodopayments-1.47.0/src/dodopayments/types/addon_cart_response_item_param.py +13 -0
- dodopayments-1.47.0/src/dodopayments/types/customer_limited_details_param.py +18 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/customer_request_param.py +2 -2
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/discount.py +7 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/discount_create_params.py +7 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/discount_update_params.py +7 -0
- dodopayments-1.47.0/src/dodopayments/types/dispute_param.py +45 -0
- dodopayments-1.47.0/src/dodopayments/types/get_dispute_param.py +52 -0
- dodopayments-1.47.0/src/dodopayments/types/license_key_param.py +53 -0
- dodopayments-1.47.0/src/dodopayments/types/new_customer_param.py +16 -0
- dodopayments-1.47.0/src/dodopayments/types/payment_param.py +131 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/product.py +4 -1
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/product_create_params.py +4 -1
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/product_list_response.py +4 -1
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/product_update_params.py +4 -1
- dodopayments-1.47.0/src/dodopayments/types/refund_param.py +42 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/subscription.py +3 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/subscription_change_plan_params.py +1 -1
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/subscription_list_params.py +1 -1
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/subscription_list_response.py +3 -0
- dodopayments-1.47.0/src/dodopayments/types/subscription_param.py +97 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/subscription_status.py +1 -1
- dodopayments-1.47.0/src/dodopayments/types/webhook_create_params.py +40 -0
- dodopayments-1.47.0/src/dodopayments/types/webhook_create_response.py +42 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/webhook_event_type.py +0 -1
- dodopayments-1.47.0/src/dodopayments/types/webhook_list_params.py +16 -0
- dodopayments-1.47.0/src/dodopayments/types/webhook_list_response.py +42 -0
- dodopayments-1.47.0/src/dodopayments/types/webhook_retrieve_response.py +42 -0
- dodopayments-1.47.0/src/dodopayments/types/webhook_update_params.py +33 -0
- dodopayments-1.47.0/src/dodopayments/types/webhook_update_response.py +42 -0
- dodopayments-1.47.0/src/dodopayments/types/webhooks/__init__.py +6 -0
- dodopayments-1.47.0/src/dodopayments/types/webhooks/header_retrieve_response.py +15 -0
- dodopayments-1.47.0/src/dodopayments/types/webhooks/header_update_params.py +13 -0
- dodopayments-1.47.0/src/dodopayments/types/your_webhook_url_create_params.py +66 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_discounts.py +4 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_products.py +4 -0
- dodopayments-1.47.0/tests/api_resources/test_webhooks.py +440 -0
- dodopayments-1.47.0/tests/api_resources/test_your_webhook_url.py +397 -0
- dodopayments-1.47.0/tests/api_resources/webhooks/__init__.py +1 -0
- dodopayments-1.47.0/tests/api_resources/webhooks/test_headers.py +184 -0
- dodopayments-1.43.1/.release-please-manifest.json +0 -3
- dodopayments-1.43.1/src/dodopayments/pagination.py +0 -44
- dodopayments-1.43.1/src/dodopayments/resources/webhook_events.py +0 -326
- dodopayments-1.43.1/src/dodopayments/types/create_new_customer_param.py +0 -23
- dodopayments-1.43.1/src/dodopayments/types/webhook_event.py +0 -26
- dodopayments-1.43.1/src/dodopayments/types/webhook_event_list_params.py +0 -39
- dodopayments-1.43.1/tests/api_resources/test_webhook_events.py +0 -192
- {dodopayments-1.43.1 → dodopayments-1.47.0}/.gitignore +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/CONTRIBUTING.md +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/LICENSE +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/README.md +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/SECURITY.md +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/bin/check-release-environment +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/bin/publish-pypi +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/examples/.keep +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/mypy.ini +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/noxfile.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/release-please-config.json +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/requirements-dev.lock +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/requirements.lock +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodo_payments/lib/.keep +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_compat.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_constants.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_exceptions.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_models.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_qs.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_resource.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_streaming.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_types.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_utils/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_utils/_logs.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_utils/_proxy.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_utils/_reflection.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_utils/_resources_proxy.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_utils/_streams.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_utils/_sync.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_utils/_transform.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_utils/_typing.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/_utils/_utils.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/lib/.keep +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/py.typed +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/addons.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/brands.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/customers/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/customers/customer_portal.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/customers/customers.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/disputes.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/invoices/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/invoices/invoices.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/invoices/payments.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/license_key_instances.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/license_keys.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/licenses.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/misc.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/payments.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/payouts.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/products/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/products/images.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/resources/refunds.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/addon_cart_response_item.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/addon_create_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/addon_list_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/addon_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/addon_update_images_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/addon_update_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/attach_addon_param.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/attach_existing_customer_param.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/billing_address.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/billing_address_param.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/brand.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/brand_create_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/brand_list_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/brand_update_images_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/brand_update_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/country_code.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/currency.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/customer.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/customer_create_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/customer_limited_details.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/customer_list_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/customer_portal_session.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/customer_update_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/customers/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/customers/customer_portal_create_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/discount_list_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/discount_type.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/dispute.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/dispute_list_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/dispute_list_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/dispute_stage.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/dispute_status.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/get_dispute.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/intent_status.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/invoices/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_activate_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_deactivate_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_key.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_key_duration.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_key_duration_param.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_key_instance.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_key_instance_list_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_key_instance_update_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_key_list_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_key_status.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_key_update_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_validate_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/license_validate_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/misc_list_supported_countries_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/one_time_product_cart_item.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/one_time_product_cart_item_param.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/payment.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/payment_create_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/payment_create_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/payment_list_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/payment_list_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/payment_method_types.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/payment_retrieve_line_items_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/payout_list_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/payout_list_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/price.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/price_param.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/product_list_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/product_update_files_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/product_update_files_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/products/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/products/image_update_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/products/image_update_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/refund.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/refund_create_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/refund_list_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/refund_status.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/subscription_charge_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/subscription_charge_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/subscription_create_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/subscription_create_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/subscription_update_params.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/tax_category.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/src/dodopayments/types/time_interval.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/customers/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/customers/test_customer_portal.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/invoices/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/invoices/test_payments.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/products/__init__.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/products/test_images.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_addons.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_brands.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_customers.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_disputes.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_license_key_instances.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_license_keys.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_licenses.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_misc.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_payments.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_payouts.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_refunds.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/api_resources/test_subscriptions.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/conftest.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/sample_file.txt +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_client.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_deepcopy.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_extract_files.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_files.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_models.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_qs.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_required_args.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_response.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_streaming.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_transform.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_utils/test_proxy.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/test_utils/test_typing.py +0 -0
- {dodopayments-1.43.1 → dodopayments-1.47.0}/tests/utils.py +0 -0
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.47.0 (2025-08-11)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.44.0...v1.47.0](https://github.com/dodopayments/dodopayments-python/compare/v1.44.0...v1.47.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** updated openapi spec to 1.47.0 ([afc16dd](https://github.com/dodopayments/dodopayments-python/commit/afc16dd0b858b3a7e91287156733fa6b7c4e4572))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Chores
|
|
13
|
+
|
|
14
|
+
* **internal:** fix ruff target version ([0f496bc](https://github.com/dodopayments/dodopayments-python/commit/0f496bcc9fb01e3ed5568b58d536fefd1e333df7))
|
|
15
|
+
* **internal:** update comment in script ([d40fb67](https://github.com/dodopayments/dodopayments-python/commit/d40fb67d7fa0bea2455969835debcbbb8aa2ab73))
|
|
16
|
+
* update @stainless-api/prism-cli to v5.15.0 ([772b0ca](https://github.com/dodopayments/dodopayments-python/commit/772b0cae7a82a93f2d8e6f45b83ebca6941bd93d))
|
|
17
|
+
|
|
18
|
+
## 1.44.0 (2025-08-02)
|
|
19
|
+
|
|
20
|
+
Full Changelog: [v1.43.1...v1.44.0](https://github.com/dodopayments/dodopayments-python/compare/v1.43.1...v1.44.0)
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **api:** updated openapi spec to 1.44.0 ([fad1533](https://github.com/dodopayments/dodopayments-python/commit/fad1533668d7cf2d3bda6b0d40a01f85c244723f))
|
|
25
|
+
* **client:** support file upload requests ([4ebfcb1](https://github.com/dodopayments/dodopayments-python/commit/4ebfcb160f5ecb4c8f86e46d5767395344614165))
|
|
26
|
+
|
|
3
27
|
## 1.43.1 (2025-07-25)
|
|
4
28
|
|
|
5
29
|
Full Changelog: [v1.43.0...v1.43.1](https://github.com/dodopayments/dodopayments-python/compare/v1.43.0...v1.43.1)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: dodopayments
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.47.0
|
|
4
4
|
Summary: The official Python library for the Dodo Payments API
|
|
5
5
|
Project-URL: Homepage, https://github.com/dodopayments/dodopayments-python
|
|
6
6
|
Project-URL: Repository, https://github.com/dodopayments/dodopayments-python
|
|
@@ -10,6 +10,7 @@ from dodopayments.types import (
|
|
|
10
10
|
CustomerLimitedDetails,
|
|
11
11
|
CustomerRequest,
|
|
12
12
|
IntentStatus,
|
|
13
|
+
NewCustomer,
|
|
13
14
|
OneTimeProductCartItem,
|
|
14
15
|
Payment,
|
|
15
16
|
PaymentMethodTypes,
|
|
@@ -167,14 +168,9 @@ Methods:
|
|
|
167
168
|
Types:
|
|
168
169
|
|
|
169
170
|
```python
|
|
170
|
-
from dodopayments.types import
|
|
171
|
+
from dodopayments.types import WebhookEventType, WebhookPayload
|
|
171
172
|
```
|
|
172
173
|
|
|
173
|
-
Methods:
|
|
174
|
-
|
|
175
|
-
- <code title="get /webhook_events/{webhook_event_id}">client.webhook_events.<a href="./src/dodopayments/resources/webhook_events.py">retrieve</a>(webhook_event_id) -> <a href="./src/dodopayments/types/webhook_event.py">WebhookEvent</a></code>
|
|
176
|
-
- <code title="get /webhook_events">client.webhook_events.<a href="./src/dodopayments/resources/webhook_events.py">list</a>(\*\*<a href="src/dodopayments/types/webhook_event_list_params.py">params</a>) -> <a href="./src/dodopayments/types/webhook_event.py">SyncDefaultPageNumberPagination[WebhookEvent]</a></code>
|
|
177
|
-
|
|
178
174
|
# Products
|
|
179
175
|
|
|
180
176
|
Types:
|
|
@@ -275,3 +271,43 @@ Methods:
|
|
|
275
271
|
- <code title="patch /brands/{id}">client.brands.<a href="./src/dodopayments/resources/brands.py">update</a>(id, \*\*<a href="src/dodopayments/types/brand_update_params.py">params</a>) -> <a href="./src/dodopayments/types/brand.py">Brand</a></code>
|
|
276
272
|
- <code title="get /brands">client.brands.<a href="./src/dodopayments/resources/brands.py">list</a>() -> <a href="./src/dodopayments/types/brand_list_response.py">BrandListResponse</a></code>
|
|
277
273
|
- <code title="put /brands/{id}/images">client.brands.<a href="./src/dodopayments/resources/brands.py">update_images</a>(id) -> <a href="./src/dodopayments/types/brand_update_images_response.py">BrandUpdateImagesResponse</a></code>
|
|
274
|
+
|
|
275
|
+
# Webhooks
|
|
276
|
+
|
|
277
|
+
Types:
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
from dodopayments.types import (
|
|
281
|
+
WebhookCreateResponse,
|
|
282
|
+
WebhookRetrieveResponse,
|
|
283
|
+
WebhookUpdateResponse,
|
|
284
|
+
WebhookListResponse,
|
|
285
|
+
)
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Methods:
|
|
289
|
+
|
|
290
|
+
- <code title="post /webhooks">client.webhooks.<a href="./src/dodopayments/resources/webhooks/webhooks.py">create</a>(\*\*<a href="src/dodopayments/types/webhook_create_params.py">params</a>) -> <a href="./src/dodopayments/types/webhook_create_response.py">WebhookCreateResponse</a></code>
|
|
291
|
+
- <code title="get /webhooks/{webhook_id}">client.webhooks.<a href="./src/dodopayments/resources/webhooks/webhooks.py">retrieve</a>(webhook_id) -> <a href="./src/dodopayments/types/webhook_retrieve_response.py">WebhookRetrieveResponse</a></code>
|
|
292
|
+
- <code title="patch /webhooks/{webhook_id}">client.webhooks.<a href="./src/dodopayments/resources/webhooks/webhooks.py">update</a>(webhook_id, \*\*<a href="src/dodopayments/types/webhook_update_params.py">params</a>) -> <a href="./src/dodopayments/types/webhook_update_response.py">WebhookUpdateResponse</a></code>
|
|
293
|
+
- <code title="get /webhooks">client.webhooks.<a href="./src/dodopayments/resources/webhooks/webhooks.py">list</a>(\*\*<a href="src/dodopayments/types/webhook_list_params.py">params</a>) -> <a href="./src/dodopayments/types/webhook_list_response.py">SyncCursorPagePagination[WebhookListResponse]</a></code>
|
|
294
|
+
- <code title="delete /webhooks/{webhook_id}">client.webhooks.<a href="./src/dodopayments/resources/webhooks/webhooks.py">delete</a>(webhook_id) -> None</code>
|
|
295
|
+
|
|
296
|
+
## Headers
|
|
297
|
+
|
|
298
|
+
Types:
|
|
299
|
+
|
|
300
|
+
```python
|
|
301
|
+
from dodopayments.types.webhooks import HeaderRetrieveResponse
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Methods:
|
|
305
|
+
|
|
306
|
+
- <code title="get /webhooks/{webhook_id}/headers">client.webhooks.headers.<a href="./src/dodopayments/resources/webhooks/headers.py">retrieve</a>(webhook_id) -> <a href="./src/dodopayments/types/webhooks/header_retrieve_response.py">HeaderRetrieveResponse</a></code>
|
|
307
|
+
- <code title="patch /webhooks/{webhook_id}/headers">client.webhooks.headers.<a href="./src/dodopayments/resources/webhooks/headers.py">update</a>(webhook_id, \*\*<a href="src/dodopayments/types/webhooks/header_update_params.py">params</a>) -> None</code>
|
|
308
|
+
|
|
309
|
+
# YourWebhookURL
|
|
310
|
+
|
|
311
|
+
Methods:
|
|
312
|
+
|
|
313
|
+
- <code title="post /your-webhook-url">client.your_webhook_url.<a href="./src/dodopayments/resources/your_webhook_url.py">create</a>(\*\*<a href="src/dodopayments/types/your_webhook_url_create_params.py">params</a>) -> None</code>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dodopayments"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.47.0"
|
|
4
4
|
description = "The official Python library for the Dodo Payments API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
@@ -159,7 +159,7 @@ reportPrivateUsage = false
|
|
|
159
159
|
[tool.ruff]
|
|
160
160
|
line-length = 120
|
|
161
161
|
output-format = "grouped"
|
|
162
|
-
target-version = "
|
|
162
|
+
target-version = "py38"
|
|
163
163
|
|
|
164
164
|
[tool.ruff.format]
|
|
165
165
|
docstring-code-format = true
|
|
@@ -532,7 +532,10 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
532
532
|
is_body_allowed = options.method.lower() != "get"
|
|
533
533
|
|
|
534
534
|
if is_body_allowed:
|
|
535
|
-
|
|
535
|
+
if isinstance(json_data, bytes):
|
|
536
|
+
kwargs["content"] = json_data
|
|
537
|
+
else:
|
|
538
|
+
kwargs["json"] = json_data if is_given(json_data) else None
|
|
536
539
|
kwargs["files"] = files
|
|
537
540
|
else:
|
|
538
541
|
headers.pop("Content-Type", None)
|
|
@@ -33,7 +33,7 @@ from .resources import (
|
|
|
33
33
|
discounts,
|
|
34
34
|
license_keys,
|
|
35
35
|
subscriptions,
|
|
36
|
-
|
|
36
|
+
your_webhook_url,
|
|
37
37
|
license_key_instances,
|
|
38
38
|
)
|
|
39
39
|
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
|
@@ -45,6 +45,7 @@ from ._base_client import (
|
|
|
45
45
|
)
|
|
46
46
|
from .resources.invoices import invoices
|
|
47
47
|
from .resources.products import products
|
|
48
|
+
from .resources.webhooks import webhooks
|
|
48
49
|
from .resources.customers import customers
|
|
49
50
|
|
|
50
51
|
__all__ = [
|
|
@@ -76,12 +77,13 @@ class DodoPayments(SyncAPIClient):
|
|
|
76
77
|
refunds: refunds.RefundsResource
|
|
77
78
|
disputes: disputes.DisputesResource
|
|
78
79
|
payouts: payouts.PayoutsResource
|
|
79
|
-
webhook_events: webhook_events.WebhookEventsResource
|
|
80
80
|
products: products.ProductsResource
|
|
81
81
|
misc: misc.MiscResource
|
|
82
82
|
discounts: discounts.DiscountsResource
|
|
83
83
|
addons: addons.AddonsResource
|
|
84
84
|
brands: brands.BrandsResource
|
|
85
|
+
webhooks: webhooks.WebhooksResource
|
|
86
|
+
your_webhook_url: your_webhook_url.YourWebhookURLResource
|
|
85
87
|
with_raw_response: DodoPaymentsWithRawResponse
|
|
86
88
|
with_streaming_response: DodoPaymentsWithStreamedResponse
|
|
87
89
|
|
|
@@ -173,12 +175,13 @@ class DodoPayments(SyncAPIClient):
|
|
|
173
175
|
self.refunds = refunds.RefundsResource(self)
|
|
174
176
|
self.disputes = disputes.DisputesResource(self)
|
|
175
177
|
self.payouts = payouts.PayoutsResource(self)
|
|
176
|
-
self.webhook_events = webhook_events.WebhookEventsResource(self)
|
|
177
178
|
self.products = products.ProductsResource(self)
|
|
178
179
|
self.misc = misc.MiscResource(self)
|
|
179
180
|
self.discounts = discounts.DiscountsResource(self)
|
|
180
181
|
self.addons = addons.AddonsResource(self)
|
|
181
182
|
self.brands = brands.BrandsResource(self)
|
|
183
|
+
self.webhooks = webhooks.WebhooksResource(self)
|
|
184
|
+
self.your_webhook_url = your_webhook_url.YourWebhookURLResource(self)
|
|
182
185
|
self.with_raw_response = DodoPaymentsWithRawResponse(self)
|
|
183
186
|
self.with_streaming_response = DodoPaymentsWithStreamedResponse(self)
|
|
184
187
|
|
|
@@ -300,12 +303,13 @@ class AsyncDodoPayments(AsyncAPIClient):
|
|
|
300
303
|
refunds: refunds.AsyncRefundsResource
|
|
301
304
|
disputes: disputes.AsyncDisputesResource
|
|
302
305
|
payouts: payouts.AsyncPayoutsResource
|
|
303
|
-
webhook_events: webhook_events.AsyncWebhookEventsResource
|
|
304
306
|
products: products.AsyncProductsResource
|
|
305
307
|
misc: misc.AsyncMiscResource
|
|
306
308
|
discounts: discounts.AsyncDiscountsResource
|
|
307
309
|
addons: addons.AsyncAddonsResource
|
|
308
310
|
brands: brands.AsyncBrandsResource
|
|
311
|
+
webhooks: webhooks.AsyncWebhooksResource
|
|
312
|
+
your_webhook_url: your_webhook_url.AsyncYourWebhookURLResource
|
|
309
313
|
with_raw_response: AsyncDodoPaymentsWithRawResponse
|
|
310
314
|
with_streaming_response: AsyncDodoPaymentsWithStreamedResponse
|
|
311
315
|
|
|
@@ -397,12 +401,13 @@ class AsyncDodoPayments(AsyncAPIClient):
|
|
|
397
401
|
self.refunds = refunds.AsyncRefundsResource(self)
|
|
398
402
|
self.disputes = disputes.AsyncDisputesResource(self)
|
|
399
403
|
self.payouts = payouts.AsyncPayoutsResource(self)
|
|
400
|
-
self.webhook_events = webhook_events.AsyncWebhookEventsResource(self)
|
|
401
404
|
self.products = products.AsyncProductsResource(self)
|
|
402
405
|
self.misc = misc.AsyncMiscResource(self)
|
|
403
406
|
self.discounts = discounts.AsyncDiscountsResource(self)
|
|
404
407
|
self.addons = addons.AsyncAddonsResource(self)
|
|
405
408
|
self.brands = brands.AsyncBrandsResource(self)
|
|
409
|
+
self.webhooks = webhooks.AsyncWebhooksResource(self)
|
|
410
|
+
self.your_webhook_url = your_webhook_url.AsyncYourWebhookURLResource(self)
|
|
406
411
|
self.with_raw_response = AsyncDodoPaymentsWithRawResponse(self)
|
|
407
412
|
self.with_streaming_response = AsyncDodoPaymentsWithStreamedResponse(self)
|
|
408
413
|
|
|
@@ -527,12 +532,13 @@ class DodoPaymentsWithRawResponse:
|
|
|
527
532
|
self.refunds = refunds.RefundsResourceWithRawResponse(client.refunds)
|
|
528
533
|
self.disputes = disputes.DisputesResourceWithRawResponse(client.disputes)
|
|
529
534
|
self.payouts = payouts.PayoutsResourceWithRawResponse(client.payouts)
|
|
530
|
-
self.webhook_events = webhook_events.WebhookEventsResourceWithRawResponse(client.webhook_events)
|
|
531
535
|
self.products = products.ProductsResourceWithRawResponse(client.products)
|
|
532
536
|
self.misc = misc.MiscResourceWithRawResponse(client.misc)
|
|
533
537
|
self.discounts = discounts.DiscountsResourceWithRawResponse(client.discounts)
|
|
534
538
|
self.addons = addons.AddonsResourceWithRawResponse(client.addons)
|
|
535
539
|
self.brands = brands.BrandsResourceWithRawResponse(client.brands)
|
|
540
|
+
self.webhooks = webhooks.WebhooksResourceWithRawResponse(client.webhooks)
|
|
541
|
+
self.your_webhook_url = your_webhook_url.YourWebhookURLResourceWithRawResponse(client.your_webhook_url)
|
|
536
542
|
|
|
537
543
|
|
|
538
544
|
class AsyncDodoPaymentsWithRawResponse:
|
|
@@ -549,12 +555,13 @@ class AsyncDodoPaymentsWithRawResponse:
|
|
|
549
555
|
self.refunds = refunds.AsyncRefundsResourceWithRawResponse(client.refunds)
|
|
550
556
|
self.disputes = disputes.AsyncDisputesResourceWithRawResponse(client.disputes)
|
|
551
557
|
self.payouts = payouts.AsyncPayoutsResourceWithRawResponse(client.payouts)
|
|
552
|
-
self.webhook_events = webhook_events.AsyncWebhookEventsResourceWithRawResponse(client.webhook_events)
|
|
553
558
|
self.products = products.AsyncProductsResourceWithRawResponse(client.products)
|
|
554
559
|
self.misc = misc.AsyncMiscResourceWithRawResponse(client.misc)
|
|
555
560
|
self.discounts = discounts.AsyncDiscountsResourceWithRawResponse(client.discounts)
|
|
556
561
|
self.addons = addons.AsyncAddonsResourceWithRawResponse(client.addons)
|
|
557
562
|
self.brands = brands.AsyncBrandsResourceWithRawResponse(client.brands)
|
|
563
|
+
self.webhooks = webhooks.AsyncWebhooksResourceWithRawResponse(client.webhooks)
|
|
564
|
+
self.your_webhook_url = your_webhook_url.AsyncYourWebhookURLResourceWithRawResponse(client.your_webhook_url)
|
|
558
565
|
|
|
559
566
|
|
|
560
567
|
class DodoPaymentsWithStreamedResponse:
|
|
@@ -571,12 +578,13 @@ class DodoPaymentsWithStreamedResponse:
|
|
|
571
578
|
self.refunds = refunds.RefundsResourceWithStreamingResponse(client.refunds)
|
|
572
579
|
self.disputes = disputes.DisputesResourceWithStreamingResponse(client.disputes)
|
|
573
580
|
self.payouts = payouts.PayoutsResourceWithStreamingResponse(client.payouts)
|
|
574
|
-
self.webhook_events = webhook_events.WebhookEventsResourceWithStreamingResponse(client.webhook_events)
|
|
575
581
|
self.products = products.ProductsResourceWithStreamingResponse(client.products)
|
|
576
582
|
self.misc = misc.MiscResourceWithStreamingResponse(client.misc)
|
|
577
583
|
self.discounts = discounts.DiscountsResourceWithStreamingResponse(client.discounts)
|
|
578
584
|
self.addons = addons.AddonsResourceWithStreamingResponse(client.addons)
|
|
579
585
|
self.brands = brands.BrandsResourceWithStreamingResponse(client.brands)
|
|
586
|
+
self.webhooks = webhooks.WebhooksResourceWithStreamingResponse(client.webhooks)
|
|
587
|
+
self.your_webhook_url = your_webhook_url.YourWebhookURLResourceWithStreamingResponse(client.your_webhook_url)
|
|
580
588
|
|
|
581
589
|
|
|
582
590
|
class AsyncDodoPaymentsWithStreamedResponse:
|
|
@@ -593,12 +601,15 @@ class AsyncDodoPaymentsWithStreamedResponse:
|
|
|
593
601
|
self.refunds = refunds.AsyncRefundsResourceWithStreamingResponse(client.refunds)
|
|
594
602
|
self.disputes = disputes.AsyncDisputesResourceWithStreamingResponse(client.disputes)
|
|
595
603
|
self.payouts = payouts.AsyncPayoutsResourceWithStreamingResponse(client.payouts)
|
|
596
|
-
self.webhook_events = webhook_events.AsyncWebhookEventsResourceWithStreamingResponse(client.webhook_events)
|
|
597
604
|
self.products = products.AsyncProductsResourceWithStreamingResponse(client.products)
|
|
598
605
|
self.misc = misc.AsyncMiscResourceWithStreamingResponse(client.misc)
|
|
599
606
|
self.discounts = discounts.AsyncDiscountsResourceWithStreamingResponse(client.discounts)
|
|
600
607
|
self.addons = addons.AsyncAddonsResourceWithStreamingResponse(client.addons)
|
|
601
608
|
self.brands = brands.AsyncBrandsResourceWithStreamingResponse(client.brands)
|
|
609
|
+
self.webhooks = webhooks.AsyncWebhooksResourceWithStreamingResponse(client.webhooks)
|
|
610
|
+
self.your_webhook_url = your_webhook_url.AsyncYourWebhookURLResourceWithStreamingResponse(
|
|
611
|
+
client.your_webhook_url
|
|
612
|
+
)
|
|
602
613
|
|
|
603
614
|
|
|
604
615
|
Client = DodoPayments
|
|
@@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
|
|
|
69
69
|
return file
|
|
70
70
|
|
|
71
71
|
if is_tuple_t(file):
|
|
72
|
-
return (file[0],
|
|
72
|
+
return (file[0], read_file_content(file[1]), *file[2:])
|
|
73
73
|
|
|
74
74
|
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
def
|
|
77
|
+
def read_file_content(file: FileContent) -> HttpxFileContent:
|
|
78
78
|
if isinstance(file, os.PathLike):
|
|
79
79
|
return pathlib.Path(file).read_bytes()
|
|
80
80
|
return file
|
|
@@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
|
|
|
111
111
|
return file
|
|
112
112
|
|
|
113
113
|
if is_tuple_t(file):
|
|
114
|
-
return (file[0], await
|
|
114
|
+
return (file[0], await async_read_file_content(file[1]), *file[2:])
|
|
115
115
|
|
|
116
116
|
raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
|
|
117
117
|
|
|
118
118
|
|
|
119
|
-
async def
|
|
119
|
+
async def async_read_file_content(file: FileContent) -> HttpxFileContent:
|
|
120
120
|
if isinstance(file, os.PathLike):
|
|
121
121
|
return await anyio.Path(file).read_bytes()
|
|
122
122
|
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Generic, TypeVar, Optional, cast
|
|
4
|
+
from typing_extensions import override
|
|
5
|
+
|
|
6
|
+
from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"SyncDefaultPageNumberPagination",
|
|
10
|
+
"AsyncDefaultPageNumberPagination",
|
|
11
|
+
"SyncCursorPagePagination",
|
|
12
|
+
"AsyncCursorPagePagination",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
_T = TypeVar("_T")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class SyncDefaultPageNumberPagination(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
|
|
19
|
+
items: List[_T]
|
|
20
|
+
|
|
21
|
+
@override
|
|
22
|
+
def _get_page_items(self) -> List[_T]:
|
|
23
|
+
items = self.items
|
|
24
|
+
if not items:
|
|
25
|
+
return []
|
|
26
|
+
return items
|
|
27
|
+
|
|
28
|
+
@override
|
|
29
|
+
def next_page_info(self) -> Optional[PageInfo]:
|
|
30
|
+
last_page = cast("int | None", self._options.params.get("page_number")) or 1
|
|
31
|
+
|
|
32
|
+
return PageInfo(params={"page_number": last_page + 1})
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class AsyncDefaultPageNumberPagination(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
|
|
36
|
+
items: List[_T]
|
|
37
|
+
|
|
38
|
+
@override
|
|
39
|
+
def _get_page_items(self) -> List[_T]:
|
|
40
|
+
items = self.items
|
|
41
|
+
if not items:
|
|
42
|
+
return []
|
|
43
|
+
return items
|
|
44
|
+
|
|
45
|
+
@override
|
|
46
|
+
def next_page_info(self) -> Optional[PageInfo]:
|
|
47
|
+
last_page = cast("int | None", self._options.params.get("page_number")) or 1
|
|
48
|
+
|
|
49
|
+
return PageInfo(params={"page_number": last_page + 1})
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class SyncCursorPagePagination(BaseSyncPage[_T], BasePage[_T], Generic[_T]):
|
|
53
|
+
data: List[_T]
|
|
54
|
+
iterator: Optional[str] = None
|
|
55
|
+
done: Optional[bool] = None
|
|
56
|
+
|
|
57
|
+
@override
|
|
58
|
+
def _get_page_items(self) -> List[_T]:
|
|
59
|
+
data = self.data
|
|
60
|
+
if not data:
|
|
61
|
+
return []
|
|
62
|
+
return data
|
|
63
|
+
|
|
64
|
+
@override
|
|
65
|
+
def has_next_page(self) -> bool:
|
|
66
|
+
done = self.done
|
|
67
|
+
if done is not None and done is False:
|
|
68
|
+
return False
|
|
69
|
+
|
|
70
|
+
return super().has_next_page()
|
|
71
|
+
|
|
72
|
+
@override
|
|
73
|
+
def next_page_info(self) -> Optional[PageInfo]:
|
|
74
|
+
iterator = self.iterator
|
|
75
|
+
if not iterator:
|
|
76
|
+
return None
|
|
77
|
+
|
|
78
|
+
return PageInfo(params={"iterator": iterator})
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class AsyncCursorPagePagination(BaseAsyncPage[_T], BasePage[_T], Generic[_T]):
|
|
82
|
+
data: List[_T]
|
|
83
|
+
iterator: Optional[str] = None
|
|
84
|
+
done: Optional[bool] = None
|
|
85
|
+
|
|
86
|
+
@override
|
|
87
|
+
def _get_page_items(self) -> List[_T]:
|
|
88
|
+
data = self.data
|
|
89
|
+
if not data:
|
|
90
|
+
return []
|
|
91
|
+
return data
|
|
92
|
+
|
|
93
|
+
@override
|
|
94
|
+
def has_next_page(self) -> bool:
|
|
95
|
+
done = self.done
|
|
96
|
+
if done is not None and done is False:
|
|
97
|
+
return False
|
|
98
|
+
|
|
99
|
+
return super().has_next_page()
|
|
100
|
+
|
|
101
|
+
@override
|
|
102
|
+
def next_page_info(self) -> Optional[PageInfo]:
|
|
103
|
+
iterator = self.iterator
|
|
104
|
+
if not iterator:
|
|
105
|
+
return None
|
|
106
|
+
|
|
107
|
+
return PageInfo(params={"iterator": iterator})
|
|
@@ -80,6 +80,14 @@ from .products import (
|
|
|
80
80
|
ProductsResourceWithStreamingResponse,
|
|
81
81
|
AsyncProductsResourceWithStreamingResponse,
|
|
82
82
|
)
|
|
83
|
+
from .webhooks import (
|
|
84
|
+
WebhooksResource,
|
|
85
|
+
AsyncWebhooksResource,
|
|
86
|
+
WebhooksResourceWithRawResponse,
|
|
87
|
+
AsyncWebhooksResourceWithRawResponse,
|
|
88
|
+
WebhooksResourceWithStreamingResponse,
|
|
89
|
+
AsyncWebhooksResourceWithStreamingResponse,
|
|
90
|
+
)
|
|
83
91
|
from .customers import (
|
|
84
92
|
CustomersResource,
|
|
85
93
|
AsyncCustomersResource,
|
|
@@ -112,13 +120,13 @@ from .subscriptions import (
|
|
|
112
120
|
SubscriptionsResourceWithStreamingResponse,
|
|
113
121
|
AsyncSubscriptionsResourceWithStreamingResponse,
|
|
114
122
|
)
|
|
115
|
-
from .
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
from .your_webhook_url import (
|
|
124
|
+
YourWebhookURLResource,
|
|
125
|
+
AsyncYourWebhookURLResource,
|
|
126
|
+
YourWebhookURLResourceWithRawResponse,
|
|
127
|
+
AsyncYourWebhookURLResourceWithRawResponse,
|
|
128
|
+
YourWebhookURLResourceWithStreamingResponse,
|
|
129
|
+
AsyncYourWebhookURLResourceWithStreamingResponse,
|
|
122
130
|
)
|
|
123
131
|
from .license_key_instances import (
|
|
124
132
|
LicenseKeyInstancesResource,
|
|
@@ -190,12 +198,6 @@ __all__ = [
|
|
|
190
198
|
"AsyncPayoutsResourceWithRawResponse",
|
|
191
199
|
"PayoutsResourceWithStreamingResponse",
|
|
192
200
|
"AsyncPayoutsResourceWithStreamingResponse",
|
|
193
|
-
"WebhookEventsResource",
|
|
194
|
-
"AsyncWebhookEventsResource",
|
|
195
|
-
"WebhookEventsResourceWithRawResponse",
|
|
196
|
-
"AsyncWebhookEventsResourceWithRawResponse",
|
|
197
|
-
"WebhookEventsResourceWithStreamingResponse",
|
|
198
|
-
"AsyncWebhookEventsResourceWithStreamingResponse",
|
|
199
201
|
"ProductsResource",
|
|
200
202
|
"AsyncProductsResource",
|
|
201
203
|
"ProductsResourceWithRawResponse",
|
|
@@ -226,4 +228,16 @@ __all__ = [
|
|
|
226
228
|
"AsyncBrandsResourceWithRawResponse",
|
|
227
229
|
"BrandsResourceWithStreamingResponse",
|
|
228
230
|
"AsyncBrandsResourceWithStreamingResponse",
|
|
231
|
+
"WebhooksResource",
|
|
232
|
+
"AsyncWebhooksResource",
|
|
233
|
+
"WebhooksResourceWithRawResponse",
|
|
234
|
+
"AsyncWebhooksResourceWithRawResponse",
|
|
235
|
+
"WebhooksResourceWithStreamingResponse",
|
|
236
|
+
"AsyncWebhooksResourceWithStreamingResponse",
|
|
237
|
+
"YourWebhookURLResource",
|
|
238
|
+
"AsyncYourWebhookURLResource",
|
|
239
|
+
"YourWebhookURLResourceWithRawResponse",
|
|
240
|
+
"AsyncYourWebhookURLResourceWithRawResponse",
|
|
241
|
+
"YourWebhookURLResourceWithStreamingResponse",
|
|
242
|
+
"AsyncYourWebhookURLResourceWithStreamingResponse",
|
|
229
243
|
]
|
|
@@ -55,6 +55,7 @@ class DiscountsResource(SyncAPIResource):
|
|
|
55
55
|
expires_at: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
56
56
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
57
57
|
restricted_to: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
58
|
+
subscription_cycles: Optional[int] | NotGiven = NOT_GIVEN,
|
|
58
59
|
usage_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
59
60
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
60
61
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -88,6 +89,10 @@ class DiscountsResource(SyncAPIResource):
|
|
|
88
89
|
|
|
89
90
|
restricted_to: List of product IDs to restrict usage (if any).
|
|
90
91
|
|
|
92
|
+
subscription_cycles: Number of subscription billing cycles this discount is valid for. If not
|
|
93
|
+
provided, the discount will be applied indefinitely to all recurring payments
|
|
94
|
+
related to the subscription.
|
|
95
|
+
|
|
91
96
|
usage_limit: How many times this discount can be used (if any). Must be >= 1 if provided.
|
|
92
97
|
|
|
93
98
|
extra_headers: Send extra headers
|
|
@@ -108,6 +113,7 @@ class DiscountsResource(SyncAPIResource):
|
|
|
108
113
|
"expires_at": expires_at,
|
|
109
114
|
"name": name,
|
|
110
115
|
"restricted_to": restricted_to,
|
|
116
|
+
"subscription_cycles": subscription_cycles,
|
|
111
117
|
"usage_limit": usage_limit,
|
|
112
118
|
},
|
|
113
119
|
discount_create_params.DiscountCreateParams,
|
|
@@ -160,6 +166,7 @@ class DiscountsResource(SyncAPIResource):
|
|
|
160
166
|
expires_at: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
161
167
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
162
168
|
restricted_to: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
169
|
+
subscription_cycles: Optional[int] | NotGiven = NOT_GIVEN,
|
|
163
170
|
type: Optional[DiscountType] | NotGiven = NOT_GIVEN,
|
|
164
171
|
usage_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
165
172
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -187,6 +194,10 @@ class DiscountsResource(SyncAPIResource):
|
|
|
187
194
|
restricted_to: If present, replaces all restricted product IDs with this new set. To remove all
|
|
188
195
|
restrictions, send empty array
|
|
189
196
|
|
|
197
|
+
subscription_cycles: Number of subscription billing cycles this discount is valid for. If not
|
|
198
|
+
provided, the discount will be applied indefinitely to all recurring payments
|
|
199
|
+
related to the subscription.
|
|
200
|
+
|
|
190
201
|
type: If present, update the discount type.
|
|
191
202
|
|
|
192
203
|
extra_headers: Send extra headers
|
|
@@ -208,6 +219,7 @@ class DiscountsResource(SyncAPIResource):
|
|
|
208
219
|
"expires_at": expires_at,
|
|
209
220
|
"name": name,
|
|
210
221
|
"restricted_to": restricted_to,
|
|
222
|
+
"subscription_cycles": subscription_cycles,
|
|
211
223
|
"type": type,
|
|
212
224
|
"usage_limit": usage_limit,
|
|
213
225
|
},
|
|
@@ -330,6 +342,7 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
330
342
|
expires_at: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
331
343
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
332
344
|
restricted_to: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
345
|
+
subscription_cycles: Optional[int] | NotGiven = NOT_GIVEN,
|
|
333
346
|
usage_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
334
347
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
335
348
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -363,6 +376,10 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
363
376
|
|
|
364
377
|
restricted_to: List of product IDs to restrict usage (if any).
|
|
365
378
|
|
|
379
|
+
subscription_cycles: Number of subscription billing cycles this discount is valid for. If not
|
|
380
|
+
provided, the discount will be applied indefinitely to all recurring payments
|
|
381
|
+
related to the subscription.
|
|
382
|
+
|
|
366
383
|
usage_limit: How many times this discount can be used (if any). Must be >= 1 if provided.
|
|
367
384
|
|
|
368
385
|
extra_headers: Send extra headers
|
|
@@ -383,6 +400,7 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
383
400
|
"expires_at": expires_at,
|
|
384
401
|
"name": name,
|
|
385
402
|
"restricted_to": restricted_to,
|
|
403
|
+
"subscription_cycles": subscription_cycles,
|
|
386
404
|
"usage_limit": usage_limit,
|
|
387
405
|
},
|
|
388
406
|
discount_create_params.DiscountCreateParams,
|
|
@@ -435,6 +453,7 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
435
453
|
expires_at: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
|
|
436
454
|
name: Optional[str] | NotGiven = NOT_GIVEN,
|
|
437
455
|
restricted_to: Optional[List[str]] | NotGiven = NOT_GIVEN,
|
|
456
|
+
subscription_cycles: Optional[int] | NotGiven = NOT_GIVEN,
|
|
438
457
|
type: Optional[DiscountType] | NotGiven = NOT_GIVEN,
|
|
439
458
|
usage_limit: Optional[int] | NotGiven = NOT_GIVEN,
|
|
440
459
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
@@ -462,6 +481,10 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
462
481
|
restricted_to: If present, replaces all restricted product IDs with this new set. To remove all
|
|
463
482
|
restrictions, send empty array
|
|
464
483
|
|
|
484
|
+
subscription_cycles: Number of subscription billing cycles this discount is valid for. If not
|
|
485
|
+
provided, the discount will be applied indefinitely to all recurring payments
|
|
486
|
+
related to the subscription.
|
|
487
|
+
|
|
465
488
|
type: If present, update the discount type.
|
|
466
489
|
|
|
467
490
|
extra_headers: Send extra headers
|
|
@@ -483,6 +506,7 @@ class AsyncDiscountsResource(AsyncAPIResource):
|
|
|
483
506
|
"expires_at": expires_at,
|
|
484
507
|
"name": name,
|
|
485
508
|
"restricted_to": restricted_to,
|
|
509
|
+
"subscription_cycles": subscription_cycles,
|
|
486
510
|
"type": type,
|
|
487
511
|
"usage_limit": usage_limit,
|
|
488
512
|
},
|