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
@@ -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
@@ -6,14 +6,12 @@ module Dodopayments
6
6
  class Grants
7
7
  # GET /entitlements/{id}/grants (public API)
8
8
  #
9
- # @overload list(id, customer_id: nil, integration_type: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
9
+ # @overload list(id, customer_id: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
10
10
  #
11
11
  # @param id [String] Entitlement ID
12
12
  #
13
13
  # @param customer_id [String] Filter by customer ID
14
14
  #
15
- # @param integration_type [Symbol, Dodopayments::Models::Entitlements::GrantListParams::IntegrationType] Filter by integration type
16
- #
17
15
  # @param page_number [Integer] Page number (default 0)
18
16
  #
19
17
  # @param page_size [Integer] Page size (default 10, max 100)
@@ -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.14.0"
4
+ VERSION = "2.16.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:
@@ -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,
@@ -85,7 +85,7 @@ module Dodopayments
85
85
  sig { returns(T.nilable(Time)) }
86
86
  attr_accessor :last_used_at
87
87
 
88
- # All supported payment method types (from Hyperswitch).
88
+ # All supported payment method types.
89
89
  #
90
90
  # Used for disabled-payment-methods filtering and validation.
91
91
  sig do
@@ -116,7 +116,7 @@ module Dodopayments
116
116
  payment_method_id:,
117
117
  card: nil,
118
118
  last_used_at: nil,
119
- # All supported payment method types (from Hyperswitch).
119
+ # All supported payment method types.
120
120
  #
121
121
  # Used for disabled-payment-methods filtering and validation.
122
122
  payment_method_type: nil,
@@ -45,7 +45,7 @@ module Dodopayments
45
45
  attr_accessor :payment_id
46
46
 
47
47
  # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
48
- # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
48
+ # routes (the merchant's own payment connector); `dodo` for everything Dodo
49
49
  # processed itself.
50
50
  sig do
51
51
  returns(
@@ -92,7 +92,7 @@ module Dodopayments
92
92
  # The unique identifier of the payment associated with the dispute.
93
93
  payment_id:,
94
94
  # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
95
- # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
95
+ # routes (the merchant's own payment connector); `dodo` for everything Dodo
96
96
  # processed itself.
97
97
  payment_provider:,
98
98
  # Whether the dispute was resolved by Rapid Dispute Resolution
@@ -121,7 +121,7 @@ module Dodopayments
121
121
  end
122
122
 
123
123
  # Which processor handled the underlying payment. `stripe` / `adyen` for BYOP
124
- # routes (the merchant's own Hyperswitch connector); `dodo` for everything Dodo
124
+ # routes (the merchant's own payment connector); `dodo` for everything Dodo
125
125
  # processed itself.
126
126
  module PaymentProvider
127
127
  extend Dodopayments::Internal::Type::Enum
@@ -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
@@ -123,6 +127,7 @@ module Dodopayments
123
127
  sig do
124
128
  params(
125
129
  id: String,
130
+ brand_id: String,
126
131
  business_id: String,
127
132
  created_at: Time,
128
133
  customer_id: String,
@@ -151,6 +156,8 @@ module Dodopayments
151
156
  def self.new(
152
157
  # Unique identifier of the grant.
153
158
  id:,
159
+ # Brand id this grant belongs to.
160
+ brand_id:,
154
161
  # Identifier of the business that owns the grant.
155
162
  business_id:,
156
163
  # Timestamp when the grant was created.
@@ -200,6 +207,7 @@ module Dodopayments
200
207
  override.returns(
201
208
  {
202
209
  id: String,
210
+ brand_id: String,
203
211
  business_id: String,
204
212
  created_at: Time,
205
213
  customer_id: String,
@@ -25,24 +25,6 @@ module Dodopayments
25
25
  sig { params(customer_id: String).void }
26
26
  attr_writer :customer_id
27
27
 
28
- # Filter by integration type
29
- sig do
30
- returns(
31
- T.nilable(
32
- Dodopayments::Entitlements::GrantListParams::IntegrationType::OrSymbol
33
- )
34
- )
35
- end
36
- attr_reader :integration_type
37
-
38
- sig do
39
- params(
40
- integration_type:
41
- Dodopayments::Entitlements::GrantListParams::IntegrationType::OrSymbol
42
- ).void
43
- end
44
- attr_writer :integration_type
45
-
46
28
  # Page number (default 0)
47
29
  sig { returns(T.nilable(Integer)) }
48
30
  attr_reader :page_number
@@ -79,8 +61,6 @@ module Dodopayments
79
61
  params(
80
62
  id: String,
81
63
  customer_id: String,
82
- integration_type:
83
- Dodopayments::Entitlements::GrantListParams::IntegrationType::OrSymbol,
84
64
  page_number: Integer,
85
65
  page_size: Integer,
86
66
  status:
@@ -92,8 +72,6 @@ module Dodopayments
92
72
  id:,
93
73
  # Filter by customer ID
94
74
  customer_id: nil,
95
- # Filter by integration type
96
- integration_type: nil,
97
75
  # Page number (default 0)
98
76
  page_number: nil,
99
77
  # Page size (default 10, max 100)
@@ -109,8 +87,6 @@ module Dodopayments
109
87
  {
110
88
  id: String,
111
89
  customer_id: String,
112
- integration_type:
113
- Dodopayments::Entitlements::GrantListParams::IntegrationType::OrSymbol,
114
90
  page_number: Integer,
115
91
  page_size: Integer,
116
92
  status:
@@ -122,71 +98,6 @@ module Dodopayments
122
98
  def to_hash
123
99
  end
124
100
 
125
- # Filter by integration type
126
- module IntegrationType
127
- extend Dodopayments::Internal::Type::Enum
128
-
129
- TaggedSymbol =
130
- T.type_alias do
131
- T.all(
132
- Symbol,
133
- Dodopayments::Entitlements::GrantListParams::IntegrationType
134
- )
135
- end
136
- OrSymbol = T.type_alias { T.any(Symbol, String) }
137
-
138
- DISCORD =
139
- T.let(
140
- :discord,
141
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
142
- )
143
- TELEGRAM =
144
- T.let(
145
- :telegram,
146
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
147
- )
148
- GITHUB =
149
- T.let(
150
- :github,
151
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
152
- )
153
- FIGMA =
154
- T.let(
155
- :figma,
156
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
157
- )
158
- FRAMER =
159
- T.let(
160
- :framer,
161
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
162
- )
163
- NOTION =
164
- T.let(
165
- :notion,
166
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
167
- )
168
- DIGITAL_FILES =
169
- T.let(
170
- :digital_files,
171
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
172
- )
173
- LICENSE_KEY =
174
- T.let(
175
- :license_key,
176
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
177
- )
178
-
179
- sig do
180
- override.returns(
181
- T::Array[
182
- Dodopayments::Entitlements::GrantListParams::IntegrationType::TaggedSymbol
183
- ]
184
- )
185
- end
186
- def self.values
187
- end
188
- end
189
-
190
101
  # Filter by grant status
191
102
  module Status
192
103
  extend Dodopayments::Internal::Type::Enum