dodopayments 2.34.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 (250) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/dodopayments/models/addon_delete_params.rb +20 -0
  5. data/lib/dodopayments/models/addon_list_params.rb +25 -1
  6. data/lib/dodopayments/models/addon_retrieve_params.rb +18 -1
  7. data/lib/dodopayments/models/addon_unarchive_params.rb +20 -0
  8. data/lib/dodopayments/models/addons/translation_delete_params.rb +36 -0
  9. data/lib/dodopayments/models/addons/translation_list_params.rb +35 -0
  10. data/lib/dodopayments/models/addons/translation_update_params.rb +52 -0
  11. data/lib/dodopayments/models/balance_ledger_entry.rb +1 -0
  12. data/lib/dodopayments/models/balance_retrieve_ledger_params.rb +1 -0
  13. data/lib/dodopayments/models/checkout_session_preview_params.rb +17 -1
  14. data/lib/dodopayments/models/create_new_customer.rb +12 -1
  15. data/lib/dodopayments/models/credit_entitlement_list_params.rb +17 -1
  16. data/lib/dodopayments/models/credit_entitlement_retrieve_params.rb +18 -1
  17. data/lib/dodopayments/models/credit_entitlements/credit_entitlement_translation.rb +47 -0
  18. data/lib/dodopayments/models/credit_entitlements/credit_entitlement_translations_list_response.rb +23 -0
  19. data/lib/dodopayments/models/credit_entitlements/translation_delete_params.rb +37 -0
  20. data/lib/dodopayments/models/credit_entitlements/translation_list_params.rb +36 -0
  21. data/lib/dodopayments/models/credit_entitlements/translation_update_params.rb +53 -0
  22. data/lib/dodopayments/models/customer.rb +9 -1
  23. data/lib/dodopayments/models/customer_create_params.rb +14 -1
  24. data/lib/dodopayments/models/customer_update_params.rb +14 -1
  25. data/lib/dodopayments/models/entitlement_list_params.rb +17 -1
  26. data/lib/dodopayments/models/entitlement_retrieve_params.rb +18 -1
  27. data/lib/dodopayments/models/entitlements/entitlement_translation.rb +67 -0
  28. data/lib/dodopayments/models/entitlements/entitlement_translations_list_response.rb +23 -0
  29. data/lib/dodopayments/models/entitlements/translation_delete_params.rb +36 -0
  30. data/lib/dodopayments/models/entitlements/translation_list_params.rb +35 -0
  31. data/lib/dodopayments/models/entitlements/translation_update_params.rb +69 -0
  32. data/lib/dodopayments/models/locale.rb +38 -0
  33. data/lib/dodopayments/models/locale_info.rb +34 -0
  34. data/lib/dodopayments/models/meter_list_params.rb +17 -1
  35. data/lib/dodopayments/models/meter_retrieve_params.rb +18 -1
  36. data/lib/dodopayments/models/meter_update_params.rb +49 -0
  37. data/lib/dodopayments/models/meters/translation_delete_params.rb +36 -0
  38. data/lib/dodopayments/models/meters/translation_list_params.rb +35 -0
  39. data/lib/dodopayments/models/meters/translation_update_params.rb +52 -0
  40. data/lib/dodopayments/models/misc_list_locales_params.rb +14 -0
  41. data/lib/dodopayments/models/misc_list_locales_response.rb +8 -0
  42. data/lib/dodopayments/models/payment.rb +29 -1
  43. data/lib/dodopayments/models/payment_list_response.rb +29 -1
  44. data/lib/dodopayments/models/payment_retrieve_line_items_params.rb +14 -1
  45. data/lib/dodopayments/models/payment_retrieve_line_items_response.rb +10 -1
  46. data/lib/dodopayments/models/payouts/breakup/detail_list_response.rb +3 -1
  47. data/lib/dodopayments/models/payouts/breakup_retrieve_response.rb +2 -1
  48. data/lib/dodopayments/models/product_collection_list_params.rb +17 -1
  49. data/lib/dodopayments/models/product_collection_retrieve_params.rb +18 -1
  50. data/lib/dodopayments/models/product_collections/translation_delete_params.rb +37 -0
  51. data/lib/dodopayments/models/product_collections/translation_list_params.rb +36 -0
  52. data/lib/dodopayments/models/product_collections/translation_update_params.rb +53 -0
  53. data/lib/dodopayments/models/product_list_params.rb +14 -1
  54. data/lib/dodopayments/models/product_retrieve_params.rb +18 -1
  55. data/lib/dodopayments/models/products/translation.rb +50 -0
  56. data/lib/dodopayments/models/products/translation_delete_params.rb +36 -0
  57. data/lib/dodopayments/models/products/translation_list_params.rb +35 -0
  58. data/lib/dodopayments/models/products/translation_update_params.rb +52 -0
  59. data/lib/dodopayments/models/products/translations_list_response.rb +20 -0
  60. data/lib/dodopayments/models/refund_create_params.rb +13 -1
  61. data/lib/dodopayments/models/subscription_list_params.rb +14 -1
  62. data/lib/dodopayments/models/subscription_retrieve_params.rb +18 -1
  63. data/lib/dodopayments/models/three_ds_flow.rb +16 -0
  64. data/lib/dodopayments/models/three_ds_status.rb +21 -0
  65. data/lib/dodopayments/models/update_subscription_plan_req.rb +10 -0
  66. data/lib/dodopayments/models.rb +20 -0
  67. data/lib/dodopayments/resources/addons/translations.rb +110 -0
  68. data/lib/dodopayments/resources/addons.rb +58 -3
  69. data/lib/dodopayments/resources/checkout_sessions.rb +31 -26
  70. data/lib/dodopayments/resources/credit_entitlements/translations.rb +113 -0
  71. data/lib/dodopayments/resources/credit_entitlements.rb +20 -3
  72. data/lib/dodopayments/resources/customers.rb +12 -2
  73. data/lib/dodopayments/resources/entitlements/translations.rb +114 -0
  74. data/lib/dodopayments/resources/entitlements.rb +20 -3
  75. data/lib/dodopayments/resources/meters/translations.rb +110 -0
  76. data/lib/dodopayments/resources/meters.rb +49 -3
  77. data/lib/dodopayments/resources/misc.rb +18 -0
  78. data/lib/dodopayments/resources/payments.rb +10 -2
  79. data/lib/dodopayments/resources/payouts/breakup/details.rb +5 -2
  80. data/lib/dodopayments/resources/payouts/breakup.rb +4 -1
  81. data/lib/dodopayments/resources/product_collections/translations.rb +113 -0
  82. data/lib/dodopayments/resources/product_collections.rb +20 -3
  83. data/lib/dodopayments/resources/products/translations.rb +110 -0
  84. data/lib/dodopayments/resources/products.rb +17 -3
  85. data/lib/dodopayments/resources/refunds.rb +6 -1
  86. data/lib/dodopayments/resources/subscriptions.rb +13 -3
  87. data/lib/dodopayments/version.rb +1 -1
  88. data/lib/dodopayments.rb +39 -0
  89. data/rbi/dodopayments/models/addon_delete_params.rbi +38 -0
  90. data/rbi/dodopayments/models/addon_list_params.rbi +32 -0
  91. data/rbi/dodopayments/models/addon_retrieve_params.rbi +29 -2
  92. data/rbi/dodopayments/models/addon_unarchive_params.rbi +38 -0
  93. data/rbi/dodopayments/models/addons/translation_delete_params.rbi +58 -0
  94. data/rbi/dodopayments/models/addons/translation_list_params.rbi +59 -0
  95. data/rbi/dodopayments/models/addons/translation_update_params.rbi +74 -0
  96. data/rbi/dodopayments/models/balance_ledger_entry.rbi +5 -0
  97. data/rbi/dodopayments/models/balance_retrieve_ledger_params.rbi +5 -0
  98. data/rbi/dodopayments/models/checkout_session_preview_params.rbi +29 -5
  99. data/rbi/dodopayments/models/create_new_customer.rbi +17 -3
  100. data/rbi/dodopayments/models/credit_entitlement_list_params.rbi +21 -0
  101. data/rbi/dodopayments/models/credit_entitlement_retrieve_params.rbi +29 -2
  102. data/rbi/dodopayments/models/credit_entitlements/credit_entitlement_translation.rbi +70 -0
  103. data/rbi/dodopayments/models/credit_entitlements/credit_entitlement_translations_list_response.rbi +54 -0
  104. data/rbi/dodopayments/models/credit_entitlements/translation_delete_params.rbi +58 -0
  105. data/rbi/dodopayments/models/credit_entitlements/translation_list_params.rbi +59 -0
  106. data/rbi/dodopayments/models/credit_entitlements/translation_update_params.rbi +74 -0
  107. data/rbi/dodopayments/models/customer.rbi +11 -3
  108. data/rbi/dodopayments/models/customer_create_params.rbi +12 -0
  109. data/rbi/dodopayments/models/customer_update_params.rbi +12 -0
  110. data/rbi/dodopayments/models/entitlement_list_params.rbi +21 -0
  111. data/rbi/dodopayments/models/entitlement_retrieve_params.rbi +29 -2
  112. data/rbi/dodopayments/models/entitlements/entitlement_translation.rbi +87 -0
  113. data/rbi/dodopayments/models/entitlements/entitlement_translations_list_response.rbi +48 -0
  114. data/rbi/dodopayments/models/entitlements/translation_delete_params.rbi +58 -0
  115. data/rbi/dodopayments/models/entitlements/translation_list_params.rbi +59 -0
  116. data/rbi/dodopayments/models/entitlements/translation_update_params.rbi +92 -0
  117. data/rbi/dodopayments/models/locale.rbi +42 -0
  118. data/rbi/dodopayments/models/locale_info.rbi +54 -0
  119. data/rbi/dodopayments/models/meter_list_params.rbi +21 -0
  120. data/rbi/dodopayments/models/meter_retrieve_params.rbi +29 -2
  121. data/rbi/dodopayments/models/meter_update_params.rbi +70 -0
  122. data/rbi/dodopayments/models/meters/translation_delete_params.rbi +58 -0
  123. data/rbi/dodopayments/models/meters/translation_list_params.rbi +59 -0
  124. data/rbi/dodopayments/models/meters/translation_update_params.rbi +74 -0
  125. data/rbi/dodopayments/models/misc_list_locales_params.rbi +32 -0
  126. data/rbi/dodopayments/models/misc_list_locales_response.rbi +11 -0
  127. data/rbi/dodopayments/models/payment.rbi +33 -0
  128. data/rbi/dodopayments/models/payment_list_response.rbi +36 -3
  129. data/rbi/dodopayments/models/payment_retrieve_line_items_params.rbi +21 -2
  130. data/rbi/dodopayments/models/payment_retrieve_line_items_response.rbi +14 -3
  131. data/rbi/dodopayments/models/payouts/breakup/detail_list_response.rbi +6 -2
  132. data/rbi/dodopayments/models/payouts/breakup_retrieve_response.rbi +4 -2
  133. data/rbi/dodopayments/models/product_collection_list_params.rbi +21 -0
  134. data/rbi/dodopayments/models/product_collection_retrieve_params.rbi +29 -2
  135. data/rbi/dodopayments/models/product_collections/translation_delete_params.rbi +58 -0
  136. data/rbi/dodopayments/models/product_collections/translation_list_params.rbi +59 -0
  137. data/rbi/dodopayments/models/product_collections/translation_update_params.rbi +74 -0
  138. data/rbi/dodopayments/models/product_list_params.rbi +21 -0
  139. data/rbi/dodopayments/models/product_retrieve_params.rbi +29 -2
  140. data/rbi/dodopayments/models/products/translation.rbi +70 -0
  141. data/rbi/dodopayments/models/products/translation_delete_params.rbi +58 -0
  142. data/rbi/dodopayments/models/products/translation_list_params.rbi +59 -0
  143. data/rbi/dodopayments/models/products/translation_update_params.rbi +74 -0
  144. data/rbi/dodopayments/models/products/translations_list_response.rbi +37 -0
  145. data/rbi/dodopayments/models/refund_create_params.rbi +10 -0
  146. data/rbi/dodopayments/models/subscription_list_params.rbi +21 -0
  147. data/rbi/dodopayments/models/subscription_retrieve_params.rbi +25 -1
  148. data/rbi/dodopayments/models/three_ds_flow.rbi +23 -0
  149. data/rbi/dodopayments/models/three_ds_status.rbi +31 -0
  150. data/rbi/dodopayments/models/update_subscription_plan_req.rbi +15 -0
  151. data/rbi/dodopayments/models.rbi +20 -0
  152. data/rbi/dodopayments/resources/addons/translations.rbi +77 -0
  153. data/rbi/dodopayments/resources/addons.rbi +48 -0
  154. data/rbi/dodopayments/resources/checkout_sessions.rbi +55 -39
  155. data/rbi/dodopayments/resources/credit_entitlements/translations.rbi +81 -0
  156. data/rbi/dodopayments/resources/credit_entitlements.rbi +19 -0
  157. data/rbi/dodopayments/resources/customers.rbi +10 -0
  158. data/rbi/dodopayments/resources/entitlements/translations.rbi +87 -0
  159. data/rbi/dodopayments/resources/entitlements.rbi +19 -0
  160. data/rbi/dodopayments/resources/meters/translations.rbi +77 -0
  161. data/rbi/dodopayments/resources/meters.rbi +42 -0
  162. data/rbi/dodopayments/resources/misc.rbi +9 -0
  163. data/rbi/dodopayments/resources/payments.rbi +4 -0
  164. data/rbi/dodopayments/resources/payouts/breakup/details.rbi +5 -2
  165. data/rbi/dodopayments/resources/payouts/breakup.rbi +4 -1
  166. data/rbi/dodopayments/resources/product_collections/translations.rbi +77 -0
  167. data/rbi/dodopayments/resources/product_collections.rbi +19 -0
  168. data/rbi/dodopayments/resources/products/translations.rbi +77 -0
  169. data/rbi/dodopayments/resources/products.rbi +19 -0
  170. data/rbi/dodopayments/resources/refunds.rbi +4 -0
  171. data/rbi/dodopayments/resources/subscriptions.rbi +26 -0
  172. data/sig/dodopayments/models/addon_delete_params.rbs +23 -0
  173. data/sig/dodopayments/models/addon_list_params.rbs +18 -1
  174. data/sig/dodopayments/models/addon_retrieve_params.rbs +8 -1
  175. data/sig/dodopayments/models/addon_unarchive_params.rbs +23 -0
  176. data/sig/dodopayments/models/addons/translation_delete_params.rbs +30 -0
  177. data/sig/dodopayments/models/addons/translation_list_params.rbs +32 -0
  178. data/sig/dodopayments/models/addons/translation_update_params.rbs +43 -0
  179. data/sig/dodopayments/models/balance_ledger_entry.rbs +2 -0
  180. data/sig/dodopayments/models/balance_retrieve_ledger_params.rbs +2 -0
  181. data/sig/dodopayments/models/checkout_session_preview_params.rbs +13 -3
  182. data/sig/dodopayments/models/create_new_customer.rbs +8 -3
  183. data/sig/dodopayments/models/credit_entitlement_list_params.rbs +12 -1
  184. data/sig/dodopayments/models/credit_entitlement_retrieve_params.rbs +8 -1
  185. data/sig/dodopayments/models/credit_entitlements/credit_entitlement_translation.rbs +39 -0
  186. data/sig/dodopayments/models/credit_entitlements/credit_entitlement_translations_list_response.rbs +24 -0
  187. data/sig/dodopayments/models/credit_entitlements/translation_delete_params.rbs +30 -0
  188. data/sig/dodopayments/models/credit_entitlements/translation_list_params.rbs +32 -0
  189. data/sig/dodopayments/models/credit_entitlements/translation_update_params.rbs +43 -0
  190. data/sig/dodopayments/models/customer.rbs +8 -3
  191. data/sig/dodopayments/models/customer_create_params.rbs +6 -1
  192. data/sig/dodopayments/models/customer_update_params.rbs +6 -1
  193. data/sig/dodopayments/models/entitlement_list_params.rbs +7 -0
  194. data/sig/dodopayments/models/entitlement_retrieve_params.rbs +8 -1
  195. data/sig/dodopayments/models/entitlements/entitlement_translation.rbs +49 -0
  196. data/sig/dodopayments/models/entitlements/entitlement_translations_list_response.rbs +22 -0
  197. data/sig/dodopayments/models/entitlements/translation_delete_params.rbs +30 -0
  198. data/sig/dodopayments/models/entitlements/translation_list_params.rbs +32 -0
  199. data/sig/dodopayments/models/entitlements/translation_update_params.rbs +53 -0
  200. data/sig/dodopayments/models/locale.rbs +56 -0
  201. data/sig/dodopayments/models/locale_info.rbs +26 -0
  202. data/sig/dodopayments/models/meter_list_params.rbs +12 -1
  203. data/sig/dodopayments/models/meter_retrieve_params.rbs +8 -1
  204. data/sig/dodopayments/models/meter_update_params.rbs +41 -0
  205. data/sig/dodopayments/models/meters/translation_delete_params.rbs +30 -0
  206. data/sig/dodopayments/models/meters/translation_list_params.rbs +32 -0
  207. data/sig/dodopayments/models/meters/translation_update_params.rbs +43 -0
  208. data/sig/dodopayments/models/misc_list_locales_params.rbs +15 -0
  209. data/sig/dodopayments/models/misc_list_locales_response.rbs +7 -0
  210. data/sig/dodopayments/models/payment.rbs +15 -0
  211. data/sig/dodopayments/models/payment_list_response.rbs +18 -3
  212. data/sig/dodopayments/models/payment_retrieve_line_items_params.rbs +10 -1
  213. data/sig/dodopayments/models/payment_retrieve_line_items_response.rbs +8 -3
  214. data/sig/dodopayments/models/product_collection_list_params.rbs +7 -0
  215. data/sig/dodopayments/models/product_collection_retrieve_params.rbs +8 -1
  216. data/sig/dodopayments/models/product_collections/translation_delete_params.rbs +30 -0
  217. data/sig/dodopayments/models/product_collections/translation_list_params.rbs +32 -0
  218. data/sig/dodopayments/models/product_collections/translation_update_params.rbs +43 -0
  219. data/sig/dodopayments/models/product_list_params.rbs +7 -0
  220. data/sig/dodopayments/models/product_retrieve_params.rbs +8 -1
  221. data/sig/dodopayments/models/products/translation.rbs +37 -0
  222. data/sig/dodopayments/models/products/translation_delete_params.rbs +30 -0
  223. data/sig/dodopayments/models/products/translation_list_params.rbs +32 -0
  224. data/sig/dodopayments/models/products/translation_update_params.rbs +43 -0
  225. data/sig/dodopayments/models/products/translations_list_response.rbs +18 -0
  226. data/sig/dodopayments/models/refund_create_params.rbs +5 -0
  227. data/sig/dodopayments/models/subscription_list_params.rbs +7 -0
  228. data/sig/dodopayments/models/subscription_retrieve_params.rbs +7 -1
  229. data/sig/dodopayments/models/three_ds_flow.rbs +14 -0
  230. data/sig/dodopayments/models/three_ds_status.rbs +24 -0
  231. data/sig/dodopayments/models.rbs +20 -0
  232. data/sig/dodopayments/resources/addons/translations.rbs +29 -0
  233. data/sig/dodopayments/resources/addons.rbs +15 -0
  234. data/sig/dodopayments/resources/checkout_sessions.rbs +1 -0
  235. data/sig/dodopayments/resources/credit_entitlements/translations.rbs +29 -0
  236. data/sig/dodopayments/resources/credit_entitlements.rbs +4 -0
  237. data/sig/dodopayments/resources/customers.rbs +2 -0
  238. data/sig/dodopayments/resources/entitlements/translations.rbs +31 -0
  239. data/sig/dodopayments/resources/entitlements.rbs +4 -0
  240. data/sig/dodopayments/resources/meters/translations.rbs +29 -0
  241. data/sig/dodopayments/resources/meters.rbs +12 -0
  242. data/sig/dodopayments/resources/misc.rbs +4 -0
  243. data/sig/dodopayments/resources/payments.rbs +1 -0
  244. data/sig/dodopayments/resources/product_collections/translations.rbs +29 -0
  245. data/sig/dodopayments/resources/product_collections.rbs +4 -0
  246. data/sig/dodopayments/resources/products/translations.rbs +29 -0
  247. data/sig/dodopayments/resources/products.rbs +4 -0
  248. data/sig/dodopayments/resources/refunds.rbs +1 -0
  249. data/sig/dodopayments/resources/subscriptions.rbs +2 -0
  250. metadata +119 -2
@@ -158,6 +158,22 @@ module Dodopayments
158
158
  sig { returns(T.nilable(String)) }
159
159
  attr_accessor :subscription_id
160
160
 
161
+ # How the cardholder completed the 3DS authentication. The value is null when the
162
+ # processor does not report it.
163
+ sig { returns(T.nilable(Dodopayments::ThreeDSFlow::TaggedSymbol)) }
164
+ attr_accessor :three_ds_flow
165
+
166
+ # The result of the 3DS authentication, as the processor reports it. The value is
167
+ # null when the processor reports no 3DS data, for example when the payment did
168
+ # not use 3DS.
169
+ sig { returns(T.nilable(Dodopayments::ThreeDSStatus::TaggedSymbol)) }
170
+ attr_accessor :three_ds_status
171
+
172
+ # The 3DS protocol version, for example `2.2.0`. The value is null when the
173
+ # processor does not report it.
174
+ sig { returns(T.nilable(String)) }
175
+ attr_accessor :three_ds_version
176
+
161
177
  sig do
162
178
  params(
163
179
  brand_id: String,
@@ -191,7 +207,10 @@ module Dodopayments
191
207
  payment_method_type: T.nilable(String),
192
208
  refund_status: T.nilable(Dodopayments::PaymentRefundStatus::OrSymbol),
193
209
  status: T.nilable(Dodopayments::IntentStatus::OrSymbol),
194
- subscription_id: T.nilable(String)
210
+ subscription_id: T.nilable(String),
211
+ three_ds_flow: T.nilable(Dodopayments::ThreeDSFlow::OrSymbol),
212
+ three_ds_status: T.nilable(Dodopayments::ThreeDSStatus::OrSymbol),
213
+ three_ds_version: T.nilable(String)
195
214
  ).returns(T.attached_class)
196
215
  end
197
216
  def self.new(
@@ -270,7 +289,17 @@ module Dodopayments
270
289
  # exist.
271
290
  refund_status: nil,
272
291
  status: nil,
273
- subscription_id: nil
292
+ subscription_id: nil,
293
+ # How the cardholder completed the 3DS authentication. The value is null when the
294
+ # processor does not report it.
295
+ three_ds_flow: nil,
296
+ # The result of the 3DS authentication, as the processor reports it. The value is
297
+ # null when the processor reports no 3DS data, for example when the payment did
298
+ # not use 3DS.
299
+ three_ds_status: nil,
300
+ # The 3DS protocol version, for example `2.2.0`. The value is null when the
301
+ # processor does not report it.
302
+ three_ds_version: nil
274
303
  )
275
304
  end
276
305
 
@@ -309,7 +338,11 @@ module Dodopayments
309
338
  refund_status:
310
339
  T.nilable(Dodopayments::PaymentRefundStatus::TaggedSymbol),
311
340
  status: T.nilable(Dodopayments::IntentStatus::TaggedSymbol),
312
- subscription_id: T.nilable(String)
341
+ subscription_id: T.nilable(String),
342
+ three_ds_flow: T.nilable(Dodopayments::ThreeDSFlow::TaggedSymbol),
343
+ three_ds_status:
344
+ T.nilable(Dodopayments::ThreeDSStatus::TaggedSymbol),
345
+ three_ds_version: T.nilable(String)
313
346
  }
314
347
  )
315
348
  end
@@ -17,18 +17,37 @@ module Dodopayments
17
17
  sig { returns(String) }
18
18
  attr_accessor :payment_id
19
19
 
20
+ # The currency of the amounts. It must be the currency that the customer paid in.
21
+ # Without it, the amounts are in the settlement currency.
22
+ sig { returns(T.nilable(Dodopayments::Currency::OrSymbol)) }
23
+ attr_reader :currency
24
+
25
+ sig { params(currency: Dodopayments::Currency::OrSymbol).void }
26
+ attr_writer :currency
27
+
20
28
  sig do
21
29
  params(
22
30
  payment_id: String,
31
+ currency: Dodopayments::Currency::OrSymbol,
23
32
  request_options: Dodopayments::RequestOptions::OrHash
24
33
  ).returns(T.attached_class)
25
34
  end
26
- def self.new(payment_id:, request_options: {})
35
+ def self.new(
36
+ payment_id:,
37
+ # The currency of the amounts. It must be the currency that the customer paid in.
38
+ # Without it, the amounts are in the settlement currency.
39
+ currency: nil,
40
+ request_options: {}
41
+ )
27
42
  end
28
43
 
29
44
  sig do
30
45
  override.returns(
31
- { payment_id: String, request_options: Dodopayments::RequestOptions }
46
+ {
47
+ payment_id: String,
48
+ currency: Dodopayments::Currency::OrSymbol,
49
+ request_options: Dodopayments::RequestOptions
50
+ }
32
51
  )
33
52
  end
34
53
  def to_hash
@@ -21,16 +21,26 @@ module Dodopayments
21
21
  end
22
22
  attr_accessor :items
23
23
 
24
+ # False when the payment method does not allow a partial refund of this payment.
25
+ sig { returns(T::Boolean) }
26
+ attr_accessor :partial_refund_allowed
27
+
24
28
  sig do
25
29
  params(
26
30
  currency: Dodopayments::Currency::OrSymbol,
27
31
  items:
28
32
  T::Array[
29
33
  Dodopayments::Models::PaymentRetrieveLineItemsResponse::Item::OrHash
30
- ]
34
+ ],
35
+ partial_refund_allowed: T::Boolean
31
36
  ).returns(T.attached_class)
32
37
  end
33
- def self.new(currency:, items:)
38
+ def self.new(
39
+ currency:,
40
+ items:,
41
+ # False when the payment method does not allow a partial refund of this payment.
42
+ partial_refund_allowed:
43
+ )
34
44
  end
35
45
 
36
46
  sig do
@@ -40,7 +50,8 @@ module Dodopayments
40
50
  items:
41
51
  T::Array[
42
52
  Dodopayments::Models::PaymentRetrieveLineItemsResponse::Item
43
- ]
53
+ ],
54
+ partial_refund_allowed: T::Boolean
44
55
  }
45
56
  )
46
57
  end
@@ -38,7 +38,9 @@ module Dodopayments
38
38
  # Amount in the payout's currency, in that currency's smallest unit (cents for
39
39
  # USD, yen for JPY, fils for KWD). The entry is converted at the rate the payout
40
40
  # settled at. These amounts sum to the value of the entries, which can be less
41
- # than the payout: the grouped breakup reports the difference as `unattributed`.
41
+ # than the payout: the grouped breakup reports the difference as `unattributed`. A
42
+ # settlement batch payout shows the native amount of a row in the payout's
43
+ # currency, and 0 for a row in a different currency.
42
44
  sig { returns(Integer) }
43
45
  attr_accessor :payout_currency_amount
44
46
 
@@ -85,7 +87,9 @@ module Dodopayments
85
87
  # Amount in the payout's currency, in that currency's smallest unit (cents for
86
88
  # USD, yen for JPY, fils for KWD). The entry is converted at the rate the payout
87
89
  # settled at. These amounts sum to the value of the entries, which can be less
88
- # than the payout: the grouped breakup reports the difference as `unattributed`.
90
+ # than the payout: the grouped breakup reports the difference as `unattributed`. A
91
+ # settlement batch payout shows the native amount of a row in the payout's
92
+ # currency, and 0 for a row in a different currency.
89
93
  payout_currency_amount:,
90
94
  # USD equivalent of the original amount (in cents).
91
95
  usd_equivalent_amount:,
@@ -14,7 +14,8 @@ module Dodopayments
14
14
 
15
15
  # The type of balance ledger event (e.g., "payment", "refund", "dispute",
16
16
  # "payment_fees"), or `unattributed` for the payout amount the entries do not
17
- # account for.
17
+ # account for. A settlement batch payout shows `carried_over` for its opening
18
+ # balance and the entries dated before that row.
18
19
  sig { returns(String) }
19
20
  attr_accessor :event_type
20
21
 
@@ -45,7 +46,8 @@ module Dodopayments
45
46
  def self.new(
46
47
  # The type of balance ledger event (e.g., "payment", "refund", "dispute",
47
48
  # "payment_fees"), or `unattributed` for the payout amount the entries do not
48
- # account for.
49
+ # account for. A settlement batch payout shows `carried_over` for its opening
50
+ # balance and the entries dated before that row.
49
51
  event_type:,
50
52
  # Total amount for this event type in the payout's currency, in that currency's
51
53
  # smallest unit (cents for USD, yen for JPY, fils for KWD).
@@ -28,6 +28,18 @@ module Dodopayments
28
28
  sig { params(brand_id: String).void }
29
29
  attr_writer :brand_id
30
30
 
31
+ # Shows the translated name, description and unit of the catalog entities in this
32
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
33
+ # with no translation, an unknown code, or no code shows the base text.
34
+ #
35
+ # Do not send a text from a localized response back in a create or update request.
36
+ # The base text then changes to the translated text.
37
+ sig { returns(T.nilable(String)) }
38
+ attr_reader :locale
39
+
40
+ sig { params(locale: String).void }
41
+ attr_writer :locale
42
+
31
43
  # Page number default is 0
32
44
  sig { returns(T.nilable(Integer)) }
33
45
  attr_reader :page_number
@@ -46,6 +58,7 @@ module Dodopayments
46
58
  params(
47
59
  archived: T::Boolean,
48
60
  brand_id: String,
61
+ locale: String,
49
62
  page_number: Integer,
50
63
  page_size: Integer,
51
64
  request_options: Dodopayments::RequestOptions::OrHash
@@ -56,6 +69,13 @@ module Dodopayments
56
69
  archived: nil,
57
70
  # Filter by Brand id
58
71
  brand_id: nil,
72
+ # Shows the translated name, description and unit of the catalog entities in this
73
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
74
+ # with no translation, an unknown code, or no code shows the base text.
75
+ #
76
+ # Do not send a text from a localized response back in a create or update request.
77
+ # The base text then changes to the translated text.
78
+ locale: nil,
59
79
  # Page number default is 0
60
80
  page_number: nil,
61
81
  # Page size default is 10 max is 100
@@ -69,6 +89,7 @@ module Dodopayments
69
89
  {
70
90
  archived: T::Boolean,
71
91
  brand_id: String,
92
+ locale: String,
72
93
  page_number: Integer,
73
94
  page_size: Integer,
74
95
  request_options: Dodopayments::RequestOptions
@@ -17,18 +17,45 @@ module Dodopayments
17
17
  sig { returns(String) }
18
18
  attr_accessor :id
19
19
 
20
+ # Shows the translated name, description and unit of the catalog entities in this
21
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
22
+ # with no translation, an unknown code, or no code shows the base text.
23
+ #
24
+ # Do not send a text from a localized response back in a create or update request.
25
+ # The base text then changes to the translated text.
26
+ sig { returns(T.nilable(String)) }
27
+ attr_reader :locale
28
+
29
+ sig { params(locale: String).void }
30
+ attr_writer :locale
31
+
20
32
  sig do
21
33
  params(
22
34
  id: String,
35
+ locale: String,
23
36
  request_options: Dodopayments::RequestOptions::OrHash
24
37
  ).returns(T.attached_class)
25
38
  end
26
- def self.new(id:, request_options: {})
39
+ def self.new(
40
+ id:,
41
+ # Shows the translated name, description and unit of the catalog entities in this
42
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
43
+ # with no translation, an unknown code, or no code shows the base text.
44
+ #
45
+ # Do not send a text from a localized response back in a create or update request.
46
+ # The base text then changes to the translated text.
47
+ locale: nil,
48
+ request_options: {}
49
+ )
27
50
  end
28
51
 
29
52
  sig do
30
53
  override.returns(
31
- { id: String, request_options: Dodopayments::RequestOptions }
54
+ {
55
+ id: String,
56
+ locale: String,
57
+ request_options: Dodopayments::RequestOptions
58
+ }
32
59
  )
33
60
  end
34
61
  def to_hash
@@ -0,0 +1,58 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module ProductCollections
6
+ class TranslationDeleteParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Dodopayments::ProductCollections::TranslationDeleteParams,
14
+ Dodopayments::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # 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
+ sig { returns(Dodopayments::Locale::OrSymbol) }
25
+ attr_accessor :locale
26
+
27
+ sig do
28
+ params(
29
+ id: String,
30
+ locale: Dodopayments::Locale::OrSymbol,
31
+ request_options: Dodopayments::RequestOptions::OrHash
32
+ ).returns(T.attached_class)
33
+ end
34
+ def self.new(
35
+ id:,
36
+ # A locale that the checkout and the customer portal can show.
37
+ #
38
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
39
+ locale:,
40
+ request_options: {}
41
+ )
42
+ end
43
+
44
+ sig do
45
+ override.returns(
46
+ {
47
+ id: String,
48
+ locale: Dodopayments::Locale::OrSymbol,
49
+ request_options: Dodopayments::RequestOptions
50
+ }
51
+ )
52
+ end
53
+ def to_hash
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,59 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module ProductCollections
6
+ class TranslationListParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Dodopayments::ProductCollections::TranslationListParams,
14
+ Dodopayments::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # Returns only these locales, for example `?locale=fr&locale=de`. With no value,
22
+ # the response has all the locales.
23
+ sig { returns(T.nilable(T::Array[String])) }
24
+ attr_reader :locale
25
+
26
+ sig { params(locale: T::Array[String]).void }
27
+ attr_writer :locale
28
+
29
+ sig do
30
+ params(
31
+ id: String,
32
+ locale: T::Array[String],
33
+ request_options: Dodopayments::RequestOptions::OrHash
34
+ ).returns(T.attached_class)
35
+ end
36
+ def self.new(
37
+ id:,
38
+ # Returns only these locales, for example `?locale=fr&locale=de`. With no value,
39
+ # the response has all the locales.
40
+ locale: nil,
41
+ request_options: {}
42
+ )
43
+ end
44
+
45
+ sig do
46
+ override.returns(
47
+ {
48
+ id: String,
49
+ locale: T::Array[String],
50
+ request_options: Dodopayments::RequestOptions
51
+ }
52
+ )
53
+ end
54
+ def to_hash
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,74 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module ProductCollections
6
+ class TranslationUpdateParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Dodopayments::ProductCollections::TranslationUpdateParams,
14
+ Dodopayments::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :id
20
+
21
+ # 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
+ sig { returns(Dodopayments::Locale::OrSymbol) }
25
+ attr_accessor :locale
26
+
27
+ # The translated description.
28
+ sig { returns(T.nilable(String)) }
29
+ attr_accessor :description
30
+
31
+ # The translated name.
32
+ sig { returns(T.nilable(String)) }
33
+ attr_accessor :name
34
+
35
+ sig do
36
+ params(
37
+ id: String,
38
+ locale: Dodopayments::Locale::OrSymbol,
39
+ description: T.nilable(String),
40
+ name: T.nilable(String),
41
+ request_options: Dodopayments::RequestOptions::OrHash
42
+ ).returns(T.attached_class)
43
+ end
44
+ def self.new(
45
+ id:,
46
+ # A locale that the checkout and the customer portal can show.
47
+ #
48
+ # The codes are a copy of the checkout locales. `GET /locales` lists them.
49
+ locale:,
50
+ # The translated description.
51
+ description: nil,
52
+ # The translated name.
53
+ name: nil,
54
+ request_options: {}
55
+ )
56
+ end
57
+
58
+ sig do
59
+ override.returns(
60
+ {
61
+ id: String,
62
+ locale: Dodopayments::Locale::OrSymbol,
63
+ description: T.nilable(String),
64
+ name: T.nilable(String),
65
+ request_options: Dodopayments::RequestOptions
66
+ }
67
+ )
68
+ end
69
+ def to_hash
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
@@ -28,6 +28,18 @@ module Dodopayments
28
28
  sig { params(brand_id: String).void }
29
29
  attr_writer :brand_id
30
30
 
31
+ # Shows the translated name, description and unit of the catalog entities in this
32
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
33
+ # with no translation, an unknown code, or no code shows the base text.
34
+ #
35
+ # Do not send a text from a localized response back in a create or update request.
36
+ # The base text then changes to the translated text.
37
+ sig { returns(T.nilable(String)) }
38
+ attr_reader :locale
39
+
40
+ sig { params(locale: String).void }
41
+ attr_writer :locale
42
+
31
43
  # Page number default is 0
32
44
  sig { returns(T.nilable(Integer)) }
33
45
  attr_reader :page_number
@@ -57,6 +69,7 @@ module Dodopayments
57
69
  params(
58
70
  archived: T::Boolean,
59
71
  brand_id: String,
72
+ locale: String,
60
73
  page_number: Integer,
61
74
  page_size: Integer,
62
75
  recurring: T::Boolean,
@@ -68,6 +81,13 @@ module Dodopayments
68
81
  archived: nil,
69
82
  # filter by Brand id
70
83
  brand_id: nil,
84
+ # Shows the translated name, description and unit of the catalog entities in this
85
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
86
+ # with no translation, an unknown code, or no code shows the base text.
87
+ #
88
+ # Do not send a text from a localized response back in a create or update request.
89
+ # The base text then changes to the translated text.
90
+ locale: nil,
71
91
  # Page number default is 0
72
92
  page_number: nil,
73
93
  # Page size default is 10 max is 100
@@ -87,6 +107,7 @@ module Dodopayments
87
107
  {
88
108
  archived: T::Boolean,
89
109
  brand_id: String,
110
+ locale: String,
90
111
  page_number: Integer,
91
112
  page_size: Integer,
92
113
  recurring: T::Boolean,
@@ -17,18 +17,45 @@ module Dodopayments
17
17
  sig { returns(String) }
18
18
  attr_accessor :id
19
19
 
20
+ # Shows the translated name, description and unit of the catalog entities in this
21
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
22
+ # with no translation, an unknown code, or no code shows the base text.
23
+ #
24
+ # Do not send a text from a localized response back in a create or update request.
25
+ # The base text then changes to the translated text.
26
+ sig { returns(T.nilable(String)) }
27
+ attr_reader :locale
28
+
29
+ sig { params(locale: String).void }
30
+ attr_writer :locale
31
+
20
32
  sig do
21
33
  params(
22
34
  id: String,
35
+ locale: String,
23
36
  request_options: Dodopayments::RequestOptions::OrHash
24
37
  ).returns(T.attached_class)
25
38
  end
26
- def self.new(id:, request_options: {})
39
+ def self.new(
40
+ id:,
41
+ # Shows the translated name, description and unit of the catalog entities in this
42
+ # locale. The value must be a code from `GET /locales`, for example `fr`. A field
43
+ # with no translation, an unknown code, or no code shows the base text.
44
+ #
45
+ # Do not send a text from a localized response back in a create or update request.
46
+ # The base text then changes to the translated text.
47
+ locale: nil,
48
+ request_options: {}
49
+ )
27
50
  end
28
51
 
29
52
  sig do
30
53
  override.returns(
31
- { id: String, request_options: Dodopayments::RequestOptions }
54
+ {
55
+ id: String,
56
+ locale: String,
57
+ request_options: Dodopayments::RequestOptions
58
+ }
32
59
  )
33
60
  end
34
61
  def to_hash
@@ -0,0 +1,70 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ class Translation < Dodopayments::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Dodopayments::Products::Translation,
11
+ Dodopayments::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # The locale of the translation.
16
+ sig { returns(Dodopayments::Locale::TaggedSymbol) }
17
+ attr_accessor :locale
18
+
19
+ # The time of the last change.
20
+ sig { returns(Time) }
21
+ attr_accessor :updated_at
22
+
23
+ # The translated description. `null` shows that the description has no
24
+ # translation.
25
+ sig { returns(T.nilable(String)) }
26
+ attr_accessor :description
27
+
28
+ # The translated name. `null` shows that the name has no translation.
29
+ sig { returns(T.nilable(String)) }
30
+ attr_accessor :name
31
+
32
+ # The translation of a product, an add-on, a product collection or a meter in one
33
+ # locale.
34
+ sig do
35
+ params(
36
+ locale: Dodopayments::Locale::OrSymbol,
37
+ updated_at: Time,
38
+ description: T.nilable(String),
39
+ name: T.nilable(String)
40
+ ).returns(T.attached_class)
41
+ end
42
+ def self.new(
43
+ # The locale of the translation.
44
+ locale:,
45
+ # The time of the last change.
46
+ updated_at:,
47
+ # The translated description. `null` shows that the description has no
48
+ # translation.
49
+ description: nil,
50
+ # The translated name. `null` shows that the name has no translation.
51
+ name: nil
52
+ )
53
+ end
54
+
55
+ sig do
56
+ override.returns(
57
+ {
58
+ locale: Dodopayments::Locale::TaggedSymbol,
59
+ updated_at: Time,
60
+ description: T.nilable(String),
61
+ name: T.nilable(String)
62
+ }
63
+ )
64
+ end
65
+ def to_hash
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end