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
@@ -0,0 +1,77 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Resources
5
+ class Meters
6
+ class Translations
7
+ # Creates or replaces the translation of one locale. The response is 201 for a new
8
+ # locale and 200 for a replaced locale.
9
+ sig do
10
+ params(
11
+ locale: Dodopayments::Locale::OrSymbol,
12
+ id: String,
13
+ description: T.nilable(String),
14
+ name: T.nilable(String),
15
+ request_options: Dodopayments::RequestOptions::OrHash
16
+ ).returns(Dodopayments::Products::Translation)
17
+ end
18
+ def update(
19
+ # Path param: A locale that the checkout and the customer portal can show.
20
+ #
21
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
22
+ locale,
23
+ # Path param: Meter Id
24
+ id:,
25
+ # Body param: The translated description.
26
+ description: nil,
27
+ # Body param: The translated name.
28
+ name: nil,
29
+ request_options: {}
30
+ )
31
+ end
32
+
33
+ # Lists the translations, for all the locales or for the locales of the filter.
34
+ sig do
35
+ params(
36
+ id: String,
37
+ locale: T::Array[String],
38
+ request_options: Dodopayments::RequestOptions::OrHash
39
+ ).returns(Dodopayments::Products::TranslationsListResponse)
40
+ end
41
+ def list(
42
+ # Meter Id
43
+ id,
44
+ # Returns only these locales, for example `?locale=fr&locale=de`. With no value,
45
+ # the response has all the locales.
46
+ locale: nil,
47
+ request_options: {}
48
+ )
49
+ end
50
+
51
+ # Deletes the translation of one locale.
52
+ sig do
53
+ params(
54
+ locale: Dodopayments::Locale::OrSymbol,
55
+ id: String,
56
+ request_options: Dodopayments::RequestOptions::OrHash
57
+ ).void
58
+ end
59
+ def delete(
60
+ # A locale that the checkout and the customer portal can show.
61
+ #
62
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
63
+ locale,
64
+ # Meter Id
65
+ id:,
66
+ request_options: {}
67
+ )
68
+ end
69
+
70
+ # @api private
71
+ sig { params(client: Dodopayments::Client).returns(T.attached_class) }
72
+ def self.new(client:)
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end
@@ -3,6 +3,9 @@
3
3
  module Dodopayments
4
4
  module Resources
5
5
  class Meters
6
+ sig { returns(Dodopayments::Resources::Meters::Translations) }
7
+ attr_reader :translations
8
+
6
9
  sig do
7
10
  params(
8
11
  aggregation: Dodopayments::MeterAggregation::OrHash,
@@ -34,12 +37,43 @@ module Dodopayments
34
37
  sig do
35
38
  params(
36
39
  id: String,
40
+ locale: String,
37
41
  request_options: Dodopayments::RequestOptions::OrHash
38
42
  ).returns(Dodopayments::Meter)
39
43
  end
40
44
  def retrieve(
41
45
  # Meter ID
42
46
  id,
47
+ # Shows the translated name, description and unit of the catalog entities in this
48
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
49
+ # with no translation, an unknown code, or no code shows the base text.
50
+ #
51
+ # Do not send a text from a localized response back in a create or update request.
52
+ # The base text then changes to the translated text.
53
+ locale: nil,
54
+ request_options: {}
55
+ )
56
+ end
57
+
58
+ sig do
59
+ params(
60
+ id: String,
61
+ description: T.nilable(String),
62
+ measurement_unit: T.nilable(String),
63
+ name: T.nilable(String),
64
+ request_options: Dodopayments::RequestOptions::OrHash
65
+ ).returns(Dodopayments::Meter)
66
+ end
67
+ def update(
68
+ # Meter ID
69
+ id,
70
+ # Description of the meter. Send `null` to remove the description. Omit it to keep
71
+ # it.
72
+ description: nil,
73
+ # Measurement unit
74
+ measurement_unit: nil,
75
+ # Name of the meter
76
+ name: nil,
43
77
  request_options: {}
44
78
  )
45
79
  end
@@ -47,6 +81,7 @@ module Dodopayments
47
81
  sig do
48
82
  params(
49
83
  archived: T::Boolean,
84
+ locale: String,
50
85
  page_number: Integer,
51
86
  page_size: Integer,
52
87
  request_options: Dodopayments::RequestOptions::OrHash
@@ -59,6 +94,13 @@ module Dodopayments
59
94
  def list(
60
95
  # List archived meters
61
96
  archived: nil,
97
+ # Shows the translated name, description and unit of the catalog entities in this
98
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
99
+ # with no translation, an unknown code, or no code shows the base text.
100
+ #
101
+ # Do not send a text from a localized response back in a create or update request.
102
+ # The base text then changes to the translated text.
103
+ locale: nil,
62
104
  # Page number default is 0
63
105
  page_number: nil,
64
106
  # Page size default is 10 max is 100
@@ -3,6 +3,15 @@
3
3
  module Dodopayments
4
4
  module Resources
5
5
  class Misc
6
+ # Lists the locales that a translation can have.
7
+ sig do
8
+ params(request_options: Dodopayments::RequestOptions::OrHash).returns(
9
+ T::Array[Dodopayments::LocaleInfo]
10
+ )
11
+ end
12
+ def list_locales(request_options: {})
13
+ end
14
+
6
15
  sig do
7
16
  params(request_options: Dodopayments::RequestOptions::OrHash).returns(
8
17
  T::Array[Dodopayments::CountryCode::TaggedSymbol]
@@ -155,12 +155,16 @@ module Dodopayments
155
155
  sig do
156
156
  params(
157
157
  payment_id: String,
158
+ currency: Dodopayments::Currency::OrSymbol,
158
159
  request_options: Dodopayments::RequestOptions::OrHash
159
160
  ).returns(Dodopayments::Models::PaymentRetrieveLineItemsResponse)
160
161
  end
161
162
  def retrieve_line_items(
162
163
  # Payment Id
163
164
  payment_id,
165
+ # The currency of the amounts. It must be the currency that the customer paid in.
166
+ # Without it, the amounts are in the settlement currency.
167
+ currency: nil,
164
168
  request_options: {}
165
169
  )
166
170
  end
@@ -8,7 +8,9 @@ module Dodopayments
8
8
  # Returns paginated individual balance ledger entries for a payout. Each entry is
9
9
  # converted into the payout's currency at the rate the payout settled at. Supports
10
10
  # pagination via `page_size` (default 10, max 100) and `page_number` (default 0)
11
- # query parameters.
11
+ # query parameters. A settlement batch payout shows its rows in native amounts.
12
+ # `unattributed` is the payout amount less the sum of its rows in the payout
13
+ # currency.
12
14
  sig do
13
15
  params(
14
16
  payout_id: String,
@@ -35,7 +37,8 @@ module Dodopayments
35
37
  # Downloads the complete payout breakup as a CSV file. Each row represents a
36
38
  # balance ledger entry with columns: Ledger ID, Event Type, Original Amount,
37
39
  # Original Currency, Reference Object ID, Description, Created At, USD Equivalent
38
- # Amount, and Payout Currency Amount.
40
+ # Amount, and Payout Currency Amount. A settlement batch payout shows its rows in
41
+ # native amounts.
39
42
  sig do
40
43
  params(
41
44
  payout_id: String,
@@ -10,7 +10,10 @@ module Dodopayments
10
10
  # Returns the breakdown of a payout by event type (payments, refunds, disputes,
11
11
  # fees, etc.) in the payout's currency. Each amount is proportionally allocated
12
12
  # based on USD equivalent values, ensuring the total sums exactly to the payout
13
- # amount.
13
+ # amount. A settlement batch payout shows its rows in native amounts. The
14
+ # `carried_over` line holds the opening balance from the switch to settlement
15
+ # batches and the rows dated before that opening balance. The `unattributed` line
16
+ # shows the payout amount that the rows do not account for.
14
17
  sig do
15
18
  params(
16
19
  payout_id: String,
@@ -51,7 +51,8 @@ module Dodopayments
51
51
  # Path param: Product Collection Id
52
52
  id:,
53
53
  # Body param: Optional group name update: Some(Some(name)) = set name, Some(None)
54
- # = clear name, None = no change
54
+ # = clear name, None = no change The API returns 422 if another group in the
55
+ # collection has no name.
55
56
  group_name: nil,
56
57
  # Body param: Optional new order for products in this group (array of
57
58
  # product_collection_group_pdts UUIDs)
@@ -0,0 +1,77 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Resources
5
+ class ProductCollections
6
+ class Translations
7
+ # Creates or replaces the translation of one locale. The response is 201 for a new
8
+ # locale and 200 for a replaced locale.
9
+ sig do
10
+ params(
11
+ locale: Dodopayments::Locale::OrSymbol,
12
+ id: String,
13
+ description: T.nilable(String),
14
+ name: T.nilable(String),
15
+ request_options: Dodopayments::RequestOptions::OrHash
16
+ ).returns(Dodopayments::Products::Translation)
17
+ end
18
+ def update(
19
+ # Path param: A locale that the checkout and the customer portal can show.
20
+ #
21
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
22
+ locale,
23
+ # Path param: Product Collection Id
24
+ id:,
25
+ # Body param: The translated description.
26
+ description: nil,
27
+ # Body param: The translated name.
28
+ name: nil,
29
+ request_options: {}
30
+ )
31
+ end
32
+
33
+ # Lists the translations, for all the locales or for the locales of the filter.
34
+ sig do
35
+ params(
36
+ id: String,
37
+ locale: T::Array[String],
38
+ request_options: Dodopayments::RequestOptions::OrHash
39
+ ).returns(Dodopayments::Products::TranslationsListResponse)
40
+ end
41
+ def list(
42
+ # Product Collection Id
43
+ id,
44
+ # Returns only these locales, for example `?locale=fr&locale=de`. With no value,
45
+ # the response has all the locales.
46
+ locale: nil,
47
+ request_options: {}
48
+ )
49
+ end
50
+
51
+ # Deletes the translation of one locale.
52
+ sig do
53
+ params(
54
+ locale: Dodopayments::Locale::OrSymbol,
55
+ id: String,
56
+ request_options: Dodopayments::RequestOptions::OrHash
57
+ ).void
58
+ end
59
+ def delete(
60
+ # A locale that the checkout and the customer portal can show.
61
+ #
62
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
63
+ locale,
64
+ # Product Collection Id
65
+ id:,
66
+ request_options: {}
67
+ )
68
+ end
69
+
70
+ # @api private
71
+ sig { params(client: Dodopayments::Client).returns(T.attached_class) }
72
+ def self.new(client:)
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end
@@ -3,6 +3,9 @@
3
3
  module Dodopayments
4
4
  module Resources
5
5
  class ProductCollections
6
+ sig { returns(Dodopayments::Resources::ProductCollections::Translations) }
7
+ attr_reader :translations
8
+
6
9
  sig { returns(Dodopayments::Resources::ProductCollections::Groups) }
7
10
  attr_reader :groups
8
11
 
@@ -69,12 +72,20 @@ module Dodopayments
69
72
  sig do
70
73
  params(
71
74
  id: String,
75
+ locale: String,
72
76
  request_options: Dodopayments::RequestOptions::OrHash
73
77
  ).returns(Dodopayments::ProductCollection)
74
78
  end
75
79
  def retrieve(
76
80
  # Product Collection Id
77
81
  id,
82
+ # Shows the translated name, description and unit of the catalog entities in this
83
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
84
+ # with no translation, an unknown code, or no code shows the base text.
85
+ #
86
+ # Do not send a text from a localized response back in a create or update request.
87
+ # The base text then changes to the translated text.
88
+ locale: nil,
78
89
  request_options: {}
79
90
  )
80
91
  end
@@ -146,6 +157,7 @@ module Dodopayments
146
157
  params(
147
158
  archived: T::Boolean,
148
159
  brand_id: String,
160
+ locale: String,
149
161
  page_number: Integer,
150
162
  page_size: Integer,
151
163
  request_options: Dodopayments::RequestOptions::OrHash
@@ -160,6 +172,13 @@ module Dodopayments
160
172
  archived: nil,
161
173
  # Filter by Brand id
162
174
  brand_id: nil,
175
+ # Shows the translated name, description and unit of the catalog entities in this
176
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
177
+ # with no translation, an unknown code, or no code shows the base text.
178
+ #
179
+ # Do not send a text from a localized response back in a create or update request.
180
+ # The base text then changes to the translated text.
181
+ locale: nil,
163
182
  # Page number default is 0
164
183
  page_number: nil,
165
184
  # Page size default is 10 max is 100
@@ -0,0 +1,77 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Resources
5
+ class Products
6
+ class Translations
7
+ # Creates or replaces the translation of one locale. The response is 201 for a new
8
+ # locale and 200 for a replaced locale.
9
+ sig do
10
+ params(
11
+ locale: Dodopayments::Locale::OrSymbol,
12
+ id: String,
13
+ description: T.nilable(String),
14
+ name: T.nilable(String),
15
+ request_options: Dodopayments::RequestOptions::OrHash
16
+ ).returns(Dodopayments::Products::Translation)
17
+ end
18
+ def update(
19
+ # Path param: A locale that the checkout and the customer portal can show.
20
+ #
21
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
22
+ locale,
23
+ # Path param: Product Id
24
+ id:,
25
+ # Body param: The translated description.
26
+ description: nil,
27
+ # Body param: The translated name.
28
+ name: nil,
29
+ request_options: {}
30
+ )
31
+ end
32
+
33
+ # Lists the translations, for all the locales or for the locales of the filter.
34
+ sig do
35
+ params(
36
+ id: String,
37
+ locale: T::Array[String],
38
+ request_options: Dodopayments::RequestOptions::OrHash
39
+ ).returns(Dodopayments::Products::TranslationsListResponse)
40
+ end
41
+ def list(
42
+ # Product Id
43
+ id,
44
+ # Returns only these locales, for example `?locale=fr&locale=de`. With no value,
45
+ # the response has all the locales.
46
+ locale: nil,
47
+ request_options: {}
48
+ )
49
+ end
50
+
51
+ # Deletes the translation of one locale.
52
+ sig do
53
+ params(
54
+ locale: Dodopayments::Locale::OrSymbol,
55
+ id: String,
56
+ request_options: Dodopayments::RequestOptions::OrHash
57
+ ).void
58
+ end
59
+ def delete(
60
+ # A locale that the checkout and the customer portal can show.
61
+ #
62
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
63
+ locale,
64
+ # Product Id
65
+ id:,
66
+ request_options: {}
67
+ )
68
+ end
69
+
70
+ # @api private
71
+ sig { params(client: Dodopayments::Client).returns(T.attached_class) }
72
+ def self.new(client:)
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end
@@ -3,6 +3,9 @@
3
3
  module Dodopayments
4
4
  module Resources
5
5
  class Products
6
+ sig { returns(Dodopayments::Resources::Products::Translations) }
7
+ attr_reader :translations
8
+
6
9
  sig { returns(Dodopayments::Resources::Products::Images) }
7
10
  attr_reader :images
8
11
 
@@ -101,12 +104,20 @@ module Dodopayments
101
104
  sig do
102
105
  params(
103
106
  id: String,
107
+ locale: String,
104
108
  request_options: Dodopayments::RequestOptions::OrHash
105
109
  ).returns(Dodopayments::Product)
106
110
  end
107
111
  def retrieve(
108
112
  # Product Id
109
113
  id,
114
+ # Shows the translated name, description and unit of the catalog entities in this
115
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
116
+ # with no translation, an unknown code, or no code shows the base text.
117
+ #
118
+ # Do not send a text from a localized response back in a create or update request.
119
+ # The base text then changes to the translated text.
120
+ locale: nil,
110
121
  request_options: {}
111
122
  )
112
123
  end
@@ -216,6 +227,7 @@ module Dodopayments
216
227
  params(
217
228
  archived: T::Boolean,
218
229
  brand_id: String,
230
+ locale: String,
219
231
  page_number: Integer,
220
232
  page_size: Integer,
221
233
  recurring: T::Boolean,
@@ -231,6 +243,13 @@ module Dodopayments
231
243
  archived: nil,
232
244
  # filter by Brand id
233
245
  brand_id: nil,
246
+ # Shows the translated name, description and unit of the catalog entities in this
247
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
248
+ # with no translation, an unknown code, or no code shows the base text.
249
+ #
250
+ # Do not send a text from a localized response back in a create or update request.
251
+ # The base text then changes to the translated text.
252
+ locale: nil,
234
253
  # Page number default is 0
235
254
  page_number: nil,
236
255
  # Page size default is 10 max is 100
@@ -6,6 +6,7 @@ module Dodopayments
6
6
  sig do
7
7
  params(
8
8
  payment_id: String,
9
+ currency: T.nilable(Dodopayments::Currency::OrSymbol),
9
10
  items:
10
11
  T.nilable(T::Array[Dodopayments::RefundCreateParams::Item::OrHash]),
11
12
  metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
@@ -16,6 +17,9 @@ module Dodopayments
16
17
  def create(
17
18
  # The unique identifier of the payment to be refunded.
18
19
  payment_id:,
20
+ # The currency of every `items[].amount`. It must be the currency the customer
21
+ # paid in. Without it, the amounts are in the settlement currency.
22
+ currency: nil,
19
23
  # Partially Refund an Individual Item
20
24
  items: nil,
21
25
  # Additional metadata associated with the refund.
@@ -116,12 +116,20 @@ module Dodopayments
116
116
  sig do
117
117
  params(
118
118
  subscription_id: String,
119
+ locale: String,
119
120
  request_options: Dodopayments::RequestOptions::OrHash
120
121
  ).returns(Dodopayments::Subscription)
121
122
  end
122
123
  def retrieve(
123
124
  # Subscription Id
124
125
  subscription_id,
126
+ # Shows the translated name, description and unit of the catalog entities in this
127
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
128
+ # with no translation, an unknown code, or no code shows the base text.
129
+ #
130
+ # Do not send a text from a localized response back in a create or update request.
131
+ # The base text then changes to the translated text.
132
+ locale: nil,
125
133
  request_options: {}
126
134
  )
127
135
  end
@@ -224,6 +232,7 @@ module Dodopayments
224
232
  created_at_gte: Time,
225
233
  created_at_lte: Time,
226
234
  customer_id: String,
235
+ locale: String,
227
236
  page_number: Integer,
228
237
  page_size: Integer,
229
238
  product_id: String,
@@ -246,6 +255,13 @@ module Dodopayments
246
255
  created_at_lte: nil,
247
256
  # Filter by customer id
248
257
  customer_id: nil,
258
+ # Shows the translated name, description and unit of the catalog entities in this
259
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
260
+ # with no translation, an unknown code, or no code shows the base text.
261
+ #
262
+ # Do not send a text from a localized response back in a create or update request.
263
+ # The base text then changes to the translated text.
264
+ locale: nil,
249
265
  # Page number default is 0
250
266
  page_number: nil,
251
267
  # Page size default is 10 max is 100
@@ -369,6 +385,11 @@ module Dodopayments
369
385
  # - `apply_change` (default): Apply plan change immediately regardless of payment
370
386
  # outcome
371
387
  #
388
+ # With `effective_at: next_billing_date`, the plan change payment replaces the
389
+ # renewal payment. If that payment fails with `prevent_change`, the plan change is
390
+ # cancelled. The subscription then renews on the current plan, with the usual
391
+ # payment retries.
392
+ #
372
393
  # If not specified, uses the business-level default setting.
373
394
  on_payment_failure: nil,
374
395
  # The URL that receives the customer after they pay the payment link. Needs
@@ -525,6 +546,11 @@ module Dodopayments
525
546
  # - `apply_change` (default): Apply plan change immediately regardless of payment
526
547
  # outcome
527
548
  #
549
+ # With `effective_at: next_billing_date`, the plan change payment replaces the
550
+ # renewal payment. If that payment fails with `prevent_change`, the plan change is
551
+ # cancelled. The subscription then renews on the current plan, with the usual
552
+ # payment retries.
553
+ #
528
554
  # If not specified, uses the business-level default setting.
529
555
  on_payment_failure: nil,
530
556
  # The URL that receives the customer after they pay the payment link. Needs
@@ -0,0 +1,23 @@
1
+ module Dodopayments
2
+ module Models
3
+ type addon_delete_params =
4
+ { id: String } & Dodopayments::Internal::Type::request_parameters
5
+
6
+ class AddonDeleteParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ attr_accessor id: String
11
+
12
+ def initialize: (
13
+ id: String,
14
+ ?request_options: Dodopayments::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ id: String,
19
+ request_options: Dodopayments::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -1,13 +1,26 @@
1
1
  module Dodopayments
2
2
  module Models
3
3
  type addon_list_params =
4
- { page_number: Integer, page_size: Integer }
4
+ {
5
+ archived: bool,
6
+ locale: String,
7
+ page_number: Integer,
8
+ page_size: Integer
9
+ }
5
10
  & Dodopayments::Internal::Type::request_parameters
6
11
 
7
12
  class AddonListParams < Dodopayments::Internal::Type::BaseModel
8
13
  extend Dodopayments::Internal::Type::RequestParameters::Converter
9
14
  include Dodopayments::Internal::Type::RequestParameters
10
15
 
16
+ attr_reader archived: bool?
17
+
18
+ def archived=: (bool) -> bool
19
+
20
+ attr_reader locale: String?
21
+
22
+ def locale=: (String) -> String
23
+
11
24
  attr_reader page_number: Integer?
12
25
 
13
26
  def page_number=: (Integer) -> Integer
@@ -17,12 +30,16 @@ module Dodopayments
17
30
  def page_size=: (Integer) -> Integer
18
31
 
19
32
  def initialize: (
33
+ ?archived: bool,
34
+ ?locale: String,
20
35
  ?page_number: Integer,
21
36
  ?page_size: Integer,
22
37
  ?request_options: Dodopayments::request_opts
23
38
  ) -> void
24
39
 
25
40
  def to_hash: -> {
41
+ archived: bool,
42
+ locale: String,
26
43
  page_number: Integer,
27
44
  page_size: Integer,
28
45
  request_options: Dodopayments::RequestOptions
@@ -1,7 +1,8 @@
1
1
  module Dodopayments
2
2
  module Models
3
3
  type addon_retrieve_params =
4
- { id: String } & Dodopayments::Internal::Type::request_parameters
4
+ { id: String, locale: String }
5
+ & Dodopayments::Internal::Type::request_parameters
5
6
 
6
7
  class AddonRetrieveParams < Dodopayments::Internal::Type::BaseModel
7
8
  extend Dodopayments::Internal::Type::RequestParameters::Converter
@@ -9,13 +10,19 @@ module Dodopayments
9
10
 
10
11
  attr_accessor id: String
11
12
 
13
+ attr_reader locale: String?
14
+
15
+ def locale=: (String) -> String
16
+
12
17
  def initialize: (
13
18
  id: String,
19
+ ?locale: String,
14
20
  ?request_options: Dodopayments::request_opts
15
21
  ) -> void
16
22
 
17
23
  def to_hash: -> {
18
24
  id: String,
25
+ locale: String,
19
26
  request_options: Dodopayments::RequestOptions
20
27
  }
21
28
  end