dodopayments 1.20.0 → 1.47.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 (452) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +45 -0
  3. data/README.md +144 -60
  4. data/SECURITY.md +2 -2
  5. data/lib/dodopayments/client.rb +25 -12
  6. data/lib/dodopayments/errors.rb +23 -1
  7. data/lib/dodopayments/file_part.rb +2 -2
  8. data/lib/dodopayments/internal/cursor_page_pagination.rb +90 -0
  9. data/lib/dodopayments/internal/default_page_number_pagination.rb +2 -2
  10. data/lib/dodopayments/internal/transport/base_client.rb +90 -10
  11. data/lib/dodopayments/internal/transport/pooled_net_requester.rb +17 -1
  12. data/lib/dodopayments/internal/type/array_of.rb +16 -2
  13. data/lib/dodopayments/internal/type/base_model.rb +152 -59
  14. data/lib/dodopayments/internal/type/boolean.rb +15 -1
  15. data/lib/dodopayments/internal/type/converter.rb +86 -33
  16. data/lib/dodopayments/internal/type/enum.rb +30 -6
  17. data/lib/dodopayments/internal/type/file_input.rb +13 -1
  18. data/lib/dodopayments/internal/type/hash_of.rb +16 -2
  19. data/lib/dodopayments/internal/type/request_parameters.rb +6 -12
  20. data/lib/dodopayments/internal/type/union.rb +44 -31
  21. data/lib/dodopayments/internal/type/unknown.rb +15 -1
  22. data/lib/dodopayments/internal/util.rb +136 -12
  23. data/lib/dodopayments/internal.rb +9 -0
  24. data/lib/dodopayments/models/addon_create_params.rb +6 -10
  25. data/lib/dodopayments/models/addon_list_params.rb +4 -4
  26. data/lib/dodopayments/models/addon_response.rb +6 -10
  27. data/lib/dodopayments/models/addon_update_params.rb +6 -10
  28. data/lib/dodopayments/models/attach_addon.rb +21 -0
  29. data/lib/dodopayments/models/billing_address.rb +3 -3
  30. data/lib/dodopayments/models/brand.rb +107 -0
  31. data/lib/dodopayments/models/brand_create_params.rb +44 -0
  32. data/lib/dodopayments/models/{webhook_event_retrieve_params.rb → brand_list_params.rb} +2 -2
  33. data/lib/dodopayments/models/brand_list_response.rb +17 -0
  34. data/lib/dodopayments/models/brand_retrieve_params.rb +14 -0
  35. data/lib/dodopayments/models/brand_update_images_params.rb +14 -0
  36. data/lib/dodopayments/models/brand_update_images_response.rb +25 -0
  37. data/lib/dodopayments/models/brand_update_params.rb +43 -0
  38. data/lib/dodopayments/models/create_new_customer.rb +0 -1
  39. data/lib/dodopayments/models/customer_list_params.rb +13 -5
  40. data/lib/dodopayments/models/customer_request.rb +3 -3
  41. data/lib/dodopayments/models/customers/customer_portal_create_params.rb +2 -2
  42. data/lib/dodopayments/models/discount.rb +15 -4
  43. data/lib/dodopayments/models/discount_create_params.rb +17 -6
  44. data/lib/dodopayments/models/discount_list_params.rb +4 -4
  45. data/lib/dodopayments/models/discount_update_params.rb +16 -5
  46. data/lib/dodopayments/models/dispute.rb +15 -7
  47. data/lib/dodopayments/models/dispute_list_params.rb +44 -16
  48. data/lib/dodopayments/models/dispute_list_response.rb +77 -0
  49. data/lib/dodopayments/models/get_dispute.rb +101 -0
  50. data/lib/dodopayments/models/license_key.rb +3 -3
  51. data/lib/dodopayments/models/license_key_duration.rb +1 -1
  52. data/lib/dodopayments/models/license_key_list_params.rb +23 -11
  53. data/lib/dodopayments/models/license_key_update_params.rb +3 -3
  54. data/lib/dodopayments/models/misc_list_supported_countries_response.rb +1 -1
  55. data/lib/dodopayments/models/new_customer.rb +27 -0
  56. data/lib/dodopayments/models/one_time_product_cart_item.rb +0 -1
  57. data/lib/dodopayments/models/payment.rb +79 -18
  58. data/lib/dodopayments/models/payment_create_params.rb +22 -41
  59. data/lib/dodopayments/models/payment_create_response.rb +16 -6
  60. data/lib/dodopayments/models/payment_list_params.rb +44 -16
  61. data/lib/dodopayments/models/payment_list_response.rb +16 -4
  62. data/lib/dodopayments/models/payment_method_types.rb +31 -0
  63. data/lib/dodopayments/models/payment_retrieve_line_items_params.rb +14 -0
  64. data/lib/dodopayments/models/payment_retrieve_line_items_response.rb +63 -0
  65. data/lib/dodopayments/models/payout_list_params.rb +4 -4
  66. data/lib/dodopayments/models/payout_list_response.rb +7 -3
  67. data/lib/dodopayments/models/price.rb +57 -30
  68. data/lib/dodopayments/models/product.rb +85 -12
  69. data/lib/dodopayments/models/product_create_params.rb +61 -12
  70. data/lib/dodopayments/models/product_list_params.rb +15 -7
  71. data/lib/dodopayments/models/product_list_response.rb +19 -11
  72. data/lib/dodopayments/models/product_update_files_params.rb +20 -0
  73. data/lib/dodopayments/models/product_update_files_response.rb +22 -0
  74. data/lib/dodopayments/models/product_update_params.rb +70 -13
  75. data/lib/dodopayments/models/products/image_update_params.rb +2 -2
  76. data/lib/dodopayments/models/refund.rb +15 -5
  77. data/lib/dodopayments/models/refund_create_params.rb +38 -1
  78. data/lib/dodopayments/models/refund_list_params.rb +26 -13
  79. data/lib/dodopayments/models/subscription.rb +38 -18
  80. data/lib/dodopayments/models/subscription_change_plan_params.rb +19 -3
  81. data/lib/dodopayments/models/subscription_charge_params.rb +38 -2
  82. data/lib/dodopayments/models/subscription_create_params.rb +53 -66
  83. data/lib/dodopayments/models/subscription_create_response.rb +24 -8
  84. data/lib/dodopayments/models/subscription_list_params.rb +37 -14
  85. data/lib/dodopayments/models/subscription_list_response.rb +37 -16
  86. data/lib/dodopayments/models/subscription_status.rb +0 -1
  87. data/lib/dodopayments/models/subscription_update_params.rb +10 -6
  88. data/lib/dodopayments/models/webhook_create_params.rb +86 -0
  89. data/lib/dodopayments/models/webhook_create_response.rb +88 -0
  90. data/lib/dodopayments/models/webhook_delete_params.rb +14 -0
  91. data/lib/dodopayments/models/webhook_event_type.rb +35 -0
  92. data/lib/dodopayments/models/webhook_list_params.rb +30 -0
  93. data/lib/dodopayments/models/webhook_list_response.rb +88 -0
  94. data/lib/dodopayments/models/webhook_payload.rb +161 -0
  95. data/lib/dodopayments/models/webhook_retrieve_params.rb +14 -0
  96. data/lib/dodopayments/models/webhook_retrieve_response.rb +88 -0
  97. data/lib/dodopayments/models/webhook_update_params.rb +69 -0
  98. data/lib/dodopayments/models/webhook_update_response.rb +88 -0
  99. data/lib/dodopayments/models/webhooks/header_retrieve_params.rb +16 -0
  100. data/lib/dodopayments/models/webhooks/header_retrieve_response.rb +31 -0
  101. data/lib/dodopayments/models/webhooks/header_update_params.rb +24 -0
  102. data/lib/dodopayments/models/your_webhook_url_create_params.rb +32 -0
  103. data/lib/dodopayments/models.rb +241 -0
  104. data/lib/dodopayments/request_options.rb +4 -0
  105. data/lib/dodopayments/resources/addons.rb +13 -21
  106. data/lib/dodopayments/resources/brands.rb +119 -0
  107. data/lib/dodopayments/resources/customers/customer_portal.rb +3 -3
  108. data/lib/dodopayments/resources/customers.rb +12 -10
  109. data/lib/dodopayments/resources/discounts.rb +24 -19
  110. data/lib/dodopayments/resources/disputes.rb +12 -12
  111. data/lib/dodopayments/resources/invoices/payments.rb +3 -2
  112. data/lib/dodopayments/resources/license_key_instances.rb +5 -5
  113. data/lib/dodopayments/resources/license_keys.rb +13 -13
  114. data/lib/dodopayments/resources/licenses.rb +4 -4
  115. data/lib/dodopayments/resources/misc.rb +1 -1
  116. data/lib/dodopayments/resources/payments.rb +38 -19
  117. data/lib/dodopayments/resources/payouts.rb +3 -3
  118. data/lib/dodopayments/resources/products/images.rb +2 -2
  119. data/lib/dodopayments/resources/products.rb +58 -24
  120. data/lib/dodopayments/resources/refunds.rb +14 -12
  121. data/lib/dodopayments/resources/subscriptions.rb +44 -29
  122. data/lib/dodopayments/resources/webhook_events.rb +0 -52
  123. data/lib/dodopayments/resources/webhooks/headers.rb +59 -0
  124. data/lib/dodopayments/resources/webhooks.rb +157 -0
  125. data/lib/dodopayments/resources/your_webhook_url.rb +56 -0
  126. data/lib/dodopayments/version.rb +1 -1
  127. data/lib/dodopayments.rb +47 -8
  128. data/rbi/dodopayments/client.rbi +24 -10
  129. data/rbi/dodopayments/errors.rbi +51 -16
  130. data/rbi/dodopayments/file_part.rbi +9 -6
  131. data/rbi/dodopayments/internal/cursor_page_pagination.rbi +25 -0
  132. data/rbi/dodopayments/internal/default_page_number_pagination.rbi +2 -1
  133. data/rbi/dodopayments/internal/transport/base_client.rbi +165 -77
  134. data/rbi/dodopayments/internal/transport/pooled_net_requester.rbi +33 -13
  135. data/rbi/dodopayments/internal/type/array_of.rbi +40 -24
  136. data/rbi/dodopayments/internal/type/base_model.rbi +160 -70
  137. data/rbi/dodopayments/internal/type/base_page.rbi +13 -8
  138. data/rbi/dodopayments/internal/type/boolean.rbi +24 -14
  139. data/rbi/dodopayments/internal/type/converter.rbi +135 -33
  140. data/rbi/dodopayments/internal/type/enum.rbi +29 -13
  141. data/rbi/dodopayments/internal/type/file_input.rbi +13 -4
  142. data/rbi/dodopayments/internal/type/hash_of.rbi +40 -24
  143. data/rbi/dodopayments/internal/type/request_parameters.rbi +14 -4
  144. data/rbi/dodopayments/internal/type/union.rbi +71 -23
  145. data/rbi/dodopayments/internal/type/unknown.rbi +24 -6
  146. data/rbi/dodopayments/internal/util.rbi +274 -89
  147. data/rbi/dodopayments/internal.rbi +7 -0
  148. data/rbi/dodopayments/models/addon_cart_response_item.rbi +16 -4
  149. data/rbi/dodopayments/models/addon_create_params.rbi +33 -24
  150. data/rbi/dodopayments/models/addon_list_params.rbi +29 -17
  151. data/rbi/dodopayments/models/addon_response.rbi +33 -27
  152. data/rbi/dodopayments/models/addon_retrieve_params.rbi +18 -5
  153. data/rbi/dodopayments/models/addon_update_images_params.rbi +18 -5
  154. data/rbi/dodopayments/models/addon_update_images_response.rbi +13 -3
  155. data/rbi/dodopayments/models/addon_update_params.rbi +34 -25
  156. data/rbi/dodopayments/models/attach_addon.rbi +28 -0
  157. data/rbi/dodopayments/models/attach_existing_customer.rbi +13 -3
  158. data/rbi/dodopayments/models/billing_address.rbi +24 -12
  159. data/rbi/dodopayments/models/brand.rbi +132 -0
  160. data/rbi/dodopayments/models/brand_create_params.rbi +68 -0
  161. data/rbi/dodopayments/models/brand_list_params.rbi +29 -0
  162. data/rbi/dodopayments/models/brand_list_response.rbi +34 -0
  163. data/rbi/dodopayments/models/brand_retrieve_params.rbi +32 -0
  164. data/rbi/dodopayments/models/brand_update_images_params.rbi +32 -0
  165. data/rbi/dodopayments/models/brand_update_images_response.rbi +36 -0
  166. data/rbi/dodopayments/models/brand_update_params.rbi +64 -0
  167. data/rbi/dodopayments/models/country_code.rbi +255 -252
  168. data/rbi/dodopayments/models/create_new_customer.rbi +27 -11
  169. data/rbi/dodopayments/models/currency.rbi +149 -148
  170. data/rbi/dodopayments/models/customer.rbi +27 -15
  171. data/rbi/dodopayments/models/customer_create_params.rbi +22 -14
  172. data/rbi/dodopayments/models/customer_limited_details.rbi +21 -4
  173. data/rbi/dodopayments/models/customer_list_params.rbi +43 -17
  174. data/rbi/dodopayments/models/customer_portal_session.rbi +13 -3
  175. data/rbi/dodopayments/models/customer_request.rbi +10 -2
  176. data/rbi/dodopayments/models/customer_retrieve_params.rbi +18 -5
  177. data/rbi/dodopayments/models/customer_update_params.rbi +21 -13
  178. data/rbi/dodopayments/models/customers/customer_portal_create_params.rbi +26 -8
  179. data/rbi/dodopayments/models/discount.rbi +42 -22
  180. data/rbi/dodopayments/models/discount_create_params.rbi +43 -20
  181. data/rbi/dodopayments/models/discount_delete_params.rbi +18 -5
  182. data/rbi/dodopayments/models/discount_list_params.rbi +32 -17
  183. data/rbi/dodopayments/models/discount_retrieve_params.rbi +18 -5
  184. data/rbi/dodopayments/models/discount_type.rbi +7 -4
  185. data/rbi/dodopayments/models/discount_update_params.rbi +43 -20
  186. data/rbi/dodopayments/models/dispute.rbi +41 -23
  187. data/rbi/dodopayments/models/dispute_list_params.rbi +178 -33
  188. data/rbi/dodopayments/models/dispute_list_response.rbi +98 -0
  189. data/rbi/dodopayments/models/dispute_retrieve_params.rbi +18 -5
  190. data/rbi/dodopayments/models/dispute_stage.rbi +11 -6
  191. data/rbi/dodopayments/models/dispute_status.rbi +20 -10
  192. data/rbi/dodopayments/models/get_dispute.rbi +124 -0
  193. data/rbi/dodopayments/models/intent_status.rbi +32 -14
  194. data/rbi/dodopayments/models/invoices/payment_retrieve_params.rbi +18 -5
  195. data/rbi/dodopayments/models/license_activate_params.rbi +21 -6
  196. data/rbi/dodopayments/models/license_deactivate_params.rbi +21 -13
  197. data/rbi/dodopayments/models/license_key.rbi +31 -23
  198. data/rbi/dodopayments/models/license_key_duration.rbi +24 -5
  199. data/rbi/dodopayments/models/license_key_instance.rbi +19 -4
  200. data/rbi/dodopayments/models/license_key_instance_list_params.rbi +23 -14
  201. data/rbi/dodopayments/models/license_key_instance_retrieve_params.rbi +18 -5
  202. data/rbi/dodopayments/models/license_key_instance_update_params.rbi +19 -6
  203. data/rbi/dodopayments/models/license_key_list_params.rbi +91 -26
  204. data/rbi/dodopayments/models/license_key_retrieve_params.rbi +18 -5
  205. data/rbi/dodopayments/models/license_key_status.rbi +10 -6
  206. data/rbi/dodopayments/models/license_key_update_params.rbi +23 -14
  207. data/rbi/dodopayments/models/license_validate_params.rbi +25 -13
  208. data/rbi/dodopayments/models/license_validate_response.rbi +13 -3
  209. data/rbi/dodopayments/models/misc_list_supported_countries_params.rbi +18 -5
  210. data/rbi/dodopayments/models/misc_list_supported_countries_response.rbi +1 -1
  211. data/rbi/dodopayments/models/new_customer.rbi +39 -0
  212. data/rbi/dodopayments/models/one_time_product_cart_item.rbi +23 -4
  213. data/rbi/dodopayments/models/payment.rbi +149 -54
  214. data/rbi/dodopayments/models/payment_create_params.rbi +67 -87
  215. data/rbi/dodopayments/models/payment_create_response.rbi +45 -22
  216. data/rbi/dodopayments/models/payment_list_params.rbi +149 -32
  217. data/rbi/dodopayments/models/payment_list_response.rbi +47 -26
  218. data/rbi/dodopayments/models/payment_method_types.rbi +52 -0
  219. data/rbi/dodopayments/models/payment_retrieve_line_items_params.rbi +32 -0
  220. data/rbi/dodopayments/models/payment_retrieve_line_items_response.rbi +114 -0
  221. data/rbi/dodopayments/models/payment_retrieve_params.rbi +18 -5
  222. data/rbi/dodopayments/models/payout_list_params.rbi +29 -17
  223. data/rbi/dodopayments/models/payout_list_response.rbi +82 -35
  224. data/rbi/dodopayments/models/price.rbi +142 -55
  225. data/rbi/dodopayments/models/product.rbi +177 -38
  226. data/rbi/dodopayments/models/product_create_params.rbi +151 -36
  227. data/rbi/dodopayments/models/product_delete_params.rbi +18 -5
  228. data/rbi/dodopayments/models/product_list_params.rbi +50 -21
  229. data/rbi/dodopayments/models/product_list_response.rbi +57 -42
  230. data/rbi/dodopayments/models/product_retrieve_params.rbi +18 -5
  231. data/rbi/dodopayments/models/product_unarchive_params.rbi +18 -5
  232. data/rbi/dodopayments/models/product_update_files_params.rbi +38 -0
  233. data/rbi/dodopayments/models/product_update_files_response.rbi +29 -0
  234. data/rbi/dodopayments/models/product_update_params.rbi +160 -37
  235. data/rbi/dodopayments/models/products/image_update_params.rbi +20 -8
  236. data/rbi/dodopayments/models/products/image_update_response.rbi +18 -4
  237. data/rbi/dodopayments/models/refund.rbi +39 -21
  238. data/rbi/dodopayments/models/refund_create_params.rbi +87 -11
  239. data/rbi/dodopayments/models/refund_list_params.rbi +86 -29
  240. data/rbi/dodopayments/models/refund_retrieve_params.rbi +18 -5
  241. data/rbi/dodopayments/models/refund_status.rbi +10 -7
  242. data/rbi/dodopayments/models/subscription.rbi +83 -47
  243. data/rbi/dodopayments/models/subscription_change_plan_params.rbi +68 -21
  244. data/rbi/dodopayments/models/subscription_charge_params.rbi +65 -6
  245. data/rbi/dodopayments/models/subscription_charge_response.rbi +13 -3
  246. data/rbi/dodopayments/models/subscription_create_params.rbi +136 -128
  247. data/rbi/dodopayments/models/subscription_create_response.rbi +51 -22
  248. data/rbi/dodopayments/models/subscription_list_params.rbi +125 -29
  249. data/rbi/dodopayments/models/subscription_list_response.rbi +85 -44
  250. data/rbi/dodopayments/models/subscription_retrieve_params.rbi +18 -5
  251. data/rbi/dodopayments/models/subscription_status.rbi +16 -10
  252. data/rbi/dodopayments/models/subscription_update_params.rbi +63 -33
  253. data/rbi/dodopayments/models/tax_category.rbi +11 -7
  254. data/rbi/dodopayments/models/time_interval.rbi +10 -7
  255. data/rbi/dodopayments/models/webhook_create_params.rbi +115 -0
  256. data/rbi/dodopayments/models/webhook_create_response.rbi +112 -0
  257. data/rbi/dodopayments/models/webhook_delete_params.rbi +32 -0
  258. data/rbi/dodopayments/models/webhook_event_type.rbi +102 -0
  259. data/rbi/dodopayments/models/webhook_list_params.rbi +54 -0
  260. data/rbi/dodopayments/models/webhook_list_response.rbi +112 -0
  261. data/rbi/dodopayments/models/webhook_payload.rbi +440 -0
  262. data/rbi/dodopayments/models/webhook_retrieve_params.rbi +32 -0
  263. data/rbi/dodopayments/models/webhook_retrieve_response.rbi +112 -0
  264. data/rbi/dodopayments/models/webhook_update_params.rbi +94 -0
  265. data/rbi/dodopayments/models/webhook_update_response.rbi +112 -0
  266. data/rbi/dodopayments/models/webhooks/header_retrieve_params.rbi +34 -0
  267. data/rbi/dodopayments/models/webhooks/header_retrieve_response.rbi +50 -0
  268. data/rbi/dodopayments/models/webhooks/header_update_params.rbi +48 -0
  269. data/rbi/dodopayments/models/your_webhook_url_create_params.rbi +56 -0
  270. data/rbi/dodopayments/models.rbi +209 -0
  271. data/rbi/dodopayments/request_options.rbi +18 -7
  272. data/rbi/dodopayments/resources/addons.rbi +44 -27
  273. data/rbi/dodopayments/resources/brands.rbi +89 -0
  274. data/rbi/dodopayments/resources/customers/customer_portal.rbi +8 -6
  275. data/rbi/dodopayments/resources/customers.rbi +31 -17
  276. data/rbi/dodopayments/resources/discounts.rbi +54 -22
  277. data/rbi/dodopayments/resources/disputes.rbi +26 -14
  278. data/rbi/dodopayments/resources/invoices/payments.rbi +10 -3
  279. data/rbi/dodopayments/resources/invoices.rbi +2 -1
  280. data/rbi/dodopayments/resources/license_key_instances.rbi +25 -10
  281. data/rbi/dodopayments/resources/license_keys.rbi +29 -15
  282. data/rbi/dodopayments/resources/licenses.rbi +25 -12
  283. data/rbi/dodopayments/resources/misc.rbi +7 -4
  284. data/rbi/dodopayments/resources/payments.rbi +61 -27
  285. data/rbi/dodopayments/resources/payouts.rbi +12 -6
  286. data/rbi/dodopayments/resources/products/images.rbi +10 -4
  287. data/rbi/dodopayments/resources/products.rbi +118 -41
  288. data/rbi/dodopayments/resources/refunds.rbi +35 -15
  289. data/rbi/dodopayments/resources/subscriptions.rbi +98 -50
  290. data/rbi/dodopayments/resources/webhook_events.rbi +2 -34
  291. data/rbi/dodopayments/resources/webhooks/headers.rbi +40 -0
  292. data/rbi/dodopayments/resources/webhooks.rbi +127 -0
  293. data/rbi/dodopayments/resources/your_webhook_url.rbi +51 -0
  294. data/sig/dodopayments/client.rbs +8 -2
  295. data/sig/dodopayments/errors.rbs +9 -0
  296. data/sig/dodopayments/internal/cursor_page_pagination.rbs +15 -0
  297. data/sig/dodopayments/internal/transport/base_client.rbs +17 -2
  298. data/sig/dodopayments/internal/transport/pooled_net_requester.rbs +4 -0
  299. data/sig/dodopayments/internal/type/array_of.rbs +3 -0
  300. data/sig/dodopayments/internal/type/base_model.rbs +13 -5
  301. data/sig/dodopayments/internal/type/base_page.rbs +1 -1
  302. data/sig/dodopayments/internal/type/boolean.rbs +3 -0
  303. data/sig/dodopayments/internal/type/converter.rbs +26 -1
  304. data/sig/dodopayments/internal/type/enum.rbs +3 -0
  305. data/sig/dodopayments/internal/type/file_input.rbs +2 -0
  306. data/sig/dodopayments/internal/type/hash_of.rbs +3 -0
  307. data/sig/dodopayments/internal/type/request_parameters.rbs +5 -1
  308. data/sig/dodopayments/internal/type/union.rbs +5 -2
  309. data/sig/dodopayments/internal/type/unknown.rbs +3 -0
  310. data/sig/dodopayments/internal/util.rbs +27 -0
  311. data/sig/dodopayments/internal.rbs +4 -0
  312. data/sig/dodopayments/models/addon_cart_response_item.rbs +1 -1
  313. data/sig/dodopayments/models/addon_create_params.rbs +8 -1
  314. data/sig/dodopayments/models/addon_list_params.rbs +14 -6
  315. data/sig/dodopayments/models/addon_response.rbs +12 -1
  316. data/sig/dodopayments/models/addon_retrieve_params.rbs +1 -1
  317. data/sig/dodopayments/models/addon_update_images_params.rbs +1 -1
  318. data/sig/dodopayments/models/addon_update_images_response.rbs +1 -1
  319. data/sig/dodopayments/models/addon_update_params.rbs +9 -1
  320. data/sig/dodopayments/models/attach_addon.rbs +15 -0
  321. data/sig/dodopayments/models/attach_existing_customer.rbs +1 -1
  322. data/sig/dodopayments/models/billing_address.rbs +7 -1
  323. data/sig/dodopayments/models/brand.rbs +88 -0
  324. data/sig/dodopayments/models/brand_create_params.rbs +46 -0
  325. data/sig/dodopayments/models/{webhook_event_retrieve_params.rbs → brand_list_params.rbs} +3 -3
  326. data/sig/dodopayments/models/brand_list_response.rbs +13 -0
  327. data/sig/dodopayments/models/brand_retrieve_params.rbs +15 -0
  328. data/sig/dodopayments/models/brand_update_images_params.rbs +15 -0
  329. data/sig/dodopayments/models/brand_update_images_response.rbs +15 -0
  330. data/sig/dodopayments/models/brand_update_params.rbs +41 -0
  331. data/sig/dodopayments/models/create_new_customer.rbs +6 -1
  332. data/sig/dodopayments/models/customer.rbs +8 -1
  333. data/sig/dodopayments/models/customer_create_params.rbs +6 -1
  334. data/sig/dodopayments/models/customer_limited_details.rbs +1 -1
  335. data/sig/dodopayments/models/customer_list_params.rbs +20 -6
  336. data/sig/dodopayments/models/customer_portal_session.rbs +1 -1
  337. data/sig/dodopayments/models/customer_request.rbs +2 -3
  338. data/sig/dodopayments/models/customer_retrieve_params.rbs +1 -1
  339. data/sig/dodopayments/models/customer_update_params.rbs +5 -1
  340. data/sig/dodopayments/models/customers/customer_portal_create_params.rbs +9 -4
  341. data/sig/dodopayments/models/discount.rbs +18 -1
  342. data/sig/dodopayments/models/discount_create_params.rbs +15 -1
  343. data/sig/dodopayments/models/discount_delete_params.rbs +1 -1
  344. data/sig/dodopayments/models/discount_list_params.rbs +14 -6
  345. data/sig/dodopayments/models/discount_retrieve_params.rbs +1 -1
  346. data/sig/dodopayments/models/discount_update_params.rbs +15 -1
  347. data/sig/dodopayments/models/dispute.rbs +17 -3
  348. data/sig/dodopayments/models/dispute_list_params.rbs +84 -22
  349. data/sig/dodopayments/models/dispute_list_response.rbs +55 -0
  350. data/sig/dodopayments/models/dispute_retrieve_params.rbs +1 -1
  351. data/sig/dodopayments/models/get_dispute.rbs +70 -0
  352. data/sig/dodopayments/models/invoices/payment_retrieve_params.rbs +1 -1
  353. data/sig/dodopayments/models/license_activate_params.rbs +5 -1
  354. data/sig/dodopayments/models/license_deactivate_params.rbs +5 -1
  355. data/sig/dodopayments/models/license_key.rbs +14 -1
  356. data/sig/dodopayments/models/license_key_duration.rbs +4 -1
  357. data/sig/dodopayments/models/license_key_instance.rbs +7 -1
  358. data/sig/dodopayments/models/license_key_instance_list_params.rbs +6 -1
  359. data/sig/dodopayments/models/license_key_instance_retrieve_params.rbs +1 -1
  360. data/sig/dodopayments/models/license_key_instance_update_params.rbs +4 -1
  361. data/sig/dodopayments/models/license_key_list_params.rbs +47 -16
  362. data/sig/dodopayments/models/license_key_retrieve_params.rbs +1 -1
  363. data/sig/dodopayments/models/license_key_update_params.rbs +6 -1
  364. data/sig/dodopayments/models/license_validate_params.rbs +5 -1
  365. data/sig/dodopayments/models/license_validate_response.rbs +1 -1
  366. data/sig/dodopayments/models/misc_list_supported_countries_params.rbs +1 -1
  367. data/sig/dodopayments/models/new_customer.rbs +21 -0
  368. data/sig/dodopayments/models/one_time_product_cart_item.rbs +5 -1
  369. data/sig/dodopayments/models/payment.rbs +76 -17
  370. data/sig/dodopayments/models/payment_create_params.rbs +23 -55
  371. data/sig/dodopayments/models/payment_create_response.rbs +21 -7
  372. data/sig/dodopayments/models/payment_list_params.rbs +85 -22
  373. data/sig/dodopayments/models/payment_list_response.rbs +25 -4
  374. data/sig/dodopayments/models/payment_method_types.rbs +48 -0
  375. data/sig/dodopayments/models/payment_retrieve_line_items_params.rbs +15 -0
  376. data/sig/dodopayments/models/payment_retrieve_line_items_response.rbs +67 -0
  377. data/sig/dodopayments/models/payment_retrieve_params.rbs +1 -1
  378. data/sig/dodopayments/models/payout_list_params.rbs +14 -6
  379. data/sig/dodopayments/models/payout_list_response.rbs +17 -1
  380. data/sig/dodopayments/models/price.rbs +53 -13
  381. data/sig/dodopayments/models/product.rbs +80 -4
  382. data/sig/dodopayments/models/product_create_params.rbs +45 -4
  383. data/sig/dodopayments/models/product_delete_params.rbs +1 -1
  384. data/sig/dodopayments/models/product_list_params.rbs +29 -10
  385. data/sig/dodopayments/models/product_list_response.rbs +20 -1
  386. data/sig/dodopayments/models/product_retrieve_params.rbs +1 -1
  387. data/sig/dodopayments/models/product_unarchive_params.rbs +1 -1
  388. data/sig/dodopayments/models/product_update_files_params.rbs +23 -0
  389. data/sig/dodopayments/models/product_update_files_response.rbs +15 -0
  390. data/sig/dodopayments/models/product_update_params.rbs +58 -4
  391. data/sig/dodopayments/models/products/image_update_params.rbs +9 -4
  392. data/sig/dodopayments/models/products/image_update_response.rbs +1 -1
  393. data/sig/dodopayments/models/refund.rbs +15 -1
  394. data/sig/dodopayments/models/refund_create_params.rbs +38 -2
  395. data/sig/dodopayments/models/refund_list_params.rbs +54 -19
  396. data/sig/dodopayments/models/refund_retrieve_params.rbs +1 -1
  397. data/sig/dodopayments/models/subscription.rbs +43 -10
  398. data/sig/dodopayments/models/subscription_change_plan_params.rbs +16 -3
  399. data/sig/dodopayments/models/subscription_charge_params.rbs +27 -2
  400. data/sig/dodopayments/models/subscription_charge_response.rbs +1 -1
  401. data/sig/dodopayments/models/subscription_create_params.rbs +58 -73
  402. data/sig/dodopayments/models/subscription_create_response.rbs +26 -7
  403. data/sig/dodopayments/models/subscription_list_params.rbs +64 -19
  404. data/sig/dodopayments/models/subscription_list_response.rbs +39 -7
  405. data/sig/dodopayments/models/subscription_retrieve_params.rbs +1 -1
  406. data/sig/dodopayments/models/subscription_status.rbs +1 -2
  407. data/sig/dodopayments/models/subscription_update_params.rbs +20 -8
  408. data/sig/dodopayments/models/webhook_create_params.rbs +65 -0
  409. data/sig/dodopayments/models/webhook_create_response.rbs +60 -0
  410. data/sig/dodopayments/models/webhook_delete_params.rbs +15 -0
  411. data/sig/dodopayments/models/webhook_event_type.rbs +54 -0
  412. data/sig/dodopayments/models/webhook_list_params.rbs +28 -0
  413. data/sig/dodopayments/models/webhook_list_response.rbs +60 -0
  414. data/sig/dodopayments/models/webhook_payload.rbs +203 -0
  415. data/sig/dodopayments/models/webhook_retrieve_params.rbs +15 -0
  416. data/sig/dodopayments/models/webhook_retrieve_response.rbs +60 -0
  417. data/sig/dodopayments/models/webhook_update_params.rbs +51 -0
  418. data/sig/dodopayments/models/webhook_update_response.rbs +60 -0
  419. data/sig/dodopayments/models/webhooks/header_retrieve_params.rbs +17 -0
  420. data/sig/dodopayments/models/webhooks/header_retrieve_response.rbs +24 -0
  421. data/sig/dodopayments/models/webhooks/header_update_params.rbs +26 -0
  422. data/sig/dodopayments/models/your_webhook_url_create_params.rbs +42 -0
  423. data/sig/dodopayments/models.rbs +201 -0
  424. data/sig/dodopayments/request_options.rbs +1 -1
  425. data/sig/dodopayments/resources/addons.rbs +6 -6
  426. data/sig/dodopayments/resources/brands.rbs +39 -0
  427. data/sig/dodopayments/resources/customers/customer_portal.rbs +2 -2
  428. data/sig/dodopayments/resources/customers.rbs +7 -6
  429. data/sig/dodopayments/resources/discounts.rbs +8 -6
  430. data/sig/dodopayments/resources/disputes.rbs +9 -9
  431. data/sig/dodopayments/resources/invoices/payments.rbs +1 -1
  432. data/sig/dodopayments/resources/license_key_instances.rbs +3 -3
  433. data/sig/dodopayments/resources/license_keys.rbs +8 -8
  434. data/sig/dodopayments/resources/licenses.rbs +1 -1
  435. data/sig/dodopayments/resources/payments.rbs +17 -11
  436. data/sig/dodopayments/resources/payouts.rbs +2 -2
  437. data/sig/dodopayments/resources/products/images.rbs +1 -1
  438. data/sig/dodopayments/resources/products.rbs +20 -7
  439. data/sig/dodopayments/resources/refunds.rbs +10 -9
  440. data/sig/dodopayments/resources/subscriptions.rbs +21 -14
  441. data/sig/dodopayments/resources/webhook_events.rbs +0 -15
  442. data/sig/dodopayments/resources/webhooks/headers.rbs +20 -0
  443. data/sig/dodopayments/resources/webhooks.rbs +48 -0
  444. data/sig/dodopayments/resources/your_webhook_url.rbs +18 -0
  445. metadata +116 -11
  446. data/lib/dodopayments/models/webhook_event.rb +0 -58
  447. data/lib/dodopayments/models/webhook_event_list_params.rb +0 -66
  448. data/rbi/dodopayments/models/webhook_event.rbi +0 -71
  449. data/rbi/dodopayments/models/webhook_event_list_params.rbi +0 -77
  450. data/rbi/dodopayments/models/webhook_event_retrieve_params.rbi +0 -19
  451. data/sig/dodopayments/models/webhook_event.rbs +0 -46
  452. data/sig/dodopayments/models/webhook_event_list_params.rbs +0 -43
@@ -4,6 +4,11 @@ module Dodopayments
4
4
  module Models
5
5
  # @see Dodopayments::Resources::Products#create
6
6
  class Product < Dodopayments::Internal::Type::BaseModel
7
+ # @!attribute brand_id
8
+ #
9
+ # @return [String]
10
+ required :brand_id, String
11
+
7
12
  # @!attribute business_id
8
13
  # Unique identifier for the business to which the product belongs.
9
14
  #
@@ -28,10 +33,17 @@ module Dodopayments
28
33
  # @return [Boolean]
29
34
  required :license_key_enabled, Dodopayments::Internal::Type::Boolean
30
35
 
36
+ # @!attribute metadata
37
+ # Additional custom data associated with the product
38
+ #
39
+ # @return [Hash{Symbol=>String}]
40
+ required :metadata, Dodopayments::Internal::Type::HashOf[String]
41
+
31
42
  # @!attribute price
43
+ # Pricing information for the product.
32
44
  #
33
45
  # @return [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice]
34
- required :price, union: -> { Dodopayments::Models::Price }
46
+ required :price, union: -> { Dodopayments::Price }
35
47
 
36
48
  # @!attribute product_id
37
49
  # Unique identifier for the product.
@@ -40,11 +52,10 @@ module Dodopayments
40
52
  required :product_id, String
41
53
 
42
54
  # @!attribute tax_category
43
- # Represents the different categories of taxation applicable to various products
44
- # and services.
55
+ # Tax category associated with the product.
45
56
  #
46
57
  # @return [Symbol, Dodopayments::Models::TaxCategory]
47
- required :tax_category, enum: -> { Dodopayments::Models::TaxCategory }
58
+ required :tax_category, enum: -> { Dodopayments::TaxCategory }
48
59
 
49
60
  # @!attribute updated_at
50
61
  # Timestamp when the product was last updated.
@@ -64,6 +75,11 @@ module Dodopayments
64
75
  # @return [String, nil]
65
76
  optional :description, String, nil?: true
66
77
 
78
+ # @!attribute digital_product_delivery
79
+ #
80
+ # @return [Dodopayments::Models::Product::DigitalProductDelivery, nil]
81
+ optional :digital_product_delivery, -> { Dodopayments::Product::DigitalProductDelivery }, nil?: true
82
+
67
83
  # @!attribute image
68
84
  # URL of the product image, optional.
69
85
  #
@@ -83,9 +99,10 @@ module Dodopayments
83
99
  optional :license_key_activations_limit, Integer, nil?: true
84
100
 
85
101
  # @!attribute license_key_duration
102
+ # Duration of the license key validity, if enabled.
86
103
  #
87
104
  # @return [Dodopayments::Models::LicenseKeyDuration, nil]
88
- optional :license_key_duration, -> { Dodopayments::Models::LicenseKeyDuration }, nil?: true
105
+ optional :license_key_duration, -> { Dodopayments::LicenseKeyDuration }, nil?: true
89
106
 
90
107
  # @!attribute name
91
108
  # Name of the product, optional.
@@ -93,9 +110,8 @@ module Dodopayments
93
110
  # @return [String, nil]
94
111
  optional :name, String, nil?: true
95
112
 
96
- # @!method initialize(business_id:, created_at:, is_recurring:, license_key_enabled:, price:, product_id:, tax_category:, updated_at:, addons: nil, description: nil, image: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, name: nil)
97
- # Some parameter documentations has been truncated, see
98
- # {Dodopayments::Models::Product} for more details.
113
+ # @!method initialize(brand_id:, business_id:, created_at:, is_recurring:, license_key_enabled:, metadata:, price:, product_id:, tax_category:, updated_at:, addons: nil, description: nil, digital_product_delivery: nil, image: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, name: nil)
114
+ # @param brand_id [String]
99
115
  #
100
116
  # @param business_id [String] Unique identifier for the business to which the product belongs.
101
117
  #
@@ -105,12 +121,13 @@ module Dodopayments
105
121
  #
106
122
  # @param license_key_enabled [Boolean] Indicates whether the product requires a license key.
107
123
  #
108
- # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice]
124
+ # @param metadata [Hash{Symbol=>String}] Additional custom data associated with the product
125
+ #
126
+ # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice] Pricing information for the product.
109
127
  #
110
128
  # @param product_id [String] Unique identifier for the product.
111
129
  #
112
- # @param tax_category [Symbol, Dodopayments::Models::TaxCategory] Represents the different categories of taxation applicable to various products a
113
- # ...
130
+ # @param tax_category [Symbol, Dodopayments::Models::TaxCategory] Tax category associated with the product.
114
131
  #
115
132
  # @param updated_at [Time] Timestamp when the product was last updated.
116
133
  #
@@ -118,15 +135,71 @@ module Dodopayments
118
135
  #
119
136
  # @param description [String, nil] Description of the product, optional.
120
137
  #
138
+ # @param digital_product_delivery [Dodopayments::Models::Product::DigitalProductDelivery, nil]
139
+ #
121
140
  # @param image [String, nil] URL of the product image, optional.
122
141
  #
123
142
  # @param license_key_activation_message [String, nil] Message sent upon license key activation, if applicable.
124
143
  #
125
144
  # @param license_key_activations_limit [Integer, nil] Limit on the number of activations for the license key, if enabled.
126
145
  #
127
- # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil]
146
+ # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil] Duration of the license key validity, if enabled.
128
147
  #
129
148
  # @param name [String, nil] Name of the product, optional.
149
+
150
+ # @see Dodopayments::Models::Product#digital_product_delivery
151
+ class DigitalProductDelivery < Dodopayments::Internal::Type::BaseModel
152
+ # @!attribute external_url
153
+ # External URL to digital product
154
+ #
155
+ # @return [String, nil]
156
+ optional :external_url, String, nil?: true
157
+
158
+ # @!attribute files
159
+ # Uploaded files ids of digital product
160
+ #
161
+ # @return [Array<Dodopayments::Models::Product::DigitalProductDelivery::File>, nil]
162
+ optional :files,
163
+ -> {
164
+ Dodopayments::Internal::Type::ArrayOf[Dodopayments::Product::DigitalProductDelivery::File]
165
+ },
166
+ nil?: true
167
+
168
+ # @!attribute instructions
169
+ # Instructions to download and use the digital product
170
+ #
171
+ # @return [String, nil]
172
+ optional :instructions, String, nil?: true
173
+
174
+ # @!method initialize(external_url: nil, files: nil, instructions: nil)
175
+ # @param external_url [String, nil] External URL to digital product
176
+ #
177
+ # @param files [Array<Dodopayments::Models::Product::DigitalProductDelivery::File>, nil] Uploaded files ids of digital product
178
+ #
179
+ # @param instructions [String, nil] Instructions to download and use the digital product
180
+
181
+ class File < Dodopayments::Internal::Type::BaseModel
182
+ # @!attribute file_id
183
+ #
184
+ # @return [String]
185
+ required :file_id, String
186
+
187
+ # @!attribute file_name
188
+ #
189
+ # @return [String]
190
+ required :file_name, String
191
+
192
+ # @!attribute url
193
+ #
194
+ # @return [String]
195
+ required :url, String
196
+
197
+ # @!method initialize(file_id:, file_name:, url:)
198
+ # @param file_id [String]
199
+ # @param file_name [String]
200
+ # @param url [String]
201
+ end
202
+ end
130
203
  end
131
204
  end
132
205
  end
@@ -8,16 +8,16 @@ module Dodopayments
8
8
  include Dodopayments::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute price
11
+ # Price configuration for the product
11
12
  #
12
13
  # @return [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice]
13
- required :price, union: -> { Dodopayments::Models::Price }
14
+ required :price, union: -> { Dodopayments::Price }
14
15
 
15
16
  # @!attribute tax_category
16
- # Represents the different categories of taxation applicable to various products
17
- # and services.
17
+ # Tax category applied to this product
18
18
  #
19
19
  # @return [Symbol, Dodopayments::Models::TaxCategory]
20
- required :tax_category, enum: -> { Dodopayments::Models::TaxCategory }
20
+ required :tax_category, enum: -> { Dodopayments::TaxCategory }
21
21
 
22
22
  # @!attribute addons
23
23
  # Addons available for subscription product
@@ -25,12 +25,26 @@ module Dodopayments
25
25
  # @return [Array<String>, nil]
26
26
  optional :addons, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
27
27
 
28
+ # @!attribute brand_id
29
+ # Brand id for the product, if not provided will default to primary brand
30
+ #
31
+ # @return [String, nil]
32
+ optional :brand_id, String, nil?: true
33
+
28
34
  # @!attribute description
29
35
  # Optional description of the product
30
36
  #
31
37
  # @return [String, nil]
32
38
  optional :description, String, nil?: true
33
39
 
40
+ # @!attribute digital_product_delivery
41
+ # Choose how you would like you digital product delivered
42
+ #
43
+ # @return [Dodopayments::Models::ProductCreateParams::DigitalProductDelivery, nil]
44
+ optional :digital_product_delivery,
45
+ -> { Dodopayments::ProductCreateParams::DigitalProductDelivery },
46
+ nil?: true
47
+
34
48
  # @!attribute license_key_activation_message
35
49
  # Optional message displayed during license key activation
36
50
  #
@@ -44,9 +58,12 @@ module Dodopayments
44
58
  optional :license_key_activations_limit, Integer, nil?: true
45
59
 
46
60
  # @!attribute license_key_duration
61
+ # Duration configuration for the license key. Set to null if you don't want the
62
+ # license key to expire. For subscriptions, the lifetime of the license key is
63
+ # tied to the subscription period
47
64
  #
48
65
  # @return [Dodopayments::Models::LicenseKeyDuration, nil]
49
- optional :license_key_duration, -> { Dodopayments::Models::LicenseKeyDuration }, nil?: true
66
+ optional :license_key_duration, -> { Dodopayments::LicenseKeyDuration }, nil?: true
50
67
 
51
68
  # @!attribute license_key_enabled
52
69
  # When true, generates and sends a license key to your customer. Defaults to false
@@ -54,36 +71,68 @@ module Dodopayments
54
71
  # @return [Boolean, nil]
55
72
  optional :license_key_enabled, Dodopayments::Internal::Type::Boolean, nil?: true
56
73
 
74
+ # @!attribute metadata
75
+ # Additional metadata for the product
76
+ #
77
+ # @return [Hash{Symbol=>String}, nil]
78
+ optional :metadata, Dodopayments::Internal::Type::HashOf[String]
79
+
57
80
  # @!attribute name
58
81
  # Optional name of the product
59
82
  #
60
83
  # @return [String, nil]
61
84
  optional :name, String, nil?: true
62
85
 
63
- # @!method initialize(price:, tax_category:, addons: nil, description: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, name: nil, request_options: {})
86
+ # @!method initialize(price:, tax_category:, addons: nil, brand_id: nil, description: nil, digital_product_delivery: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, name: nil, request_options: {})
64
87
  # Some parameter documentations has been truncated, see
65
88
  # {Dodopayments::Models::ProductCreateParams} for more details.
66
89
  #
67
- # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice]
90
+ # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice] Price configuration for the product
68
91
  #
69
- # @param tax_category [Symbol, Dodopayments::Models::TaxCategory] Represents the different categories of taxation applicable to various products a
70
- # ...
92
+ # @param tax_category [Symbol, Dodopayments::Models::TaxCategory] Tax category applied to this product
71
93
  #
72
94
  # @param addons [Array<String>, nil] Addons available for subscription product
73
95
  #
96
+ # @param brand_id [String, nil] Brand id for the product, if not provided will default to primary brand
97
+ #
74
98
  # @param description [String, nil] Optional description of the product
75
99
  #
100
+ # @param digital_product_delivery [Dodopayments::Models::ProductCreateParams::DigitalProductDelivery, nil] Choose how you would like you digital product delivered
101
+ #
76
102
  # @param license_key_activation_message [String, nil] Optional message displayed during license key activation
77
103
  #
78
- # @param license_key_activations_limit [Integer, nil] The number of times the license key can be activated. ...
104
+ # @param license_key_activations_limit [Integer, nil] The number of times the license key can be activated.
105
+ #
106
+ # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil] Duration configuration for the license key.
79
107
  #
80
- # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil]
108
+ # @param license_key_enabled [Boolean, nil] When true, generates and sends a license key to your customer.
81
109
  #
82
- # @param license_key_enabled [Boolean, nil] When true, generates and sends a license key to your customer. ...
110
+ # @param metadata [Hash{Symbol=>String}] Additional metadata for the product
83
111
  #
84
112
  # @param name [String, nil] Optional name of the product
85
113
  #
86
114
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
115
+
116
+ class DigitalProductDelivery < Dodopayments::Internal::Type::BaseModel
117
+ # @!attribute external_url
118
+ # External URL to digital product
119
+ #
120
+ # @return [String, nil]
121
+ optional :external_url, String, nil?: true
122
+
123
+ # @!attribute instructions
124
+ # Instructions to download and use the digital product
125
+ #
126
+ # @return [String, nil]
127
+ optional :instructions, String, nil?: true
128
+
129
+ # @!method initialize(external_url: nil, instructions: nil)
130
+ # Choose how you would like you digital product delivered
131
+ #
132
+ # @param external_url [String, nil] External URL to digital product
133
+ #
134
+ # @param instructions [String, nil] Instructions to download and use the digital product
135
+ end
87
136
  end
88
137
  end
89
138
  end
@@ -13,17 +13,23 @@ module Dodopayments
13
13
  # @return [Boolean, nil]
14
14
  optional :archived, Dodopayments::Internal::Type::Boolean
15
15
 
16
+ # @!attribute brand_id
17
+ # filter by Brand id
18
+ #
19
+ # @return [String, nil]
20
+ optional :brand_id, String
21
+
16
22
  # @!attribute page_number
17
23
  # Page number default is 0
18
24
  #
19
25
  # @return [Integer, nil]
20
- optional :page_number, Integer, nil?: true
26
+ optional :page_number, Integer
21
27
 
22
28
  # @!attribute page_size
23
29
  # Page size default is 10 max is 100
24
30
  #
25
31
  # @return [Integer, nil]
26
- optional :page_size, Integer, nil?: true
32
+ optional :page_size, Integer
27
33
 
28
34
  # @!attribute recurring
29
35
  # Filter products by pricing type:
@@ -33,19 +39,21 @@ module Dodopayments
33
39
  # - `null` or absent: Show both types of products
34
40
  #
35
41
  # @return [Boolean, nil]
36
- optional :recurring, Dodopayments::Internal::Type::Boolean, nil?: true
42
+ optional :recurring, Dodopayments::Internal::Type::Boolean
37
43
 
38
- # @!method initialize(archived: nil, page_number: nil, page_size: nil, recurring: nil, request_options: {})
44
+ # @!method initialize(archived: nil, brand_id: nil, page_number: nil, page_size: nil, recurring: nil, request_options: {})
39
45
  # Some parameter documentations has been truncated, see
40
46
  # {Dodopayments::Models::ProductListParams} for more details.
41
47
  #
42
48
  # @param archived [Boolean] List archived products
43
49
  #
44
- # @param page_number [Integer, nil] Page number default is 0
50
+ # @param brand_id [String] filter by Brand id
51
+ #
52
+ # @param page_number [Integer] Page number default is 0
45
53
  #
46
- # @param page_size [Integer, nil] Page size default is 10 max is 100
54
+ # @param page_size [Integer] Page size default is 10 max is 100
47
55
  #
48
- # @param recurring [Boolean, nil] Filter products by pricing type: ...
56
+ # @param recurring [Boolean] Filter products by pricing type:
49
57
  #
50
58
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
51
59
  end
@@ -22,6 +22,12 @@ module Dodopayments
22
22
  # @return [Boolean]
23
23
  required :is_recurring, Dodopayments::Internal::Type::Boolean
24
24
 
25
+ # @!attribute metadata
26
+ # Additional custom data associated with the product
27
+ #
28
+ # @return [Hash{Symbol=>String}]
29
+ required :metadata, Dodopayments::Internal::Type::HashOf[String]
30
+
25
31
  # @!attribute product_id
26
32
  # Unique identifier for the product.
27
33
  #
@@ -29,11 +35,10 @@ module Dodopayments
29
35
  required :product_id, String
30
36
 
31
37
  # @!attribute tax_category
32
- # Represents the different categories of taxation applicable to various products
33
- # and services.
38
+ # Tax category associated with the product.
34
39
  #
35
40
  # @return [Symbol, Dodopayments::Models::TaxCategory]
36
- required :tax_category, enum: -> { Dodopayments::Models::TaxCategory }
41
+ required :tax_category, enum: -> { Dodopayments::TaxCategory }
37
42
 
38
43
  # @!attribute updated_at
39
44
  # Timestamp when the product was last updated.
@@ -42,9 +47,10 @@ module Dodopayments
42
47
  required :updated_at, Time
43
48
 
44
49
  # @!attribute currency
50
+ # Currency of the price
45
51
  #
46
52
  # @return [Symbol, Dodopayments::Models::Currency, nil]
47
- optional :currency, enum: -> { Dodopayments::Models::Currency }, nil?: true
53
+ optional :currency, enum: -> { Dodopayments::Currency }, nil?: true
48
54
 
49
55
  # @!attribute description
50
56
  # Description of the product, optional.
@@ -80,9 +86,10 @@ module Dodopayments
80
86
  optional :price, Integer, nil?: true
81
87
 
82
88
  # @!attribute price_detail
89
+ # Details of the price
83
90
  #
84
91
  # @return [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
85
- optional :price_detail, union: -> { Dodopayments::Models::Price }, nil?: true
92
+ optional :price_detail, union: -> { Dodopayments::Price }, nil?: true
86
93
 
87
94
  # @!attribute tax_inclusive
88
95
  # Indicates if the price is tax inclusive
@@ -90,7 +97,7 @@ module Dodopayments
90
97
  # @return [Boolean, nil]
91
98
  optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true
92
99
 
93
- # @!method initialize(business_id:, created_at:, is_recurring:, product_id:, tax_category:, updated_at:, currency: nil, description: nil, image: nil, name: nil, price: nil, price_detail: nil, tax_inclusive: nil)
100
+ # @!method initialize(business_id:, created_at:, is_recurring:, metadata:, product_id:, tax_category:, updated_at:, currency: nil, description: nil, image: nil, name: nil, price: nil, price_detail: nil, tax_inclusive: nil)
94
101
  # Some parameter documentations has been truncated, see
95
102
  # {Dodopayments::Models::ProductListResponse} for more details.
96
103
  #
@@ -100,14 +107,15 @@ module Dodopayments
100
107
  #
101
108
  # @param is_recurring [Boolean] Indicates if the product is recurring (e.g., subscriptions).
102
109
  #
110
+ # @param metadata [Hash{Symbol=>String}] Additional custom data associated with the product
111
+ #
103
112
  # @param product_id [String] Unique identifier for the product.
104
113
  #
105
- # @param tax_category [Symbol, Dodopayments::Models::TaxCategory] Represents the different categories of taxation applicable to various products a
106
- # ...
114
+ # @param tax_category [Symbol, Dodopayments::Models::TaxCategory] Tax category associated with the product.
107
115
  #
108
116
  # @param updated_at [Time] Timestamp when the product was last updated.
109
117
  #
110
- # @param currency [Symbol, Dodopayments::Models::Currency, nil]
118
+ # @param currency [Symbol, Dodopayments::Models::Currency, nil] Currency of the price
111
119
  #
112
120
  # @param description [String, nil] Description of the product, optional.
113
121
  #
@@ -115,9 +123,9 @@ module Dodopayments
115
123
  #
116
124
  # @param name [String, nil] Name of the product, optional.
117
125
  #
118
- # @param price [Integer, nil] Price of the product, optional. ...
126
+ # @param price [Integer, nil] Price of the product, optional.
119
127
  #
120
- # @param price_detail [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
128
+ # @param price_detail [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil] Details of the price
121
129
  #
122
130
  # @param tax_inclusive [Boolean, nil] Indicates if the price is tax inclusive
123
131
  end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ # @see Dodopayments::Resources::Products#update_files
6
+ class ProductUpdateFilesParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ # @!attribute file_name
11
+ #
12
+ # @return [String]
13
+ required :file_name, String
14
+
15
+ # @!method initialize(file_name:, request_options: {})
16
+ # @param file_name [String]
17
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ # @see Dodopayments::Resources::Products#update_files
6
+ class ProductUpdateFilesResponse < Dodopayments::Internal::Type::BaseModel
7
+ # @!attribute file_id
8
+ #
9
+ # @return [String]
10
+ required :file_id, String
11
+
12
+ # @!attribute url
13
+ #
14
+ # @return [String]
15
+ required :url, String
16
+
17
+ # @!method initialize(file_id:, url:)
18
+ # @param file_id [String]
19
+ # @param url [String]
20
+ end
21
+ end
22
+ end
@@ -13,12 +13,25 @@ module Dodopayments
13
13
  # @return [Array<String>, nil]
14
14
  optional :addons, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
15
15
 
16
+ # @!attribute brand_id
17
+ #
18
+ # @return [String, nil]
19
+ optional :brand_id, String, nil?: true
20
+
16
21
  # @!attribute description
17
22
  # Description of the product, optional and must be at most 1000 characters.
18
23
  #
19
24
  # @return [String, nil]
20
25
  optional :description, String, nil?: true
21
26
 
27
+ # @!attribute digital_product_delivery
28
+ # Choose how you would like you digital product delivered
29
+ #
30
+ # @return [Dodopayments::Models::ProductUpdateParams::DigitalProductDelivery, nil]
31
+ optional :digital_product_delivery,
32
+ -> { Dodopayments::ProductUpdateParams::DigitalProductDelivery },
33
+ nil?: true
34
+
22
35
  # @!attribute image_id
23
36
  # Product image id after its uploaded to S3
24
37
  #
@@ -44,9 +57,13 @@ module Dodopayments
44
57
  optional :license_key_activations_limit, Integer, nil?: true
45
58
 
46
59
  # @!attribute license_key_duration
60
+ # Duration of the license key if enabled.
61
+ #
62
+ # Only applicable if `license_key_enabled` is `true`. Represents the duration in
63
+ # days for which the license key is valid.
47
64
  #
48
65
  # @return [Dodopayments::Models::LicenseKeyDuration, nil]
49
- optional :license_key_duration, -> { Dodopayments::Models::LicenseKeyDuration }, nil?: true
66
+ optional :license_key_duration, -> { Dodopayments::LicenseKeyDuration }, nil?: true
50
67
 
51
68
  # @!attribute license_key_enabled
52
69
  # Whether the product requires a license key.
@@ -57,6 +74,12 @@ module Dodopayments
57
74
  # @return [Boolean, nil]
58
75
  optional :license_key_enabled, Dodopayments::Internal::Type::Boolean, nil?: true
59
76
 
77
+ # @!attribute metadata
78
+ # Additional metadata for the product
79
+ #
80
+ # @return [Hash{Symbol=>String}, nil]
81
+ optional :metadata, Dodopayments::Internal::Type::HashOf[String], nil?: true
82
+
60
83
  # @!attribute name
61
84
  # Name of the product, optional and must be at most 100 characters.
62
85
  #
@@ -64,43 +87,77 @@ module Dodopayments
64
87
  optional :name, String, nil?: true
65
88
 
66
89
  # @!attribute price
90
+ # Price details of the product.
67
91
  #
68
92
  # @return [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
69
- optional :price, union: -> { Dodopayments::Models::Price }, nil?: true
93
+ optional :price, union: -> { Dodopayments::Price }, nil?: true
70
94
 
71
95
  # @!attribute tax_category
72
- # Represents the different categories of taxation applicable to various products
73
- # and services.
96
+ # Tax category of the product.
74
97
  #
75
98
  # @return [Symbol, Dodopayments::Models::TaxCategory, nil]
76
- optional :tax_category, enum: -> { Dodopayments::Models::TaxCategory }, nil?: true
99
+ optional :tax_category, enum: -> { Dodopayments::TaxCategory }, nil?: true
77
100
 
78
- # @!method initialize(addons: nil, description: nil, image_id: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, name: nil, price: nil, tax_category: nil, request_options: {})
101
+ # @!method initialize(addons: nil, brand_id: nil, description: nil, digital_product_delivery: nil, image_id: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, name: nil, price: nil, tax_category: nil, request_options: {})
79
102
  # Some parameter documentations has been truncated, see
80
103
  # {Dodopayments::Models::ProductUpdateParams} for more details.
81
104
  #
82
105
  # @param addons [Array<String>, nil] Available Addons for subscription products
83
106
  #
107
+ # @param brand_id [String, nil]
108
+ #
84
109
  # @param description [String, nil] Description of the product, optional and must be at most 1000 characters.
85
110
  #
111
+ # @param digital_product_delivery [Dodopayments::Models::ProductUpdateParams::DigitalProductDelivery, nil] Choose how you would like you digital product delivered
112
+ #
86
113
  # @param image_id [String, nil] Product image id after its uploaded to S3
87
114
  #
88
- # @param license_key_activation_message [String, nil] Message sent to the customer upon license key activation. ...
115
+ # @param license_key_activation_message [String, nil] Message sent to the customer upon license key activation.
89
116
  #
90
- # @param license_key_activations_limit [Integer, nil] Limit for the number of activations for the license key. ...
117
+ # @param license_key_activations_limit [Integer, nil] Limit for the number of activations for the license key.
91
118
  #
92
- # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil]
119
+ # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil] Duration of the license key if enabled.
93
120
  #
94
- # @param license_key_enabled [Boolean, nil] Whether the product requires a license key. ...
121
+ # @param license_key_enabled [Boolean, nil] Whether the product requires a license key.
122
+ #
123
+ # @param metadata [Hash{Symbol=>String}, nil] Additional metadata for the product
95
124
  #
96
125
  # @param name [String, nil] Name of the product, optional and must be at most 100 characters.
97
126
  #
98
- # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
127
+ # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil] Price details of the product.
99
128
  #
100
- # @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Represents the different categories of taxation applicable to various products a
101
- # ...
129
+ # @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Tax category of the product.
102
130
  #
103
131
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
132
+
133
+ class DigitalProductDelivery < Dodopayments::Internal::Type::BaseModel
134
+ # @!attribute external_url
135
+ # External URL to digital product
136
+ #
137
+ # @return [String, nil]
138
+ optional :external_url, String, nil?: true
139
+
140
+ # @!attribute files
141
+ # Uploaded files ids of digital product
142
+ #
143
+ # @return [Array<String>, nil]
144
+ optional :files, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
145
+
146
+ # @!attribute instructions
147
+ # Instructions to download and use the digital product
148
+ #
149
+ # @return [String, nil]
150
+ optional :instructions, String, nil?: true
151
+
152
+ # @!method initialize(external_url: nil, files: nil, instructions: nil)
153
+ # Choose how you would like you digital product delivered
154
+ #
155
+ # @param external_url [String, nil] External URL to digital product
156
+ #
157
+ # @param files [Array<String>, nil] Uploaded files ids of digital product
158
+ #
159
+ # @param instructions [String, nil] Instructions to download and use the digital product
160
+ end
104
161
  end
105
162
  end
106
163
  end
@@ -11,10 +11,10 @@ module Dodopayments
11
11
  # @!attribute force_update
12
12
  #
13
13
  # @return [Boolean, nil]
14
- optional :force_update, Dodopayments::Internal::Type::Boolean, nil?: true
14
+ optional :force_update, Dodopayments::Internal::Type::Boolean
15
15
 
16
16
  # @!method initialize(force_update: nil, request_options: {})
17
- # @param force_update [Boolean, nil]
17
+ # @param force_update [Boolean]
18
18
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
19
19
  end
20
20
  end