dodopayments 2.33.0 → 2.35.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 (277) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/dodopayments/internal/type/enum.rb +11 -11
  5. data/lib/dodopayments/models/addon_delete_params.rb +20 -0
  6. data/lib/dodopayments/models/addon_list_params.rb +25 -1
  7. data/lib/dodopayments/models/addon_retrieve_params.rb +18 -1
  8. data/lib/dodopayments/models/addon_unarchive_params.rb +20 -0
  9. data/lib/dodopayments/models/addons/translation_delete_params.rb +36 -0
  10. data/lib/dodopayments/models/addons/translation_list_params.rb +35 -0
  11. data/lib/dodopayments/models/addons/translation_update_params.rb +52 -0
  12. data/lib/dodopayments/models/balance_ledger_entry.rb +1 -0
  13. data/lib/dodopayments/models/balance_retrieve_ledger_params.rb +1 -0
  14. data/lib/dodopayments/models/charge_type.rb +33 -0
  15. data/lib/dodopayments/models/checkout_session_preview_params.rb +17 -1
  16. data/lib/dodopayments/models/checkout_session_preview_response.rb +12 -1
  17. data/lib/dodopayments/models/create_new_customer.rb +12 -1
  18. data/lib/dodopayments/models/credit_entitlement_list_params.rb +17 -1
  19. data/lib/dodopayments/models/credit_entitlement_retrieve_params.rb +18 -1
  20. data/lib/dodopayments/models/credit_entitlements/credit_entitlement_translation.rb +47 -0
  21. data/lib/dodopayments/models/credit_entitlements/credit_entitlement_translations_list_response.rb +23 -0
  22. data/lib/dodopayments/models/credit_entitlements/translation_delete_params.rb +37 -0
  23. data/lib/dodopayments/models/credit_entitlements/translation_list_params.rb +36 -0
  24. data/lib/dodopayments/models/credit_entitlements/translation_update_params.rb +53 -0
  25. data/lib/dodopayments/models/customer.rb +9 -1
  26. data/lib/dodopayments/models/customer_create_params.rb +14 -1
  27. data/lib/dodopayments/models/customer_update_params.rb +14 -1
  28. data/lib/dodopayments/models/entitlement_list_params.rb +17 -1
  29. data/lib/dodopayments/models/entitlement_retrieve_params.rb +18 -1
  30. data/lib/dodopayments/models/entitlements/entitlement_translation.rb +67 -0
  31. data/lib/dodopayments/models/entitlements/entitlement_translations_list_response.rb +23 -0
  32. data/lib/dodopayments/models/entitlements/translation_delete_params.rb +36 -0
  33. data/lib/dodopayments/models/entitlements/translation_list_params.rb +35 -0
  34. data/lib/dodopayments/models/entitlements/translation_update_params.rb +69 -0
  35. data/lib/dodopayments/models/invoices/payment_retrieve_params.rb +14 -1
  36. data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +14 -1
  37. data/lib/dodopayments/models/invoices/payment_retrieve_refund_params.rb +14 -1
  38. data/lib/dodopayments/models/locale.rb +38 -0
  39. data/lib/dodopayments/models/locale_info.rb +34 -0
  40. data/lib/dodopayments/models/meter_list_params.rb +17 -1
  41. data/lib/dodopayments/models/meter_retrieve_params.rb +18 -1
  42. data/lib/dodopayments/models/meter_update_params.rb +49 -0
  43. data/lib/dodopayments/models/meters/translation_delete_params.rb +36 -0
  44. data/lib/dodopayments/models/meters/translation_list_params.rb +35 -0
  45. data/lib/dodopayments/models/meters/translation_update_params.rb +52 -0
  46. data/lib/dodopayments/models/misc_list_locales_params.rb +14 -0
  47. data/lib/dodopayments/models/misc_list_locales_response.rb +8 -0
  48. data/lib/dodopayments/models/payment.rb +85 -8
  49. data/lib/dodopayments/models/payment_list_response.rb +91 -6
  50. data/lib/dodopayments/models/payment_retrieve_line_items_params.rb +14 -1
  51. data/lib/dodopayments/models/payment_retrieve_line_items_response.rb +10 -1
  52. data/lib/dodopayments/models/payouts/breakup/detail_list_response.rb +3 -1
  53. data/lib/dodopayments/models/payouts/breakup_retrieve_response.rb +2 -1
  54. data/lib/dodopayments/models/price.rb +56 -20
  55. data/lib/dodopayments/models/product_collection_list_params.rb +17 -1
  56. data/lib/dodopayments/models/product_collection_retrieve_params.rb +18 -1
  57. data/lib/dodopayments/models/product_collections/group_update_params.rb +2 -1
  58. data/lib/dodopayments/models/product_collections/translation_delete_params.rb +37 -0
  59. data/lib/dodopayments/models/product_collections/translation_list_params.rb +36 -0
  60. data/lib/dodopayments/models/product_collections/translation_update_params.rb +53 -0
  61. data/lib/dodopayments/models/product_list_params.rb +14 -1
  62. data/lib/dodopayments/models/product_retrieve_params.rb +18 -1
  63. data/lib/dodopayments/models/products/translation.rb +50 -0
  64. data/lib/dodopayments/models/products/translation_delete_params.rb +36 -0
  65. data/lib/dodopayments/models/products/translation_list_params.rb +35 -0
  66. data/lib/dodopayments/models/products/translation_update_params.rb +52 -0
  67. data/lib/dodopayments/models/products/translations_list_response.rb +20 -0
  68. data/lib/dodopayments/models/refund_create_params.rb +13 -1
  69. data/lib/dodopayments/models/subscription_list_params.rb +14 -1
  70. data/lib/dodopayments/models/subscription_retrieve_params.rb +18 -1
  71. data/lib/dodopayments/models/subscription_service_period.rb +12 -1
  72. data/lib/dodopayments/models/three_ds_flow.rb +16 -0
  73. data/lib/dodopayments/models/three_ds_status.rb +21 -0
  74. data/lib/dodopayments/models/update_subscription_plan_req.rb +10 -0
  75. data/lib/dodopayments/models.rb +22 -0
  76. data/lib/dodopayments/resources/addons/translations.rb +110 -0
  77. data/lib/dodopayments/resources/addons.rb +58 -3
  78. data/lib/dodopayments/resources/checkout_sessions.rb +31 -26
  79. data/lib/dodopayments/resources/credit_entitlements/translations.rb +113 -0
  80. data/lib/dodopayments/resources/credit_entitlements.rb +20 -3
  81. data/lib/dodopayments/resources/customers.rb +12 -2
  82. data/lib/dodopayments/resources/entitlements/translations.rb +114 -0
  83. data/lib/dodopayments/resources/entitlements.rb +20 -3
  84. data/lib/dodopayments/resources/invoices/payments.rb +30 -6
  85. data/lib/dodopayments/resources/meters/translations.rb +110 -0
  86. data/lib/dodopayments/resources/meters.rb +49 -3
  87. data/lib/dodopayments/resources/misc.rb +18 -0
  88. data/lib/dodopayments/resources/payments.rb +10 -2
  89. data/lib/dodopayments/resources/payouts/breakup/details.rb +5 -2
  90. data/lib/dodopayments/resources/payouts/breakup.rb +4 -1
  91. data/lib/dodopayments/resources/product_collections/translations.rb +113 -0
  92. data/lib/dodopayments/resources/product_collections.rb +20 -3
  93. data/lib/dodopayments/resources/products/translations.rb +110 -0
  94. data/lib/dodopayments/resources/products.rb +17 -3
  95. data/lib/dodopayments/resources/refunds.rb +6 -1
  96. data/lib/dodopayments/resources/subscriptions.rb +13 -3
  97. data/lib/dodopayments/version.rb +1 -1
  98. data/lib/dodopayments.rb +40 -0
  99. data/rbi/dodopayments/models/addon_delete_params.rbi +38 -0
  100. data/rbi/dodopayments/models/addon_list_params.rbi +32 -0
  101. data/rbi/dodopayments/models/addon_retrieve_params.rbi +29 -2
  102. data/rbi/dodopayments/models/addon_unarchive_params.rbi +38 -0
  103. data/rbi/dodopayments/models/addons/translation_delete_params.rbi +58 -0
  104. data/rbi/dodopayments/models/addons/translation_list_params.rbi +59 -0
  105. data/rbi/dodopayments/models/addons/translation_update_params.rbi +74 -0
  106. data/rbi/dodopayments/models/balance_ledger_entry.rbi +5 -0
  107. data/rbi/dodopayments/models/balance_retrieve_ledger_params.rbi +5 -0
  108. data/rbi/dodopayments/models/charge_type.rbi +37 -0
  109. data/rbi/dodopayments/models/checkout_session_preview_params.rbi +29 -5
  110. data/rbi/dodopayments/models/checkout_session_preview_response.rbi +14 -0
  111. data/rbi/dodopayments/models/create_new_customer.rbi +17 -3
  112. data/rbi/dodopayments/models/credit_entitlement_list_params.rbi +21 -0
  113. data/rbi/dodopayments/models/credit_entitlement_retrieve_params.rbi +29 -2
  114. data/rbi/dodopayments/models/credit_entitlements/credit_entitlement_translation.rbi +70 -0
  115. data/rbi/dodopayments/models/credit_entitlements/credit_entitlement_translations_list_response.rbi +54 -0
  116. data/rbi/dodopayments/models/credit_entitlements/translation_delete_params.rbi +58 -0
  117. data/rbi/dodopayments/models/credit_entitlements/translation_list_params.rbi +59 -0
  118. data/rbi/dodopayments/models/credit_entitlements/translation_update_params.rbi +74 -0
  119. data/rbi/dodopayments/models/customer.rbi +11 -3
  120. data/rbi/dodopayments/models/customer_create_params.rbi +12 -0
  121. data/rbi/dodopayments/models/customer_update_params.rbi +12 -0
  122. data/rbi/dodopayments/models/entitlement_list_params.rbi +21 -0
  123. data/rbi/dodopayments/models/entitlement_retrieve_params.rbi +29 -2
  124. data/rbi/dodopayments/models/entitlements/entitlement_translation.rbi +87 -0
  125. data/rbi/dodopayments/models/entitlements/entitlement_translations_list_response.rbi +48 -0
  126. data/rbi/dodopayments/models/entitlements/translation_delete_params.rbi +58 -0
  127. data/rbi/dodopayments/models/entitlements/translation_list_params.rbi +59 -0
  128. data/rbi/dodopayments/models/entitlements/translation_update_params.rbi +92 -0
  129. data/rbi/dodopayments/models/invoices/payment_retrieve_params.rbi +17 -1
  130. data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +21 -2
  131. data/rbi/dodopayments/models/invoices/payment_retrieve_refund_params.rbi +21 -2
  132. data/rbi/dodopayments/models/locale.rbi +42 -0
  133. data/rbi/dodopayments/models/locale_info.rbi +54 -0
  134. data/rbi/dodopayments/models/meter_list_params.rbi +21 -0
  135. data/rbi/dodopayments/models/meter_retrieve_params.rbi +29 -2
  136. data/rbi/dodopayments/models/meter_update_params.rbi +70 -0
  137. data/rbi/dodopayments/models/meters/translation_delete_params.rbi +58 -0
  138. data/rbi/dodopayments/models/meters/translation_list_params.rbi +59 -0
  139. data/rbi/dodopayments/models/meters/translation_update_params.rbi +74 -0
  140. data/rbi/dodopayments/models/misc_list_locales_params.rbi +32 -0
  141. data/rbi/dodopayments/models/misc_list_locales_response.rbi +11 -0
  142. data/rbi/dodopayments/models/payment.rbi +103 -8
  143. data/rbi/dodopayments/models/payment_list_response.rbi +112 -9
  144. data/rbi/dodopayments/models/payment_retrieve_line_items_params.rbi +21 -2
  145. data/rbi/dodopayments/models/payment_retrieve_line_items_response.rbi +14 -3
  146. data/rbi/dodopayments/models/payouts/breakup/detail_list_response.rbi +6 -2
  147. data/rbi/dodopayments/models/payouts/breakup_retrieve_response.rbi +4 -2
  148. data/rbi/dodopayments/models/price.rbi +96 -24
  149. data/rbi/dodopayments/models/product_collection_list_params.rbi +21 -0
  150. data/rbi/dodopayments/models/product_collection_retrieve_params.rbi +29 -2
  151. data/rbi/dodopayments/models/product_collections/group_update_params.rbi +4 -2
  152. data/rbi/dodopayments/models/product_collections/translation_delete_params.rbi +58 -0
  153. data/rbi/dodopayments/models/product_collections/translation_list_params.rbi +59 -0
  154. data/rbi/dodopayments/models/product_collections/translation_update_params.rbi +74 -0
  155. data/rbi/dodopayments/models/product_list_params.rbi +21 -0
  156. data/rbi/dodopayments/models/product_retrieve_params.rbi +29 -2
  157. data/rbi/dodopayments/models/products/translation.rbi +70 -0
  158. data/rbi/dodopayments/models/products/translation_delete_params.rbi +58 -0
  159. data/rbi/dodopayments/models/products/translation_list_params.rbi +59 -0
  160. data/rbi/dodopayments/models/products/translation_update_params.rbi +74 -0
  161. data/rbi/dodopayments/models/products/translations_list_response.rbi +37 -0
  162. data/rbi/dodopayments/models/refund_create_params.rbi +10 -0
  163. data/rbi/dodopayments/models/subscription_list_params.rbi +21 -0
  164. data/rbi/dodopayments/models/subscription_retrieve_params.rbi +25 -1
  165. data/rbi/dodopayments/models/subscription_service_period.rbi +24 -4
  166. data/rbi/dodopayments/models/three_ds_flow.rbi +23 -0
  167. data/rbi/dodopayments/models/three_ds_status.rbi +31 -0
  168. data/rbi/dodopayments/models/update_subscription_plan_req.rbi +15 -0
  169. data/rbi/dodopayments/models.rbi +22 -0
  170. data/rbi/dodopayments/resources/addons/translations.rbi +77 -0
  171. data/rbi/dodopayments/resources/addons.rbi +48 -0
  172. data/rbi/dodopayments/resources/checkout_sessions.rbi +55 -39
  173. data/rbi/dodopayments/resources/credit_entitlements/translations.rbi +81 -0
  174. data/rbi/dodopayments/resources/credit_entitlements.rbi +19 -0
  175. data/rbi/dodopayments/resources/customers.rbi +10 -0
  176. data/rbi/dodopayments/resources/entitlements/translations.rbi +87 -0
  177. data/rbi/dodopayments/resources/entitlements.rbi +19 -0
  178. data/rbi/dodopayments/resources/invoices/payments.rbi +12 -0
  179. data/rbi/dodopayments/resources/meters/translations.rbi +77 -0
  180. data/rbi/dodopayments/resources/meters.rbi +42 -0
  181. data/rbi/dodopayments/resources/misc.rbi +9 -0
  182. data/rbi/dodopayments/resources/payments.rbi +4 -0
  183. data/rbi/dodopayments/resources/payouts/breakup/details.rbi +5 -2
  184. data/rbi/dodopayments/resources/payouts/breakup.rbi +4 -1
  185. data/rbi/dodopayments/resources/product_collections/groups.rbi +2 -1
  186. data/rbi/dodopayments/resources/product_collections/translations.rbi +77 -0
  187. data/rbi/dodopayments/resources/product_collections.rbi +19 -0
  188. data/rbi/dodopayments/resources/products/translations.rbi +77 -0
  189. data/rbi/dodopayments/resources/products.rbi +19 -0
  190. data/rbi/dodopayments/resources/refunds.rbi +4 -0
  191. data/rbi/dodopayments/resources/subscriptions.rbi +26 -0
  192. data/sig/dodopayments/models/addon_delete_params.rbs +23 -0
  193. data/sig/dodopayments/models/addon_list_params.rbs +18 -1
  194. data/sig/dodopayments/models/addon_retrieve_params.rbs +8 -1
  195. data/sig/dodopayments/models/addon_unarchive_params.rbs +23 -0
  196. data/sig/dodopayments/models/addons/translation_delete_params.rbs +30 -0
  197. data/sig/dodopayments/models/addons/translation_list_params.rbs +32 -0
  198. data/sig/dodopayments/models/addons/translation_update_params.rbs +43 -0
  199. data/sig/dodopayments/models/balance_ledger_entry.rbs +2 -0
  200. data/sig/dodopayments/models/balance_retrieve_ledger_params.rbs +2 -0
  201. data/sig/dodopayments/models/charge_type.rbs +16 -0
  202. data/sig/dodopayments/models/checkout_session_preview_params.rbs +13 -3
  203. data/sig/dodopayments/models/checkout_session_preview_response.rbs +5 -0
  204. data/sig/dodopayments/models/create_new_customer.rbs +8 -3
  205. data/sig/dodopayments/models/credit_entitlement_list_params.rbs +12 -1
  206. data/sig/dodopayments/models/credit_entitlement_retrieve_params.rbs +8 -1
  207. data/sig/dodopayments/models/credit_entitlements/credit_entitlement_translation.rbs +39 -0
  208. data/sig/dodopayments/models/credit_entitlements/credit_entitlement_translations_list_response.rbs +24 -0
  209. data/sig/dodopayments/models/credit_entitlements/translation_delete_params.rbs +30 -0
  210. data/sig/dodopayments/models/credit_entitlements/translation_list_params.rbs +32 -0
  211. data/sig/dodopayments/models/credit_entitlements/translation_update_params.rbs +43 -0
  212. data/sig/dodopayments/models/customer.rbs +8 -3
  213. data/sig/dodopayments/models/customer_create_params.rbs +6 -1
  214. data/sig/dodopayments/models/customer_update_params.rbs +6 -1
  215. data/sig/dodopayments/models/entitlement_list_params.rbs +7 -0
  216. data/sig/dodopayments/models/entitlement_retrieve_params.rbs +8 -1
  217. data/sig/dodopayments/models/entitlements/entitlement_translation.rbs +49 -0
  218. data/sig/dodopayments/models/entitlements/entitlement_translations_list_response.rbs +22 -0
  219. data/sig/dodopayments/models/entitlements/translation_delete_params.rbs +30 -0
  220. data/sig/dodopayments/models/entitlements/translation_list_params.rbs +32 -0
  221. data/sig/dodopayments/models/entitlements/translation_update_params.rbs +53 -0
  222. data/sig/dodopayments/models/invoices/payment_retrieve_params.rbs +7 -1
  223. data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +8 -1
  224. data/sig/dodopayments/models/invoices/payment_retrieve_refund_params.rbs +8 -1
  225. data/sig/dodopayments/models/locale.rbs +56 -0
  226. data/sig/dodopayments/models/locale_info.rbs +26 -0
  227. data/sig/dodopayments/models/meter_list_params.rbs +12 -1
  228. data/sig/dodopayments/models/meter_retrieve_params.rbs +8 -1
  229. data/sig/dodopayments/models/meter_update_params.rbs +41 -0
  230. data/sig/dodopayments/models/meters/translation_delete_params.rbs +30 -0
  231. data/sig/dodopayments/models/meters/translation_list_params.rbs +32 -0
  232. data/sig/dodopayments/models/meters/translation_update_params.rbs +43 -0
  233. data/sig/dodopayments/models/misc_list_locales_params.rbs +15 -0
  234. data/sig/dodopayments/models/misc_list_locales_response.rbs +7 -0
  235. data/sig/dodopayments/models/payment.rbs +35 -0
  236. data/sig/dodopayments/models/payment_list_response.rbs +43 -3
  237. data/sig/dodopayments/models/payment_retrieve_line_items_params.rbs +10 -1
  238. data/sig/dodopayments/models/payment_retrieve_line_items_response.rbs +8 -3
  239. data/sig/dodopayments/models/product_collection_list_params.rbs +7 -0
  240. data/sig/dodopayments/models/product_collection_retrieve_params.rbs +8 -1
  241. data/sig/dodopayments/models/product_collections/translation_delete_params.rbs +30 -0
  242. data/sig/dodopayments/models/product_collections/translation_list_params.rbs +32 -0
  243. data/sig/dodopayments/models/product_collections/translation_update_params.rbs +43 -0
  244. data/sig/dodopayments/models/product_list_params.rbs +7 -0
  245. data/sig/dodopayments/models/product_retrieve_params.rbs +8 -1
  246. data/sig/dodopayments/models/products/translation.rbs +37 -0
  247. data/sig/dodopayments/models/products/translation_delete_params.rbs +30 -0
  248. data/sig/dodopayments/models/products/translation_list_params.rbs +32 -0
  249. data/sig/dodopayments/models/products/translation_update_params.rbs +43 -0
  250. data/sig/dodopayments/models/products/translations_list_response.rbs +18 -0
  251. data/sig/dodopayments/models/refund_create_params.rbs +5 -0
  252. data/sig/dodopayments/models/subscription_list_params.rbs +7 -0
  253. data/sig/dodopayments/models/subscription_retrieve_params.rbs +7 -1
  254. data/sig/dodopayments/models/subscription_service_period.rbs +10 -1
  255. data/sig/dodopayments/models/three_ds_flow.rbs +14 -0
  256. data/sig/dodopayments/models/three_ds_status.rbs +24 -0
  257. data/sig/dodopayments/models.rbs +22 -0
  258. data/sig/dodopayments/resources/addons/translations.rbs +29 -0
  259. data/sig/dodopayments/resources/addons.rbs +15 -0
  260. data/sig/dodopayments/resources/checkout_sessions.rbs +1 -0
  261. data/sig/dodopayments/resources/credit_entitlements/translations.rbs +29 -0
  262. data/sig/dodopayments/resources/credit_entitlements.rbs +4 -0
  263. data/sig/dodopayments/resources/customers.rbs +2 -0
  264. data/sig/dodopayments/resources/entitlements/translations.rbs +31 -0
  265. data/sig/dodopayments/resources/entitlements.rbs +4 -0
  266. data/sig/dodopayments/resources/invoices/payments.rbs +3 -0
  267. data/sig/dodopayments/resources/meters/translations.rbs +29 -0
  268. data/sig/dodopayments/resources/meters.rbs +12 -0
  269. data/sig/dodopayments/resources/misc.rbs +4 -0
  270. data/sig/dodopayments/resources/payments.rbs +1 -0
  271. data/sig/dodopayments/resources/product_collections/translations.rbs +29 -0
  272. data/sig/dodopayments/resources/product_collections.rbs +4 -0
  273. data/sig/dodopayments/resources/products/translations.rbs +29 -0
  274. data/sig/dodopayments/resources/products.rbs +4 -0
  275. data/sig/dodopayments/resources/refunds.rbs +1 -0
  276. data/sig/dodopayments/resources/subscriptions.rbs +2 -0
  277. metadata +122 -2
@@ -122,14 +122,16 @@ module Dodopayments
122
122
  required :currency, enum: -> { Dodopayments::Currency }
123
123
 
124
124
  # @!attribute payment_frequency_count
125
- # Number of units for the payment frequency. For example, a value of `1` with a
126
- # `payment_frequency_interval` of `month` represents monthly payments.
125
+ # Number of `payment_frequency_interval` units between two charges. This field
126
+ # sets the billing cycle. For example, `1` with a `payment_frequency_interval` of
127
+ # `month` charges the customer every month.
127
128
  #
128
129
  # @return [Integer]
129
130
  required :payment_frequency_count, Integer
130
131
 
131
132
  # @!attribute payment_frequency_interval
132
- # The time interval for the payment frequency (e.g., day, month, year).
133
+ # The time unit of the billing cycle (e.g., day, month, year). Use it with
134
+ # `payment_frequency_count`.
133
135
  #
134
136
  # @return [Symbol, Dodopayments::Models::TimeInterval]
135
137
  required :payment_frequency_interval, enum: -> { Dodopayments::TimeInterval }
@@ -142,14 +144,30 @@ module Dodopayments
142
144
  required :price, Integer
143
145
 
144
146
  # @!attribute subscription_period_count
145
- # Number of units for the subscription period. For example, a value of `12` with a
146
- # `subscription_period_interval` of `month` represents a one-year subscription.
147
+ # Number of `subscription_period_interval` units for the total duration of the
148
+ # subscription. This field does not set the billing cycle. Use
149
+ # `payment_frequency_count` for the billing cycle. When this period ends, the
150
+ # subscription expires. Dodo Payments does not start a new billing cycle after the
151
+ # subscription expires. Dodo Payments can still retry a failed payment for an
152
+ # earlier billing cycle.
153
+ #
154
+ # For a subscription that renews until the customer cancels it, set this to `20`
155
+ # with a `subscription_period_interval` of `year`. This is the recommended value
156
+ # and also the maximum. The subscription expires after 20 years if the customer
157
+ # does not cancel it before then.
158
+ #
159
+ # For example, a monthly plan uses a `payment_frequency_count` of `1`, a
160
+ # `payment_frequency_interval` of `month`, and a subscription period of `20`
161
+ # `year`. Do not set the subscription period to `1` `month` for a monthly plan:
162
+ # the subscription then expires after one month.
147
163
  #
148
164
  # @return [Integer]
149
165
  required :subscription_period_count, Integer
150
166
 
151
167
  # @!attribute subscription_period_interval
152
- # The time interval for the subscription period (e.g., day, month, year).
168
+ # The time unit of the total subscription duration (e.g., day, month, year). Use
169
+ # it with `subscription_period_count`. The recommended value is `year`, with a
170
+ # `subscription_period_count` of `20`.
153
171
  #
154
172
  # @return [Symbol, Dodopayments::Models::TimeInterval]
155
173
  required :subscription_period_interval, enum: -> { Dodopayments::TimeInterval }
@@ -235,15 +253,15 @@ module Dodopayments
235
253
  #
236
254
  # @param currency [Symbol, Dodopayments::Models::Currency] The currency in which the payment is made.
237
255
  #
238
- # @param payment_frequency_count [Integer] Number of units for the payment frequency.
256
+ # @param payment_frequency_count [Integer] Number of `payment_frequency_interval` units between two charges.
239
257
  #
240
- # @param payment_frequency_interval [Symbol, Dodopayments::Models::TimeInterval] The time interval for the payment frequency (e.g., day, month, year).
258
+ # @param payment_frequency_interval [Symbol, Dodopayments::Models::TimeInterval] The time unit of the billing cycle (e.g., day, month, year).
241
259
  #
242
260
  # @param price [Integer] The payment amount. Represented in the lowest denomination of the currency (e.g.
243
261
  #
244
- # @param subscription_period_count [Integer] Number of units for the subscription period.
262
+ # @param subscription_period_count [Integer] Number of `subscription_period_interval` units for the total duration of the sub
245
263
  #
246
- # @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval] The time interval for the subscription period (e.g., day, month, year).
264
+ # @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval] The time unit of the total subscription duration (e.g., day, month, year).
247
265
  #
248
266
  # @param discount [Integer] Deprecated: use `discount_bps` instead.
249
267
  #
@@ -281,27 +299,45 @@ module Dodopayments
281
299
  required :fixed_price, Integer
282
300
 
283
301
  # @!attribute payment_frequency_count
284
- # Number of units for the payment frequency. For example, a value of `1` with a
285
- # `payment_frequency_interval` of `month` represents monthly payments.
302
+ # Number of `payment_frequency_interval` units between two charges. This field
303
+ # sets the billing cycle. For example, `1` with a `payment_frequency_interval` of
304
+ # `month` charges the customer every month.
286
305
  #
287
306
  # @return [Integer]
288
307
  required :payment_frequency_count, Integer
289
308
 
290
309
  # @!attribute payment_frequency_interval
291
- # The time interval for the payment frequency (e.g., day, month, year).
310
+ # The time unit of the billing cycle (e.g., day, month, year). Use it with
311
+ # `payment_frequency_count`.
292
312
  #
293
313
  # @return [Symbol, Dodopayments::Models::TimeInterval]
294
314
  required :payment_frequency_interval, enum: -> { Dodopayments::TimeInterval }
295
315
 
296
316
  # @!attribute subscription_period_count
297
- # Number of units for the subscription period. For example, a value of `12` with a
298
- # `subscription_period_interval` of `month` represents a one-year subscription.
317
+ # Number of `subscription_period_interval` units for the total duration of the
318
+ # subscription. This field does not set the billing cycle. Use
319
+ # `payment_frequency_count` for the billing cycle. When this period ends, the
320
+ # subscription expires. Dodo Payments does not start a new billing cycle after the
321
+ # subscription expires. Dodo Payments can still retry a failed payment for an
322
+ # earlier billing cycle.
323
+ #
324
+ # For a subscription that renews until the customer cancels it, set this to `20`
325
+ # with a `subscription_period_interval` of `year`. This is the recommended value
326
+ # and also the maximum. The subscription expires after 20 years if the customer
327
+ # does not cancel it before then.
328
+ #
329
+ # For example, a monthly plan uses a `payment_frequency_count` of `1`, a
330
+ # `payment_frequency_interval` of `month`, and a subscription period of `20`
331
+ # `year`. Do not set the subscription period to `1` `month` for a monthly plan:
332
+ # the subscription then expires after one month.
299
333
  #
300
334
  # @return [Integer]
301
335
  required :subscription_period_count, Integer
302
336
 
303
337
  # @!attribute subscription_period_interval
304
- # The time interval for the subscription period (e.g., day, month, year).
338
+ # The time unit of the total subscription duration (e.g., day, month, year). Use
339
+ # it with `subscription_period_count`. The recommended value is `year`, with a
340
+ # `subscription_period_count` of `20`.
305
341
  #
306
342
  # @return [Symbol, Dodopayments::Models::TimeInterval]
307
343
  required :subscription_period_interval, enum: -> { Dodopayments::TimeInterval }
@@ -366,13 +402,13 @@ module Dodopayments
366
402
  #
367
403
  # @param fixed_price [Integer] The fixed payment amount. Represented in the lowest denomination of the currency
368
404
  #
369
- # @param payment_frequency_count [Integer] Number of units for the payment frequency.
405
+ # @param payment_frequency_count [Integer] Number of `payment_frequency_interval` units between two charges.
370
406
  #
371
- # @param payment_frequency_interval [Symbol, Dodopayments::Models::TimeInterval] The time interval for the payment frequency (e.g., day, month, year).
407
+ # @param payment_frequency_interval [Symbol, Dodopayments::Models::TimeInterval] The time unit of the billing cycle (e.g., day, month, year).
372
408
  #
373
- # @param subscription_period_count [Integer] Number of units for the subscription period.
409
+ # @param subscription_period_count [Integer] Number of `subscription_period_interval` units for the total duration of the sub
374
410
  #
375
- # @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval] The time interval for the subscription period (e.g., day, month, year).
411
+ # @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval] The time unit of the total subscription duration (e.g., day, month, year).
376
412
  #
377
413
  # @param discount [Integer] Deprecated: use `discount_bps` instead.
378
414
  #
@@ -19,6 +19,17 @@ module Dodopayments
19
19
  # @return [String, nil]
20
20
  optional :brand_id, String
21
21
 
22
+ # @!attribute locale
23
+ # Shows the translated name, description and unit of the catalog entities in this
24
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
25
+ # with no translation, an unknown code, or no code shows the base text.
26
+ #
27
+ # Do not send a text from a localized response back in a create or update request.
28
+ # The base text then changes to the translated text.
29
+ #
30
+ # @return [String, nil]
31
+ optional :locale, String
32
+
22
33
  # @!attribute page_number
23
34
  # Page number default is 0
24
35
  #
@@ -31,11 +42,16 @@ module Dodopayments
31
42
  # @return [Integer, nil]
32
43
  optional :page_size, Integer
33
44
 
34
- # @!method initialize(archived: nil, brand_id: nil, page_number: nil, page_size: nil, request_options: {})
45
+ # @!method initialize(archived: nil, brand_id: nil, locale: nil, page_number: nil, page_size: nil, request_options: {})
46
+ # Some parameter documentations has been truncated, see
47
+ # {Dodopayments::Models::ProductCollectionListParams} for more details.
48
+ #
35
49
  # @param archived [Boolean] List archived collections
36
50
  #
37
51
  # @param brand_id [String] Filter by Brand id
38
52
  #
53
+ # @param locale [String] Shows the translated name, description and unit of the catalog entities in this
54
+ #
39
55
  # @param page_number [Integer] Page number default is 0
40
56
  #
41
57
  # @param page_size [Integer] Page size default is 10 max is 100
@@ -12,8 +12,25 @@ module Dodopayments
12
12
  # @return [String]
13
13
  required :id, String
14
14
 
15
- # @!method initialize(id:, request_options: {})
15
+ # @!attribute locale
16
+ # Shows the translated name, description and unit of the catalog entities in this
17
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
18
+ # with no translation, an unknown code, or no code shows the base text.
19
+ #
20
+ # Do not send a text from a localized response back in a create or update request.
21
+ # The base text then changes to the translated text.
22
+ #
23
+ # @return [String, nil]
24
+ optional :locale, String
25
+
26
+ # @!method initialize(id:, locale: nil, request_options: {})
27
+ # Some parameter documentations has been truncated, see
28
+ # {Dodopayments::Models::ProductCollectionRetrieveParams} for more details.
29
+ #
16
30
  # @param id [String]
31
+ #
32
+ # @param locale [String] Shows the translated name, description and unit of the catalog entities in this
33
+ #
17
34
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
18
35
  end
19
36
  end
@@ -20,7 +20,8 @@ module Dodopayments
20
20
 
21
21
  # @!attribute group_name
22
22
  # Optional group name update: Some(Some(name)) = set name, Some(None) = clear
23
- # name, None = no change
23
+ # name, None = no change The API returns 422 if another group in the collection
24
+ # has no name.
24
25
  #
25
26
  # @return [String, nil]
26
27
  optional :group_name, String, nil?: true
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module ProductCollections
6
+ # @see Dodopayments::Resources::ProductCollections::Translations#delete
7
+ class TranslationDeleteParams < Dodopayments::Internal::Type::BaseModel
8
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
+ include Dodopayments::Internal::Type::RequestParameters
10
+
11
+ # @!attribute id
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute locale
17
+ # A locale that the checkout and the customer portal can show.
18
+ #
19
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
20
+ #
21
+ # @return [Symbol, Dodopayments::Models::Locale]
22
+ required :locale, enum: -> { Dodopayments::Locale }
23
+
24
+ # @!method initialize(id:, locale:, request_options: {})
25
+ # Some parameter documentations has been truncated, see
26
+ # {Dodopayments::Models::ProductCollections::TranslationDeleteParams} for more
27
+ # details.
28
+ #
29
+ # @param id [String]
30
+ #
31
+ # @param locale [Symbol, Dodopayments::Models::Locale] A locale that the checkout and the customer portal can show.
32
+ #
33
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module ProductCollections
6
+ # @see Dodopayments::Resources::ProductCollections::Translations#list
7
+ class TranslationListParams < Dodopayments::Internal::Type::BaseModel
8
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
+ include Dodopayments::Internal::Type::RequestParameters
10
+
11
+ # @!attribute id
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute locale
17
+ # Returns only these locales, for example `?locale=fr&locale=de`. With no value,
18
+ # the response has all the locales.
19
+ #
20
+ # @return [Array<String>, nil]
21
+ optional :locale, Dodopayments::Internal::Type::ArrayOf[String]
22
+
23
+ # @!method initialize(id:, locale: nil, request_options: {})
24
+ # Some parameter documentations has been truncated, see
25
+ # {Dodopayments::Models::ProductCollections::TranslationListParams} for more
26
+ # details.
27
+ #
28
+ # @param id [String]
29
+ #
30
+ # @param locale [Array<String>] Returns only these locales, for example `?locale=fr&locale=de`. With no value, t
31
+ #
32
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module ProductCollections
6
+ # @see Dodopayments::Resources::ProductCollections::Translations#update
7
+ class TranslationUpdateParams < Dodopayments::Internal::Type::BaseModel
8
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
+ include Dodopayments::Internal::Type::RequestParameters
10
+
11
+ # @!attribute id
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute locale
17
+ # A locale that the checkout and the customer portal can show.
18
+ #
19
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
20
+ #
21
+ # @return [Symbol, Dodopayments::Models::Locale]
22
+ required :locale, enum: -> { Dodopayments::Locale }
23
+
24
+ # @!attribute description
25
+ # The translated description.
26
+ #
27
+ # @return [String, nil]
28
+ optional :description, String, nil?: true
29
+
30
+ # @!attribute name
31
+ # The translated name.
32
+ #
33
+ # @return [String, nil]
34
+ optional :name, String, nil?: true
35
+
36
+ # @!method initialize(id:, locale:, description: nil, name: nil, request_options: {})
37
+ # Some parameter documentations has been truncated, see
38
+ # {Dodopayments::Models::ProductCollections::TranslationUpdateParams} for more
39
+ # details.
40
+ #
41
+ # @param id [String]
42
+ #
43
+ # @param locale [Symbol, Dodopayments::Models::Locale] A locale that the checkout and the customer portal can show.
44
+ #
45
+ # @param description [String, nil] The translated description.
46
+ #
47
+ # @param name [String, nil] The translated name.
48
+ #
49
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
50
+ end
51
+ end
52
+ end
53
+ end
@@ -19,6 +19,17 @@ module Dodopayments
19
19
  # @return [String, nil]
20
20
  optional :brand_id, String
21
21
 
22
+ # @!attribute locale
23
+ # Shows the translated name, description and unit of the catalog entities in this
24
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
25
+ # with no translation, an unknown code, or no code shows the base text.
26
+ #
27
+ # Do not send a text from a localized response back in a create or update request.
28
+ # The base text then changes to the translated text.
29
+ #
30
+ # @return [String, nil]
31
+ optional :locale, String
32
+
22
33
  # @!attribute page_number
23
34
  # Page number default is 0
24
35
  #
@@ -41,7 +52,7 @@ module Dodopayments
41
52
  # @return [Boolean, nil]
42
53
  optional :recurring, Dodopayments::Internal::Type::Boolean
43
54
 
44
- # @!method initialize(archived: nil, brand_id: nil, page_number: nil, page_size: nil, recurring: nil, request_options: {})
55
+ # @!method initialize(archived: nil, brand_id: nil, locale: nil, page_number: nil, page_size: nil, recurring: nil, request_options: {})
45
56
  # Some parameter documentations has been truncated, see
46
57
  # {Dodopayments::Models::ProductListParams} for more details.
47
58
  #
@@ -49,6 +60,8 @@ module Dodopayments
49
60
  #
50
61
  # @param brand_id [String] filter by Brand id
51
62
  #
63
+ # @param locale [String] Shows the translated name, description and unit of the catalog entities in this
64
+ #
52
65
  # @param page_number [Integer] Page number default is 0
53
66
  #
54
67
  # @param page_size [Integer] Page size default is 10 max is 100
@@ -12,8 +12,25 @@ module Dodopayments
12
12
  # @return [String]
13
13
  required :id, String
14
14
 
15
- # @!method initialize(id:, request_options: {})
15
+ # @!attribute locale
16
+ # Shows the translated name, description and unit of the catalog entities in this
17
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
18
+ # with no translation, an unknown code, or no code shows the base text.
19
+ #
20
+ # Do not send a text from a localized response back in a create or update request.
21
+ # The base text then changes to the translated text.
22
+ #
23
+ # @return [String, nil]
24
+ optional :locale, String
25
+
26
+ # @!method initialize(id:, locale: nil, request_options: {})
27
+ # Some parameter documentations has been truncated, see
28
+ # {Dodopayments::Models::ProductRetrieveParams} for more details.
29
+ #
16
30
  # @param id [String]
31
+ #
32
+ # @param locale [String] Shows the translated name, description and unit of the catalog entities in this
33
+ #
17
34
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
18
35
  end
19
36
  end
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ # @see Dodopayments::Resources::Products::Translations#update
7
+ class Translation < Dodopayments::Internal::Type::BaseModel
8
+ # @!attribute locale
9
+ # The locale of the translation.
10
+ #
11
+ # @return [Symbol, Dodopayments::Models::Locale]
12
+ required :locale, enum: -> { Dodopayments::Locale }
13
+
14
+ # @!attribute updated_at
15
+ # The time of the last change.
16
+ #
17
+ # @return [Time]
18
+ required :updated_at, Time
19
+
20
+ # @!attribute description
21
+ # The translated description. `null` shows that the description has no
22
+ # translation.
23
+ #
24
+ # @return [String, nil]
25
+ optional :description, String, nil?: true
26
+
27
+ # @!attribute name
28
+ # The translated name. `null` shows that the name has no translation.
29
+ #
30
+ # @return [String, nil]
31
+ optional :name, String, nil?: true
32
+
33
+ # @!method initialize(locale:, updated_at:, description: nil, name: nil)
34
+ # Some parameter documentations has been truncated, see
35
+ # {Dodopayments::Models::Products::Translation} for more details.
36
+ #
37
+ # The translation of a product, an add-on, a product collection or a meter in one
38
+ # locale.
39
+ #
40
+ # @param locale [Symbol, Dodopayments::Models::Locale] The locale of the translation.
41
+ #
42
+ # @param updated_at [Time] The time of the last change.
43
+ #
44
+ # @param description [String, nil] The translated description. `null` shows that the description has no translation
45
+ #
46
+ # @param name [String, nil] The translated name. `null` shows that the name has no translation.
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ # @see Dodopayments::Resources::Products::Translations#delete
7
+ class TranslationDeleteParams < Dodopayments::Internal::Type::BaseModel
8
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
+ include Dodopayments::Internal::Type::RequestParameters
10
+
11
+ # @!attribute id
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute locale
17
+ # A locale that the checkout and the customer portal can show.
18
+ #
19
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
20
+ #
21
+ # @return [Symbol, Dodopayments::Models::Locale]
22
+ required :locale, enum: -> { Dodopayments::Locale }
23
+
24
+ # @!method initialize(id:, locale:, request_options: {})
25
+ # Some parameter documentations has been truncated, see
26
+ # {Dodopayments::Models::Products::TranslationDeleteParams} for more details.
27
+ #
28
+ # @param id [String]
29
+ #
30
+ # @param locale [Symbol, Dodopayments::Models::Locale] A locale that the checkout and the customer portal can show.
31
+ #
32
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ # @see Dodopayments::Resources::Products::Translations#list
7
+ class TranslationListParams < Dodopayments::Internal::Type::BaseModel
8
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
+ include Dodopayments::Internal::Type::RequestParameters
10
+
11
+ # @!attribute id
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute locale
17
+ # Returns only these locales, for example `?locale=fr&locale=de`. With no value,
18
+ # the response has all the locales.
19
+ #
20
+ # @return [Array<String>, nil]
21
+ optional :locale, Dodopayments::Internal::Type::ArrayOf[String]
22
+
23
+ # @!method initialize(id:, locale: nil, request_options: {})
24
+ # Some parameter documentations has been truncated, see
25
+ # {Dodopayments::Models::Products::TranslationListParams} for more details.
26
+ #
27
+ # @param id [String]
28
+ #
29
+ # @param locale [Array<String>] Returns only these locales, for example `?locale=fr&locale=de`. With no value, t
30
+ #
31
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ # @see Dodopayments::Resources::Products::Translations#update
7
+ class TranslationUpdateParams < Dodopayments::Internal::Type::BaseModel
8
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
+ include Dodopayments::Internal::Type::RequestParameters
10
+
11
+ # @!attribute id
12
+ #
13
+ # @return [String]
14
+ required :id, String
15
+
16
+ # @!attribute locale
17
+ # A locale that the checkout and the customer portal can show.
18
+ #
19
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
20
+ #
21
+ # @return [Symbol, Dodopayments::Models::Locale]
22
+ required :locale, enum: -> { Dodopayments::Locale }
23
+
24
+ # @!attribute description
25
+ # The translated description.
26
+ #
27
+ # @return [String, nil]
28
+ optional :description, String, nil?: true
29
+
30
+ # @!attribute name
31
+ # The translated name.
32
+ #
33
+ # @return [String, nil]
34
+ optional :name, String, nil?: true
35
+
36
+ # @!method initialize(id:, locale:, description: nil, name: nil, request_options: {})
37
+ # Some parameter documentations has been truncated, see
38
+ # {Dodopayments::Models::Products::TranslationUpdateParams} for more details.
39
+ #
40
+ # @param id [String]
41
+ #
42
+ # @param locale [Symbol, Dodopayments::Models::Locale] A locale that the checkout and the customer portal can show.
43
+ #
44
+ # @param description [String, nil] The translated description.
45
+ #
46
+ # @param name [String, nil] The translated name.
47
+ #
48
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ # @see Dodopayments::Resources::Products::Translations#list
7
+ class TranslationsListResponse < Dodopayments::Internal::Type::BaseModel
8
+ # @!attribute items
9
+ #
10
+ # @return [Array<Dodopayments::Models::Products::Translation>]
11
+ required :items, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Products::Translation] }
12
+
13
+ # @!method initialize(items:)
14
+ # The translations of a product, an add-on, a product collection or a meter.
15
+ #
16
+ # @param items [Array<Dodopayments::Models::Products::Translation>]
17
+ end
18
+ end
19
+ end
20
+ end
@@ -13,6 +13,13 @@ module Dodopayments
13
13
  # @return [String]
14
14
  required :payment_id, String
15
15
 
16
+ # @!attribute currency
17
+ # The currency of every `items[].amount`. It must be the currency the customer
18
+ # paid in. Without it, the amounts are in the settlement currency.
19
+ #
20
+ # @return [Symbol, Dodopayments::Models::Currency, nil]
21
+ optional :currency, enum: -> { Dodopayments::Currency }, nil?: true
22
+
16
23
  # @!attribute items
17
24
  # Partially Refund an Individual Item
18
25
  #
@@ -33,9 +40,14 @@ module Dodopayments
33
40
  # @return [String, nil]
34
41
  optional :reason, String, nil?: true
35
42
 
36
- # @!method initialize(payment_id:, items: nil, metadata: nil, reason: nil, request_options: {})
43
+ # @!method initialize(payment_id:, currency: nil, items: nil, metadata: nil, reason: nil, request_options: {})
44
+ # Some parameter documentations has been truncated, see
45
+ # {Dodopayments::Models::RefundCreateParams} for more details.
46
+ #
37
47
  # @param payment_id [String] The unique identifier of the payment to be refunded.
38
48
  #
49
+ # @param currency [Symbol, Dodopayments::Models::Currency, nil] The currency of every `items[].amount`. It must be the currency the customer pai
50
+ #
39
51
  # @param items [Array<Dodopayments::Models::RefundCreateParams::Item>, nil] Partially Refund an Individual Item
40
52
  #
41
53
  # @param metadata [Hash{Symbol=>String, Float, Boolean}] Additional metadata associated with the refund.