dodopayments 2.14.0 → 2.16.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 (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -3
  3. data/README.md +1 -1
  4. data/lib/dodopayments/models/abandoned_checkout_detected_webhook_event.rb +14 -1
  5. data/lib/dodopayments/models/abandoned_checkout_recovered_webhook_event.rb +14 -1
  6. data/lib/dodopayments/models/checkout_session_preview_response.rb +15 -1
  7. data/lib/dodopayments/models/credit_balance_low_webhook_event.rb +16 -1
  8. data/lib/dodopayments/models/credit_entitlements/credit_ledger_entry.rb +24 -1
  9. data/lib/dodopayments/models/customer_retrieve_payment_methods_response.rb +2 -2
  10. data/lib/dodopayments/models/dispute_list_response.rb +2 -2
  11. data/lib/dodopayments/models/dunning_recovered_webhook_event.rb +14 -1
  12. data/lib/dodopayments/models/dunning_started_webhook_event.rb +14 -1
  13. data/lib/dodopayments/models/entitlements/entitlement_grant.rb +9 -1
  14. data/lib/dodopayments/models/entitlements/grant_list_params.rb +1 -26
  15. data/lib/dodopayments/models/get_dispute.rb +35 -1
  16. data/lib/dodopayments/models/integration_config.rb +7 -7
  17. data/lib/dodopayments/models/integration_config_response.rb +7 -11
  18. data/lib/dodopayments/models/license_key.rb +9 -1
  19. data/lib/dodopayments/models/payment.rb +9 -9
  20. data/lib/dodopayments/models/payment_create_response.rb +3 -2
  21. data/lib/dodopayments/models/payment_list_response.rb +2 -4
  22. data/lib/dodopayments/models/payment_method_types.rb +1 -1
  23. data/lib/dodopayments/models/payouts/breakup/detail_list_response.rb +7 -6
  24. data/lib/dodopayments/models/payouts/breakup_retrieve_response.rb +3 -3
  25. data/lib/dodopayments/models/product.rb +24 -1
  26. data/lib/dodopayments/models/product_create_params.rb +28 -5
  27. data/lib/dodopayments/models/product_list_response.rb +24 -1
  28. data/lib/dodopayments/models/product_update_params.rb +24 -1
  29. data/lib/dodopayments/models/refund.rb +9 -1
  30. data/lib/dodopayments/models/subscription.rb +12 -4
  31. data/lib/dodopayments/models/subscription_list_response.rb +3 -3
  32. data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +16 -1
  33. data/lib/dodopayments/models/subscription_retrieve_usage_history_response.rb +7 -2
  34. data/lib/dodopayments/models/theme_config.rb +1 -1
  35. data/lib/dodopayments/models/webhook_payload.rb +47 -3
  36. data/lib/dodopayments/resources/entitlements/grants.rb +1 -3
  37. data/lib/dodopayments/resources/products.rb +8 -4
  38. data/lib/dodopayments/version.rb +1 -1
  39. data/rbi/dodopayments/models/abandoned_checkout_detected_webhook_event.rbi +8 -0
  40. data/rbi/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbi +8 -0
  41. data/rbi/dodopayments/models/checkout_session_preview_response.rbi +14 -0
  42. data/rbi/dodopayments/models/credit_balance_low_webhook_event.rbi +8 -0
  43. data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +8 -0
  44. data/rbi/dodopayments/models/customer_retrieve_payment_methods_response.rbi +2 -2
  45. data/rbi/dodopayments/models/dispute_list_response.rbi +3 -3
  46. data/rbi/dodopayments/models/dunning_recovered_webhook_event.rbi +8 -0
  47. data/rbi/dodopayments/models/dunning_started_webhook_event.rbi +8 -0
  48. data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +8 -0
  49. data/rbi/dodopayments/models/entitlements/grant_list_params.rbi +0 -89
  50. data/rbi/dodopayments/models/get_dispute.rbi +52 -0
  51. data/rbi/dodopayments/models/integration_config.rbi +9 -9
  52. data/rbi/dodopayments/models/integration_config_response.rbi +9 -15
  53. data/rbi/dodopayments/models/license_key.rbi +8 -0
  54. data/rbi/dodopayments/models/payment.rbi +13 -12
  55. data/rbi/dodopayments/models/payment_create_response.rbi +4 -2
  56. data/rbi/dodopayments/models/payment_list_response.rbi +3 -6
  57. data/rbi/dodopayments/models/payment_method_types.rbi +1 -1
  58. data/rbi/dodopayments/models/payouts/breakup/detail_list_response.rbi +10 -8
  59. data/rbi/dodopayments/models/payouts/breakup_retrieve_response.rbi +4 -4
  60. data/rbi/dodopayments/models/product.rbi +36 -0
  61. data/rbi/dodopayments/models/product_create_params.rbi +58 -4
  62. data/rbi/dodopayments/models/product_list_response.rbi +58 -0
  63. data/rbi/dodopayments/models/product_update_params.rbi +54 -0
  64. data/rbi/dodopayments/models/refund.rbi +8 -0
  65. data/rbi/dodopayments/models/subscription.rbi +12 -4
  66. data/rbi/dodopayments/models/subscription_list_response.rbi +4 -4
  67. data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +10 -0
  68. data/rbi/dodopayments/models/subscription_retrieve_usage_history_response.rbi +4 -2
  69. data/rbi/dodopayments/models/theme_config.rbi +1 -1
  70. data/rbi/dodopayments/models/webhook_payload.rbi +24 -0
  71. data/rbi/dodopayments/resources/entitlements/grants.rbi +0 -4
  72. data/rbi/dodopayments/resources/products.rbi +14 -2
  73. data/sig/dodopayments/models/abandoned_checkout_detected_webhook_event.rbs +5 -0
  74. data/sig/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbs +5 -0
  75. data/sig/dodopayments/models/checkout_session_preview_response.rbs +5 -0
  76. data/sig/dodopayments/models/credit_balance_low_webhook_event.rbs +5 -0
  77. data/sig/dodopayments/models/credit_entitlements/credit_ledger_entry.rbs +5 -0
  78. data/sig/dodopayments/models/dunning_recovered_webhook_event.rbs +5 -0
  79. data/sig/dodopayments/models/dunning_started_webhook_event.rbs +5 -0
  80. data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +5 -0
  81. data/sig/dodopayments/models/entitlements/grant_list_params.rbs +0 -34
  82. data/sig/dodopayments/models/get_dispute.rbs +22 -0
  83. data/sig/dodopayments/models/license_key.rbs +5 -0
  84. data/sig/dodopayments/models/product.rbs +16 -0
  85. data/sig/dodopayments/models/product_create_params.rbs +17 -1
  86. data/sig/dodopayments/models/product_list_response.rbs +16 -0
  87. data/sig/dodopayments/models/product_update_params.rbs +16 -0
  88. data/sig/dodopayments/models/refund.rbs +5 -0
  89. data/sig/dodopayments/models/subscription.rbs +5 -0
  90. data/sig/dodopayments/models/theme_config.rbs +1 -1
  91. data/sig/dodopayments/models/webhook_payload.rbs +15 -0
  92. data/sig/dodopayments/resources/entitlements/grants.rbs +0 -1
  93. data/sig/dodopayments/resources/products.rbs +2 -0
  94. metadata +2 -2
@@ -76,6 +76,17 @@ module Dodopayments
76
76
  sig { returns(T.nilable(Dodopayments::Price::Variants)) }
77
77
  attr_accessor :price_detail
78
78
 
79
+ # Pricing mode for localized pricing. NULL means base-only (no localized rules
80
+ # apply).
81
+ sig do
82
+ returns(
83
+ T.nilable(
84
+ Dodopayments::Models::ProductListResponse::PricingMode::TaggedSymbol
85
+ )
86
+ )
87
+ end
88
+ attr_accessor :pricing_mode
89
+
79
90
  # Indicates if the price is tax inclusive
80
91
  sig { returns(T.nilable(T::Boolean)) }
81
92
  attr_accessor :tax_inclusive
@@ -104,6 +115,10 @@ module Dodopayments
104
115
  Dodopayments::Price::UsageBasedPrice::OrHash
105
116
  )
106
117
  ),
118
+ pricing_mode:
119
+ T.nilable(
120
+ Dodopayments::Models::ProductListResponse::PricingMode::OrSymbol
121
+ ),
107
122
  tax_inclusive: T.nilable(T::Boolean)
108
123
  ).returns(T.attached_class)
109
124
  end
@@ -145,6 +160,9 @@ module Dodopayments
145
160
  price: nil,
146
161
  # Details of the price
147
162
  price_detail: nil,
163
+ # Pricing mode for localized pricing. NULL means base-only (no localized rules
164
+ # apply).
165
+ pricing_mode: nil,
148
166
  # Indicates if the price is tax inclusive
149
167
  tax_inclusive: nil
150
168
  )
@@ -167,12 +185,52 @@ module Dodopayments
167
185
  name: T.nilable(String),
168
186
  price: T.nilable(Integer),
169
187
  price_detail: T.nilable(Dodopayments::Price::Variants),
188
+ pricing_mode:
189
+ T.nilable(
190
+ Dodopayments::Models::ProductListResponse::PricingMode::TaggedSymbol
191
+ ),
170
192
  tax_inclusive: T.nilable(T::Boolean)
171
193
  }
172
194
  )
173
195
  end
174
196
  def to_hash
175
197
  end
198
+
199
+ # Pricing mode for localized pricing. NULL means base-only (no localized rules
200
+ # apply).
201
+ module PricingMode
202
+ extend Dodopayments::Internal::Type::Enum
203
+
204
+ TaggedSymbol =
205
+ T.type_alias do
206
+ T.all(
207
+ Symbol,
208
+ Dodopayments::Models::ProductListResponse::PricingMode
209
+ )
210
+ end
211
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
212
+
213
+ BY_CURRENCY =
214
+ T.let(
215
+ :by_currency,
216
+ Dodopayments::Models::ProductListResponse::PricingMode::TaggedSymbol
217
+ )
218
+ BY_COUNTRY =
219
+ T.let(
220
+ :by_country,
221
+ Dodopayments::Models::ProductListResponse::PricingMode::TaggedSymbol
222
+ )
223
+
224
+ sig do
225
+ override.returns(
226
+ T::Array[
227
+ Dodopayments::Models::ProductListResponse::PricingMode::TaggedSymbol
228
+ ]
229
+ )
230
+ end
231
+ def self.values
232
+ end
233
+ end
176
234
  end
177
235
  end
178
236
  end
@@ -132,6 +132,16 @@ module Dodopayments
132
132
  end
133
133
  attr_accessor :price
134
134
 
135
+ # Update the pricing mode. Omit to leave unchanged; set to null to clear (which
136
+ # archives all active localized rules for this product). Changing to a different
137
+ # non-null mode also archives any rules whose mode doesn't match the new mode.
138
+ sig do
139
+ returns(
140
+ T.nilable(Dodopayments::ProductUpdateParams::PricingMode::OrSymbol)
141
+ )
142
+ end
143
+ attr_accessor :pricing_mode
144
+
135
145
  # Tax category of the product.
136
146
  sig { returns(T.nilable(Dodopayments::TaxCategory::OrSymbol)) }
137
147
  attr_accessor :tax_category
@@ -166,6 +176,8 @@ module Dodopayments
166
176
  Dodopayments::Price::UsageBasedPrice::OrHash
167
177
  )
168
178
  ),
179
+ pricing_mode:
180
+ T.nilable(Dodopayments::ProductUpdateParams::PricingMode::OrSymbol),
169
181
  tax_category: T.nilable(Dodopayments::TaxCategory::OrSymbol),
170
182
  request_options: Dodopayments::RequestOptions::OrHash
171
183
  ).returns(T.attached_class)
@@ -223,6 +235,10 @@ module Dodopayments
223
235
  name: nil,
224
236
  # Price details of the product.
225
237
  price: nil,
238
+ # Update the pricing mode. Omit to leave unchanged; set to null to clear (which
239
+ # archives all active localized rules for this product). Changing to a different
240
+ # non-null mode also archives any rules whose mode doesn't match the new mode.
241
+ pricing_mode: nil,
226
242
  # Tax category of the product.
227
243
  tax_category: nil,
228
244
  request_options: {}
@@ -259,6 +275,10 @@ module Dodopayments
259
275
  Dodopayments::Price::UsageBasedPrice
260
276
  )
261
277
  ),
278
+ pricing_mode:
279
+ T.nilable(
280
+ Dodopayments::ProductUpdateParams::PricingMode::OrSymbol
281
+ ),
262
282
  tax_category: T.nilable(Dodopayments::TaxCategory::OrSymbol),
263
283
  request_options: Dodopayments::RequestOptions
264
284
  }
@@ -320,6 +340,40 @@ module Dodopayments
320
340
  def to_hash
321
341
  end
322
342
  end
343
+
344
+ # Update the pricing mode. Omit to leave unchanged; set to null to clear (which
345
+ # archives all active localized rules for this product). Changing to a different
346
+ # non-null mode also archives any rules whose mode doesn't match the new mode.
347
+ module PricingMode
348
+ extend Dodopayments::Internal::Type::Enum
349
+
350
+ TaggedSymbol =
351
+ T.type_alias do
352
+ T.all(Symbol, Dodopayments::ProductUpdateParams::PricingMode)
353
+ end
354
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
355
+
356
+ BY_CURRENCY =
357
+ T.let(
358
+ :by_currency,
359
+ Dodopayments::ProductUpdateParams::PricingMode::TaggedSymbol
360
+ )
361
+ BY_COUNTRY =
362
+ T.let(
363
+ :by_country,
364
+ Dodopayments::ProductUpdateParams::PricingMode::TaggedSymbol
365
+ )
366
+
367
+ sig do
368
+ override.returns(
369
+ T::Array[
370
+ Dodopayments::ProductUpdateParams::PricingMode::TaggedSymbol
371
+ ]
372
+ )
373
+ end
374
+ def self.values
375
+ end
376
+ end
323
377
  end
324
378
  end
325
379
  end
@@ -8,6 +8,10 @@ module Dodopayments
8
8
  T.any(Dodopayments::Refund, Dodopayments::Internal::AnyHash)
9
9
  end
10
10
 
11
+ # Brand id this refund belongs to
12
+ sig { returns(String) }
13
+ attr_accessor :brand_id
14
+
11
15
  # The unique identifier of the business issuing the refund.
12
16
  sig { returns(String) }
13
17
  attr_accessor :business_id
@@ -59,6 +63,7 @@ module Dodopayments
59
63
 
60
64
  sig do
61
65
  params(
66
+ brand_id: String,
62
67
  business_id: String,
63
68
  created_at: Time,
64
69
  customer: Dodopayments::CustomerLimitedDetails::OrHash,
@@ -73,6 +78,8 @@ module Dodopayments
73
78
  ).returns(T.attached_class)
74
79
  end
75
80
  def self.new(
81
+ # Brand id this refund belongs to
82
+ brand_id:,
76
83
  # The unique identifier of the business issuing the refund.
77
84
  business_id:,
78
85
  # The timestamp of when the refund was created in UTC.
@@ -101,6 +108,7 @@ module Dodopayments
101
108
  sig do
102
109
  override.returns(
103
110
  {
111
+ brand_id: String,
104
112
  business_id: String,
105
113
  created_at: Time,
106
114
  customer: Dodopayments::CustomerLimitedDetails,
@@ -19,6 +19,10 @@ module Dodopayments
19
19
  sig { params(billing: Dodopayments::BillingAddress::OrHash).void }
20
20
  attr_writer :billing
21
21
 
22
+ # Brand id this subscription belongs to
23
+ sig { returns(String) }
24
+ attr_accessor :brand_id
25
+
22
26
  # Indicates if the subscription will cancel at the next billing date
23
27
  sig { returns(T::Boolean) }
24
28
  attr_accessor :cancel_at_next_billing_date
@@ -87,8 +91,8 @@ module Dodopayments
87
91
  sig { returns(Integer) }
88
92
  attr_accessor :quantity
89
93
 
90
- # Amount charged before tax for each recurring payment in smallest currency unit
91
- # (e.g. cents)
94
+ # Amount charged before tax for each recurring payment in the currency's smallest
95
+ # unit (cents for USD, yen for JPY, fils for KWD)
92
96
  sig { returns(Integer) }
93
97
  attr_accessor :recurring_pre_tax_amount
94
98
 
@@ -179,6 +183,7 @@ module Dodopayments
179
183
  params(
180
184
  addons: T::Array[Dodopayments::AddonCartResponseItem::OrHash],
181
185
  billing: Dodopayments::BillingAddress::OrHash,
186
+ brand_id: String,
182
187
  cancel_at_next_billing_date: T::Boolean,
183
188
  created_at: Time,
184
189
  credit_entitlement_cart:
@@ -225,6 +230,8 @@ module Dodopayments
225
230
  addons:,
226
231
  # Billing address details for payments
227
232
  billing:,
233
+ # Brand id this subscription belongs to
234
+ brand_id:,
228
235
  # Indicates if the subscription will cancel at the next billing date
229
236
  cancel_at_next_billing_date:,
230
237
  # Timestamp when the subscription was created
@@ -256,8 +263,8 @@ module Dodopayments
256
263
  product_id:,
257
264
  # Number of units/items included in the subscription
258
265
  quantity:,
259
- # Amount charged before tax for each recurring payment in smallest currency unit
260
- # (e.g. cents)
266
+ # Amount charged before tax for each recurring payment in the currency's smallest
267
+ # unit (cents for USD, yen for JPY, fils for KWD)
261
268
  recurring_pre_tax_amount:,
262
269
  # Current status of the subscription
263
270
  status:,
@@ -304,6 +311,7 @@ module Dodopayments
304
311
  {
305
312
  addons: T::Array[Dodopayments::AddonCartResponseItem],
306
313
  billing: Dodopayments::BillingAddress,
314
+ brand_id: String,
307
315
  cancel_at_next_billing_date: T::Boolean,
308
316
  created_at: Time,
309
317
  credit_entitlement_cart:
@@ -80,8 +80,8 @@ module Dodopayments
80
80
  sig { returns(Integer) }
81
81
  attr_accessor :quantity
82
82
 
83
- # Amount charged before tax for each recurring payment in smallest currency unit
84
- # (e.g. cents)
83
+ # Amount charged before tax for each recurring payment in the currency's smallest
84
+ # unit (cents for USD, yen for JPY, fils for KWD)
85
85
  sig { returns(Integer) }
86
86
  attr_accessor :recurring_pre_tax_amount
87
87
 
@@ -217,8 +217,8 @@ module Dodopayments
217
217
  product_id:,
218
218
  # Number of units/items included in the subscription
219
219
  quantity:,
220
- # Amount charged before tax for each recurring payment in smallest currency unit
221
- # (e.g. cents)
220
+ # Amount charged before tax for each recurring payment in the currency's smallest
221
+ # unit (cents for USD, yen for JPY, fils for KWD)
222
222
  recurring_pre_tax_amount:,
223
223
  # Current status of the subscription
224
224
  status:,
@@ -477,6 +477,11 @@ module Dodopayments
477
477
  sig { returns(Dodopayments::Currency::TaggedSymbol) }
478
478
  attr_accessor :currency
479
479
 
480
+ # Net credit movement in the smallest currency unit (e.g. cents). **Negative** –
481
+ # credits were deducted from the customer's balance to offset the charge (typical
482
+ # on upgrades). **Positive** – credits were added to the customer's balance,
483
+ # either from a downgrade proration refund or from topping-up the wallet to meet a
484
+ # gateway minimum-charge threshold. **Zero** – no credit movement occurred.
480
485
  sig { returns(Integer) }
481
486
  attr_accessor :customer_credits
482
487
 
@@ -508,6 +513,11 @@ module Dodopayments
508
513
  end
509
514
  def self.new(
510
515
  currency:,
516
+ # Net credit movement in the smallest currency unit (e.g. cents). **Negative** –
517
+ # credits were deducted from the customer's balance to offset the charge (typical
518
+ # on upgrades). **Positive** – credits were added to the customer's balance,
519
+ # either from a downgrade proration refund or from topping-up the wallet to meet a
520
+ # gateway minimum-charge threshold. **Zero** – no credit movement occurred.
511
521
  customer_credits:,
512
522
  settlement_amount:,
513
523
  settlement_currency:,
@@ -101,7 +101,8 @@ module Dodopayments
101
101
  sig { returns(String) }
102
102
  attr_accessor :price_per_unit
103
103
 
104
- # Total price charged for this meter in smallest currency unit (cents)
104
+ # Total price charged for this meter in the currency's smallest unit (cents for
105
+ # USD, yen for JPY, fils for KWD)
105
106
  sig { returns(Integer) }
106
107
  attr_accessor :total_price
107
108
 
@@ -132,7 +133,8 @@ module Dodopayments
132
133
  name:,
133
134
  # Price per unit in string format for precision
134
135
  price_per_unit:,
135
- # Total price charged for this meter in smallest currency unit (cents)
136
+ # Total price charged for this meter in the currency's smallest unit (cents for
137
+ # USD, yen for JPY, fils for KWD)
136
138
  total_price:
137
139
  )
138
140
  end
@@ -121,7 +121,7 @@ module Dodopayments
121
121
  MD = T.let(:md, Dodopayments::ThemeConfig::FontSize::TaggedSymbol)
122
122
  LG = T.let(:lg, Dodopayments::ThemeConfig::FontSize::TaggedSymbol)
123
123
  XL = T.let(:xl, Dodopayments::ThemeConfig::FontSize::TaggedSymbol)
124
- SIZE2_XL =
124
+ FONT_SIZE_2XL =
125
125
  T.let(:"2xl", Dodopayments::ThemeConfig::FontSize::TaggedSymbol)
126
126
 
127
127
  sig do
@@ -256,6 +256,10 @@ module Dodopayments
256
256
  sig { returns(String) }
257
257
  attr_accessor :available_balance
258
258
 
259
+ # Brand id this credit entitlement belongs to
260
+ sig { returns(String) }
261
+ attr_accessor :brand_id
262
+
259
263
  sig { returns(String) }
260
264
  attr_accessor :credit_entitlement_id
261
265
 
@@ -283,6 +287,7 @@ module Dodopayments
283
287
  sig do
284
288
  params(
285
289
  available_balance: String,
290
+ brand_id: String,
286
291
  credit_entitlement_id: String,
287
292
  credit_entitlement_name: String,
288
293
  customer_id: String,
@@ -295,6 +300,8 @@ module Dodopayments
295
300
  end
296
301
  def self.new(
297
302
  available_balance:,
303
+ # Brand id this credit entitlement belongs to
304
+ brand_id:,
298
305
  credit_entitlement_id:,
299
306
  credit_entitlement_name:,
300
307
  customer_id:,
@@ -310,6 +317,7 @@ module Dodopayments
310
317
  override.returns(
311
318
  {
312
319
  available_balance: String,
320
+ brand_id: String,
313
321
  credit_entitlement_id: String,
314
322
  credit_entitlement_name: String,
315
323
  customer_id: String,
@@ -344,6 +352,10 @@ module Dodopayments
344
352
  end
345
353
  attr_accessor :abandonment_reason
346
354
 
355
+ # Brand id this abandoned checkout belongs to
356
+ sig { returns(String) }
357
+ attr_accessor :brand_id
358
+
347
359
  sig { returns(String) }
348
360
  attr_accessor :customer_id
349
361
 
@@ -368,6 +380,7 @@ module Dodopayments
368
380
  abandoned_at: Time,
369
381
  abandonment_reason:
370
382
  Dodopayments::WebhookPayload::Data::AbandonedCheckout::AbandonmentReason::OrSymbol,
383
+ brand_id: String,
371
384
  customer_id: String,
372
385
  payment_id: String,
373
386
  status:
@@ -379,6 +392,8 @@ module Dodopayments
379
392
  def self.new(
380
393
  abandoned_at:,
381
394
  abandonment_reason:,
395
+ # Brand id this abandoned checkout belongs to
396
+ brand_id:,
382
397
  customer_id:,
383
398
  payment_id:,
384
399
  status:,
@@ -393,6 +408,7 @@ module Dodopayments
393
408
  abandoned_at: Time,
394
409
  abandonment_reason:
395
410
  Dodopayments::WebhookPayload::Data::AbandonedCheckout::AbandonmentReason::OrSymbol,
411
+ brand_id: String,
396
412
  customer_id: String,
397
413
  payload_type: Symbol,
398
414
  payment_id: String,
@@ -498,6 +514,10 @@ module Dodopayments
498
514
  )
499
515
  end
500
516
 
517
+ # Brand id this dunning attempt belongs to
518
+ sig { returns(String) }
519
+ attr_accessor :brand_id
520
+
501
521
  sig { returns(Time) }
502
522
  attr_accessor :created_at
503
523
 
@@ -529,6 +549,7 @@ module Dodopayments
529
549
 
530
550
  sig do
531
551
  params(
552
+ brand_id: String,
532
553
  created_at: Time,
533
554
  customer_id: String,
534
555
  status:
@@ -541,6 +562,8 @@ module Dodopayments
541
562
  ).returns(T.attached_class)
542
563
  end
543
564
  def self.new(
565
+ # Brand id this dunning attempt belongs to
566
+ brand_id:,
544
567
  created_at:,
545
568
  customer_id:,
546
569
  status:,
@@ -554,6 +577,7 @@ module Dodopayments
554
577
  sig do
555
578
  override.returns(
556
579
  {
580
+ brand_id: String,
557
581
  created_at: Time,
558
582
  customer_id: String,
559
583
  payload_type: Symbol,
@@ -9,8 +9,6 @@ module Dodopayments
9
9
  params(
10
10
  id: String,
11
11
  customer_id: String,
12
- integration_type:
13
- Dodopayments::Entitlements::GrantListParams::IntegrationType::OrSymbol,
14
12
  page_number: Integer,
15
13
  page_size: Integer,
16
14
  status:
@@ -27,8 +25,6 @@ module Dodopayments
27
25
  id,
28
26
  # Filter by customer ID
29
27
  customer_id: nil,
30
- # Filter by integration type
31
- integration_type: nil,
32
28
  # Page number (default 0)
33
29
  page_number: nil,
34
30
  # Page size (default 10, max 100)
@@ -36,6 +36,8 @@ module Dodopayments
36
36
  T.nilable(Dodopayments::LicenseKeyDuration::OrHash),
37
37
  license_key_enabled: T.nilable(T::Boolean),
38
38
  metadata: T::Hash[Symbol, String],
39
+ pricing_mode:
40
+ T.nilable(Dodopayments::ProductCreateParams::PricingMode::OrSymbol),
39
41
  request_options: Dodopayments::RequestOptions::OrHash
40
42
  ).returns(Dodopayments::Product)
41
43
  end
@@ -50,7 +52,7 @@ module Dodopayments
50
52
  addons: nil,
51
53
  # Brand id for the product, if not provided will default to primary brand
52
54
  brand_id: nil,
53
- # Optional credit entitlements to attach (max 3)
55
+ # Optional credit entitlements to attach (max 5)
54
56
  credit_entitlements: nil,
55
57
  # Optional description of the product
56
58
  description: nil,
@@ -58,7 +60,7 @@ module Dodopayments
58
60
  #
59
61
  # deprecated: use entitlements instead
60
62
  digital_product_delivery: nil,
61
- # Optional entitlements to attach to this product (max 20)
63
+ # Optional entitlements to attach to this product (max 50)
62
64
  entitlements: nil,
63
65
  # Optional message displayed during license key activation
64
66
  #
@@ -85,6 +87,10 @@ module Dodopayments
85
87
  license_key_enabled: nil,
86
88
  # Additional metadata for the product
87
89
  metadata: nil,
90
+ # Pricing mode for localized pricing. When set, rules from
91
+ # /products/{id}/localized-prices apply at checkout. NULL means base-only
92
+ # (existing behavior).
93
+ pricing_mode: nil,
88
94
  request_options: {}
89
95
  )
90
96
  end
@@ -132,6 +138,8 @@ module Dodopayments
132
138
  Dodopayments::Price::UsageBasedPrice::OrHash
133
139
  )
134
140
  ),
141
+ pricing_mode:
142
+ T.nilable(Dodopayments::ProductUpdateParams::PricingMode::OrSymbol),
135
143
  tax_category: T.nilable(Dodopayments::TaxCategory::OrSymbol),
136
144
  request_options: Dodopayments::RequestOptions::OrHash
137
145
  ).void
@@ -189,6 +197,10 @@ module Dodopayments
189
197
  name: nil,
190
198
  # Price details of the product.
191
199
  price: nil,
200
+ # Update the pricing mode. Omit to leave unchanged; set to null to clear (which
201
+ # archives all active localized rules for this product). Changing to a different
202
+ # non-null mode also archives any rules whose mode doesn't match the new mode.
203
+ pricing_mode: nil,
192
204
  # Tax category of the product.
193
205
  tax_category: nil,
194
206
  request_options: {}
@@ -35,6 +35,7 @@ module Dodopayments
35
35
  {
36
36
  abandoned_at: Time,
37
37
  abandonment_reason: Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Data::abandonment_reason,
38
+ brand_id: String,
38
39
  customer_id: String,
39
40
  payment_id: String,
40
41
  status: Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Data::status,
@@ -46,6 +47,8 @@ module Dodopayments
46
47
 
47
48
  attr_accessor abandonment_reason: Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Data::abandonment_reason
48
49
 
50
+ attr_accessor brand_id: String
51
+
49
52
  attr_accessor customer_id: String
50
53
 
51
54
  attr_accessor payment_id: String
@@ -57,6 +60,7 @@ module Dodopayments
57
60
  def initialize: (
58
61
  abandoned_at: Time,
59
62
  abandonment_reason: Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Data::abandonment_reason,
63
+ brand_id: String,
60
64
  customer_id: String,
61
65
  payment_id: String,
62
66
  status: Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Data::status,
@@ -66,6 +70,7 @@ module Dodopayments
66
70
  def to_hash: -> {
67
71
  abandoned_at: Time,
68
72
  abandonment_reason: Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Data::abandonment_reason,
73
+ brand_id: String,
69
74
  customer_id: String,
70
75
  payment_id: String,
71
76
  status: Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Data::status,
@@ -35,6 +35,7 @@ module Dodopayments
35
35
  {
36
36
  abandoned_at: Time,
37
37
  abandonment_reason: Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Data::abandonment_reason,
38
+ brand_id: String,
38
39
  customer_id: String,
39
40
  payment_id: String,
40
41
  status: Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Data::status,
@@ -46,6 +47,8 @@ module Dodopayments
46
47
 
47
48
  attr_accessor abandonment_reason: Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Data::abandonment_reason
48
49
 
50
+ attr_accessor brand_id: String
51
+
49
52
  attr_accessor customer_id: String
50
53
 
51
54
  attr_accessor payment_id: String
@@ -57,6 +60,7 @@ module Dodopayments
57
60
  def initialize: (
58
61
  abandoned_at: Time,
59
62
  abandonment_reason: Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Data::abandonment_reason,
63
+ brand_id: String,
60
64
  customer_id: String,
61
65
  payment_id: String,
62
66
  status: Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Data::status,
@@ -66,6 +70,7 @@ module Dodopayments
66
70
  def to_hash: -> {
67
71
  abandoned_at: Time,
68
72
  abandonment_reason: Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Data::abandonment_reason,
73
+ brand_id: String,
69
74
  customer_id: String,
70
75
  payment_id: String,
71
76
  status: Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Data::status,
@@ -5,6 +5,7 @@ module Dodopayments
5
5
  billing_country: Dodopayments::Models::country_code,
6
6
  currency: Dodopayments::Models::currency,
7
7
  current_breakup: Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup,
8
+ is_byop: bool,
8
9
  product_cart: ::Array[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart],
9
10
  total_price: Integer,
10
11
  recurring_breakup: Dodopayments::Models::CheckoutSessionPreviewResponse::RecurringBreakup?,
@@ -19,6 +20,8 @@ module Dodopayments
19
20
 
20
21
  attr_accessor current_breakup: Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup
21
22
 
23
+ attr_accessor is_byop: bool
24
+
22
25
  attr_accessor product_cart: ::Array[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart]
23
26
 
24
27
  attr_accessor total_price: Integer
@@ -33,6 +36,7 @@ module Dodopayments
33
36
  billing_country: Dodopayments::Models::country_code,
34
37
  currency: Dodopayments::Models::currency,
35
38
  current_breakup: Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup,
39
+ is_byop: bool,
36
40
  product_cart: ::Array[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart],
37
41
  total_price: Integer,
38
42
  ?recurring_breakup: Dodopayments::Models::CheckoutSessionPreviewResponse::RecurringBreakup?,
@@ -44,6 +48,7 @@ module Dodopayments
44
48
  billing_country: Dodopayments::Models::country_code,
45
49
  currency: Dodopayments::Models::currency,
46
50
  current_breakup: Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup,
51
+ is_byop: bool,
47
52
  product_cart: ::Array[Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart],
48
53
  total_price: Integer,
49
54
  recurring_breakup: Dodopayments::Models::CheckoutSessionPreviewResponse::RecurringBreakup?,
@@ -34,6 +34,7 @@ module Dodopayments
34
34
  type data =
35
35
  {
36
36
  available_balance: String,
37
+ brand_id: String,
37
38
  credit_entitlement_id: String,
38
39
  credit_entitlement_name: String,
39
40
  customer_id: String,
@@ -46,6 +47,8 @@ module Dodopayments
46
47
  class Data < Dodopayments::Internal::Type::BaseModel
47
48
  attr_accessor available_balance: String
48
49
 
50
+ attr_accessor brand_id: String
51
+
49
52
  attr_accessor credit_entitlement_id: String
50
53
 
51
54
  attr_accessor credit_entitlement_name: String
@@ -62,6 +65,7 @@ module Dodopayments
62
65
 
63
66
  def initialize: (
64
67
  available_balance: String,
68
+ brand_id: String,
65
69
  credit_entitlement_id: String,
66
70
  credit_entitlement_name: String,
67
71
  customer_id: String,
@@ -73,6 +77,7 @@ module Dodopayments
73
77
 
74
78
  def to_hash: -> {
75
79
  available_balance: String,
80
+ brand_id: String,
76
81
  credit_entitlement_id: String,
77
82
  credit_entitlement_name: String,
78
83
  customer_id: String,