dodopayments 1.30.0__tar.gz → 1.30.2__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 (202) hide show
  1. dodopayments-1.30.2/.release-please-manifest.json +3 -0
  2. {dodopayments-1.30.0 → dodopayments-1.30.2}/CHANGELOG.md +14 -0
  3. {dodopayments-1.30.0 → dodopayments-1.30.2}/CONTRIBUTING.md +1 -2
  4. {dodopayments-1.30.0 → dodopayments-1.30.2}/PKG-INFO +1 -1
  5. {dodopayments-1.30.0 → dodopayments-1.30.2}/api.md +2 -2
  6. {dodopayments-1.30.0 → dodopayments-1.30.2}/pyproject.toml +1 -1
  7. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_base_client.py +6 -0
  8. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_models.py +2 -0
  9. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_types.py +2 -0
  10. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_version.py +1 -1
  11. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/customers/customers.py +19 -1
  12. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/subscriptions.py +41 -0
  13. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/__init__.py +2 -0
  14. dodopayments-1.30.2/src/dodopayments/types/customer_update_params.py +14 -0
  15. dodopayments-1.30.2/src/dodopayments/types/subscription_change_plan_params.py +30 -0
  16. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_customers.py +26 -8
  17. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_subscriptions.py +64 -8
  18. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_client.py +54 -0
  19. dodopayments-1.30.0/.release-please-manifest.json +0 -3
  20. {dodopayments-1.30.0 → dodopayments-1.30.2}/.gitignore +0 -0
  21. {dodopayments-1.30.0 → dodopayments-1.30.2}/LICENSE +0 -0
  22. {dodopayments-1.30.0 → dodopayments-1.30.2}/README.md +0 -0
  23. {dodopayments-1.30.0 → dodopayments-1.30.2}/SECURITY.md +0 -0
  24. {dodopayments-1.30.0 → dodopayments-1.30.2}/bin/check-release-environment +0 -0
  25. {dodopayments-1.30.0 → dodopayments-1.30.2}/bin/publish-pypi +0 -0
  26. {dodopayments-1.30.0 → dodopayments-1.30.2}/examples/.keep +0 -0
  27. {dodopayments-1.30.0 → dodopayments-1.30.2}/mypy.ini +0 -0
  28. {dodopayments-1.30.0 → dodopayments-1.30.2}/noxfile.py +0 -0
  29. {dodopayments-1.30.0 → dodopayments-1.30.2}/release-please-config.json +0 -0
  30. {dodopayments-1.30.0 → dodopayments-1.30.2}/requirements-dev.lock +0 -0
  31. {dodopayments-1.30.0 → dodopayments-1.30.2}/requirements.lock +0 -0
  32. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodo_payments/lib/.keep +0 -0
  33. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/__init__.py +0 -0
  34. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_client.py +0 -0
  35. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_compat.py +0 -0
  36. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_constants.py +0 -0
  37. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_exceptions.py +0 -0
  38. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_files.py +0 -0
  39. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_qs.py +0 -0
  40. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_resource.py +0 -0
  41. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_response.py +0 -0
  42. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_streaming.py +0 -0
  43. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_utils/__init__.py +0 -0
  44. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_utils/_logs.py +0 -0
  45. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_utils/_proxy.py +0 -0
  46. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_utils/_reflection.py +0 -0
  47. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_utils/_resources_proxy.py +0 -0
  48. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_utils/_streams.py +0 -0
  49. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_utils/_sync.py +0 -0
  50. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_utils/_transform.py +0 -0
  51. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_utils/_typing.py +0 -0
  52. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/_utils/_utils.py +0 -0
  53. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/lib/.keep +0 -0
  54. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/pagination.py +0 -0
  55. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/py.typed +0 -0
  56. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/__init__.py +0 -0
  57. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/addons.py +0 -0
  58. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/brands.py +0 -0
  59. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/customers/__init__.py +0 -0
  60. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/customers/customer_portal.py +0 -0
  61. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/discounts.py +0 -0
  62. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/disputes.py +0 -0
  63. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/invoices/__init__.py +0 -0
  64. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/invoices/invoices.py +0 -0
  65. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/invoices/payments.py +0 -0
  66. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/license_key_instances.py +0 -0
  67. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/license_keys.py +0 -0
  68. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/licenses.py +0 -0
  69. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/misc.py +0 -0
  70. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/payments.py +0 -0
  71. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/payouts.py +0 -0
  72. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/products/__init__.py +0 -0
  73. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/products/images.py +0 -0
  74. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/products/products.py +0 -0
  75. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/refunds.py +0 -0
  76. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/resources/webhook_events.py +0 -0
  77. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/addon_cart_response_item.py +0 -0
  78. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/addon_create_params.py +0 -0
  79. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/addon_list_params.py +0 -0
  80. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/addon_response.py +0 -0
  81. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/addon_update_images_response.py +0 -0
  82. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/addon_update_params.py +0 -0
  83. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/attach_existing_customer_param.py +0 -0
  84. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/billing_address.py +0 -0
  85. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/billing_address_param.py +0 -0
  86. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/brand_create_params.py +0 -0
  87. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/brand_create_response.py +0 -0
  88. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/brand_list_response.py +0 -0
  89. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/brand_retrieve_response.py +0 -0
  90. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/brand_update_images_response.py +0 -0
  91. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/brand_update_params.py +0 -0
  92. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/brand_update_response.py +0 -0
  93. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/country_code.py +0 -0
  94. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/create_new_customer_param.py +0 -0
  95. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/currency.py +0 -0
  96. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/customer.py +0 -0
  97. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/customer_create_params.py +0 -0
  98. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/customer_limited_details.py +0 -0
  99. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/customer_list_params.py +0 -0
  100. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/customer_portal_session.py +0 -0
  101. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/customer_request_param.py +0 -0
  102. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/customers/__init__.py +0 -0
  103. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/customers/customer_portal_create_params.py +0 -0
  104. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/discount.py +0 -0
  105. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/discount_create_params.py +0 -0
  106. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/discount_list_params.py +0 -0
  107. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/discount_type.py +0 -0
  108. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/discount_update_params.py +0 -0
  109. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/dispute.py +0 -0
  110. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/dispute_list_params.py +0 -0
  111. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/dispute_list_response.py +0 -0
  112. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/dispute_retrieve_response.py +0 -0
  113. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/dispute_stage.py +0 -0
  114. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/dispute_status.py +0 -0
  115. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/intent_status.py +0 -0
  116. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/invoices/__init__.py +0 -0
  117. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_activate_params.py +0 -0
  118. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_deactivate_params.py +0 -0
  119. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_key.py +0 -0
  120. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_key_duration.py +0 -0
  121. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_key_duration_param.py +0 -0
  122. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_key_instance.py +0 -0
  123. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_key_instance_list_params.py +0 -0
  124. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_key_instance_update_params.py +0 -0
  125. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_key_list_params.py +0 -0
  126. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_key_status.py +0 -0
  127. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_key_update_params.py +0 -0
  128. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_validate_params.py +0 -0
  129. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/license_validate_response.py +0 -0
  130. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/misc_list_supported_countries_response.py +0 -0
  131. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/one_time_product_cart_item.py +0 -0
  132. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/one_time_product_cart_item_param.py +0 -0
  133. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/payment.py +0 -0
  134. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/payment_create_params.py +0 -0
  135. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/payment_create_response.py +0 -0
  136. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/payment_list_params.py +0 -0
  137. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/payment_list_response.py +0 -0
  138. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/payment_retrieve_line_items_response.py +0 -0
  139. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/payout_list_params.py +0 -0
  140. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/payout_list_response.py +0 -0
  141. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/price.py +0 -0
  142. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/price_param.py +0 -0
  143. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/product.py +0 -0
  144. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/product_create_params.py +0 -0
  145. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/product_list_params.py +0 -0
  146. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/product_list_response.py +0 -0
  147. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/product_update_params.py +0 -0
  148. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/products/__init__.py +0 -0
  149. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/products/image_update_params.py +0 -0
  150. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/products/image_update_response.py +0 -0
  151. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/refund.py +0 -0
  152. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/refund_create_params.py +0 -0
  153. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/refund_list_params.py +0 -0
  154. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/refund_status.py +0 -0
  155. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/subscription.py +0 -0
  156. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/subscription_charge_params.py +0 -0
  157. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/subscription_charge_response.py +0 -0
  158. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/subscription_create_params.py +0 -0
  159. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/subscription_create_response.py +0 -0
  160. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/subscription_list_params.py +0 -0
  161. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/subscription_list_response.py +0 -0
  162. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/subscription_status.py +0 -0
  163. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/subscription_update_params.py +0 -0
  164. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/tax_category.py +0 -0
  165. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/time_interval.py +0 -0
  166. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/webhook_event.py +0 -0
  167. {dodopayments-1.30.0 → dodopayments-1.30.2}/src/dodopayments/types/webhook_event_list_params.py +0 -0
  168. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/__init__.py +0 -0
  169. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/__init__.py +0 -0
  170. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/customers/__init__.py +0 -0
  171. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/customers/test_customer_portal.py +0 -0
  172. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/invoices/__init__.py +0 -0
  173. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/invoices/test_payments.py +0 -0
  174. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/products/__init__.py +0 -0
  175. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/products/test_images.py +0 -0
  176. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_addons.py +0 -0
  177. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_brands.py +0 -0
  178. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_discounts.py +0 -0
  179. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_disputes.py +0 -0
  180. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_license_key_instances.py +0 -0
  181. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_license_keys.py +0 -0
  182. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_licenses.py +0 -0
  183. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_misc.py +0 -0
  184. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_payments.py +0 -0
  185. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_payouts.py +0 -0
  186. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_products.py +0 -0
  187. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_refunds.py +0 -0
  188. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/api_resources/test_webhook_events.py +0 -0
  189. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/conftest.py +0 -0
  190. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/sample_file.txt +0 -0
  191. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_deepcopy.py +0 -0
  192. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_extract_files.py +0 -0
  193. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_files.py +0 -0
  194. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_models.py +0 -0
  195. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_qs.py +0 -0
  196. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_required_args.py +0 -0
  197. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_response.py +0 -0
  198. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_streaming.py +0 -0
  199. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_transform.py +0 -0
  200. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_utils/test_proxy.py +0 -0
  201. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/test_utils/test_typing.py +0 -0
  202. {dodopayments-1.30.0 → dodopayments-1.30.2}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.30.2"
3
+ }
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.30.2 (2025-06-04)
4
+
5
+ Full Changelog: [v1.30.0...v1.30.2](https://github.com/dodopayments/dodopayments-python/compare/v1.30.0...v1.30.2)
6
+
7
+ ### Features
8
+
9
+ * **api:** fixed openapi spec ([15906d8](https://github.com/dodopayments/dodopayments-python/commit/15906d809eb6ab659e3b60ee1b5c92b3716c6730))
10
+ * **client:** add follow_redirects request option ([fb63495](https://github.com/dodopayments/dodopayments-python/commit/fb63495b183be3cbe1c4d0eacfdfaeb7f00653e0))
11
+
12
+
13
+ ### Chores
14
+
15
+ * **docs:** remove reference to rye shell ([865a4ac](https://github.com/dodopayments/dodopayments-python/commit/865a4acfec4f830bc4209267a7d937dba0c401be))
16
+
3
17
  ## 1.30.0 (2025-06-02)
4
18
 
5
19
  Full Changelog: [v1.27.0...v1.30.0](https://github.com/dodopayments/dodopayments-python/compare/v1.27.0...v1.30.0)
@@ -17,8 +17,7 @@ $ rye sync --all-features
17
17
  You can then run scripts using `rye run python script.py` or by activating the virtual environment:
18
18
 
19
19
  ```sh
20
- $ rye shell
21
- # or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work
20
+ # Activate the virtual environment - https://docs.python.org/3/library/venv.html#how-venvs-work
22
21
  $ source .venv/bin/activate
23
22
 
24
23
  # now you can omit the `rye run` prefix
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dodopayments
3
- Version: 1.30.0
3
+ Version: 1.30.2
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
@@ -47,7 +47,7 @@ Methods:
47
47
  - <code title="get /subscriptions/{subscription_id}">client.subscriptions.<a href="./src/dodopayments/resources/subscriptions.py">retrieve</a>(subscription_id) -> <a href="./src/dodopayments/types/subscription.py">Subscription</a></code>
48
48
  - <code title="patch /subscriptions/{subscription_id}">client.subscriptions.<a href="./src/dodopayments/resources/subscriptions.py">update</a>(subscription_id, \*\*<a href="src/dodopayments/types/subscription_update_params.py">params</a>) -> <a href="./src/dodopayments/types/subscription.py">Subscription</a></code>
49
49
  - <code title="get /subscriptions">client.subscriptions.<a href="./src/dodopayments/resources/subscriptions.py">list</a>(\*\*<a href="src/dodopayments/types/subscription_list_params.py">params</a>) -> <a href="./src/dodopayments/types/subscription_list_response.py">SyncDefaultPageNumberPagination[SubscriptionListResponse]</a></code>
50
- - <code title="post /subscriptions/{subscription_id}/change-plan">client.subscriptions.<a href="./src/dodopayments/resources/subscriptions.py">change_plan</a>(subscription_id) -> None</code>
50
+ - <code title="post /subscriptions/{subscription_id}/change-plan">client.subscriptions.<a href="./src/dodopayments/resources/subscriptions.py">change_plan</a>(subscription_id, \*\*<a href="src/dodopayments/types/subscription_change_plan_params.py">params</a>) -> None</code>
51
51
  - <code title="post /subscriptions/{subscription_id}/charge">client.subscriptions.<a href="./src/dodopayments/resources/subscriptions.py">charge</a>(subscription_id, \*\*<a href="src/dodopayments/types/subscription_charge_params.py">params</a>) -> <a href="./src/dodopayments/types/subscription_charge_response.py">SubscriptionChargeResponse</a></code>
52
52
 
53
53
  # Invoices
@@ -112,7 +112,7 @@ Methods:
112
112
 
113
113
  - <code title="post /customers">client.customers.<a href="./src/dodopayments/resources/customers/customers.py">create</a>(\*\*<a href="src/dodopayments/types/customer_create_params.py">params</a>) -> <a href="./src/dodopayments/types/customer.py">Customer</a></code>
114
114
  - <code title="get /customers/{customer_id}">client.customers.<a href="./src/dodopayments/resources/customers/customers.py">retrieve</a>(customer_id) -> <a href="./src/dodopayments/types/customer.py">Customer</a></code>
115
- - <code title="patch /customers/{customer_id}">client.customers.<a href="./src/dodopayments/resources/customers/customers.py">update</a>(customer_id) -> <a href="./src/dodopayments/types/customer.py">Customer</a></code>
115
+ - <code title="patch /customers/{customer_id}">client.customers.<a href="./src/dodopayments/resources/customers/customers.py">update</a>(customer_id, \*\*<a href="src/dodopayments/types/customer_update_params.py">params</a>) -> <a href="./src/dodopayments/types/customer.py">Customer</a></code>
116
116
  - <code title="get /customers">client.customers.<a href="./src/dodopayments/resources/customers/customers.py">list</a>(\*\*<a href="src/dodopayments/types/customer_list_params.py">params</a>) -> <a href="./src/dodopayments/types/customer.py">SyncDefaultPageNumberPagination[Customer]</a></code>
117
117
 
118
118
  ## CustomerPortal
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dodopayments"
3
- version = "1.30.0"
3
+ version = "1.30.2"
4
4
  description = "The official Python library for the Dodo Payments API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -960,6 +960,9 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
960
960
  if self.custom_auth is not None:
961
961
  kwargs["auth"] = self.custom_auth
962
962
 
963
+ if options.follow_redirects is not None:
964
+ kwargs["follow_redirects"] = options.follow_redirects
965
+
963
966
  log.debug("Sending HTTP Request: %s %s", request.method, request.url)
964
967
 
965
968
  response = None
@@ -1460,6 +1463,9 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
1460
1463
  if self.custom_auth is not None:
1461
1464
  kwargs["auth"] = self.custom_auth
1462
1465
 
1466
+ if options.follow_redirects is not None:
1467
+ kwargs["follow_redirects"] = options.follow_redirects
1468
+
1463
1469
  log.debug("Sending HTTP Request: %s %s", request.method, request.url)
1464
1470
 
1465
1471
  response = None
@@ -737,6 +737,7 @@ class FinalRequestOptionsInput(TypedDict, total=False):
737
737
  idempotency_key: str
738
738
  json_data: Body
739
739
  extra_json: AnyMapping
740
+ follow_redirects: bool
740
741
 
741
742
 
742
743
  @final
@@ -750,6 +751,7 @@ class FinalRequestOptions(pydantic.BaseModel):
750
751
  files: Union[HttpxRequestFiles, None] = None
751
752
  idempotency_key: Union[str, None] = None
752
753
  post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven()
754
+ follow_redirects: Union[bool, None] = None
753
755
 
754
756
  # It should be noted that we cannot use `json` here as that would override
755
757
  # a BaseModel method in an incompatible fashion.
@@ -100,6 +100,7 @@ class RequestOptions(TypedDict, total=False):
100
100
  params: Query
101
101
  extra_json: AnyMapping
102
102
  idempotency_key: str
103
+ follow_redirects: bool
103
104
 
104
105
 
105
106
  # Sentinel class used until PEP 0661 is accepted
@@ -215,3 +216,4 @@ class _GenericAlias(Protocol):
215
216
 
216
217
  class HttpxSendArgs(TypedDict, total=False):
217
218
  auth: httpx.Auth
219
+ follow_redirects: bool
@@ -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.30.0" # x-release-please-version
4
+ __version__ = "1.30.2" # x-release-please-version
@@ -6,7 +6,7 @@ from typing import Optional
6
6
 
7
7
  import httpx
8
8
 
9
- from ...types import customer_list_params, customer_create_params
9
+ from ...types import customer_list_params, customer_create_params, customer_update_params
10
10
  from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
11
11
  from ..._utils import maybe_transform, async_maybe_transform
12
12
  from ..._compat import cached_property
@@ -130,6 +130,8 @@ class CustomersResource(SyncAPIResource):
130
130
  self,
131
131
  customer_id: str,
132
132
  *,
133
+ name: Optional[str] | NotGiven = NOT_GIVEN,
134
+ phone_number: Optional[str] | NotGiven = NOT_GIVEN,
133
135
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
134
136
  # The extra values given here take precedence over values defined on the client or passed to this method.
135
137
  extra_headers: Headers | None = None,
@@ -151,6 +153,13 @@ class CustomersResource(SyncAPIResource):
151
153
  raise ValueError(f"Expected a non-empty value for `customer_id` but received {customer_id!r}")
152
154
  return self._patch(
153
155
  f"/customers/{customer_id}",
156
+ body=maybe_transform(
157
+ {
158
+ "name": name,
159
+ "phone_number": phone_number,
160
+ },
161
+ customer_update_params.CustomerUpdateParams,
162
+ ),
154
163
  options=make_request_options(
155
164
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
156
165
  ),
@@ -301,6 +310,8 @@ class AsyncCustomersResource(AsyncAPIResource):
301
310
  self,
302
311
  customer_id: str,
303
312
  *,
313
+ name: Optional[str] | NotGiven = NOT_GIVEN,
314
+ phone_number: Optional[str] | NotGiven = NOT_GIVEN,
304
315
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
305
316
  # The extra values given here take precedence over values defined on the client or passed to this method.
306
317
  extra_headers: Headers | None = None,
@@ -322,6 +333,13 @@ class AsyncCustomersResource(AsyncAPIResource):
322
333
  raise ValueError(f"Expected a non-empty value for `customer_id` but received {customer_id!r}")
323
334
  return await self._patch(
324
335
  f"/customers/{customer_id}",
336
+ body=await async_maybe_transform(
337
+ {
338
+ "name": name,
339
+ "phone_number": phone_number,
340
+ },
341
+ customer_update_params.CustomerUpdateParams,
342
+ ),
325
343
  options=make_request_options(
326
344
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
327
345
  ),
@@ -15,6 +15,7 @@ from ..types import (
15
15
  subscription_charge_params,
16
16
  subscription_create_params,
17
17
  subscription_update_params,
18
+ subscription_change_plan_params,
18
19
  )
19
20
  from .._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
20
21
  from .._utils import maybe_transform, async_maybe_transform
@@ -320,6 +321,10 @@ class SubscriptionsResource(SyncAPIResource):
320
321
  self,
321
322
  subscription_id: str,
322
323
  *,
324
+ product_id: str,
325
+ proration_billing_mode: Literal["prorated_immediately"],
326
+ quantity: int,
327
+ addons: Optional[Iterable[subscription_change_plan_params.Addon]] | NotGiven = NOT_GIVEN,
323
328
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
324
329
  # The extra values given here take precedence over values defined on the client or passed to this method.
325
330
  extra_headers: Headers | None = None,
@@ -329,6 +334,13 @@ class SubscriptionsResource(SyncAPIResource):
329
334
  ) -> None:
330
335
  """
331
336
  Args:
337
+ product_id: Unique identifier of the product to subscribe to
338
+
339
+ quantity: Number of units to subscribe for. Must be at least 1.
340
+
341
+ addons: Addons for the new plan. Note : Leaving this empty would remove any existing
342
+ addons
343
+
332
344
  extra_headers: Send extra headers
333
345
 
334
346
  extra_query: Add additional query parameters to the request
@@ -342,6 +354,15 @@ class SubscriptionsResource(SyncAPIResource):
342
354
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
343
355
  return self._post(
344
356
  f"/subscriptions/{subscription_id}/change-plan",
357
+ body=maybe_transform(
358
+ {
359
+ "product_id": product_id,
360
+ "proration_billing_mode": proration_billing_mode,
361
+ "quantity": quantity,
362
+ "addons": addons,
363
+ },
364
+ subscription_change_plan_params.SubscriptionChangePlanParams,
365
+ ),
345
366
  options=make_request_options(
346
367
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
347
368
  ),
@@ -673,6 +694,10 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
673
694
  self,
674
695
  subscription_id: str,
675
696
  *,
697
+ product_id: str,
698
+ proration_billing_mode: Literal["prorated_immediately"],
699
+ quantity: int,
700
+ addons: Optional[Iterable[subscription_change_plan_params.Addon]] | NotGiven = NOT_GIVEN,
676
701
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
677
702
  # The extra values given here take precedence over values defined on the client or passed to this method.
678
703
  extra_headers: Headers | None = None,
@@ -682,6 +707,13 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
682
707
  ) -> None:
683
708
  """
684
709
  Args:
710
+ product_id: Unique identifier of the product to subscribe to
711
+
712
+ quantity: Number of units to subscribe for. Must be at least 1.
713
+
714
+ addons: Addons for the new plan. Note : Leaving this empty would remove any existing
715
+ addons
716
+
685
717
  extra_headers: Send extra headers
686
718
 
687
719
  extra_query: Add additional query parameters to the request
@@ -695,6 +727,15 @@ class AsyncSubscriptionsResource(AsyncAPIResource):
695
727
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
696
728
  return await self._post(
697
729
  f"/subscriptions/{subscription_id}/change-plan",
730
+ body=await async_maybe_transform(
731
+ {
732
+ "product_id": product_id,
733
+ "proration_billing_mode": proration_billing_mode,
734
+ "quantity": quantity,
735
+ "addons": addons,
736
+ },
737
+ subscription_change_plan_params.SubscriptionChangePlanParams,
738
+ ),
698
739
  options=make_request_options(
699
740
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
700
741
  ),
@@ -54,6 +54,7 @@ from .product_list_response import ProductListResponse as ProductListResponse
54
54
  from .product_update_params import ProductUpdateParams as ProductUpdateParams
55
55
  from .customer_create_params import CustomerCreateParams as CustomerCreateParams
56
56
  from .customer_request_param import CustomerRequestParam as CustomerRequestParam
57
+ from .customer_update_params import CustomerUpdateParams as CustomerUpdateParams
57
58
  from .discount_create_params import DiscountCreateParams as DiscountCreateParams
58
59
  from .discount_update_params import DiscountUpdateParams as DiscountUpdateParams
59
60
  from .brand_retrieve_response import BrandRetrieveResponse as BrandRetrieveResponse
@@ -82,6 +83,7 @@ from .brand_update_images_response import BrandUpdateImagesResponse as BrandUpda
82
83
  from .subscription_charge_response import SubscriptionChargeResponse as SubscriptionChargeResponse
83
84
  from .subscription_create_response import SubscriptionCreateResponse as SubscriptionCreateResponse
84
85
  from .attach_existing_customer_param import AttachExistingCustomerParam as AttachExistingCustomerParam
86
+ from .subscription_change_plan_params import SubscriptionChangePlanParams as SubscriptionChangePlanParams
85
87
  from .license_key_instance_list_params import LicenseKeyInstanceListParams as LicenseKeyInstanceListParams
86
88
  from .one_time_product_cart_item_param import OneTimeProductCartItemParam as OneTimeProductCartItemParam
87
89
  from .license_key_instance_update_params import LicenseKeyInstanceUpdateParams as LicenseKeyInstanceUpdateParams
@@ -0,0 +1,14 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+ from typing_extensions import TypedDict
7
+
8
+ __all__ = ["CustomerUpdateParams"]
9
+
10
+
11
+ class CustomerUpdateParams(TypedDict, total=False):
12
+ name: Optional[str]
13
+
14
+ phone_number: Optional[str]
@@ -0,0 +1,30 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable, Optional
6
+ from typing_extensions import Literal, Required, TypedDict
7
+
8
+ __all__ = ["SubscriptionChangePlanParams", "Addon"]
9
+
10
+
11
+ class SubscriptionChangePlanParams(TypedDict, total=False):
12
+ product_id: Required[str]
13
+ """Unique identifier of the product to subscribe to"""
14
+
15
+ proration_billing_mode: Required[Literal["prorated_immediately"]]
16
+
17
+ quantity: Required[int]
18
+ """Number of units to subscribe for. Must be at least 1."""
19
+
20
+ addons: Optional[Iterable[Addon]]
21
+ """
22
+ Addons for the new plan. Note : Leaving this empty would remove any existing
23
+ addons
24
+ """
25
+
26
+
27
+ class Addon(TypedDict, total=False):
28
+ addon_id: Required[str]
29
+
30
+ quantity: Required[int]
@@ -102,14 +102,23 @@ class TestCustomers:
102
102
  @parametrize
103
103
  def test_method_update(self, client: DodoPayments) -> None:
104
104
  customer = client.customers.update(
105
- "customer_id",
105
+ customer_id="customer_id",
106
+ )
107
+ assert_matches_type(Customer, customer, path=["response"])
108
+
109
+ @parametrize
110
+ def test_method_update_with_all_params(self, client: DodoPayments) -> None:
111
+ customer = client.customers.update(
112
+ customer_id="customer_id",
113
+ name="name",
114
+ phone_number="phone_number",
106
115
  )
107
116
  assert_matches_type(Customer, customer, path=["response"])
108
117
 
109
118
  @parametrize
110
119
  def test_raw_response_update(self, client: DodoPayments) -> None:
111
120
  response = client.customers.with_raw_response.update(
112
- "customer_id",
121
+ customer_id="customer_id",
113
122
  )
114
123
 
115
124
  assert response.is_closed is True
@@ -120,7 +129,7 @@ class TestCustomers:
120
129
  @parametrize
121
130
  def test_streaming_response_update(self, client: DodoPayments) -> None:
122
131
  with client.customers.with_streaming_response.update(
123
- "customer_id",
132
+ customer_id="customer_id",
124
133
  ) as response:
125
134
  assert not response.is_closed
126
135
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -134,7 +143,7 @@ class TestCustomers:
134
143
  def test_path_params_update(self, client: DodoPayments) -> None:
135
144
  with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"):
136
145
  client.customers.with_raw_response.update(
137
- "",
146
+ customer_id="",
138
147
  )
139
148
 
140
149
  @parametrize
@@ -258,14 +267,23 @@ class TestAsyncCustomers:
258
267
  @parametrize
259
268
  async def test_method_update(self, async_client: AsyncDodoPayments) -> None:
260
269
  customer = await async_client.customers.update(
261
- "customer_id",
270
+ customer_id="customer_id",
271
+ )
272
+ assert_matches_type(Customer, customer, path=["response"])
273
+
274
+ @parametrize
275
+ async def test_method_update_with_all_params(self, async_client: AsyncDodoPayments) -> None:
276
+ customer = await async_client.customers.update(
277
+ customer_id="customer_id",
278
+ name="name",
279
+ phone_number="phone_number",
262
280
  )
263
281
  assert_matches_type(Customer, customer, path=["response"])
264
282
 
265
283
  @parametrize
266
284
  async def test_raw_response_update(self, async_client: AsyncDodoPayments) -> None:
267
285
  response = await async_client.customers.with_raw_response.update(
268
- "customer_id",
286
+ customer_id="customer_id",
269
287
  )
270
288
 
271
289
  assert response.is_closed is True
@@ -276,7 +294,7 @@ class TestAsyncCustomers:
276
294
  @parametrize
277
295
  async def test_streaming_response_update(self, async_client: AsyncDodoPayments) -> None:
278
296
  async with async_client.customers.with_streaming_response.update(
279
- "customer_id",
297
+ customer_id="customer_id",
280
298
  ) as response:
281
299
  assert not response.is_closed
282
300
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -290,7 +308,7 @@ class TestAsyncCustomers:
290
308
  async def test_path_params_update(self, async_client: AsyncDodoPayments) -> None:
291
309
  with pytest.raises(ValueError, match=r"Expected a non-empty value for `customer_id` but received ''"):
292
310
  await async_client.customers.with_raw_response.update(
293
- "",
311
+ customer_id="",
294
312
  )
295
313
 
296
314
  @parametrize
@@ -254,14 +254,36 @@ class TestSubscriptions:
254
254
  @parametrize
255
255
  def test_method_change_plan(self, client: DodoPayments) -> None:
256
256
  subscription = client.subscriptions.change_plan(
257
- "subscription_id",
257
+ subscription_id="subscription_id",
258
+ product_id="product_id",
259
+ proration_billing_mode="prorated_immediately",
260
+ quantity=0,
261
+ )
262
+ assert subscription is None
263
+
264
+ @parametrize
265
+ def test_method_change_plan_with_all_params(self, client: DodoPayments) -> None:
266
+ subscription = client.subscriptions.change_plan(
267
+ subscription_id="subscription_id",
268
+ product_id="product_id",
269
+ proration_billing_mode="prorated_immediately",
270
+ quantity=0,
271
+ addons=[
272
+ {
273
+ "addon_id": "addon_id",
274
+ "quantity": 0,
275
+ }
276
+ ],
258
277
  )
259
278
  assert subscription is None
260
279
 
261
280
  @parametrize
262
281
  def test_raw_response_change_plan(self, client: DodoPayments) -> None:
263
282
  response = client.subscriptions.with_raw_response.change_plan(
264
- "subscription_id",
283
+ subscription_id="subscription_id",
284
+ product_id="product_id",
285
+ proration_billing_mode="prorated_immediately",
286
+ quantity=0,
265
287
  )
266
288
 
267
289
  assert response.is_closed is True
@@ -272,7 +294,10 @@ class TestSubscriptions:
272
294
  @parametrize
273
295
  def test_streaming_response_change_plan(self, client: DodoPayments) -> None:
274
296
  with client.subscriptions.with_streaming_response.change_plan(
275
- "subscription_id",
297
+ subscription_id="subscription_id",
298
+ product_id="product_id",
299
+ proration_billing_mode="prorated_immediately",
300
+ quantity=0,
276
301
  ) as response:
277
302
  assert not response.is_closed
278
303
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -286,7 +311,10 @@ class TestSubscriptions:
286
311
  def test_path_params_change_plan(self, client: DodoPayments) -> None:
287
312
  with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"):
288
313
  client.subscriptions.with_raw_response.change_plan(
289
- "",
314
+ subscription_id="",
315
+ product_id="product_id",
316
+ proration_billing_mode="prorated_immediately",
317
+ quantity=0,
290
318
  )
291
319
 
292
320
  @parametrize
@@ -574,14 +602,36 @@ class TestAsyncSubscriptions:
574
602
  @parametrize
575
603
  async def test_method_change_plan(self, async_client: AsyncDodoPayments) -> None:
576
604
  subscription = await async_client.subscriptions.change_plan(
577
- "subscription_id",
605
+ subscription_id="subscription_id",
606
+ product_id="product_id",
607
+ proration_billing_mode="prorated_immediately",
608
+ quantity=0,
609
+ )
610
+ assert subscription is None
611
+
612
+ @parametrize
613
+ async def test_method_change_plan_with_all_params(self, async_client: AsyncDodoPayments) -> None:
614
+ subscription = await async_client.subscriptions.change_plan(
615
+ subscription_id="subscription_id",
616
+ product_id="product_id",
617
+ proration_billing_mode="prorated_immediately",
618
+ quantity=0,
619
+ addons=[
620
+ {
621
+ "addon_id": "addon_id",
622
+ "quantity": 0,
623
+ }
624
+ ],
578
625
  )
579
626
  assert subscription is None
580
627
 
581
628
  @parametrize
582
629
  async def test_raw_response_change_plan(self, async_client: AsyncDodoPayments) -> None:
583
630
  response = await async_client.subscriptions.with_raw_response.change_plan(
584
- "subscription_id",
631
+ subscription_id="subscription_id",
632
+ product_id="product_id",
633
+ proration_billing_mode="prorated_immediately",
634
+ quantity=0,
585
635
  )
586
636
 
587
637
  assert response.is_closed is True
@@ -592,7 +642,10 @@ class TestAsyncSubscriptions:
592
642
  @parametrize
593
643
  async def test_streaming_response_change_plan(self, async_client: AsyncDodoPayments) -> None:
594
644
  async with async_client.subscriptions.with_streaming_response.change_plan(
595
- "subscription_id",
645
+ subscription_id="subscription_id",
646
+ product_id="product_id",
647
+ proration_billing_mode="prorated_immediately",
648
+ quantity=0,
596
649
  ) as response:
597
650
  assert not response.is_closed
598
651
  assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -606,7 +659,10 @@ class TestAsyncSubscriptions:
606
659
  async def test_path_params_change_plan(self, async_client: AsyncDodoPayments) -> None:
607
660
  with pytest.raises(ValueError, match=r"Expected a non-empty value for `subscription_id` but received ''"):
608
661
  await async_client.subscriptions.with_raw_response.change_plan(
609
- "",
662
+ subscription_id="",
663
+ product_id="product_id",
664
+ proration_billing_mode="prorated_immediately",
665
+ quantity=0,
610
666
  )
611
667
 
612
668
  @parametrize
@@ -945,6 +945,33 @@ class TestDodoPayments:
945
945
 
946
946
  assert response.http_request.headers.get("x-stainless-retry-count") == "42"
947
947
 
948
+ @pytest.mark.respx(base_url=base_url)
949
+ def test_follow_redirects(self, respx_mock: MockRouter) -> None:
950
+ # Test that the default follow_redirects=True allows following redirects
951
+ respx_mock.post("/redirect").mock(
952
+ return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
953
+ )
954
+ respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"}))
955
+
956
+ response = self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response)
957
+ assert response.status_code == 200
958
+ assert response.json() == {"status": "ok"}
959
+
960
+ @pytest.mark.respx(base_url=base_url)
961
+ def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None:
962
+ # Test that follow_redirects=False prevents following redirects
963
+ respx_mock.post("/redirect").mock(
964
+ return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
965
+ )
966
+
967
+ with pytest.raises(APIStatusError) as exc_info:
968
+ self.client.post(
969
+ "/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response
970
+ )
971
+
972
+ assert exc_info.value.response.status_code == 302
973
+ assert exc_info.value.response.headers["Location"] == f"{base_url}/redirected"
974
+
948
975
 
949
976
  class TestAsyncDodoPayments:
950
977
  client = AsyncDodoPayments(base_url=base_url, bearer_token=bearer_token, _strict_response_validation=True)
@@ -1887,3 +1914,30 @@ class TestAsyncDodoPayments:
1887
1914
  raise AssertionError("calling get_platform using asyncify resulted in a hung process")
1888
1915
 
1889
1916
  time.sleep(0.1)
1917
+
1918
+ @pytest.mark.respx(base_url=base_url)
1919
+ async def test_follow_redirects(self, respx_mock: MockRouter) -> None:
1920
+ # Test that the default follow_redirects=True allows following redirects
1921
+ respx_mock.post("/redirect").mock(
1922
+ return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
1923
+ )
1924
+ respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"}))
1925
+
1926
+ response = await self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response)
1927
+ assert response.status_code == 200
1928
+ assert response.json() == {"status": "ok"}
1929
+
1930
+ @pytest.mark.respx(base_url=base_url)
1931
+ async def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None:
1932
+ # Test that follow_redirects=False prevents following redirects
1933
+ respx_mock.post("/redirect").mock(
1934
+ return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"})
1935
+ )
1936
+
1937
+ with pytest.raises(APIStatusError) as exc_info:
1938
+ await self.client.post(
1939
+ "/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response
1940
+ )
1941
+
1942
+ assert exc_info.value.response.status_code == 302
1943
+ assert exc_info.value.response.headers["Location"] == f"{base_url}/redirected"
@@ -1,3 +0,0 @@
1
- {
2
- ".": "1.30.0"
3
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes