dodopayments 1.44.0__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.

Files changed (230) hide show
  1. dodopayments-1.47.0/.release-please-manifest.json +3 -0
  2. {dodopayments-1.44.0 → dodopayments-1.47.0}/CHANGELOG.md +15 -0
  3. {dodopayments-1.44.0 → dodopayments-1.47.0}/PKG-INFO +1 -1
  4. {dodopayments-1.44.0 → dodopayments-1.47.0}/api.md +41 -0
  5. {dodopayments-1.44.0 → dodopayments-1.47.0}/pyproject.toml +2 -2
  6. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_client.py +20 -0
  7. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_version.py +1 -1
  8. dodopayments-1.47.0/src/dodopayments/pagination.py +107 -0
  9. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/__init__.py +28 -0
  10. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/discounts.py +24 -0
  11. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/products/products.py +17 -1
  12. dodopayments-1.47.0/src/dodopayments/resources/webhooks/__init__.py +33 -0
  13. dodopayments-1.47.0/src/dodopayments/resources/webhooks/headers.py +255 -0
  14. dodopayments-1.47.0/src/dodopayments/resources/webhooks/webhooks.py +676 -0
  15. dodopayments-1.47.0/src/dodopayments/resources/your_webhook_url.py +224 -0
  16. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/__init__.py +17 -1
  17. dodopayments-1.47.0/src/dodopayments/types/addon_cart_response_item_param.py +13 -0
  18. dodopayments-1.47.0/src/dodopayments/types/customer_limited_details_param.py +18 -0
  19. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/customer_request_param.py +2 -2
  20. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/discount.py +7 -0
  21. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/discount_create_params.py +7 -0
  22. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/discount_update_params.py +7 -0
  23. dodopayments-1.47.0/src/dodopayments/types/dispute_param.py +45 -0
  24. dodopayments-1.47.0/src/dodopayments/types/get_dispute_param.py +52 -0
  25. dodopayments-1.47.0/src/dodopayments/types/license_key_param.py +53 -0
  26. dodopayments-1.47.0/src/dodopayments/types/new_customer_param.py +16 -0
  27. dodopayments-1.47.0/src/dodopayments/types/payment_param.py +131 -0
  28. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/product.py +4 -1
  29. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/product_create_params.py +4 -1
  30. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/product_list_response.py +4 -1
  31. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/product_update_params.py +4 -1
  32. dodopayments-1.47.0/src/dodopayments/types/refund_param.py +42 -0
  33. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/subscription.py +3 -0
  34. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/subscription_list_response.py +3 -0
  35. dodopayments-1.47.0/src/dodopayments/types/subscription_param.py +97 -0
  36. dodopayments-1.47.0/src/dodopayments/types/webhook_create_params.py +40 -0
  37. dodopayments-1.47.0/src/dodopayments/types/webhook_create_response.py +42 -0
  38. dodopayments-1.47.0/src/dodopayments/types/webhook_list_params.py +16 -0
  39. dodopayments-1.47.0/src/dodopayments/types/webhook_list_response.py +42 -0
  40. dodopayments-1.47.0/src/dodopayments/types/webhook_retrieve_response.py +42 -0
  41. dodopayments-1.47.0/src/dodopayments/types/webhook_update_params.py +33 -0
  42. dodopayments-1.47.0/src/dodopayments/types/webhook_update_response.py +42 -0
  43. dodopayments-1.47.0/src/dodopayments/types/webhooks/__init__.py +6 -0
  44. dodopayments-1.47.0/src/dodopayments/types/webhooks/header_retrieve_response.py +15 -0
  45. dodopayments-1.47.0/src/dodopayments/types/webhooks/header_update_params.py +13 -0
  46. dodopayments-1.47.0/src/dodopayments/types/your_webhook_url_create_params.py +66 -0
  47. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_discounts.py +4 -0
  48. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_products.py +4 -0
  49. dodopayments-1.47.0/tests/api_resources/test_webhooks.py +440 -0
  50. dodopayments-1.47.0/tests/api_resources/test_your_webhook_url.py +397 -0
  51. dodopayments-1.47.0/tests/api_resources/webhooks/__init__.py +1 -0
  52. dodopayments-1.47.0/tests/api_resources/webhooks/test_headers.py +184 -0
  53. dodopayments-1.44.0/.release-please-manifest.json +0 -3
  54. dodopayments-1.44.0/src/dodopayments/pagination.py +0 -44
  55. dodopayments-1.44.0/src/dodopayments/types/create_new_customer_param.py +0 -23
  56. {dodopayments-1.44.0 → dodopayments-1.47.0}/.gitignore +0 -0
  57. {dodopayments-1.44.0 → dodopayments-1.47.0}/CONTRIBUTING.md +0 -0
  58. {dodopayments-1.44.0 → dodopayments-1.47.0}/LICENSE +0 -0
  59. {dodopayments-1.44.0 → dodopayments-1.47.0}/README.md +0 -0
  60. {dodopayments-1.44.0 → dodopayments-1.47.0}/SECURITY.md +0 -0
  61. {dodopayments-1.44.0 → dodopayments-1.47.0}/bin/check-release-environment +0 -0
  62. {dodopayments-1.44.0 → dodopayments-1.47.0}/bin/publish-pypi +0 -0
  63. {dodopayments-1.44.0 → dodopayments-1.47.0}/examples/.keep +0 -0
  64. {dodopayments-1.44.0 → dodopayments-1.47.0}/mypy.ini +0 -0
  65. {dodopayments-1.44.0 → dodopayments-1.47.0}/noxfile.py +0 -0
  66. {dodopayments-1.44.0 → dodopayments-1.47.0}/release-please-config.json +0 -0
  67. {dodopayments-1.44.0 → dodopayments-1.47.0}/requirements-dev.lock +0 -0
  68. {dodopayments-1.44.0 → dodopayments-1.47.0}/requirements.lock +0 -0
  69. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodo_payments/lib/.keep +0 -0
  70. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/__init__.py +0 -0
  71. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_base_client.py +0 -0
  72. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_compat.py +0 -0
  73. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_constants.py +0 -0
  74. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_exceptions.py +0 -0
  75. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_files.py +0 -0
  76. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_models.py +0 -0
  77. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_qs.py +0 -0
  78. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_resource.py +0 -0
  79. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_response.py +0 -0
  80. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_streaming.py +0 -0
  81. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_types.py +0 -0
  82. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_utils/__init__.py +0 -0
  83. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_utils/_logs.py +0 -0
  84. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_utils/_proxy.py +0 -0
  85. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_utils/_reflection.py +0 -0
  86. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_utils/_resources_proxy.py +0 -0
  87. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_utils/_streams.py +0 -0
  88. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_utils/_sync.py +0 -0
  89. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_utils/_transform.py +0 -0
  90. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_utils/_typing.py +0 -0
  91. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/_utils/_utils.py +0 -0
  92. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/lib/.keep +0 -0
  93. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/py.typed +0 -0
  94. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/addons.py +0 -0
  95. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/brands.py +0 -0
  96. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/customers/__init__.py +0 -0
  97. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/customers/customer_portal.py +0 -0
  98. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/customers/customers.py +0 -0
  99. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/disputes.py +0 -0
  100. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/invoices/__init__.py +0 -0
  101. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/invoices/invoices.py +0 -0
  102. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/invoices/payments.py +0 -0
  103. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/license_key_instances.py +0 -0
  104. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/license_keys.py +0 -0
  105. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/licenses.py +0 -0
  106. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/misc.py +0 -0
  107. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/payments.py +0 -0
  108. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/payouts.py +0 -0
  109. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/products/__init__.py +0 -0
  110. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/products/images.py +0 -0
  111. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/refunds.py +0 -0
  112. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/resources/subscriptions.py +0 -0
  113. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/addon_cart_response_item.py +0 -0
  114. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/addon_create_params.py +0 -0
  115. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/addon_list_params.py +0 -0
  116. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/addon_response.py +0 -0
  117. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/addon_update_images_response.py +0 -0
  118. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/addon_update_params.py +0 -0
  119. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/attach_addon_param.py +0 -0
  120. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/attach_existing_customer_param.py +0 -0
  121. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/billing_address.py +0 -0
  122. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/billing_address_param.py +0 -0
  123. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/brand.py +0 -0
  124. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/brand_create_params.py +0 -0
  125. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/brand_list_response.py +0 -0
  126. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/brand_update_images_response.py +0 -0
  127. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/brand_update_params.py +0 -0
  128. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/country_code.py +0 -0
  129. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/currency.py +0 -0
  130. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/customer.py +0 -0
  131. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/customer_create_params.py +0 -0
  132. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/customer_limited_details.py +0 -0
  133. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/customer_list_params.py +0 -0
  134. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/customer_portal_session.py +0 -0
  135. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/customer_update_params.py +0 -0
  136. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/customers/__init__.py +0 -0
  137. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/customers/customer_portal_create_params.py +0 -0
  138. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/discount_list_params.py +0 -0
  139. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/discount_type.py +0 -0
  140. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/dispute.py +0 -0
  141. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/dispute_list_params.py +0 -0
  142. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/dispute_list_response.py +0 -0
  143. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/dispute_stage.py +0 -0
  144. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/dispute_status.py +0 -0
  145. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/get_dispute.py +0 -0
  146. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/intent_status.py +0 -0
  147. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/invoices/__init__.py +0 -0
  148. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_activate_params.py +0 -0
  149. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_deactivate_params.py +0 -0
  150. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_key.py +0 -0
  151. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_key_duration.py +0 -0
  152. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_key_duration_param.py +0 -0
  153. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_key_instance.py +0 -0
  154. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_key_instance_list_params.py +0 -0
  155. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_key_instance_update_params.py +0 -0
  156. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_key_list_params.py +0 -0
  157. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_key_status.py +0 -0
  158. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_key_update_params.py +0 -0
  159. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_validate_params.py +0 -0
  160. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/license_validate_response.py +0 -0
  161. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/misc_list_supported_countries_response.py +0 -0
  162. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/one_time_product_cart_item.py +0 -0
  163. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/one_time_product_cart_item_param.py +0 -0
  164. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/payment.py +0 -0
  165. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/payment_create_params.py +0 -0
  166. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/payment_create_response.py +0 -0
  167. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/payment_list_params.py +0 -0
  168. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/payment_list_response.py +0 -0
  169. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/payment_method_types.py +0 -0
  170. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/payment_retrieve_line_items_response.py +0 -0
  171. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/payout_list_params.py +0 -0
  172. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/payout_list_response.py +0 -0
  173. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/price.py +0 -0
  174. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/price_param.py +0 -0
  175. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/product_list_params.py +0 -0
  176. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/product_update_files_params.py +0 -0
  177. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/product_update_files_response.py +0 -0
  178. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/products/__init__.py +0 -0
  179. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/products/image_update_params.py +0 -0
  180. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/products/image_update_response.py +0 -0
  181. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/refund.py +0 -0
  182. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/refund_create_params.py +0 -0
  183. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/refund_list_params.py +0 -0
  184. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/refund_status.py +0 -0
  185. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/subscription_change_plan_params.py +0 -0
  186. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/subscription_charge_params.py +0 -0
  187. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/subscription_charge_response.py +0 -0
  188. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/subscription_create_params.py +0 -0
  189. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/subscription_create_response.py +0 -0
  190. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/subscription_list_params.py +0 -0
  191. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/subscription_status.py +0 -0
  192. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/subscription_update_params.py +0 -0
  193. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/tax_category.py +0 -0
  194. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/time_interval.py +0 -0
  195. {dodopayments-1.44.0 → dodopayments-1.47.0}/src/dodopayments/types/webhook_event_type.py +0 -0
  196. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/__init__.py +0 -0
  197. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/__init__.py +0 -0
  198. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/customers/__init__.py +0 -0
  199. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/customers/test_customer_portal.py +0 -0
  200. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/invoices/__init__.py +0 -0
  201. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/invoices/test_payments.py +0 -0
  202. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/products/__init__.py +0 -0
  203. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/products/test_images.py +0 -0
  204. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_addons.py +0 -0
  205. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_brands.py +0 -0
  206. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_customers.py +0 -0
  207. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_disputes.py +0 -0
  208. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_license_key_instances.py +0 -0
  209. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_license_keys.py +0 -0
  210. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_licenses.py +0 -0
  211. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_misc.py +0 -0
  212. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_payments.py +0 -0
  213. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_payouts.py +0 -0
  214. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_refunds.py +0 -0
  215. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/api_resources/test_subscriptions.py +0 -0
  216. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/conftest.py +0 -0
  217. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/sample_file.txt +0 -0
  218. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_client.py +0 -0
  219. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_deepcopy.py +0 -0
  220. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_extract_files.py +0 -0
  221. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_files.py +0 -0
  222. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_models.py +0 -0
  223. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_qs.py +0 -0
  224. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_required_args.py +0 -0
  225. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_response.py +0 -0
  226. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_streaming.py +0 -0
  227. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_transform.py +0 -0
  228. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_utils/test_proxy.py +0 -0
  229. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/test_utils/test_typing.py +0 -0
  230. {dodopayments-1.44.0 → dodopayments-1.47.0}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.47.0"
3
+ }
@@ -1,5 +1,20 @@
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
+
3
18
  ## 1.44.0 (2025-08-02)
4
19
 
5
20
  Full Changelog: [v1.43.1...v1.44.0](https://github.com/dodopayments/dodopayments-python/compare/v1.43.1...v1.44.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dodopayments
3
- Version: 1.44.0
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,
@@ -270,3 +271,43 @@ Methods:
270
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>
271
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>
272
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.44.0"
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 = "py37"
162
+ target-version = "py38"
163
163
 
164
164
  [tool.ruff.format]
165
165
  docstring-code-format = true
@@ -33,6 +33,7 @@ from .resources import (
33
33
  discounts,
34
34
  license_keys,
35
35
  subscriptions,
36
+ your_webhook_url,
36
37
  license_key_instances,
37
38
  )
38
39
  from ._streaming import Stream as Stream, AsyncStream as AsyncStream
@@ -44,6 +45,7 @@ from ._base_client import (
44
45
  )
45
46
  from .resources.invoices import invoices
46
47
  from .resources.products import products
48
+ from .resources.webhooks import webhooks
47
49
  from .resources.customers import customers
48
50
 
49
51
  __all__ = [
@@ -80,6 +82,8 @@ class DodoPayments(SyncAPIClient):
80
82
  discounts: discounts.DiscountsResource
81
83
  addons: addons.AddonsResource
82
84
  brands: brands.BrandsResource
85
+ webhooks: webhooks.WebhooksResource
86
+ your_webhook_url: your_webhook_url.YourWebhookURLResource
83
87
  with_raw_response: DodoPaymentsWithRawResponse
84
88
  with_streaming_response: DodoPaymentsWithStreamedResponse
85
89
 
@@ -176,6 +180,8 @@ class DodoPayments(SyncAPIClient):
176
180
  self.discounts = discounts.DiscountsResource(self)
177
181
  self.addons = addons.AddonsResource(self)
178
182
  self.brands = brands.BrandsResource(self)
183
+ self.webhooks = webhooks.WebhooksResource(self)
184
+ self.your_webhook_url = your_webhook_url.YourWebhookURLResource(self)
179
185
  self.with_raw_response = DodoPaymentsWithRawResponse(self)
180
186
  self.with_streaming_response = DodoPaymentsWithStreamedResponse(self)
181
187
 
@@ -302,6 +308,8 @@ class AsyncDodoPayments(AsyncAPIClient):
302
308
  discounts: discounts.AsyncDiscountsResource
303
309
  addons: addons.AsyncAddonsResource
304
310
  brands: brands.AsyncBrandsResource
311
+ webhooks: webhooks.AsyncWebhooksResource
312
+ your_webhook_url: your_webhook_url.AsyncYourWebhookURLResource
305
313
  with_raw_response: AsyncDodoPaymentsWithRawResponse
306
314
  with_streaming_response: AsyncDodoPaymentsWithStreamedResponse
307
315
 
@@ -398,6 +406,8 @@ class AsyncDodoPayments(AsyncAPIClient):
398
406
  self.discounts = discounts.AsyncDiscountsResource(self)
399
407
  self.addons = addons.AsyncAddonsResource(self)
400
408
  self.brands = brands.AsyncBrandsResource(self)
409
+ self.webhooks = webhooks.AsyncWebhooksResource(self)
410
+ self.your_webhook_url = your_webhook_url.AsyncYourWebhookURLResource(self)
401
411
  self.with_raw_response = AsyncDodoPaymentsWithRawResponse(self)
402
412
  self.with_streaming_response = AsyncDodoPaymentsWithStreamedResponse(self)
403
413
 
@@ -527,6 +537,8 @@ class DodoPaymentsWithRawResponse:
527
537
  self.discounts = discounts.DiscountsResourceWithRawResponse(client.discounts)
528
538
  self.addons = addons.AddonsResourceWithRawResponse(client.addons)
529
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)
530
542
 
531
543
 
532
544
  class AsyncDodoPaymentsWithRawResponse:
@@ -548,6 +560,8 @@ class AsyncDodoPaymentsWithRawResponse:
548
560
  self.discounts = discounts.AsyncDiscountsResourceWithRawResponse(client.discounts)
549
561
  self.addons = addons.AsyncAddonsResourceWithRawResponse(client.addons)
550
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)
551
565
 
552
566
 
553
567
  class DodoPaymentsWithStreamedResponse:
@@ -569,6 +583,8 @@ class DodoPaymentsWithStreamedResponse:
569
583
  self.discounts = discounts.DiscountsResourceWithStreamingResponse(client.discounts)
570
584
  self.addons = addons.AddonsResourceWithStreamingResponse(client.addons)
571
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)
572
588
 
573
589
 
574
590
  class AsyncDodoPaymentsWithStreamedResponse:
@@ -590,6 +606,10 @@ class AsyncDodoPaymentsWithStreamedResponse:
590
606
  self.discounts = discounts.AsyncDiscountsResourceWithStreamingResponse(client.discounts)
591
607
  self.addons = addons.AsyncAddonsResourceWithStreamingResponse(client.addons)
592
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
+ )
593
613
 
594
614
 
595
615
  Client = DodoPayments
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "dodopayments"
4
- __version__ = "1.44.0" # x-release-please-version
4
+ __version__ = "1.47.0" # x-release-please-version
@@ -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,6 +120,14 @@ from .subscriptions import (
112
120
  SubscriptionsResourceWithStreamingResponse,
113
121
  AsyncSubscriptionsResourceWithStreamingResponse,
114
122
  )
123
+ from .your_webhook_url import (
124
+ YourWebhookURLResource,
125
+ AsyncYourWebhookURLResource,
126
+ YourWebhookURLResourceWithRawResponse,
127
+ AsyncYourWebhookURLResourceWithRawResponse,
128
+ YourWebhookURLResourceWithStreamingResponse,
129
+ AsyncYourWebhookURLResourceWithStreamingResponse,
130
+ )
115
131
  from .license_key_instances import (
116
132
  LicenseKeyInstancesResource,
117
133
  AsyncLicenseKeyInstancesResource,
@@ -212,4 +228,16 @@ __all__ = [
212
228
  "AsyncBrandsResourceWithRawResponse",
213
229
  "BrandsResourceWithStreamingResponse",
214
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",
215
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
  },
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import List, Optional
5
+ from typing import Dict, List, Optional
6
6
 
7
7
  import httpx
8
8
 
@@ -80,6 +80,7 @@ class ProductsResource(SyncAPIResource):
80
80
  license_key_activations_limit: Optional[int] | NotGiven = NOT_GIVEN,
81
81
  license_key_duration: Optional[LicenseKeyDurationParam] | NotGiven = NOT_GIVEN,
82
82
  license_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
83
+ metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
83
84
  name: Optional[str] | NotGiven = NOT_GIVEN,
84
85
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
85
86
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -112,6 +113,8 @@ class ProductsResource(SyncAPIResource):
112
113
 
113
114
  license_key_enabled: When true, generates and sends a license key to your customer. Defaults to false
114
115
 
116
+ metadata: Additional metadata for the product
117
+
115
118
  name: Optional name of the product
116
119
 
117
120
  extra_headers: Send extra headers
@@ -136,6 +139,7 @@ class ProductsResource(SyncAPIResource):
136
139
  "license_key_activations_limit": license_key_activations_limit,
137
140
  "license_key_duration": license_key_duration,
138
141
  "license_key_enabled": license_key_enabled,
142
+ "metadata": metadata,
139
143
  "name": name,
140
144
  },
141
145
  product_create_params.ProductCreateParams,
@@ -190,6 +194,7 @@ class ProductsResource(SyncAPIResource):
190
194
  license_key_activations_limit: Optional[int] | NotGiven = NOT_GIVEN,
191
195
  license_key_duration: Optional[LicenseKeyDurationParam] | NotGiven = NOT_GIVEN,
192
196
  license_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
197
+ metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
193
198
  name: Optional[str] | NotGiven = NOT_GIVEN,
194
199
  price: Optional[PriceParam] | NotGiven = NOT_GIVEN,
195
200
  tax_category: Optional[TaxCategory] | NotGiven = NOT_GIVEN,
@@ -230,6 +235,8 @@ class ProductsResource(SyncAPIResource):
230
235
  If `true`, additional fields related to license key (duration, activations
231
236
  limit, activation message) become applicable.
232
237
 
238
+ metadata: Additional metadata for the product
239
+
233
240
  name: Name of the product, optional and must be at most 100 characters.
234
241
 
235
242
  price: Price details of the product.
@@ -260,6 +267,7 @@ class ProductsResource(SyncAPIResource):
260
267
  "license_key_activations_limit": license_key_activations_limit,
261
268
  "license_key_duration": license_key_duration,
262
269
  "license_key_enabled": license_key_enabled,
270
+ "metadata": metadata,
263
271
  "name": name,
264
272
  "price": price,
265
273
  "tax_category": tax_category,
@@ -469,6 +477,7 @@ class AsyncProductsResource(AsyncAPIResource):
469
477
  license_key_activations_limit: Optional[int] | NotGiven = NOT_GIVEN,
470
478
  license_key_duration: Optional[LicenseKeyDurationParam] | NotGiven = NOT_GIVEN,
471
479
  license_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
480
+ metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
472
481
  name: Optional[str] | NotGiven = NOT_GIVEN,
473
482
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
474
483
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -501,6 +510,8 @@ class AsyncProductsResource(AsyncAPIResource):
501
510
 
502
511
  license_key_enabled: When true, generates and sends a license key to your customer. Defaults to false
503
512
 
513
+ metadata: Additional metadata for the product
514
+
504
515
  name: Optional name of the product
505
516
 
506
517
  extra_headers: Send extra headers
@@ -525,6 +536,7 @@ class AsyncProductsResource(AsyncAPIResource):
525
536
  "license_key_activations_limit": license_key_activations_limit,
526
537
  "license_key_duration": license_key_duration,
527
538
  "license_key_enabled": license_key_enabled,
539
+ "metadata": metadata,
528
540
  "name": name,
529
541
  },
530
542
  product_create_params.ProductCreateParams,
@@ -579,6 +591,7 @@ class AsyncProductsResource(AsyncAPIResource):
579
591
  license_key_activations_limit: Optional[int] | NotGiven = NOT_GIVEN,
580
592
  license_key_duration: Optional[LicenseKeyDurationParam] | NotGiven = NOT_GIVEN,
581
593
  license_key_enabled: Optional[bool] | NotGiven = NOT_GIVEN,
594
+ metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
582
595
  name: Optional[str] | NotGiven = NOT_GIVEN,
583
596
  price: Optional[PriceParam] | NotGiven = NOT_GIVEN,
584
597
  tax_category: Optional[TaxCategory] | NotGiven = NOT_GIVEN,
@@ -619,6 +632,8 @@ class AsyncProductsResource(AsyncAPIResource):
619
632
  If `true`, additional fields related to license key (duration, activations
620
633
  limit, activation message) become applicable.
621
634
 
635
+ metadata: Additional metadata for the product
636
+
622
637
  name: Name of the product, optional and must be at most 100 characters.
623
638
 
624
639
  price: Price details of the product.
@@ -649,6 +664,7 @@ class AsyncProductsResource(AsyncAPIResource):
649
664
  "license_key_activations_limit": license_key_activations_limit,
650
665
  "license_key_duration": license_key_duration,
651
666
  "license_key_enabled": license_key_enabled,
667
+ "metadata": metadata,
652
668
  "name": name,
653
669
  "price": price,
654
670
  "tax_category": tax_category,
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .headers import (
4
+ HeadersResource,
5
+ AsyncHeadersResource,
6
+ HeadersResourceWithRawResponse,
7
+ AsyncHeadersResourceWithRawResponse,
8
+ HeadersResourceWithStreamingResponse,
9
+ AsyncHeadersResourceWithStreamingResponse,
10
+ )
11
+ from .webhooks import (
12
+ WebhooksResource,
13
+ AsyncWebhooksResource,
14
+ WebhooksResourceWithRawResponse,
15
+ AsyncWebhooksResourceWithRawResponse,
16
+ WebhooksResourceWithStreamingResponse,
17
+ AsyncWebhooksResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "HeadersResource",
22
+ "AsyncHeadersResource",
23
+ "HeadersResourceWithRawResponse",
24
+ "AsyncHeadersResourceWithRawResponse",
25
+ "HeadersResourceWithStreamingResponse",
26
+ "AsyncHeadersResourceWithStreamingResponse",
27
+ "WebhooksResource",
28
+ "AsyncWebhooksResource",
29
+ "WebhooksResourceWithRawResponse",
30
+ "AsyncWebhooksResourceWithRawResponse",
31
+ "WebhooksResourceWithStreamingResponse",
32
+ "AsyncWebhooksResourceWithStreamingResponse",
33
+ ]