dodopayments 2.13.0 → 2.15.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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -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/balance_ledger_entry.rb +1 -0
  7. data/lib/dodopayments/models/balance_retrieve_ledger_params.rb +1 -0
  8. data/lib/dodopayments/models/checkout_session_preview_response.rb +15 -1
  9. data/lib/dodopayments/models/credit_balance_low_webhook_event.rb +16 -1
  10. data/lib/dodopayments/models/credit_entitlements/credit_ledger_entry.rb +24 -1
  11. data/lib/dodopayments/models/dispute_list_response.rb +27 -1
  12. data/lib/dodopayments/models/dunning_recovered_webhook_event.rb +14 -1
  13. data/lib/dodopayments/models/dunning_started_webhook_event.rb +14 -1
  14. data/lib/dodopayments/models/entitlements/entitlement_grant.rb +17 -1
  15. data/lib/dodopayments/models/get_dispute.rb +35 -1
  16. data/lib/dodopayments/models/integration_config.rb +28 -1
  17. data/lib/dodopayments/models/integration_config_response.rb +28 -1
  18. data/lib/dodopayments/models/license_key.rb +10 -1
  19. data/lib/dodopayments/models/license_key_list_params.rb +1 -0
  20. data/lib/dodopayments/models/payment.rb +34 -6
  21. data/lib/dodopayments/models/payment_create_response.rb +3 -2
  22. data/lib/dodopayments/models/payment_list_response.rb +43 -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_update_params.rb +24 -1
  28. data/lib/dodopayments/models/refund.rb +9 -1
  29. data/lib/dodopayments/models/subscription.rb +12 -4
  30. data/lib/dodopayments/models/subscription_list_response.rb +3 -3
  31. data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +16 -1
  32. data/lib/dodopayments/models/subscription_retrieve_usage_history_response.rb +7 -2
  33. data/lib/dodopayments/models/subscription_update_payment_method_params.rb +21 -1
  34. data/lib/dodopayments/models/webhook_payload.rb +47 -3
  35. data/lib/dodopayments/resources/products.rb +8 -4
  36. data/lib/dodopayments/version.rb +1 -1
  37. data/rbi/dodopayments/models/abandoned_checkout_detected_webhook_event.rbi +8 -0
  38. data/rbi/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbi +8 -0
  39. data/rbi/dodopayments/models/balance_ledger_entry.rbi +5 -0
  40. data/rbi/dodopayments/models/balance_retrieve_ledger_params.rbi +5 -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/dispute_list_response.rbi +60 -0
  45. data/rbi/dodopayments/models/dunning_recovered_webhook_event.rbi +8 -0
  46. data/rbi/dodopayments/models/dunning_started_webhook_event.rbi +8 -0
  47. data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +18 -0
  48. data/rbi/dodopayments/models/get_dispute.rbi +52 -0
  49. data/rbi/dodopayments/models/integration_config.rbi +65 -3
  50. data/rbi/dodopayments/models/integration_config_response.rbi +64 -3
  51. data/rbi/dodopayments/models/license_key.rbi +9 -0
  52. data/rbi/dodopayments/models/license_key_list_params.rbi +5 -0
  53. data/rbi/dodopayments/models/payment.rbi +49 -6
  54. data/rbi/dodopayments/models/payment_create_response.rbi +4 -2
  55. data/rbi/dodopayments/models/payment_list_response.rbi +76 -0
  56. data/rbi/dodopayments/models/payouts/breakup/detail_list_response.rbi +10 -8
  57. data/rbi/dodopayments/models/payouts/breakup_retrieve_response.rbi +4 -4
  58. data/rbi/dodopayments/models/product.rbi +36 -0
  59. data/rbi/dodopayments/models/product_create_params.rbi +58 -4
  60. data/rbi/dodopayments/models/product_update_params.rbi +54 -0
  61. data/rbi/dodopayments/models/refund.rbi +8 -0
  62. data/rbi/dodopayments/models/subscription.rbi +12 -4
  63. data/rbi/dodopayments/models/subscription_list_response.rbi +4 -4
  64. data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +10 -0
  65. data/rbi/dodopayments/models/subscription_retrieve_usage_history_response.rbi +4 -2
  66. data/rbi/dodopayments/models/subscription_update_payment_method_params.rbi +40 -5
  67. data/rbi/dodopayments/models/webhook_payload.rbi +24 -0
  68. data/rbi/dodopayments/resources/products.rbi +14 -2
  69. data/sig/dodopayments/models/abandoned_checkout_detected_webhook_event.rbs +5 -0
  70. data/sig/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbs +5 -0
  71. data/sig/dodopayments/models/balance_ledger_entry.rbs +2 -0
  72. data/sig/dodopayments/models/balance_retrieve_ledger_params.rbs +2 -0
  73. data/sig/dodopayments/models/checkout_session_preview_response.rbs +5 -0
  74. data/sig/dodopayments/models/credit_balance_low_webhook_event.rbs +5 -0
  75. data/sig/dodopayments/models/credit_entitlements/credit_ledger_entry.rbs +5 -0
  76. data/sig/dodopayments/models/dispute_list_response.rbs +17 -0
  77. data/sig/dodopayments/models/dunning_recovered_webhook_event.rbs +5 -0
  78. data/sig/dodopayments/models/dunning_started_webhook_event.rbs +5 -0
  79. data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +10 -0
  80. data/sig/dodopayments/models/get_dispute.rbs +22 -0
  81. data/sig/dodopayments/models/integration_config.rbs +19 -3
  82. data/sig/dodopayments/models/integration_config_response.rbs +19 -3
  83. data/sig/dodopayments/models/license_key.rbs +7 -1
  84. data/sig/dodopayments/models/license_key_list_params.rbs +2 -1
  85. data/sig/dodopayments/models/payment.rbs +17 -0
  86. data/sig/dodopayments/models/payment_list_response.rbs +27 -0
  87. data/sig/dodopayments/models/product.rbs +16 -0
  88. data/sig/dodopayments/models/product_create_params.rbs +17 -1
  89. data/sig/dodopayments/models/product_update_params.rbs +16 -0
  90. data/sig/dodopayments/models/refund.rbs +5 -0
  91. data/sig/dodopayments/models/subscription.rbs +5 -0
  92. data/sig/dodopayments/models/subscription_update_payment_method_params.rbs +19 -4
  93. data/sig/dodopayments/models/webhook_payload.rbs +15 -0
  94. data/sig/dodopayments/resources/products.rbs +2 -0
  95. metadata +2 -2
@@ -141,6 +141,12 @@ module Dodopayments
141
141
  # @return [String]
142
142
  required :available_balance, String
143
143
 
144
+ # @!attribute brand_id
145
+ # Brand id this credit entitlement belongs to
146
+ #
147
+ # @return [String]
148
+ required :brand_id, String
149
+
144
150
  # @!attribute credit_entitlement_id
145
151
  #
146
152
  # @return [String]
@@ -181,15 +187,25 @@ module Dodopayments
181
187
  # @return [Integer]
182
188
  required :threshold_percent, Integer
183
189
 
184
- # @!method initialize(available_balance:, credit_entitlement_id:, credit_entitlement_name:, customer_id:, subscription_credits_amount:, subscription_id:, threshold_amount:, threshold_percent:, payload_type: :CreditBalanceLow)
190
+ # @!method initialize(available_balance:, brand_id:, credit_entitlement_id:, credit_entitlement_name:, customer_id:, subscription_credits_amount:, subscription_id:, threshold_amount:, threshold_percent:, payload_type: :CreditBalanceLow)
185
191
  # @param available_balance [String]
192
+ #
193
+ # @param brand_id [String] Brand id this credit entitlement belongs to
194
+ #
186
195
  # @param credit_entitlement_id [String]
196
+ #
187
197
  # @param credit_entitlement_name [String]
198
+ #
188
199
  # @param customer_id [String]
200
+ #
189
201
  # @param subscription_credits_amount [String]
202
+ #
190
203
  # @param subscription_id [String]
204
+ #
191
205
  # @param threshold_amount [String]
206
+ #
192
207
  # @param threshold_percent [Integer]
208
+ #
193
209
  # @param payload_type [Symbol, :CreditBalanceLow]
194
210
  end
195
211
 
@@ -205,6 +221,12 @@ module Dodopayments
205
221
  required :abandonment_reason,
206
222
  enum: -> { Dodopayments::WebhookPayload::Data::AbandonedCheckout::AbandonmentReason }
207
223
 
224
+ # @!attribute brand_id
225
+ # Brand id this abandoned checkout belongs to
226
+ #
227
+ # @return [String]
228
+ required :brand_id, String
229
+
208
230
  # @!attribute customer_id
209
231
  #
210
232
  # @return [String]
@@ -230,13 +252,21 @@ module Dodopayments
230
252
  # @return [String, nil]
231
253
  optional :recovered_payment_id, String, nil?: true
232
254
 
233
- # @!method initialize(abandoned_at:, abandonment_reason:, customer_id:, payment_id:, status:, recovered_payment_id: nil, payload_type: :AbandonedCheckout)
255
+ # @!method initialize(abandoned_at:, abandonment_reason:, brand_id:, customer_id:, payment_id:, status:, recovered_payment_id: nil, payload_type: :AbandonedCheckout)
234
256
  # @param abandoned_at [Time]
257
+ #
235
258
  # @param abandonment_reason [Symbol, Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout::AbandonmentReason]
259
+ #
260
+ # @param brand_id [String] Brand id this abandoned checkout belongs to
261
+ #
236
262
  # @param customer_id [String]
263
+ #
237
264
  # @param payment_id [String]
265
+ #
238
266
  # @param status [Symbol, Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout::Status]
267
+ #
239
268
  # @param recovered_payment_id [String, nil]
269
+ #
240
270
  # @param payload_type [Symbol, :AbandonedCheckout]
241
271
 
242
272
  # @see Dodopayments::Models::WebhookPayload::Data::AbandonedCheckout#abandonment_reason
@@ -266,6 +296,12 @@ module Dodopayments
266
296
  end
267
297
 
268
298
  class DunningAttempt < Dodopayments::Internal::Type::BaseModel
299
+ # @!attribute brand_id
300
+ # Brand id this dunning attempt belongs to
301
+ #
302
+ # @return [String]
303
+ required :brand_id, String
304
+
269
305
  # @!attribute created_at
270
306
  #
271
307
  # @return [Time]
@@ -301,13 +337,21 @@ module Dodopayments
301
337
  # @return [String, nil]
302
338
  optional :payment_id, String, nil?: true
303
339
 
304
- # @!method initialize(created_at:, customer_id:, status:, subscription_id:, trigger_state:, payment_id: nil, payload_type: :DunningAttempt)
340
+ # @!method initialize(brand_id:, created_at:, customer_id:, status:, subscription_id:, trigger_state:, payment_id: nil, payload_type: :DunningAttempt)
341
+ # @param brand_id [String] Brand id this dunning attempt belongs to
342
+ #
305
343
  # @param created_at [Time]
344
+ #
306
345
  # @param customer_id [String]
346
+ #
307
347
  # @param status [Symbol, Dodopayments::Models::WebhookPayload::Data::DunningAttempt::Status]
348
+ #
308
349
  # @param subscription_id [String]
350
+ #
309
351
  # @param trigger_state [Symbol, Dodopayments::Models::WebhookPayload::Data::DunningAttempt::TriggerState]
352
+ #
310
353
  # @param payment_id [String, nil]
354
+ #
311
355
  # @param payload_type [Symbol, :DunningAttempt]
312
356
 
313
357
  # @see Dodopayments::Models::WebhookPayload::Data::DunningAttempt#status
@@ -12,7 +12,7 @@ module Dodopayments
12
12
  # Some parameter documentations has been truncated, see
13
13
  # {Dodopayments::Models::ProductCreateParams} for more details.
14
14
  #
15
- # @overload create(name:, price:, tax_category:, addons: nil, brand_id: nil, credit_entitlements: nil, description: nil, digital_product_delivery: nil, entitlements: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, request_options: {})
15
+ # @overload create(name:, price:, tax_category:, addons: nil, brand_id: nil, credit_entitlements: nil, description: nil, digital_product_delivery: nil, entitlements: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, pricing_mode: nil, request_options: {})
16
16
  #
17
17
  # @param name [String] Name of the product
18
18
  #
@@ -24,13 +24,13 @@ module Dodopayments
24
24
  #
25
25
  # @param brand_id [String, nil] Brand id for the product, if not provided will default to primary brand
26
26
  #
27
- # @param credit_entitlements [Array<Dodopayments::Models::AttachCreditEntitlement>, nil] Optional credit entitlements to attach (max 3)
27
+ # @param credit_entitlements [Array<Dodopayments::Models::AttachCreditEntitlement>, nil] Optional credit entitlements to attach (max 5)
28
28
  #
29
29
  # @param description [String, nil] Optional description of the product
30
30
  #
31
31
  # @param digital_product_delivery [Dodopayments::Models::ProductCreateParams::DigitalProductDelivery, nil] Choose how you would like you digital product delivered
32
32
  #
33
- # @param entitlements [Array<Dodopayments::Models::AttachProductEntitlement>, nil] Optional entitlements to attach to this product (max 20)
33
+ # @param entitlements [Array<Dodopayments::Models::AttachProductEntitlement>, nil] Optional entitlements to attach to this product (max 50)
34
34
  #
35
35
  # @param license_key_activation_message [String, nil] Optional message displayed during license key activation
36
36
  #
@@ -42,6 +42,8 @@ module Dodopayments
42
42
  #
43
43
  # @param metadata [Hash{Symbol=>String}] Additional metadata for the product
44
44
  #
45
+ # @param pricing_mode [Symbol, Dodopayments::Models::ProductCreateParams::PricingMode, nil] Pricing mode for localized pricing. When set, rules from
46
+ #
45
47
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
46
48
  #
47
49
  # @return [Dodopayments::Models::Product]
@@ -79,7 +81,7 @@ module Dodopayments
79
81
  # Some parameter documentations has been truncated, see
80
82
  # {Dodopayments::Models::ProductUpdateParams} for more details.
81
83
  #
82
- # @overload update(id, addons: nil, brand_id: nil, credit_entitlements: nil, description: nil, digital_product_delivery: nil, entitlements: nil, image_id: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, name: nil, price: nil, tax_category: nil, request_options: {})
84
+ # @overload update(id, addons: nil, brand_id: nil, credit_entitlements: nil, description: nil, digital_product_delivery: nil, entitlements: nil, image_id: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, name: nil, price: nil, pricing_mode: nil, tax_category: nil, request_options: {})
83
85
  #
84
86
  # @param id [String]
85
87
  #
@@ -111,6 +113,8 @@ module Dodopayments
111
113
  #
112
114
  # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil] Price details of the product.
113
115
  #
116
+ # @param pricing_mode [Symbol, Dodopayments::Models::ProductUpdateParams::PricingMode, nil] Update the pricing mode. Omit to leave unchanged; set to null to clear
117
+ #
114
118
  # @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Tax category of the product.
115
119
  #
116
120
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dodopayments
4
- VERSION = "2.13.0"
4
+ VERSION = "2.15.0"
5
5
  end
@@ -90,6 +90,10 @@ module Dodopayments
90
90
  end
91
91
  attr_accessor :abandonment_reason
92
92
 
93
+ # Brand id this abandoned checkout belongs to
94
+ sig { returns(String) }
95
+ attr_accessor :brand_id
96
+
93
97
  sig { returns(String) }
94
98
  attr_accessor :customer_id
95
99
 
@@ -113,6 +117,7 @@ module Dodopayments
113
117
  abandoned_at: Time,
114
118
  abandonment_reason:
115
119
  Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Data::AbandonmentReason::OrSymbol,
120
+ brand_id: String,
116
121
  customer_id: String,
117
122
  payment_id: String,
118
123
  status:
@@ -123,6 +128,8 @@ module Dodopayments
123
128
  def self.new(
124
129
  abandoned_at:,
125
130
  abandonment_reason:,
131
+ # Brand id this abandoned checkout belongs to
132
+ brand_id:,
126
133
  customer_id:,
127
134
  payment_id:,
128
135
  status:,
@@ -136,6 +143,7 @@ module Dodopayments
136
143
  abandoned_at: Time,
137
144
  abandonment_reason:
138
145
  Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Data::AbandonmentReason::TaggedSymbol,
146
+ brand_id: String,
139
147
  customer_id: String,
140
148
  payment_id: String,
141
149
  status:
@@ -92,6 +92,10 @@ module Dodopayments
92
92
  end
93
93
  attr_accessor :abandonment_reason
94
94
 
95
+ # Brand id this abandoned checkout belongs to
96
+ sig { returns(String) }
97
+ attr_accessor :brand_id
98
+
95
99
  sig { returns(String) }
96
100
  attr_accessor :customer_id
97
101
 
@@ -115,6 +119,7 @@ module Dodopayments
115
119
  abandoned_at: Time,
116
120
  abandonment_reason:
117
121
  Dodopayments::AbandonedCheckoutRecoveredWebhookEvent::Data::AbandonmentReason::OrSymbol,
122
+ brand_id: String,
118
123
  customer_id: String,
119
124
  payment_id: String,
120
125
  status:
@@ -125,6 +130,8 @@ module Dodopayments
125
130
  def self.new(
126
131
  abandoned_at:,
127
132
  abandonment_reason:,
133
+ # Brand id this abandoned checkout belongs to
134
+ brand_id:,
128
135
  customer_id:,
129
136
  payment_id:,
130
137
  status:,
@@ -138,6 +145,7 @@ module Dodopayments
138
145
  abandoned_at: Time,
139
146
  abandonment_reason:
140
147
  Dodopayments::AbandonedCheckoutRecoveredWebhookEvent::Data::AbandonmentReason::TaggedSymbol,
148
+ brand_id: String,
141
149
  customer_id: String,
142
150
  payment_id: String,
143
151
  status:
@@ -212,6 +212,11 @@ module Dodopayments
212
212
  :payment_retry_fee,
213
213
  Dodopayments::BalanceLedgerEntry::EventType::TaggedSymbol
214
214
  )
215
+ BYOP_FEE =
216
+ T.let(
217
+ :byop_fee,
218
+ Dodopayments::BalanceLedgerEntry::EventType::TaggedSymbol
219
+ )
215
220
 
216
221
  sig do
217
222
  override.returns(
@@ -1010,6 +1010,11 @@ module Dodopayments
1010
1010
  :payment_retry_fee,
1011
1011
  Dodopayments::BalanceRetrieveLedgerParams::EventType::TaggedSymbol
1012
1012
  )
1013
+ BYOP_FEE =
1014
+ T.let(
1015
+ :byop_fee,
1016
+ Dodopayments::BalanceRetrieveLedgerParams::EventType::TaggedSymbol
1017
+ )
1013
1018
 
1014
1019
  sig do
1015
1020
  override.returns(
@@ -35,6 +35,13 @@ module Dodopayments
35
35
  end
36
36
  attr_writer :current_breakup
37
37
 
38
+ # Whether the payment will be routed through the merchant's own processor (BYOP).
39
+ # True when the session's business has a BYOP route configured for the billing
40
+ # country; in that case the quoted amounts exclude Dodo-computed tax because the
41
+ # merchant is MoR and owns tax.
42
+ sig { returns(T::Boolean) }
43
+ attr_accessor :is_byop
44
+
38
45
  # The total product cart
39
46
  sig do
40
47
  returns(
@@ -84,6 +91,7 @@ module Dodopayments
84
91
  currency: Dodopayments::Currency::OrSymbol,
85
92
  current_breakup:
86
93
  Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup::OrHash,
94
+ is_byop: T::Boolean,
87
95
  product_cart:
88
96
  T::Array[
89
97
  Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart::OrHash
@@ -104,6 +112,11 @@ module Dodopayments
104
112
  currency:,
105
113
  # Breakup of the current payment
106
114
  current_breakup:,
115
+ # Whether the payment will be routed through the merchant's own processor (BYOP).
116
+ # True when the session's business has a BYOP route configured for the billing
117
+ # country; in that case the quoted amounts exclude Dodo-computed tax because the
118
+ # merchant is MoR and owns tax.
119
+ is_byop:,
107
120
  # The total product cart
108
121
  product_cart:,
109
122
  # Total calculate price of the product cart
@@ -124,6 +137,7 @@ module Dodopayments
124
137
  currency: Dodopayments::Currency::TaggedSymbol,
125
138
  current_breakup:
126
139
  Dodopayments::Models::CheckoutSessionPreviewResponse::CurrentBreakup,
140
+ is_byop: T::Boolean,
127
141
  product_cart:
128
142
  T::Array[
129
143
  Dodopayments::Models::CheckoutSessionPreviewResponse::ProductCart
@@ -79,6 +79,10 @@ module Dodopayments
79
79
  sig { returns(String) }
80
80
  attr_accessor :available_balance
81
81
 
82
+ # Brand id this credit entitlement belongs to
83
+ sig { returns(String) }
84
+ attr_accessor :brand_id
85
+
82
86
  sig { returns(String) }
83
87
  attr_accessor :credit_entitlement_id
84
88
 
@@ -104,6 +108,7 @@ module Dodopayments
104
108
  sig do
105
109
  params(
106
110
  available_balance: String,
111
+ brand_id: String,
107
112
  credit_entitlement_id: String,
108
113
  credit_entitlement_name: String,
109
114
  customer_id: String,
@@ -115,6 +120,8 @@ module Dodopayments
115
120
  end
116
121
  def self.new(
117
122
  available_balance:,
123
+ # Brand id this credit entitlement belongs to
124
+ brand_id:,
118
125
  credit_entitlement_id:,
119
126
  credit_entitlement_name:,
120
127
  customer_id:,
@@ -129,6 +136,7 @@ module Dodopayments
129
136
  override.returns(
130
137
  {
131
138
  available_balance: String,
139
+ brand_id: String,
132
140
  credit_entitlement_id: String,
133
141
  credit_entitlement_name: String,
134
142
  customer_id: String,
@@ -24,6 +24,10 @@ module Dodopayments
24
24
  sig { returns(String) }
25
25
  attr_accessor :balance_before
26
26
 
27
+ # Brand id this credit ledger entry belongs to
28
+ sig { returns(String) }
29
+ attr_accessor :brand_id
30
+
27
31
  sig { returns(String) }
28
32
  attr_accessor :business_id
29
33
 
@@ -71,6 +75,7 @@ module Dodopayments
71
75
  amount: String,
72
76
  balance_after: String,
73
77
  balance_before: String,
78
+ brand_id: String,
74
79
  business_id: String,
75
80
  created_at: Time,
76
81
  credit_entitlement_id: String,
@@ -91,6 +96,8 @@ module Dodopayments
91
96
  amount:,
92
97
  balance_after:,
93
98
  balance_before:,
99
+ # Brand id this credit ledger entry belongs to
100
+ brand_id:,
94
101
  business_id:,
95
102
  created_at:,
96
103
  credit_entitlement_id:,
@@ -113,6 +120,7 @@ module Dodopayments
113
120
  amount: String,
114
121
  balance_after: String,
115
122
  balance_before: String,
123
+ brand_id: String,
116
124
  business_id: String,
117
125
  created_at: Time,
118
126
  credit_entitlement_id: String,
@@ -44,6 +44,16 @@ module Dodopayments
44
44
  sig { returns(String) }
45
45
  attr_accessor :payment_id
46
46
 
47
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
48
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
49
+ # processed itself.
50
+ sig do
51
+ returns(
52
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol
53
+ )
54
+ end
55
+ attr_accessor :payment_provider
56
+
47
57
  # Whether the dispute was resolved by Rapid Dispute Resolution
48
58
  sig { returns(T.nilable(T::Boolean)) }
49
59
  attr_accessor :is_resolved_by_rdr
@@ -58,6 +68,8 @@ module Dodopayments
58
68
  dispute_stage: Dodopayments::DisputeStage::OrSymbol,
59
69
  dispute_status: Dodopayments::DisputeStatus::OrSymbol,
60
70
  payment_id: String,
71
+ payment_provider:
72
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::OrSymbol,
61
73
  is_resolved_by_rdr: T.nilable(T::Boolean)
62
74
  ).returns(T.attached_class)
63
75
  end
@@ -79,6 +91,10 @@ module Dodopayments
79
91
  dispute_status:,
80
92
  # The unique identifier of the payment associated with the dispute.
81
93
  payment_id:,
94
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
95
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
96
+ # processed itself.
97
+ payment_provider:,
82
98
  # Whether the dispute was resolved by Rapid Dispute Resolution
83
99
  is_resolved_by_rdr: nil
84
100
  )
@@ -95,12 +111,56 @@ module Dodopayments
95
111
  dispute_stage: Dodopayments::DisputeStage::TaggedSymbol,
96
112
  dispute_status: Dodopayments::DisputeStatus::TaggedSymbol,
97
113
  payment_id: String,
114
+ payment_provider:
115
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol,
98
116
  is_resolved_by_rdr: T.nilable(T::Boolean)
99
117
  }
100
118
  )
101
119
  end
102
120
  def to_hash
103
121
  end
122
+
123
+ # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
124
+ # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
125
+ # processed itself.
126
+ module PaymentProvider
127
+ extend Dodopayments::Internal::Type::Enum
128
+
129
+ TaggedSymbol =
130
+ T.type_alias do
131
+ T.all(
132
+ Symbol,
133
+ Dodopayments::Models::DisputeListResponse::PaymentProvider
134
+ )
135
+ end
136
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
137
+
138
+ STRIPE =
139
+ T.let(
140
+ :stripe,
141
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol
142
+ )
143
+ ADYEN =
144
+ T.let(
145
+ :adyen,
146
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol
147
+ )
148
+ DODO =
149
+ T.let(
150
+ :dodo,
151
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol
152
+ )
153
+
154
+ sig do
155
+ override.returns(
156
+ T::Array[
157
+ Dodopayments::Models::DisputeListResponse::PaymentProvider::TaggedSymbol
158
+ ]
159
+ )
160
+ end
161
+ def self.values
162
+ end
163
+ end
104
164
  end
105
165
  end
106
166
  end
@@ -76,6 +76,10 @@ module Dodopayments
76
76
  )
77
77
  end
78
78
 
79
+ # Brand id this dunning attempt belongs to
80
+ sig { returns(String) }
81
+ attr_accessor :brand_id
82
+
79
83
  sig { returns(Time) }
80
84
  attr_accessor :created_at
81
85
 
@@ -105,6 +109,7 @@ module Dodopayments
105
109
  # Webhook payload for dunning.started and dunning.recovered events
106
110
  sig do
107
111
  params(
112
+ brand_id: String,
108
113
  created_at: Time,
109
114
  customer_id: String,
110
115
  status:
@@ -116,6 +121,8 @@ module Dodopayments
116
121
  ).returns(T.attached_class)
117
122
  end
118
123
  def self.new(
124
+ # Brand id this dunning attempt belongs to
125
+ brand_id:,
119
126
  created_at:,
120
127
  customer_id:,
121
128
  status:,
@@ -128,6 +135,7 @@ module Dodopayments
128
135
  sig do
129
136
  override.returns(
130
137
  {
138
+ brand_id: String,
131
139
  created_at: Time,
132
140
  customer_id: String,
133
141
  status:
@@ -76,6 +76,10 @@ module Dodopayments
76
76
  )
77
77
  end
78
78
 
79
+ # Brand id this dunning attempt belongs to
80
+ sig { returns(String) }
81
+ attr_accessor :brand_id
82
+
79
83
  sig { returns(Time) }
80
84
  attr_accessor :created_at
81
85
 
@@ -105,6 +109,7 @@ module Dodopayments
105
109
  # Webhook payload for dunning.started and dunning.recovered events
106
110
  sig do
107
111
  params(
112
+ brand_id: String,
108
113
  created_at: Time,
109
114
  customer_id: String,
110
115
  status:
@@ -116,6 +121,8 @@ module Dodopayments
116
121
  ).returns(T.attached_class)
117
122
  end
118
123
  def self.new(
124
+ # Brand id this dunning attempt belongs to
125
+ brand_id:,
119
126
  created_at:,
120
127
  customer_id:,
121
128
  status:,
@@ -128,6 +135,7 @@ module Dodopayments
128
135
  sig do
129
136
  override.returns(
130
137
  {
138
+ brand_id: String,
131
139
  created_at: Time,
132
140
  customer_id: String,
133
141
  status:
@@ -18,6 +18,10 @@ module Dodopayments
18
18
  sig { returns(String) }
19
19
  attr_accessor :id
20
20
 
21
+ # Brand id this grant belongs to.
22
+ sig { returns(String) }
23
+ attr_accessor :brand_id
24
+
21
25
  # Identifier of the business that owns the grant.
22
26
  sig { returns(String) }
23
27
  attr_accessor :business_id
@@ -34,6 +38,10 @@ module Dodopayments
34
38
  sig { returns(String) }
35
39
  attr_accessor :entitlement_id
36
40
 
41
+ # The integration type of the grant's entitlement (e.g. `license_key`).
42
+ sig { returns(Dodopayments::EntitlementIntegrationType::TaggedSymbol) }
43
+ attr_accessor :integration_type
44
+
37
45
  # Arbitrary key-value metadata recorded on the grant.
38
46
  sig { returns(T::Hash[Symbol, String]) }
39
47
  attr_accessor :metadata
@@ -119,10 +127,13 @@ module Dodopayments
119
127
  sig do
120
128
  params(
121
129
  id: String,
130
+ brand_id: String,
122
131
  business_id: String,
123
132
  created_at: Time,
124
133
  customer_id: String,
125
134
  entitlement_id: String,
135
+ integration_type:
136
+ Dodopayments::EntitlementIntegrationType::OrSymbol,
126
137
  metadata: T::Hash[Symbol, String],
127
138
  status:
128
139
  Dodopayments::Entitlements::EntitlementGrant::Status::OrSymbol,
@@ -145,6 +156,8 @@ module Dodopayments
145
156
  def self.new(
146
157
  # Unique identifier of the grant.
147
158
  id:,
159
+ # Brand id this grant belongs to.
160
+ brand_id:,
148
161
  # Identifier of the business that owns the grant.
149
162
  business_id:,
150
163
  # Timestamp when the grant was created.
@@ -153,6 +166,8 @@ module Dodopayments
153
166
  customer_id:,
154
167
  # Identifier of the entitlement this grant was issued from.
155
168
  entitlement_id:,
169
+ # The integration type of the grant's entitlement (e.g. `license_key`).
170
+ integration_type:,
156
171
  # Arbitrary key-value metadata recorded on the grant.
157
172
  metadata:,
158
173
  # Lifecycle status of the grant.
@@ -192,10 +207,13 @@ module Dodopayments
192
207
  override.returns(
193
208
  {
194
209
  id: String,
210
+ brand_id: String,
195
211
  business_id: String,
196
212
  created_at: Time,
197
213
  customer_id: String,
198
214
  entitlement_id: String,
215
+ integration_type:
216
+ Dodopayments::EntitlementIntegrationType::TaggedSymbol,
199
217
  metadata: T::Hash[Symbol, String],
200
218
  status:
201
219
  Dodopayments::Entitlements::EntitlementGrant::Status::TaggedSymbol,