dodopayments 2.9.1 → 2.11.0

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.
Files changed (302) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +9 -9
  4. data/lib/dodopayments/client.rb +4 -0
  5. data/lib/dodopayments/internal/transport/base_client.rb +2 -0
  6. data/lib/dodopayments/internal/type/union.rb +21 -7
  7. data/lib/dodopayments/models/abandoned_checkout_detected_webhook_event.rb +4 -16
  8. data/lib/dodopayments/models/abandoned_checkout_recovered_webhook_event.rb +4 -16
  9. data/lib/dodopayments/models/checkout_session_flags.rb +15 -1
  10. data/lib/dodopayments/models/checkout_session_request.rb +25 -2
  11. data/lib/dodopayments/models/checkout_session_response.rb +33 -1
  12. data/lib/dodopayments/models/credit_added_webhook_event.rb +4 -16
  13. data/lib/dodopayments/models/credit_balance_low_webhook_event.rb +4 -16
  14. data/lib/dodopayments/models/credit_deducted_webhook_event.rb +4 -16
  15. data/lib/dodopayments/models/credit_expired_webhook_event.rb +4 -16
  16. data/lib/dodopayments/models/credit_manual_adjustment_webhook_event.rb +4 -16
  17. data/lib/dodopayments/models/credit_overage_charged_webhook_event.rb +4 -16
  18. data/lib/dodopayments/models/credit_overage_reset_webhook_event.rb +4 -16
  19. data/lib/dodopayments/models/credit_rolled_over_webhook_event.rb +4 -16
  20. data/lib/dodopayments/models/credit_rollover_forfeited_webhook_event.rb +4 -16
  21. data/lib/dodopayments/models/discount_detail.rb +143 -0
  22. data/lib/dodopayments/models/dispute_accepted_webhook_event.rb +4 -16
  23. data/lib/dodopayments/models/dispute_cancelled_webhook_event.rb +4 -16
  24. data/lib/dodopayments/models/dispute_challenged_webhook_event.rb +4 -16
  25. data/lib/dodopayments/models/dispute_expired_webhook_event.rb +4 -16
  26. data/lib/dodopayments/models/dispute_lost_webhook_event.rb +4 -16
  27. data/lib/dodopayments/models/dispute_opened_webhook_event.rb +4 -16
  28. data/lib/dodopayments/models/dispute_won_webhook_event.rb +4 -16
  29. data/lib/dodopayments/models/dunning_recovered_webhook_event.rb +4 -16
  30. data/lib/dodopayments/models/dunning_started_webhook_event.rb +4 -16
  31. data/lib/dodopayments/models/entitlement_grant_created_webhook_event.rb +4 -16
  32. data/lib/dodopayments/models/entitlement_grant_delivered_webhook_event.rb +4 -16
  33. data/lib/dodopayments/models/entitlement_grant_failed_webhook_event.rb +4 -16
  34. data/lib/dodopayments/models/entitlement_grant_revoked_webhook_event.rb +4 -16
  35. data/lib/dodopayments/models/filter_type.rb +71 -0
  36. data/lib/dodopayments/models/github_permission.rb +19 -0
  37. data/lib/dodopayments/models/integration_config.rb +3 -19
  38. data/lib/dodopayments/models/integration_config_response.rb +3 -19
  39. data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +22 -0
  40. data/lib/dodopayments/models/license_key_created_webhook_event.rb +4 -16
  41. data/lib/dodopayments/models/meter_filter.rb +3 -331
  42. data/lib/dodopayments/models/payment.rb +15 -3
  43. data/lib/dodopayments/models/payment_cancelled_webhook_event.rb +4 -16
  44. data/lib/dodopayments/models/payment_create_params.rb +25 -3
  45. data/lib/dodopayments/models/payment_create_response.rb +14 -3
  46. data/lib/dodopayments/models/payment_failed_webhook_event.rb +4 -16
  47. data/lib/dodopayments/models/payment_method_types.rb +1 -0
  48. data/lib/dodopayments/models/payment_processing_webhook_event.rb +4 -16
  49. data/lib/dodopayments/models/payment_succeeded_webhook_event.rb +4 -16
  50. data/lib/dodopayments/models/payout_list_response.rb +6 -3
  51. data/lib/dodopayments/models/price.rb +20 -48
  52. data/lib/dodopayments/models/product.rb +3 -3
  53. data/lib/dodopayments/models/product_collection.rb +74 -0
  54. data/lib/dodopayments/models/product_collection_create_params.rb +47 -0
  55. data/lib/dodopayments/models/product_collection_delete_params.rb +20 -0
  56. data/lib/dodopayments/models/product_collection_list_params.rb +46 -0
  57. data/lib/dodopayments/models/product_collection_list_response.rb +65 -0
  58. data/lib/dodopayments/models/product_collection_retrieve_params.rb +20 -0
  59. data/lib/dodopayments/models/product_collection_unarchive_params.rb +20 -0
  60. data/lib/dodopayments/models/product_collection_unarchive_response.rb +33 -0
  61. data/lib/dodopayments/models/product_collection_update_images_params.rb +29 -0
  62. data/lib/dodopayments/models/product_collection_update_images_response.rb +25 -0
  63. data/lib/dodopayments/models/product_collection_update_params.rb +61 -0
  64. data/lib/dodopayments/models/product_collections/group_create_params.rb +22 -0
  65. data/lib/dodopayments/models/product_collections/group_delete_params.rb +28 -0
  66. data/lib/dodopayments/models/product_collections/group_product.rb +26 -0
  67. data/lib/dodopayments/models/product_collections/group_update_params.rb +59 -0
  68. data/lib/dodopayments/models/product_collections/groups/item_create_params.rb +41 -0
  69. data/lib/dodopayments/models/product_collections/groups/item_create_response.rb +15 -0
  70. data/lib/dodopayments/models/product_collections/groups/item_delete_params.rb +36 -0
  71. data/lib/dodopayments/models/product_collections/groups/item_update_params.rb +47 -0
  72. data/lib/dodopayments/models/product_collections/groups/product_collection_product.rb +132 -0
  73. data/lib/dodopayments/models/product_collections/product_collection_group_details.rb +42 -0
  74. data/lib/dodopayments/models/product_collections/product_collection_group_response.rb +39 -0
  75. data/lib/dodopayments/models/product_create_params.rb +3 -3
  76. data/lib/dodopayments/models/product_item_req.rb +42 -1
  77. data/lib/dodopayments/models/product_update_params.rb +3 -3
  78. data/lib/dodopayments/models/refund_failed_webhook_event.rb +4 -16
  79. data/lib/dodopayments/models/refund_succeeded_webhook_event.rb +4 -16
  80. data/lib/dodopayments/models/subscription.rb +24 -5
  81. data/lib/dodopayments/models/subscription_active_webhook_event.rb +4 -16
  82. data/lib/dodopayments/models/subscription_cancelled_webhook_event.rb +4 -16
  83. data/lib/dodopayments/models/subscription_create_params.rb +25 -3
  84. data/lib/dodopayments/models/subscription_create_response.rb +14 -3
  85. data/lib/dodopayments/models/subscription_expired_webhook_event.rb +4 -16
  86. data/lib/dodopayments/models/subscription_failed_webhook_event.rb +4 -16
  87. data/lib/dodopayments/models/subscription_list_response.rb +45 -5
  88. data/lib/dodopayments/models/subscription_on_hold_webhook_event.rb +4 -16
  89. data/lib/dodopayments/models/subscription_plan_changed_webhook_event.rb +4 -16
  90. data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +21 -49
  91. data/lib/dodopayments/models/subscription_renewed_webhook_event.rb +4 -16
  92. data/lib/dodopayments/models/subscription_update_params.rb +12 -1
  93. data/lib/dodopayments/models/subscription_update_payment_method_params.rb +19 -37
  94. data/lib/dodopayments/models/subscription_updated_webhook_event.rb +4 -16
  95. data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +41 -39
  96. data/lib/dodopayments/models/unwrap_webhook_event.rb +41 -39
  97. data/lib/dodopayments/models/update_subscription_plan_req.rb +17 -6
  98. data/lib/dodopayments/models/webhook_event_type.rb +1 -2
  99. data/lib/dodopayments/models/webhook_payload.rb +52 -143
  100. data/lib/dodopayments/models.rb +24 -0
  101. data/lib/dodopayments/resources/checkout_sessions.rb +12 -4
  102. data/lib/dodopayments/resources/invoices/payments.rb +18 -0
  103. data/lib/dodopayments/resources/payments.rb +6 -2
  104. data/lib/dodopayments/resources/product_collections/groups/items.rb +111 -0
  105. data/lib/dodopayments/resources/product_collections/groups.rb +109 -0
  106. data/lib/dodopayments/resources/product_collections.rb +179 -0
  107. data/lib/dodopayments/resources/subscriptions.rb +20 -10
  108. data/lib/dodopayments/version.rb +1 -1
  109. data/lib/dodopayments.rb +29 -0
  110. data/rbi/dodopayments/client.rbi +3 -0
  111. data/rbi/dodopayments/models/abandoned_checkout_detected_webhook_event.rbi +4 -40
  112. data/rbi/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbi +4 -40
  113. data/rbi/dodopayments/models/checkout_session_flags.rbi +23 -0
  114. data/rbi/dodopayments/models/checkout_session_request.rbi +26 -0
  115. data/rbi/dodopayments/models/checkout_session_response.rbi +43 -5
  116. data/rbi/dodopayments/models/credit_added_webhook_event.rbi +4 -29
  117. data/rbi/dodopayments/models/credit_balance_low_webhook_event.rbi +4 -33
  118. data/rbi/dodopayments/models/credit_deducted_webhook_event.rbi +4 -33
  119. data/rbi/dodopayments/models/credit_expired_webhook_event.rbi +4 -33
  120. data/rbi/dodopayments/models/credit_manual_adjustment_webhook_event.rbi +4 -39
  121. data/rbi/dodopayments/models/credit_overage_charged_webhook_event.rbi +4 -36
  122. data/rbi/dodopayments/models/credit_overage_reset_webhook_event.rbi +4 -36
  123. data/rbi/dodopayments/models/credit_rolled_over_webhook_event.rbi +4 -33
  124. data/rbi/dodopayments/models/credit_rollover_forfeited_webhook_event.rbi +4 -40
  125. data/rbi/dodopayments/models/discount_detail.rbi +161 -0
  126. data/rbi/dodopayments/models/dispute_accepted_webhook_event.rbi +4 -33
  127. data/rbi/dodopayments/models/dispute_cancelled_webhook_event.rbi +4 -33
  128. data/rbi/dodopayments/models/dispute_challenged_webhook_event.rbi +4 -34
  129. data/rbi/dodopayments/models/dispute_expired_webhook_event.rbi +4 -33
  130. data/rbi/dodopayments/models/dispute_lost_webhook_event.rbi +4 -29
  131. data/rbi/dodopayments/models/dispute_opened_webhook_event.rbi +4 -33
  132. data/rbi/dodopayments/models/dispute_won_webhook_event.rbi +4 -29
  133. data/rbi/dodopayments/models/dunning_recovered_webhook_event.rbi +4 -33
  134. data/rbi/dodopayments/models/dunning_started_webhook_event.rbi +4 -33
  135. data/rbi/dodopayments/models/entitlement_grant_created_webhook_event.rbi +4 -40
  136. data/rbi/dodopayments/models/entitlement_grant_delivered_webhook_event.rbi +4 -40
  137. data/rbi/dodopayments/models/entitlement_grant_failed_webhook_event.rbi +4 -39
  138. data/rbi/dodopayments/models/entitlement_grant_revoked_webhook_event.rbi +4 -40
  139. data/rbi/dodopayments/models/filter_type.rbi +112 -0
  140. data/rbi/dodopayments/models/github_permission.rbi +26 -0
  141. data/rbi/dodopayments/models/integration_config.rbi +3 -59
  142. data/rbi/dodopayments/models/integration_config_response.rbi +3 -59
  143. data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +40 -0
  144. data/rbi/dodopayments/models/license_key_created_webhook_event.rbi +4 -34
  145. data/rbi/dodopayments/models/meter_filter.rbi +3 -572
  146. data/rbi/dodopayments/models/payment.rbi +10 -2
  147. data/rbi/dodopayments/models/payment_cancelled_webhook_event.rbi +4 -33
  148. data/rbi/dodopayments/models/payment_create_params.rbi +26 -2
  149. data/rbi/dodopayments/models/payment_create_response.rbi +12 -2
  150. data/rbi/dodopayments/models/payment_failed_webhook_event.rbi +4 -33
  151. data/rbi/dodopayments/models/payment_method_types.rbi +1 -0
  152. data/rbi/dodopayments/models/payment_processing_webhook_event.rbi +4 -34
  153. data/rbi/dodopayments/models/payment_succeeded_webhook_event.rbi +4 -33
  154. data/rbi/dodopayments/models/price.rbi +18 -90
  155. data/rbi/dodopayments/models/product_collection.rbi +108 -0
  156. data/rbi/dodopayments/models/product_collection_create_params.rbi +82 -0
  157. data/rbi/dodopayments/models/product_collection_delete_params.rbi +38 -0
  158. data/rbi/dodopayments/models/product_collection_list_params.rbi +82 -0
  159. data/rbi/dodopayments/models/product_collection_list_response.rbi +88 -0
  160. data/rbi/dodopayments/models/product_collection_retrieve_params.rbi +38 -0
  161. data/rbi/dodopayments/models/product_collection_unarchive_params.rbi +38 -0
  162. data/rbi/dodopayments/models/product_collection_unarchive_response.rbi +56 -0
  163. data/rbi/dodopayments/models/product_collection_update_images_params.rbi +52 -0
  164. data/rbi/dodopayments/models/product_collection_update_images_response.rbi +40 -0
  165. data/rbi/dodopayments/models/product_collection_update_params.rbi +84 -0
  166. data/rbi/dodopayments/models/product_collections/group_create_params.rbi +40 -0
  167. data/rbi/dodopayments/models/product_collections/group_delete_params.rbi +48 -0
  168. data/rbi/dodopayments/models/product_collections/group_product.rbi +46 -0
  169. data/rbi/dodopayments/models/product_collections/group_update_params.rbi +80 -0
  170. data/rbi/dodopayments/models/product_collections/groups/item_create_params.rbi +68 -0
  171. data/rbi/dodopayments/models/product_collections/groups/item_create_response.rbi +17 -0
  172. data/rbi/dodopayments/models/product_collections/groups/item_delete_params.rbi +55 -0
  173. data/rbi/dodopayments/models/product_collections/groups/item_update_params.rbi +68 -0
  174. data/rbi/dodopayments/models/product_collections/groups/product_collection_product.rbi +148 -0
  175. data/rbi/dodopayments/models/product_collections/product_collection_group_details.rbi +67 -0
  176. data/rbi/dodopayments/models/product_collections/product_collection_group_response.rbi +68 -0
  177. data/rbi/dodopayments/models/product_item_req.rbi +74 -3
  178. data/rbi/dodopayments/models/refund_failed_webhook_event.rbi +4 -31
  179. data/rbi/dodopayments/models/refund_succeeded_webhook_event.rbi +4 -33
  180. data/rbi/dodopayments/models/subscription.rbi +22 -4
  181. data/rbi/dodopayments/models/subscription_active_webhook_event.rbi +4 -36
  182. data/rbi/dodopayments/models/subscription_cancelled_webhook_event.rbi +4 -36
  183. data/rbi/dodopayments/models/subscription_create_params.rbi +26 -2
  184. data/rbi/dodopayments/models/subscription_create_response.rbi +12 -2
  185. data/rbi/dodopayments/models/subscription_expired_webhook_event.rbi +4 -36
  186. data/rbi/dodopayments/models/subscription_failed_webhook_event.rbi +4 -36
  187. data/rbi/dodopayments/models/subscription_list_response.rbi +77 -4
  188. data/rbi/dodopayments/models/subscription_on_hold_webhook_event.rbi +4 -36
  189. data/rbi/dodopayments/models/subscription_plan_changed_webhook_event.rbi +4 -40
  190. data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +18 -123
  191. data/rbi/dodopayments/models/subscription_renewed_webhook_event.rbi +4 -36
  192. data/rbi/dodopayments/models/subscription_update_params.rbi +14 -0
  193. data/rbi/dodopayments/models/subscription_update_payment_method_params.rbi +28 -112
  194. data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +4 -36
  195. data/rbi/dodopayments/models/update_subscription_plan_req.rbi +18 -8
  196. data/rbi/dodopayments/models/webhook_event_type.rbi +5 -4
  197. data/rbi/dodopayments/models/webhook_payload.rbi +46 -466
  198. data/rbi/dodopayments/models.rbi +31 -0
  199. data/rbi/dodopayments/resources/checkout_sessions.rbi +22 -0
  200. data/rbi/dodopayments/resources/invoices/payments.rbi +9 -0
  201. data/rbi/dodopayments/resources/payments.rbi +11 -1
  202. data/rbi/dodopayments/resources/product_collections/groups/items.rbi +83 -0
  203. data/rbi/dodopayments/resources/product_collections/groups.rbi +88 -0
  204. data/rbi/dodopayments/resources/product_collections.rbi +149 -0
  205. data/rbi/dodopayments/resources/subscriptions.rbi +37 -13
  206. data/sig/dodopayments/client.rbs +2 -0
  207. data/sig/dodopayments/models/abandoned_checkout_detected_webhook_event.rbs +4 -14
  208. data/sig/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbs +4 -14
  209. data/sig/dodopayments/models/checkout_session_flags.rbs +7 -0
  210. data/sig/dodopayments/models/checkout_session_request.rbs +10 -0
  211. data/sig/dodopayments/models/checkout_session_response.rbs +27 -3
  212. data/sig/dodopayments/models/credit_added_webhook_event.rbs +4 -14
  213. data/sig/dodopayments/models/credit_balance_low_webhook_event.rbs +4 -14
  214. data/sig/dodopayments/models/credit_deducted_webhook_event.rbs +4 -14
  215. data/sig/dodopayments/models/credit_expired_webhook_event.rbs +4 -14
  216. data/sig/dodopayments/models/credit_manual_adjustment_webhook_event.rbs +4 -14
  217. data/sig/dodopayments/models/credit_overage_charged_webhook_event.rbs +4 -14
  218. data/sig/dodopayments/models/credit_overage_reset_webhook_event.rbs +4 -14
  219. data/sig/dodopayments/models/credit_rolled_over_webhook_event.rbs +4 -14
  220. data/sig/dodopayments/models/credit_rollover_forfeited_webhook_event.rbs +4 -14
  221. data/sig/dodopayments/models/discount_detail.rbs +95 -0
  222. data/sig/dodopayments/models/dispute_accepted_webhook_event.rbs +4 -14
  223. data/sig/dodopayments/models/dispute_cancelled_webhook_event.rbs +4 -14
  224. data/sig/dodopayments/models/dispute_challenged_webhook_event.rbs +4 -14
  225. data/sig/dodopayments/models/dispute_expired_webhook_event.rbs +4 -14
  226. data/sig/dodopayments/models/dispute_lost_webhook_event.rbs +4 -14
  227. data/sig/dodopayments/models/dispute_opened_webhook_event.rbs +4 -14
  228. data/sig/dodopayments/models/dispute_won_webhook_event.rbs +4 -14
  229. data/sig/dodopayments/models/dunning_recovered_webhook_event.rbs +4 -14
  230. data/sig/dodopayments/models/dunning_started_webhook_event.rbs +4 -14
  231. data/sig/dodopayments/models/entitlement_grant_created_webhook_event.rbs +4 -14
  232. data/sig/dodopayments/models/entitlement_grant_delivered_webhook_event.rbs +4 -14
  233. data/sig/dodopayments/models/entitlement_grant_failed_webhook_event.rbs +4 -14
  234. data/sig/dodopayments/models/entitlement_grant_revoked_webhook_event.rbs +4 -14
  235. data/sig/dodopayments/models/filter_type.rbs +52 -0
  236. data/sig/dodopayments/models/github_permission.rbs +17 -0
  237. data/sig/dodopayments/models/integration_config.rbs +4 -18
  238. data/sig/dodopayments/models/integration_config_response.rbs +4 -18
  239. data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +25 -0
  240. data/sig/dodopayments/models/license_key_created_webhook_event.rbs +4 -14
  241. data/sig/dodopayments/models/meter_filter.rbs +4 -252
  242. data/sig/dodopayments/models/payment.rbs +5 -0
  243. data/sig/dodopayments/models/payment_cancelled_webhook_event.rbs +4 -14
  244. data/sig/dodopayments/models/payment_create_params.rbs +10 -0
  245. data/sig/dodopayments/models/payment_create_response.rbs +5 -0
  246. data/sig/dodopayments/models/payment_failed_webhook_event.rbs +4 -14
  247. data/sig/dodopayments/models/payment_method_types.rbs +2 -0
  248. data/sig/dodopayments/models/payment_processing_webhook_event.rbs +4 -14
  249. data/sig/dodopayments/models/payment_succeeded_webhook_event.rbs +4 -14
  250. data/sig/dodopayments/models/price.rbs +15 -45
  251. data/sig/dodopayments/models/product_collection.rbs +55 -0
  252. data/sig/dodopayments/models/product_collection_create_params.rbs +41 -0
  253. data/sig/dodopayments/models/product_collection_delete_params.rbs +23 -0
  254. data/sig/dodopayments/models/product_collection_list_params.rbs +49 -0
  255. data/sig/dodopayments/models/product_collection_list_response.rbs +50 -0
  256. data/sig/dodopayments/models/product_collection_retrieve_params.rbs +23 -0
  257. data/sig/dodopayments/models/product_collection_unarchive_params.rbs +23 -0
  258. data/sig/dodopayments/models/product_collection_unarchive_response.rbs +30 -0
  259. data/sig/dodopayments/models/product_collection_update_images_params.rbs +28 -0
  260. data/sig/dodopayments/models/product_collection_update_images_response.rbs +16 -0
  261. data/sig/dodopayments/models/product_collection_update_params.rbs +51 -0
  262. data/sig/dodopayments/models/product_collections/group_create_params.rbs +27 -0
  263. data/sig/dodopayments/models/product_collections/group_delete_params.rbs +30 -0
  264. data/sig/dodopayments/models/product_collections/group_product.rbs +17 -0
  265. data/sig/dodopayments/models/product_collections/group_update_params.rbs +48 -0
  266. data/sig/dodopayments/models/product_collections/groups/item_create_params.rbs +40 -0
  267. data/sig/dodopayments/models/product_collections/groups/item_create_response.rbs +12 -0
  268. data/sig/dodopayments/models/product_collections/groups/item_delete_params.rbs +36 -0
  269. data/sig/dodopayments/models/product_collections/groups/item_update_params.rbs +40 -0
  270. data/sig/dodopayments/models/product_collections/groups/product_collection_product.rbs +99 -0
  271. data/sig/dodopayments/models/product_collections/product_collection_group_details.rbs +34 -0
  272. data/sig/dodopayments/models/product_collections/product_collection_group_response.rbs +39 -0
  273. data/sig/dodopayments/models/product_item_req.rbs +27 -3
  274. data/sig/dodopayments/models/refund_failed_webhook_event.rbs +4 -14
  275. data/sig/dodopayments/models/refund_succeeded_webhook_event.rbs +4 -14
  276. data/sig/dodopayments/models/subscription.rbs +10 -0
  277. data/sig/dodopayments/models/subscription_active_webhook_event.rbs +4 -14
  278. data/sig/dodopayments/models/subscription_cancelled_webhook_event.rbs +4 -14
  279. data/sig/dodopayments/models/subscription_create_params.rbs +10 -0
  280. data/sig/dodopayments/models/subscription_create_response.rbs +5 -0
  281. data/sig/dodopayments/models/subscription_expired_webhook_event.rbs +4 -14
  282. data/sig/dodopayments/models/subscription_failed_webhook_event.rbs +4 -14
  283. data/sig/dodopayments/models/subscription_list_response.rbs +29 -0
  284. data/sig/dodopayments/models/subscription_on_hold_webhook_event.rbs +4 -14
  285. data/sig/dodopayments/models/subscription_plan_changed_webhook_event.rbs +4 -14
  286. data/sig/dodopayments/models/subscription_preview_change_plan_response.rbs +15 -45
  287. data/sig/dodopayments/models/subscription_renewed_webhook_event.rbs +4 -14
  288. data/sig/dodopayments/models/subscription_update_params.rbs +5 -0
  289. data/sig/dodopayments/models/subscription_update_payment_method_params.rbs +17 -57
  290. data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +4 -14
  291. data/sig/dodopayments/models/update_subscription_plan_req.rbs +5 -0
  292. data/sig/dodopayments/models/webhook_event_type.rbs +2 -4
  293. data/sig/dodopayments/models/webhook_payload.rbs +50 -213
  294. data/sig/dodopayments/models.rbs +24 -0
  295. data/sig/dodopayments/resources/checkout_sessions.rbs +4 -0
  296. data/sig/dodopayments/resources/invoices/payments.rbs +5 -0
  297. data/sig/dodopayments/resources/payments.rbs +2 -0
  298. data/sig/dodopayments/resources/product_collections/groups/items.rbs +33 -0
  299. data/sig/dodopayments/resources/product_collections/groups.rbs +34 -0
  300. data/sig/dodopayments/resources/product_collections.rbs +56 -0
  301. data/sig/dodopayments/resources/subscriptions.rbs +6 -1
  302. metadata +89 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc0aa98fdabf63772954ef8a37fa9943640be90e8f5b63b6271d23d7679d347e
4
- data.tar.gz: 8ad9b63374eed557b79b1ec9469f96f58b05b9f68c695fa413785474ab35e9fc
3
+ metadata.gz: 37a5895dd2b5d696adb46dd626413dbbf90366649cc8dbc064f551fa9c479cfd
4
+ data.tar.gz: 7a0d7cc47bf89c6de92c1018078438c8209a8bdb16f72c746f867e48a868f2f2
5
5
  SHA512:
6
- metadata.gz: ff56943bda78725f9e454cfb3ab1d9ebe09fbb8c01ff0fc54b47edbcf6417d8fb036a0e0e7d01adf8bdbd733089c03198508c97f25897ec3a718f957f478bd43
7
- data.tar.gz: ca67b58771ea486e6b99f1c0351555c3c527f0535ae5b30dc186ba65adfcb5506d3d8e1cb952158eb5290dde9c7dbab80b175ce392c4143f9b8c632810d3d6ac
6
+ metadata.gz: 4081412b2c3f6a61b73f4b9f5fe0aa570250e523cb0675f39a5d6ef242e66a086ca4b0b0a3546b607a1e8bc0d51e5fb267a4330b66d309a90f076f1267347973
7
+ data.tar.gz: 81c5473276481eff28bb2a62757133119f160a7c83abce993662a0073d90807f85a12cc3e2edd29117b9befb1944fabfa0b7a6d8b629ab0f22a3220ab58588ff
data/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.11.0 (2026-05-21)
4
+
5
+ Full Changelog: [v2.10.0...v2.11.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.10.0...v2.11.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** fixed a breaking modal change ([ca90fef](https://github.com/dodopayments/dodopayments-ruby/commit/ca90fef9200c68c0686261728a7d1add4820cdb5))
10
+ * **api:** stainless fixes ([3b16e3f](https://github.com/dodopayments/dodopayments-ruby/commit/3b16e3f755914b312d060f705631c8e5f172beb7))
11
+ * **api:** updated openapi spec to v1.99.0 and added missing endpoints as well ([11e4b50](https://github.com/dodopayments/dodopayments-ruby/commit/11e4b50fb9a96cad609583025a02490e58677296))
12
+
13
+ ## 2.10.0 (2026-05-14)
14
+
15
+ Full Changelog: [v2.9.1...v2.10.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.9.1...v2.10.0)
16
+
17
+ ### Features
18
+
19
+ * **api:** manual updates ([5bea624](https://github.com/dodopayments/dodopayments-ruby/commit/5bea6246c3a998c3587e24a9c345a41000a87e31))
20
+ * **api:** updated openapi spec to 1.98.0 ([4747cdf](https://github.com/dodopayments/dodopayments-ruby/commit/4747cdf437c49a58c4e70908e08e4bd853dd0859))
21
+ * **api:** updated openapi spec to v1.97.10 ([4b79dec](https://github.com/dodopayments/dodopayments-ruby/commit/4b79dec6275293cce30c1db6d682eeb4ee1f69b7))
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * **client:** elide content type header on requests without body ([036bd33](https://github.com/dodopayments/dodopayments-ruby/commit/036bd33ad42365dfd68d18274297dcb46887ab94))
27
+
3
28
  ## 2.9.1 (2026-05-04)
4
29
 
5
30
  Full Changelog: [v2.9.0...v2.9.1](https://github.com/dodopayments/dodopayments-ruby/compare/v2.9.0...v2.9.1)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "dodopayments", "~> 2.9.1"
29
+ gem "dodopayments", "~> 2.11.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -42,7 +42,7 @@ dodo_payments = Dodopayments::Client.new(
42
42
  environment: "test_mode" # defaults to "live_mode"
43
43
  )
44
44
 
45
- checkout_session_response = dodo_payments.checkout_sessions.create(product_cart: [{product_id: "product_id", quantity: 0}])
45
+ checkout_session_response = dodo_payments.checkout_sessions.create(product_cart: [{product_id: "pdt_example", quantity: 1}])
46
46
 
47
47
  puts(checkout_session_response.session_id)
48
48
  ```
@@ -81,7 +81,7 @@ When the library is unable to connect to the API, or if the API returns a non-su
81
81
 
82
82
  ```ruby
83
83
  begin
84
- checkout_session = dodo_payments.checkout_sessions.create(product_cart: [{product_id: "product_id", quantity: 0}])
84
+ checkout_session = dodo_payments.checkout_sessions.create(product_cart: [{product_id: "pdt_example", quantity: 1}])
85
85
  rescue Dodopayments::Errors::APIConnectionError => e
86
86
  puts("The server could not be reached")
87
87
  puts(e.cause) # an underlying Exception, likely raised within `net/http`
@@ -125,7 +125,7 @@ dodo_payments = Dodopayments::Client.new(
125
125
 
126
126
  # Or, configure per-request:
127
127
  dodo_payments.checkout_sessions.create(
128
- product_cart: [{product_id: "product_id", quantity: 0}],
128
+ product_cart: [{product_id: "pdt_example", quantity: 1}],
129
129
  request_options: {max_retries: 5}
130
130
  )
131
131
  ```
@@ -142,7 +142,7 @@ dodo_payments = Dodopayments::Client.new(
142
142
 
143
143
  # Or, configure per-request:
144
144
  dodo_payments.checkout_sessions.create(
145
- product_cart: [{product_id: "product_id", quantity: 0}],
145
+ product_cart: [{product_id: "pdt_example", quantity: 1}],
146
146
  request_options: {timeout: 5}
147
147
  )
148
148
  ```
@@ -176,7 +176,7 @@ Note: the `extra_` parameters of the same name overrides the documented paramete
176
176
  ```ruby
177
177
  checkout_session_response =
178
178
  dodo_payments.checkout_sessions.create(
179
- product_cart: [{product_id: "product_id", quantity: 0}],
179
+ product_cart: [{product_id: "pdt_example", quantity: 1}],
180
180
  request_options: {
181
181
  extra_query: {my_query_parameter: value},
182
182
  extra_body: {my_body_parameter: value},
@@ -223,7 +223,7 @@ You can provide typesafe request parameters like so:
223
223
 
224
224
  ```ruby
225
225
  dodo_payments.checkout_sessions.create(
226
- product_cart: [Dodopayments::ProductItemReq.new(product_id: "product_id", quantity: 0)]
226
+ product_cart: [Dodopayments::ProductItemReq.new(product_id: "pdt_example", quantity: 1)]
227
227
  )
228
228
  ```
229
229
 
@@ -231,11 +231,11 @@ Or, equivalently:
231
231
 
232
232
  ```ruby
233
233
  # Hashes work, but are not typesafe:
234
- dodo_payments.checkout_sessions.create(product_cart: [{product_id: "product_id", quantity: 0}])
234
+ dodo_payments.checkout_sessions.create(product_cart: [{product_id: "pdt_example", quantity: 1}])
235
235
 
236
236
  # You can also splat a full Params class:
237
237
  params = Dodopayments::CheckoutSessionCreateParams.new(
238
- product_cart: [Dodopayments::ProductItemReq.new(product_id: "product_id", quantity: 0)]
238
+ product_cart: [Dodopayments::ProductItemReq.new(product_id: "pdt_example", quantity: 1)]
239
239
  )
240
240
  dodo_payments.checkout_sessions.create(**params)
241
241
  ```
@@ -96,6 +96,9 @@ module Dodopayments
96
96
  # @return [Dodopayments::Resources::Entitlements]
97
97
  attr_reader :entitlements
98
98
 
99
+ # @return [Dodopayments::Resources::ProductCollections]
100
+ attr_reader :product_collections
101
+
99
102
  # @api private
100
103
  #
101
104
  # @return [Hash{String=>String}]
@@ -195,6 +198,7 @@ module Dodopayments
195
198
  @balances = Dodopayments::Resources::Balances.new(client: self)
196
199
  @credit_entitlements = Dodopayments::Resources::CreditEntitlements.new(client: self)
197
200
  @entitlements = Dodopayments::Resources::Entitlements.new(client: self)
201
+ @product_collections = Dodopayments::Resources::ProductCollections.new(client: self)
198
202
  end
199
203
  end
200
204
  end
@@ -306,6 +306,8 @@ module Dodopayments
306
306
  Dodopayments::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
307
307
  end
308
308
 
309
+ headers.delete("content-type") if body.nil?
310
+
309
311
  url = Dodopayments::Internal::Util.join_parsed_uri(
310
312
  @base_url_components,
311
313
  {**req, path: path, query: query}
@@ -6,14 +6,28 @@ module Dodopayments
6
6
  # @api private
7
7
  #
8
8
  # @example
9
- # # `customer_request` is a `Dodopayments::CustomerRequest`
10
- # case customer_request
11
- # when Dodopayments::AttachExistingCustomer
12
- # puts(customer_request.customer_id)
13
- # when Dodopayments::NewCustomer
14
- # puts(customer_request.email)
9
+ # # `price` is a `Dodopayments::Price`
10
+ # case price
11
+ # when Dodopayments::Price::OneTimePrice
12
+ # puts(price.currency)
13
+ # when Dodopayments::Price::RecurringPrice
14
+ # puts(price.discount)
15
+ # when Dodopayments::Price::UsageBasedPrice
16
+ # puts(price.fixed_price)
15
17
  # else
16
- # puts(customer_request)
18
+ # puts(price)
19
+ # end
20
+ #
21
+ # @example
22
+ # case price
23
+ # in {type: :one_time_price, currency: currency, discount: discount, price: price}
24
+ # puts(currency)
25
+ # in {type: :recurring_price, currency: currency, discount: discount, payment_frequency_count: payment_frequency_count}
26
+ # puts(discount)
27
+ # in {type: :usage_based_price, currency: currency, discount: discount, fixed_price: fixed_price}
28
+ # puts(fixed_price)
29
+ # else
30
+ # puts(price)
17
31
  # end
18
32
  module Union
19
33
  include Dodopayments::Internal::Type::Converter
@@ -25,10 +25,10 @@ module Dodopayments
25
25
  # @!attribute type
26
26
  # The event type
27
27
  #
28
- # @return [Symbol, Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Type]
29
- required :type, enum: -> { Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Type }
28
+ # @return [Symbol, :"abandoned_checkout.detected"]
29
+ required :type, const: :"abandoned_checkout.detected"
30
30
 
31
- # @!method initialize(business_id:, data:, timestamp:, type:)
31
+ # @!method initialize(business_id:, data:, timestamp:, type: :"abandoned_checkout.detected")
32
32
  # Some parameter documentations has been truncated, see
33
33
  # {Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent} for more details.
34
34
  #
@@ -38,7 +38,7 @@ module Dodopayments
38
38
  #
39
39
  # @param timestamp [Time] The timestamp of when the event occurred
40
40
  #
41
- # @param type [Symbol, Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Type] The event type
41
+ # @param type [Symbol, :"abandoned_checkout.detected"] The event type
42
42
 
43
43
  # @see Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent#data
44
44
  class Data < Dodopayments::Internal::Type::BaseModel
@@ -109,18 +109,6 @@ module Dodopayments
109
109
  # @return [Array<Symbol>]
110
110
  end
111
111
  end
112
-
113
- # The event type
114
- #
115
- # @see Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent#type
116
- module Type
117
- extend Dodopayments::Internal::Type::Enum
118
-
119
- ABANDONED_CHECKOUT_DETECTED = :"abandoned_checkout.detected"
120
-
121
- # @!method self.values
122
- # @return [Array<Symbol>]
123
- end
124
112
  end
125
113
  end
126
114
  end
@@ -25,10 +25,10 @@ module Dodopayments
25
25
  # @!attribute type
26
26
  # The event type
27
27
  #
28
- # @return [Symbol, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Type]
29
- required :type, enum: -> { Dodopayments::AbandonedCheckoutRecoveredWebhookEvent::Type }
28
+ # @return [Symbol, :"abandoned_checkout.recovered"]
29
+ required :type, const: :"abandoned_checkout.recovered"
30
30
 
31
- # @!method initialize(business_id:, data:, timestamp:, type:)
31
+ # @!method initialize(business_id:, data:, timestamp:, type: :"abandoned_checkout.recovered")
32
32
  # Some parameter documentations has been truncated, see
33
33
  # {Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent} for more details.
34
34
  #
@@ -38,7 +38,7 @@ module Dodopayments
38
38
  #
39
39
  # @param timestamp [Time] The timestamp of when the event occurred
40
40
  #
41
- # @param type [Symbol, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Type] The event type
41
+ # @param type [Symbol, :"abandoned_checkout.recovered"] The event type
42
42
 
43
43
  # @see Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent#data
44
44
  class Data < Dodopayments::Internal::Type::BaseModel
@@ -109,18 +109,6 @@ module Dodopayments
109
109
  # @return [Array<Symbol>]
110
110
  end
111
111
  end
112
-
113
- # The event type
114
- #
115
- # @see Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent#type
116
- module Type
117
- extend Dodopayments::Internal::Type::Enum
118
-
119
- ABANDONED_CHECKOUT_RECOVERED = :"abandoned_checkout.recovered"
120
-
121
- # @!method self.values
122
- # @return [Array<Symbol>]
123
- end
124
112
  end
125
113
  end
126
114
  end
@@ -11,6 +11,18 @@ module Dodopayments
11
11
  # @return [Boolean, nil]
12
12
  optional :allow_currency_selection, Dodopayments::Internal::Type::Boolean
13
13
 
14
+ # @!attribute allow_customer_editing_business_name
15
+ # If true, the customer can supply or edit the business name associated with the
16
+ # tax id during checkout. Works independently of `allow_customer_editing_tax_id` —
17
+ # either flag (or `allow_tax_id`) is sufficient to let the customer override the
18
+ # session's business name. Typically set together with
19
+ # `allow_customer_editing_tax_id`.
20
+ #
21
+ # Default is false
22
+ #
23
+ # @return [Boolean, nil]
24
+ optional :allow_customer_editing_business_name, Dodopayments::Internal::Type::Boolean
25
+
14
26
  # @!attribute allow_customer_editing_city
15
27
  #
16
28
  # @return [Boolean, nil]
@@ -101,12 +113,14 @@ module Dodopayments
101
113
  # @return [Boolean, nil]
102
114
  optional :require_phone_number, Dodopayments::Internal::Type::Boolean
103
115
 
104
- # @!method initialize(allow_currency_selection: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_tax_id: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil, require_phone_number: nil)
116
+ # @!method initialize(allow_currency_selection: nil, allow_customer_editing_business_name: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_tax_id: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil, require_phone_number: nil)
105
117
  # Some parameter documentations has been truncated, see
106
118
  # {Dodopayments::Models::CheckoutSessionFlags} for more details.
107
119
  #
108
120
  # @param allow_currency_selection [Boolean] if customer is allowed to change currency, set it to true
109
121
  #
122
+ # @param allow_customer_editing_business_name [Boolean] If true, the customer can supply or edit the business name associated
123
+ #
110
124
  # @param allow_customer_editing_city [Boolean]
111
125
  #
112
126
  # @param allow_customer_editing_country [Boolean]
@@ -61,6 +61,14 @@ module Dodopayments
61
61
  # @return [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer, nil]
62
62
  optional :customer, union: -> { Dodopayments::CustomerRequest }, nil?: true
63
63
 
64
+ # @!attribute customer_business_name
65
+ # Optional business / legal name associated with the tax id. When provided
66
+ # together with a valid tax id for a B2B purchase, this name is rendered on the
67
+ # invoice instead of the customer's personal name.
68
+ #
69
+ # @return [String, nil]
70
+ optional :customer_business_name, String, nil?: true
71
+
64
72
  # @!attribute customization
65
73
  # Customization for the checkout session page
66
74
  #
@@ -68,10 +76,21 @@ module Dodopayments
68
76
  optional :customization, -> { Dodopayments::CheckoutSessionCustomization }
69
77
 
70
78
  # @!attribute discount_code
79
+ # @deprecated Use `discount_id` instead.
80
+ #
81
+ # DEPRECATED: Use discount_codes instead. Cannot be used together with
82
+ # discount_codes.
71
83
  #
72
84
  # @return [String, nil]
73
85
  optional :discount_code, String, nil?: true
74
86
 
87
+ # @!attribute discount_codes
88
+ # Stacked discount codes to apply, in order. Max 20. Cannot be used together with
89
+ # discount_code.
90
+ #
91
+ # @return [Array<String>, nil]
92
+ optional :discount_codes, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
93
+
75
94
  # @!attribute feature_flags
76
95
  #
77
96
  # @return [Dodopayments::Models::CheckoutSessionFlags, nil]
@@ -151,7 +170,7 @@ module Dodopayments
151
170
  # @return [String, nil]
152
171
  optional :tax_id, String, nil?: true
153
172
 
154
- # @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil)
173
+ # @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customer_business_name: nil, customization: nil, discount_code: nil, discount_codes: nil, feature_flags: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil)
155
174
  # Some parameter documentations has been truncated, see
156
175
  # {Dodopayments::Models::CheckoutSessionRequest} for more details.
157
176
  #
@@ -171,9 +190,13 @@ module Dodopayments
171
190
  #
172
191
  # @param customer [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::NewCustomer, nil] Customer details for the session
173
192
  #
193
+ # @param customer_business_name [String, nil] Optional business / legal name associated with the tax id. When provided
194
+ #
174
195
  # @param customization [Dodopayments::Models::CheckoutSessionCustomization] Customization for the checkout session page
175
196
  #
176
- # @param discount_code [String, nil]
197
+ # @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
198
+ #
199
+ # @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order. Max 20.
177
200
  #
178
201
  # @param feature_flags [Dodopayments::Models::CheckoutSessionFlags]
179
202
  #
@@ -16,10 +16,42 @@ module Dodopayments
16
16
  # @return [String, nil]
17
17
  optional :checkout_url, String, nil?: true
18
18
 
19
- # @!method initialize(session_id:, checkout_url: nil)
19
+ # @!attribute client_secret
20
+ # Client secret used to load the Dodo Payments checkout SDK. Returned when
21
+ # `confirm: true` was passed and a PaymentIntent was created at session-creation
22
+ # time. `None` otherwise.
23
+ #
24
+ # @return [String, nil]
25
+ optional :client_secret, String, nil?: true
26
+
27
+ # @!attribute payment_id
28
+ # Underlying payment id when `confirm: true` was passed and a PaymentIntent was
29
+ # created at session-creation time. `None` otherwise.
30
+ #
31
+ # @return [String, nil]
32
+ optional :payment_id, String, nil?: true
33
+
34
+ # @!attribute publishable_key
35
+ # Publishable key for the Dodo Payments checkout SDK. Returned when
36
+ # `confirm: true` was passed and a PaymentIntent was created at session-creation
37
+ # time. `None` otherwise.
38
+ #
39
+ # @return [String, nil]
40
+ optional :publishable_key, String, nil?: true
41
+
42
+ # @!method initialize(session_id:, checkout_url: nil, client_secret: nil, payment_id: nil, publishable_key: nil)
43
+ # Some parameter documentations has been truncated, see
44
+ # {Dodopayments::Models::CheckoutSessionResponse} for more details.
45
+ #
20
46
  # @param session_id [String] The ID of the created checkout session
21
47
  #
22
48
  # @param checkout_url [String, nil] Checkout url (None when payment_method_id is provided)
49
+ #
50
+ # @param client_secret [String, nil] Client secret used to load the Dodo Payments checkout SDK. Returned when
51
+ #
52
+ # @param payment_id [String, nil] Underlying payment id when `confirm: true` was passed and a PaymentIntent
53
+ #
54
+ # @param publishable_key [String, nil] Publishable key for the Dodo Payments checkout SDK. Returned when
23
55
  end
24
56
  end
25
57
  end
@@ -24,29 +24,17 @@ module Dodopayments
24
24
  # @!attribute type
25
25
  # The event type
26
26
  #
27
- # @return [Symbol, Dodopayments::Models::CreditAddedWebhookEvent::Type]
28
- required :type, enum: -> { Dodopayments::CreditAddedWebhookEvent::Type }
27
+ # @return [Symbol, :"credit.added"]
28
+ required :type, const: :"credit.added"
29
29
 
30
- # @!method initialize(business_id:, data:, timestamp:, type:)
30
+ # @!method initialize(business_id:, data:, timestamp:, type: :"credit.added")
31
31
  # @param business_id [String] The business identifier
32
32
  #
33
33
  # @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
34
34
  #
35
35
  # @param timestamp [Time] The timestamp of when the event occurred
36
36
  #
37
- # @param type [Symbol, Dodopayments::Models::CreditAddedWebhookEvent::Type] The event type
38
-
39
- # The event type
40
- #
41
- # @see Dodopayments::Models::CreditAddedWebhookEvent#type
42
- module Type
43
- extend Dodopayments::Internal::Type::Enum
44
-
45
- CREDIT_ADDED = :"credit.added"
46
-
47
- # @!method self.values
48
- # @return [Array<Symbol>]
49
- end
37
+ # @param type [Symbol, :"credit.added"] The event type
50
38
  end
51
39
  end
52
40
  end
@@ -24,17 +24,17 @@ module Dodopayments
24
24
  # @!attribute type
25
25
  # The event type
26
26
  #
27
- # @return [Symbol, Dodopayments::Models::CreditBalanceLowWebhookEvent::Type]
28
- required :type, enum: -> { Dodopayments::CreditBalanceLowWebhookEvent::Type }
27
+ # @return [Symbol, :"credit.balance_low"]
28
+ required :type, const: :"credit.balance_low"
29
29
 
30
- # @!method initialize(business_id:, data:, timestamp:, type:)
30
+ # @!method initialize(business_id:, data:, timestamp:, type: :"credit.balance_low")
31
31
  # @param business_id [String] The business identifier
32
32
  #
33
33
  # @param data [Dodopayments::Models::CreditBalanceLowWebhookEvent::Data] Webhook payload for credit.balance_low event
34
34
  #
35
35
  # @param timestamp [Time] The timestamp of when the event occurred
36
36
  #
37
- # @param type [Symbol, Dodopayments::Models::CreditBalanceLowWebhookEvent::Type] The event type
37
+ # @param type [Symbol, :"credit.balance_low"] The event type
38
38
 
39
39
  # @see Dodopayments::Models::CreditBalanceLowWebhookEvent#data
40
40
  class Data < Dodopayments::Internal::Type::BaseModel
@@ -90,18 +90,6 @@ module Dodopayments
90
90
  # @param threshold_amount [String]
91
91
  # @param threshold_percent [Integer]
92
92
  end
93
-
94
- # The event type
95
- #
96
- # @see Dodopayments::Models::CreditBalanceLowWebhookEvent#type
97
- module Type
98
- extend Dodopayments::Internal::Type::Enum
99
-
100
- CREDIT_BALANCE_LOW = :"credit.balance_low"
101
-
102
- # @!method self.values
103
- # @return [Array<Symbol>]
104
- end
105
93
  end
106
94
  end
107
95
  end
@@ -24,29 +24,17 @@ module Dodopayments
24
24
  # @!attribute type
25
25
  # The event type
26
26
  #
27
- # @return [Symbol, Dodopayments::Models::CreditDeductedWebhookEvent::Type]
28
- required :type, enum: -> { Dodopayments::CreditDeductedWebhookEvent::Type }
27
+ # @return [Symbol, :"credit.deducted"]
28
+ required :type, const: :"credit.deducted"
29
29
 
30
- # @!method initialize(business_id:, data:, timestamp:, type:)
30
+ # @!method initialize(business_id:, data:, timestamp:, type: :"credit.deducted")
31
31
  # @param business_id [String] The business identifier
32
32
  #
33
33
  # @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
34
34
  #
35
35
  # @param timestamp [Time] The timestamp of when the event occurred
36
36
  #
37
- # @param type [Symbol, Dodopayments::Models::CreditDeductedWebhookEvent::Type] The event type
38
-
39
- # The event type
40
- #
41
- # @see Dodopayments::Models::CreditDeductedWebhookEvent#type
42
- module Type
43
- extend Dodopayments::Internal::Type::Enum
44
-
45
- CREDIT_DEDUCTED = :"credit.deducted"
46
-
47
- # @!method self.values
48
- # @return [Array<Symbol>]
49
- end
37
+ # @param type [Symbol, :"credit.deducted"] The event type
50
38
  end
51
39
  end
52
40
  end
@@ -24,29 +24,17 @@ module Dodopayments
24
24
  # @!attribute type
25
25
  # The event type
26
26
  #
27
- # @return [Symbol, Dodopayments::Models::CreditExpiredWebhookEvent::Type]
28
- required :type, enum: -> { Dodopayments::CreditExpiredWebhookEvent::Type }
27
+ # @return [Symbol, :"credit.expired"]
28
+ required :type, const: :"credit.expired"
29
29
 
30
- # @!method initialize(business_id:, data:, timestamp:, type:)
30
+ # @!method initialize(business_id:, data:, timestamp:, type: :"credit.expired")
31
31
  # @param business_id [String] The business identifier
32
32
  #
33
33
  # @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
34
34
  #
35
35
  # @param timestamp [Time] The timestamp of when the event occurred
36
36
  #
37
- # @param type [Symbol, Dodopayments::Models::CreditExpiredWebhookEvent::Type] The event type
38
-
39
- # The event type
40
- #
41
- # @see Dodopayments::Models::CreditExpiredWebhookEvent#type
42
- module Type
43
- extend Dodopayments::Internal::Type::Enum
44
-
45
- CREDIT_EXPIRED = :"credit.expired"
46
-
47
- # @!method self.values
48
- # @return [Array<Symbol>]
49
- end
37
+ # @param type [Symbol, :"credit.expired"] The event type
50
38
  end
51
39
  end
52
40
  end
@@ -24,29 +24,17 @@ module Dodopayments
24
24
  # @!attribute type
25
25
  # The event type
26
26
  #
27
- # @return [Symbol, Dodopayments::Models::CreditManualAdjustmentWebhookEvent::Type]
28
- required :type, enum: -> { Dodopayments::CreditManualAdjustmentWebhookEvent::Type }
27
+ # @return [Symbol, :"credit.manual_adjustment"]
28
+ required :type, const: :"credit.manual_adjustment"
29
29
 
30
- # @!method initialize(business_id:, data:, timestamp:, type:)
30
+ # @!method initialize(business_id:, data:, timestamp:, type: :"credit.manual_adjustment")
31
31
  # @param business_id [String] The business identifier
32
32
  #
33
33
  # @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
34
34
  #
35
35
  # @param timestamp [Time] The timestamp of when the event occurred
36
36
  #
37
- # @param type [Symbol, Dodopayments::Models::CreditManualAdjustmentWebhookEvent::Type] The event type
38
-
39
- # The event type
40
- #
41
- # @see Dodopayments::Models::CreditManualAdjustmentWebhookEvent#type
42
- module Type
43
- extend Dodopayments::Internal::Type::Enum
44
-
45
- CREDIT_MANUAL_ADJUSTMENT = :"credit.manual_adjustment"
46
-
47
- # @!method self.values
48
- # @return [Array<Symbol>]
49
- end
37
+ # @param type [Symbol, :"credit.manual_adjustment"] The event type
50
38
  end
51
39
  end
52
40
  end
@@ -24,29 +24,17 @@ module Dodopayments
24
24
  # @!attribute type
25
25
  # The event type
26
26
  #
27
- # @return [Symbol, Dodopayments::Models::CreditOverageChargedWebhookEvent::Type]
28
- required :type, enum: -> { Dodopayments::CreditOverageChargedWebhookEvent::Type }
27
+ # @return [Symbol, :"credit.overage_charged"]
28
+ required :type, const: :"credit.overage_charged"
29
29
 
30
- # @!method initialize(business_id:, data:, timestamp:, type:)
30
+ # @!method initialize(business_id:, data:, timestamp:, type: :"credit.overage_charged")
31
31
  # @param business_id [String] The business identifier
32
32
  #
33
33
  # @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
34
34
  #
35
35
  # @param timestamp [Time] The timestamp of when the event occurred
36
36
  #
37
- # @param type [Symbol, Dodopayments::Models::CreditOverageChargedWebhookEvent::Type] The event type
38
-
39
- # The event type
40
- #
41
- # @see Dodopayments::Models::CreditOverageChargedWebhookEvent#type
42
- module Type
43
- extend Dodopayments::Internal::Type::Enum
44
-
45
- CREDIT_OVERAGE_CHARGED = :"credit.overage_charged"
46
-
47
- # @!method self.values
48
- # @return [Array<Symbol>]
49
- end
37
+ # @param type [Symbol, :"credit.overage_charged"] The event type
50
38
  end
51
39
  end
52
40
  end
@@ -24,29 +24,17 @@ module Dodopayments
24
24
  # @!attribute type
25
25
  # The event type
26
26
  #
27
- # @return [Symbol, Dodopayments::Models::CreditOverageResetWebhookEvent::Type]
28
- required :type, enum: -> { Dodopayments::CreditOverageResetWebhookEvent::Type }
27
+ # @return [Symbol, :"credit.overage_reset"]
28
+ required :type, const: :"credit.overage_reset"
29
29
 
30
- # @!method initialize(business_id:, data:, timestamp:, type:)
30
+ # @!method initialize(business_id:, data:, timestamp:, type: :"credit.overage_reset")
31
31
  # @param business_id [String] The business identifier
32
32
  #
33
33
  # @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
34
34
  #
35
35
  # @param timestamp [Time] The timestamp of when the event occurred
36
36
  #
37
- # @param type [Symbol, Dodopayments::Models::CreditOverageResetWebhookEvent::Type] The event type
38
-
39
- # The event type
40
- #
41
- # @see Dodopayments::Models::CreditOverageResetWebhookEvent#type
42
- module Type
43
- extend Dodopayments::Internal::Type::Enum
44
-
45
- CREDIT_OVERAGE_RESET = :"credit.overage_reset"
46
-
47
- # @!method self.values
48
- # @return [Array<Symbol>]
49
- end
37
+ # @param type [Symbol, :"credit.overage_reset"] The event type
50
38
  end
51
39
  end
52
40
  end