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 Addons
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: Addon 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
+ # Addon 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
+ # Addon 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 Addons
6
+ sig { returns(Dodopayments::Resources::Addons::Translations) }
7
+ attr_reader :translations
8
+
6
9
  sig do
7
10
  params(
8
11
  currency: Dodopayments::Currency::OrSymbol,
@@ -31,12 +34,20 @@ module Dodopayments
31
34
  sig do
32
35
  params(
33
36
  id: String,
37
+ locale: String,
34
38
  request_options: Dodopayments::RequestOptions::OrHash
35
39
  ).returns(Dodopayments::AddonResponse)
36
40
  end
37
41
  def retrieve(
38
42
  # Addon Id
39
43
  id,
44
+ # Shows the translated name, description and unit of the catalog entities in this
45
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
46
+ # with no translation, an unknown code, or no code shows the base text.
47
+ #
48
+ # Do not send a text from a localized response back in a create or update request.
49
+ # The base text then changes to the translated text.
50
+ locale: nil,
40
51
  request_options: {}
41
52
  )
42
53
  end
@@ -75,6 +86,8 @@ module Dodopayments
75
86
 
76
87
  sig do
77
88
  params(
89
+ archived: T::Boolean,
90
+ locale: String,
78
91
  page_number: Integer,
79
92
  page_size: Integer,
80
93
  request_options: Dodopayments::RequestOptions::OrHash
@@ -85,6 +98,15 @@ module Dodopayments
85
98
  )
86
99
  end
87
100
  def list(
101
+ # List archived addons. The default is false.
102
+ archived: nil,
103
+ # Shows the translated name, description and unit of the catalog entities in this
104
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
105
+ # with no translation, an unknown code, or no code shows the base text.
106
+ #
107
+ # Do not send a text from a localized response back in a create or update request.
108
+ # The base text then changes to the translated text.
109
+ locale: nil,
88
110
  # Page number default is 0
89
111
  page_number: nil,
90
112
  # Page size default is 10 max is 100
@@ -93,6 +115,32 @@ module Dodopayments
93
115
  )
94
116
  end
95
117
 
118
+ sig do
119
+ params(
120
+ id: String,
121
+ request_options: Dodopayments::RequestOptions::OrHash
122
+ ).void
123
+ end
124
+ def delete(
125
+ # Addon Id
126
+ id,
127
+ request_options: {}
128
+ )
129
+ end
130
+
131
+ sig do
132
+ params(
133
+ id: String,
134
+ request_options: Dodopayments::RequestOptions::OrHash
135
+ ).void
136
+ end
137
+ def unarchive(
138
+ # Addon Id
139
+ id,
140
+ request_options: {}
141
+ )
142
+ end
143
+
96
144
  sig do
97
145
  params(
98
146
  id: String,
@@ -140,6 +140,7 @@ module Dodopayments
140
140
  sig do
141
141
  params(
142
142
  product_cart: T::Array[Dodopayments::ProductItemReq::OrHash],
143
+ locale: String,
143
144
  allowed_payment_method_types:
144
145
  T.nilable(T::Array[Dodopayments::PaymentMethodTypes::OrSymbol]),
145
146
  billing_address:
@@ -176,20 +177,29 @@ module Dodopayments
176
177
  ).returns(Dodopayments::Models::CheckoutSessionPreviewResponse)
177
178
  end
178
179
  def preview(
179
- # The products of the checkout. A cart holds at most 20 of them, one-time and
180
- # subscription products together. An empty cart is valid for the
180
+ # Body param: The products of the checkout. A cart holds at most 20 of them,
181
+ # one-time and subscription products together. An empty cart is valid for the
181
182
  # product-collection flow, where the customer chooses the product later.
182
183
  product_cart:,
183
- # Customers will never see payment methods that are not in this list. However,
184
- # adding a method here does not guarantee customers will see it. Availability
185
- # still depends on other factors (e.g., customer location, merchant settings).
184
+ # Query param: Shows the translated name, description and unit of the catalog
185
+ # entities in this locale. The value must be a code from `GET /locales`, for
186
+ # example `fr`. A field with no translation, an unknown code, or no code shows the
187
+ # base text.
188
+ #
189
+ # Do not send a text from a localized response back in a create or update request.
190
+ # The base text then changes to the translated text.
191
+ locale: nil,
192
+ # Body param: Customers will never see payment methods that are not in this list.
193
+ # However, adding a method here does not guarantee customers will see it.
194
+ # Availability still depends on other factors (e.g., customer location, merchant
195
+ # settings).
186
196
  #
187
197
  # Disclaimar: Always provide 'credit' and 'debit' as a fallback. If all payment
188
198
  # methods are unavailable, checkout session will fail.
189
199
  allowed_payment_method_types: nil,
190
- # Billing address information for the session
200
+ # Body param: Billing address information for the session
191
201
  billing_address: nil,
192
- # The currency to charge the customer in.
202
+ # Body param: The currency to charge the customer in.
193
203
  #
194
204
  # Adaptive pricing must be enabled for the business. The customer then pays in
195
205
  # this currency. If you do not set it, the currency comes from the billing
@@ -198,61 +208,67 @@ module Dodopayments
198
208
  # If adaptive pricing is disabled, the API discards this field. The currency then
199
209
  # comes from the product price, or from the billing country.
200
210
  billing_currency: nil,
201
- # The URL to redirect the customer if they cancel or go back from the checkout. If
202
- # not provided, the back button will not be displayed.
211
+ # Body param: The URL to redirect the customer if they cancel or go back from the
212
+ # checkout. If not provided, the back button will not be displayed.
203
213
  cancel_url: nil,
204
- # If confirm is true, all the details will be finalized. If required data is
205
- # missing, an API error is thrown.
214
+ # Body param: If confirm is true, all the details will be finalized. If required
215
+ # data is missing, an API error is thrown.
206
216
  confirm: nil,
207
- # Custom fields to collect from customer during checkout (max 5 fields)
217
+ # Body param: Custom fields to collect from customer during checkout (max 5
218
+ # fields)
208
219
  custom_fields: nil,
209
- # Customer details for the session
220
+ # Body param: Customer details for the session
210
221
  customer: nil,
211
- # Optional business / legal name associated with the tax id. When provided
212
- # together with a valid tax id for a B2B purchase, this name is rendered on the
213
- # invoice instead of the customer's personal name.
222
+ # Body param: Optional business / legal name associated with the tax id. When
223
+ # provided together with a valid tax id for a B2B purchase, this name is rendered
224
+ # on the invoice instead of the customer's personal name.
214
225
  customer_business_name: nil,
215
- # Customization for the checkout session page
226
+ # Body param: Customization for the checkout session page
216
227
  customization: nil,
217
- # DEPRECATED: Use discount_codes instead. Cannot be used together with
228
+ # Body param: DEPRECATED: Use discount_codes instead. Cannot be used together with
218
229
  # discount_codes.
219
230
  discount_code: nil,
220
- # Stacked discount codes to apply, in order. Max 20. Cannot be used together with
221
- # discount_code.
231
+ # Body param: Stacked discount codes to apply, in order. Max 20. Cannot be used
232
+ # together with discount_code.
222
233
  discount_codes: nil,
234
+ # Body param
223
235
  feature_flags: nil,
224
- # Override merchant default 3DS behaviour for this session
236
+ # Body param: Override merchant default 3DS behaviour for this session
225
237
  force_3ds: nil,
226
- # Override the merchant-level mandate floor (in INR paise) for INR e-mandates on
227
- # Indian-card recurring payments. The mandate amount sent to the processor is
228
- # `max(this_floor, actual_billing_amount)`, so this is effectively the
229
- # customer-facing authorization ceiling whenever billing is lower. When unset, the
230
- # merchant setting applies; when that's also unset, the system default of ₹15,000
231
- # applies.
238
+ # Body param: Override the merchant-level mandate floor (in INR paise) for INR
239
+ # e-mandates on Indian-card recurring payments. The mandate amount sent to the
240
+ # processor is `max(this_floor, actual_billing_amount)`, so this is effectively
241
+ # the customer-facing authorization ceiling whenever billing is lower. When unset,
242
+ # the merchant setting applies; when that's also unset, the system default of
243
+ # ₹15,000 applies.
232
244
  mandate_min_amount_inr_paise: nil,
233
- # Additional metadata associated with the payment. Defaults to empty if not
234
- # provided.
245
+ # Body param: Additional metadata associated with the payment. Defaults to empty
246
+ # if not provided.
235
247
  metadata: nil,
236
- # If true, only zipcode is required when confirm is true; other address fields
237
- # remain optional
248
+ # Body param: If true, only zipcode is required when confirm is true; other
249
+ # address fields remain optional
238
250
  #
239
251
  # Default is true when `feature_flags.single_page` is true. Otherwise, default is
240
252
  # false.
241
253
  minimal_address: nil,
242
- # Optional payment method ID to use for this checkout session. Only allowed when
243
- # `confirm` is true. If provided, existing customer id must also be provided.
254
+ # Body param: Optional payment method ID to use for this checkout session. Only
255
+ # allowed when `confirm` is true. If provided, existing customer id must also be
256
+ # provided.
244
257
  payment_method_id: nil,
245
- # Product collection ID for collection-based checkout flow
258
+ # Body param: Product collection ID for collection-based checkout flow
246
259
  product_collection_id: nil,
247
- # The url to redirect after payment failure or success.
260
+ # Body param: The url to redirect after payment failure or success.
248
261
  return_url: nil,
249
- # If true, returns a shortened checkout URL. Defaults to false if not specified.
262
+ # Body param: If true, returns a shortened checkout URL. Defaults to false if not
263
+ # specified.
250
264
  short_link: nil,
251
- # Display saved payment methods of a returning customer False by default
265
+ # Body param: Display saved payment methods of a returning customer False by
266
+ # default
252
267
  show_saved_payment_methods: nil,
268
+ # Body param
253
269
  subscription_data: nil,
254
- # Tax ID for the customer (e.g. VAT number). Requires billing_address with
255
- # country.
270
+ # Body param: Tax ID for the customer (e.g. VAT number). Requires billing_address
271
+ # with country.
256
272
  tax_id: nil,
257
273
  request_options: {}
258
274
  )
@@ -0,0 +1,81 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Resources
5
+ class CreditEntitlements
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
+ name: T.nilable(String),
14
+ unit: T.nilable(String),
15
+ request_options: Dodopayments::RequestOptions::OrHash
16
+ ).returns(
17
+ Dodopayments::CreditEntitlements::CreditEntitlementTranslation
18
+ )
19
+ end
20
+ def update(
21
+ # Path param: A locale that the checkout and the customer portal can show.
22
+ #
23
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
24
+ locale,
25
+ # Path param: Credit Entitlement Id
26
+ id:,
27
+ # Body param: The translated name.
28
+ name: nil,
29
+ # Body param: The translated unit.
30
+ unit: nil,
31
+ request_options: {}
32
+ )
33
+ end
34
+
35
+ # Lists the translations, for all the locales or for the locales of the filter.
36
+ sig do
37
+ params(
38
+ id: String,
39
+ locale: T::Array[String],
40
+ request_options: Dodopayments::RequestOptions::OrHash
41
+ ).returns(
42
+ Dodopayments::CreditEntitlements::CreditEntitlementTranslationsListResponse
43
+ )
44
+ end
45
+ def list(
46
+ # Credit Entitlement Id
47
+ id,
48
+ # Returns only these locales, for example `?locale=fr&locale=de`. With no value,
49
+ # the response has all the locales.
50
+ locale: nil,
51
+ request_options: {}
52
+ )
53
+ end
54
+
55
+ # Deletes the translation of one locale.
56
+ sig do
57
+ params(
58
+ locale: Dodopayments::Locale::OrSymbol,
59
+ id: String,
60
+ request_options: Dodopayments::RequestOptions::OrHash
61
+ ).void
62
+ end
63
+ def delete(
64
+ # A locale that the checkout and the customer portal can show.
65
+ #
66
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
67
+ locale,
68
+ # Credit Entitlement Id
69
+ id:,
70
+ request_options: {}
71
+ )
72
+ end
73
+
74
+ # @api private
75
+ sig { params(client: Dodopayments::Client).returns(T.attached_class) }
76
+ def self.new(client:)
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
@@ -3,6 +3,9 @@
3
3
  module Dodopayments
4
4
  module Resources
5
5
  class CreditEntitlements
6
+ sig { returns(Dodopayments::Resources::CreditEntitlements::Translations) }
7
+ attr_reader :translations
8
+
6
9
  sig { returns(Dodopayments::Resources::CreditEntitlements::Balances) }
7
10
  attr_reader :balances
8
11
 
@@ -134,12 +137,20 @@ module Dodopayments
134
137
  sig do
135
138
  params(
136
139
  id: String,
140
+ locale: String,
137
141
  request_options: Dodopayments::RequestOptions::OrHash
138
142
  ).returns(Dodopayments::CreditEntitlement)
139
143
  end
140
144
  def retrieve(
141
145
  # Credit Entitlement ID
142
146
  id,
147
+ # Shows the translated name, description and unit of the catalog entities in this
148
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
149
+ # with no translation, an unknown code, or no code shows the base text.
150
+ #
151
+ # Do not send a text from a localized response back in a create or update request.
152
+ # The base text then changes to the translated text.
153
+ locale: nil,
143
154
  request_options: {}
144
155
  )
145
156
  end
@@ -286,6 +297,7 @@ module Dodopayments
286
297
  sig do
287
298
  params(
288
299
  deleted: T::Boolean,
300
+ locale: String,
289
301
  page_number: Integer,
290
302
  page_size: Integer,
291
303
  request_options: Dodopayments::RequestOptions::OrHash
@@ -298,6 +310,13 @@ module Dodopayments
298
310
  def list(
299
311
  # List deleted credit entitlements
300
312
  deleted: nil,
313
+ # Shows the translated name, description and unit of the catalog entities in this
314
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
315
+ # with no translation, an unknown code, or no code shows the base text.
316
+ #
317
+ # Do not send a text from a localized response back in a create or update request.
318
+ # The base text then changes to the translated text.
319
+ locale: nil,
301
320
  # Page number default is 0
302
321
  page_number: nil,
303
322
  # Page size default is 10 max is 100
@@ -18,6 +18,7 @@ module Dodopayments
18
18
  name: String,
19
19
  metadata: T::Hash[Symbol, Dodopayments::MetadataItem::Variants],
20
20
  phone_number: T.nilable(String),
21
+ preferred_locale: T.nilable(Dodopayments::Locale::OrSymbol),
21
22
  request_options: Dodopayments::RequestOptions::OrHash
22
23
  ).returns(Dodopayments::Customer)
23
24
  end
@@ -27,6 +28,10 @@ module Dodopayments
27
28
  # Additional metadata for the customer
28
29
  metadata: nil,
29
30
  phone_number: nil,
31
+ # The language of the customer emails, a code from `GET /locales`. With no value,
32
+ # the emails are in English until a checkout or the customer portal sets a
33
+ # language.
34
+ preferred_locale: nil,
30
35
  request_options: {}
31
36
  )
32
37
  end
@@ -52,6 +57,7 @@ module Dodopayments
52
57
  T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
53
58
  name: T.nilable(String),
54
59
  phone_number: T.nilable(String),
60
+ preferred_locale: T.nilable(Dodopayments::Locale::OrSymbol),
55
61
  request_options: Dodopayments::RequestOptions::OrHash
56
62
  ).returns(Dodopayments::Customer)
57
63
  end
@@ -63,6 +69,10 @@ module Dodopayments
63
69
  metadata: nil,
64
70
  name: nil,
65
71
  phone_number: nil,
72
+ # The language of the customer emails, a code from `GET /locales`. A value
73
+ # replaces the current language, and `null` removes it. Send this field only to
74
+ # change the language on purpose. With no language, the emails are in English.
75
+ preferred_locale: nil,
66
76
  request_options: {}
67
77
  )
68
78
  end
@@ -0,0 +1,87 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Resources
5
+ class Entitlements
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
+ activation_message: T.nilable(String),
14
+ description: T.nilable(String),
15
+ instructions: T.nilable(String),
16
+ name: T.nilable(String),
17
+ request_options: Dodopayments::RequestOptions::OrHash
18
+ ).returns(Dodopayments::Entitlements::EntitlementTranslation)
19
+ end
20
+ def update(
21
+ # Path param: A locale that the checkout and the customer portal can show.
22
+ #
23
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
24
+ locale,
25
+ # Path param: Entitlement Id
26
+ id:,
27
+ # Body param: The translated activation message. Only a `license_key` entitlement
28
+ # has it.
29
+ activation_message: nil,
30
+ # Body param: The translated description.
31
+ description: nil,
32
+ # Body param: The translated delivery instructions. Only a `digital_files`
33
+ # entitlement has them.
34
+ instructions: nil,
35
+ # Body param: The translated name.
36
+ name: nil,
37
+ request_options: {}
38
+ )
39
+ end
40
+
41
+ # Lists the translations, for all the locales or for the locales of the filter.
42
+ sig do
43
+ params(
44
+ id: String,
45
+ locale: T::Array[String],
46
+ request_options: Dodopayments::RequestOptions::OrHash
47
+ ).returns(
48
+ Dodopayments::Entitlements::EntitlementTranslationsListResponse
49
+ )
50
+ end
51
+ def list(
52
+ # Entitlement Id
53
+ id,
54
+ # Returns only these locales, for example `?locale=fr&locale=de`. With no value,
55
+ # the response has all the locales.
56
+ locale: nil,
57
+ request_options: {}
58
+ )
59
+ end
60
+
61
+ # Deletes the translation of one locale.
62
+ sig do
63
+ params(
64
+ locale: Dodopayments::Locale::OrSymbol,
65
+ id: String,
66
+ request_options: Dodopayments::RequestOptions::OrHash
67
+ ).void
68
+ end
69
+ def delete(
70
+ # A locale that the checkout and the customer portal can show.
71
+ #
72
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
73
+ locale,
74
+ # Entitlement Id
75
+ id:,
76
+ request_options: {}
77
+ )
78
+ end
79
+
80
+ # @api private
81
+ sig { params(client: Dodopayments::Client).returns(T.attached_class) }
82
+ def self.new(client:)
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
@@ -3,6 +3,9 @@
3
3
  module Dodopayments
4
4
  module Resources
5
5
  class Entitlements
6
+ sig { returns(Dodopayments::Resources::Entitlements::Translations) }
7
+ attr_reader :translations
8
+
6
9
  sig { returns(Dodopayments::Resources::Entitlements::Files) }
7
10
  attr_reader :files
8
11
 
@@ -50,12 +53,20 @@ module Dodopayments
50
53
  sig do
51
54
  params(
52
55
  id: String,
56
+ locale: String,
53
57
  request_options: Dodopayments::RequestOptions::OrHash
54
58
  ).returns(Dodopayments::Entitlement)
55
59
  end
56
60
  def retrieve(
57
61
  # Entitlement ID
58
62
  id,
63
+ # Shows the translated name, description and unit of the catalog entities in this
64
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
65
+ # with no translation, an unknown code, or no code shows the base text.
66
+ #
67
+ # Do not send a text from a localized response back in a create or update request.
68
+ # The base text then changes to the translated text.
69
+ locale: nil,
59
70
  request_options: {}
60
71
  )
61
72
  end
@@ -108,6 +119,7 @@ module Dodopayments
108
119
  params(
109
120
  integration_type:
110
121
  Dodopayments::EntitlementListParams::IntegrationType::OrSymbol,
122
+ locale: String,
111
123
  page_number: Integer,
112
124
  page_size: Integer,
113
125
  request_options: Dodopayments::RequestOptions::OrHash
@@ -120,6 +132,13 @@ module Dodopayments
120
132
  def list(
121
133
  # Filter by integration type
122
134
  integration_type: nil,
135
+ # Shows the translated name, description and unit of the catalog entities in this
136
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
137
+ # with no translation, an unknown code, or no code shows the base text.
138
+ #
139
+ # Do not send a text from a localized response back in a create or update request.
140
+ # The base text then changes to the translated text.
141
+ locale: nil,
123
142
  # Page number (default 0)
124
143
  page_number: nil,
125
144
  # Page size (default 10, max 100)
@@ -7,12 +7,16 @@ module Dodopayments
7
7
  sig do
8
8
  params(
9
9
  payment_id: String,
10
+ token: String,
10
11
  request_options: Dodopayments::RequestOptions::OrHash
11
12
  ).returns(StringIO)
12
13
  end
13
14
  def retrieve(
14
15
  # Payment ID
15
16
  payment_id,
17
+ # The signed link token. If the business asks for a credential on its invoice
18
+ # links, a valid token for this record replaces the credential.
19
+ token: nil,
16
20
  request_options: {}
17
21
  )
18
22
  end
@@ -20,12 +24,16 @@ module Dodopayments
20
24
  sig do
21
25
  params(
22
26
  payout_id: String,
27
+ token: String,
23
28
  request_options: Dodopayments::RequestOptions::OrHash
24
29
  ).returns(StringIO)
25
30
  end
26
31
  def retrieve_payout(
27
32
  # Payout ID
28
33
  payout_id,
34
+ # The signed link token. If the business asks for a credential on its invoice
35
+ # links, a valid token for this record replaces the credential.
36
+ token: nil,
29
37
  request_options: {}
30
38
  )
31
39
  end
@@ -33,12 +41,16 @@ module Dodopayments
33
41
  sig do
34
42
  params(
35
43
  refund_id: String,
44
+ token: String,
36
45
  request_options: Dodopayments::RequestOptions::OrHash
37
46
  ).returns(StringIO)
38
47
  end
39
48
  def retrieve_refund(
40
49
  # Refund ID
41
50
  refund_id,
51
+ # The signed link token. If the business asks for a credential on its invoice
52
+ # links, a valid token for this record replaces the credential.
53
+ token: nil,
42
54
  request_options: {}
43
55
  )
44
56
  end