dodopayments 2.11.1 → 2.12.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +1 -1
- data/lib/dodopayments/models/balance_ledger_entry.rb +1 -0
- data/lib/dodopayments/models/balance_retrieve_ledger_params.rb +1 -0
- data/lib/dodopayments/models/discount.rb +4 -8
- data/lib/dodopayments/models/discount_create_params.rb +5 -9
- data/lib/dodopayments/models/discount_detail.rb +2 -2
- data/lib/dodopayments/models/discount_list_params.rb +2 -2
- data/lib/dodopayments/models/discount_update_params.rb +5 -8
- data/lib/dodopayments/models/payment.rb +11 -1
- data/lib/dodopayments/models/product_collection.rb +131 -1
- data/lib/dodopayments/models/product_collection_create_params.rb +123 -1
- data/lib/dodopayments/models/product_collection_update_params.rb +123 -1
- data/lib/dodopayments/resources/discounts.rb +5 -5
- data/lib/dodopayments/resources/product_collections.rb +28 -2
- data/lib/dodopayments/version.rb +1 -1
- data/rbi/dodopayments/models/balance_ledger_entry.rbi +5 -0
- data/rbi/dodopayments/models/balance_retrieve_ledger_params.rbi +5 -0
- data/rbi/dodopayments/models/discount.rbi +4 -12
- data/rbi/dodopayments/models/discount_create_params.rbi +6 -14
- data/rbi/dodopayments/models/discount_detail.rbi +2 -2
- data/rbi/dodopayments/models/discount_list_params.rbi +2 -2
- data/rbi/dodopayments/models/discount_update_params.rbi +6 -12
- data/rbi/dodopayments/models/payment.rbi +12 -0
- data/rbi/dodopayments/models/product_collection.rbi +307 -3
- data/rbi/dodopayments/models/product_collection_create_params.rbi +310 -0
- data/rbi/dodopayments/models/product_collection_update_params.rbi +310 -0
- data/rbi/dodopayments/resources/discounts.rbi +7 -14
- data/rbi/dodopayments/resources/product_collections.rbi +70 -0
- data/sig/dodopayments/models/balance_ledger_entry.rbs +2 -0
- data/sig/dodopayments/models/balance_retrieve_ledger_params.rbs +2 -0
- data/sig/dodopayments/models/payment.rbs +5 -0
- data/sig/dodopayments/models/product_collection.rbs +95 -3
- data/sig/dodopayments/models/product_collection_create_params.rbs +93 -1
- data/sig/dodopayments/models/product_collection_update_params.rbs +93 -1
- data/sig/dodopayments/resources/product_collections.rbs +10 -0
- metadata +1 -1
|
@@ -25,6 +25,28 @@ module Dodopayments
|
|
|
25
25
|
sig { returns(T.nilable(String)) }
|
|
26
26
|
attr_accessor :description
|
|
27
27
|
|
|
28
|
+
# Effective_at setting for downgrades: Some(Some(val)) = set, Some(None) = clear
|
|
29
|
+
# (inherit), None = no change
|
|
30
|
+
sig do
|
|
31
|
+
returns(
|
|
32
|
+
T.nilable(
|
|
33
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnDowngrade::OrSymbol
|
|
34
|
+
)
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
attr_accessor :effective_at_on_downgrade
|
|
38
|
+
|
|
39
|
+
# Effective_at setting for upgrades: Some(Some(val)) = set, Some(None) = clear
|
|
40
|
+
# (inherit), None = no change
|
|
41
|
+
sig do
|
|
42
|
+
returns(
|
|
43
|
+
T.nilable(
|
|
44
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnUpgrade::OrSymbol
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
end
|
|
48
|
+
attr_accessor :effective_at_on_upgrade
|
|
49
|
+
|
|
28
50
|
# Optional new order for groups (array of group UUIDs in desired order)
|
|
29
51
|
sig { returns(T.nilable(T::Array[String])) }
|
|
30
52
|
attr_accessor :group_order
|
|
@@ -37,14 +59,67 @@ module Dodopayments
|
|
|
37
59
|
sig { returns(T.nilable(String)) }
|
|
38
60
|
attr_accessor :name
|
|
39
61
|
|
|
62
|
+
# On payment failure behavior: Some(Some(val)) = set, Some(None) = clear
|
|
63
|
+
# (inherit), None = no change
|
|
64
|
+
sig do
|
|
65
|
+
returns(
|
|
66
|
+
T.nilable(
|
|
67
|
+
Dodopayments::ProductCollectionUpdateParams::OnPaymentFailure::OrSymbol
|
|
68
|
+
)
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
attr_accessor :on_payment_failure
|
|
72
|
+
|
|
73
|
+
# Proration billing mode for downgrades: Some(Some(val)) = set, Some(None) = clear
|
|
74
|
+
# (inherit), None = no change
|
|
75
|
+
sig do
|
|
76
|
+
returns(
|
|
77
|
+
T.nilable(
|
|
78
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnDowngrade::OrSymbol
|
|
79
|
+
)
|
|
80
|
+
)
|
|
81
|
+
end
|
|
82
|
+
attr_accessor :proration_billing_mode_on_downgrade
|
|
83
|
+
|
|
84
|
+
# Proration billing mode for upgrades: Some(Some(val)) = set, Some(None) = clear
|
|
85
|
+
# (inherit), None = no change
|
|
86
|
+
sig do
|
|
87
|
+
returns(
|
|
88
|
+
T.nilable(
|
|
89
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnUpgrade::OrSymbol
|
|
90
|
+
)
|
|
91
|
+
)
|
|
92
|
+
end
|
|
93
|
+
attr_accessor :proration_billing_mode_on_upgrade
|
|
94
|
+
|
|
40
95
|
sig do
|
|
41
96
|
params(
|
|
42
97
|
id: String,
|
|
43
98
|
brand_id: T.nilable(String),
|
|
44
99
|
description: T.nilable(String),
|
|
100
|
+
effective_at_on_downgrade:
|
|
101
|
+
T.nilable(
|
|
102
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnDowngrade::OrSymbol
|
|
103
|
+
),
|
|
104
|
+
effective_at_on_upgrade:
|
|
105
|
+
T.nilable(
|
|
106
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnUpgrade::OrSymbol
|
|
107
|
+
),
|
|
45
108
|
group_order: T.nilable(T::Array[String]),
|
|
46
109
|
image_id: T.nilable(String),
|
|
47
110
|
name: T.nilable(String),
|
|
111
|
+
on_payment_failure:
|
|
112
|
+
T.nilable(
|
|
113
|
+
Dodopayments::ProductCollectionUpdateParams::OnPaymentFailure::OrSymbol
|
|
114
|
+
),
|
|
115
|
+
proration_billing_mode_on_downgrade:
|
|
116
|
+
T.nilable(
|
|
117
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnDowngrade::OrSymbol
|
|
118
|
+
),
|
|
119
|
+
proration_billing_mode_on_upgrade:
|
|
120
|
+
T.nilable(
|
|
121
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnUpgrade::OrSymbol
|
|
122
|
+
),
|
|
48
123
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
49
124
|
).returns(T.attached_class)
|
|
50
125
|
end
|
|
@@ -54,12 +129,27 @@ module Dodopayments
|
|
|
54
129
|
brand_id: nil,
|
|
55
130
|
# Optional description update - pass null to remove, omit to keep unchanged
|
|
56
131
|
description: nil,
|
|
132
|
+
# Effective_at setting for downgrades: Some(Some(val)) = set, Some(None) = clear
|
|
133
|
+
# (inherit), None = no change
|
|
134
|
+
effective_at_on_downgrade: nil,
|
|
135
|
+
# Effective_at setting for upgrades: Some(Some(val)) = set, Some(None) = clear
|
|
136
|
+
# (inherit), None = no change
|
|
137
|
+
effective_at_on_upgrade: nil,
|
|
57
138
|
# Optional new order for groups (array of group UUIDs in desired order)
|
|
58
139
|
group_order: nil,
|
|
59
140
|
# Optional image update - pass null to remove, omit to keep unchanged
|
|
60
141
|
image_id: nil,
|
|
61
142
|
# Optional new name for the collection
|
|
62
143
|
name: nil,
|
|
144
|
+
# On payment failure behavior: Some(Some(val)) = set, Some(None) = clear
|
|
145
|
+
# (inherit), None = no change
|
|
146
|
+
on_payment_failure: nil,
|
|
147
|
+
# Proration billing mode for downgrades: Some(Some(val)) = set, Some(None) = clear
|
|
148
|
+
# (inherit), None = no change
|
|
149
|
+
proration_billing_mode_on_downgrade: nil,
|
|
150
|
+
# Proration billing mode for upgrades: Some(Some(val)) = set, Some(None) = clear
|
|
151
|
+
# (inherit), None = no change
|
|
152
|
+
proration_billing_mode_on_upgrade: nil,
|
|
63
153
|
request_options: {}
|
|
64
154
|
)
|
|
65
155
|
end
|
|
@@ -70,15 +160,235 @@ module Dodopayments
|
|
|
70
160
|
id: String,
|
|
71
161
|
brand_id: T.nilable(String),
|
|
72
162
|
description: T.nilable(String),
|
|
163
|
+
effective_at_on_downgrade:
|
|
164
|
+
T.nilable(
|
|
165
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnDowngrade::OrSymbol
|
|
166
|
+
),
|
|
167
|
+
effective_at_on_upgrade:
|
|
168
|
+
T.nilable(
|
|
169
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnUpgrade::OrSymbol
|
|
170
|
+
),
|
|
73
171
|
group_order: T.nilable(T::Array[String]),
|
|
74
172
|
image_id: T.nilable(String),
|
|
75
173
|
name: T.nilable(String),
|
|
174
|
+
on_payment_failure:
|
|
175
|
+
T.nilable(
|
|
176
|
+
Dodopayments::ProductCollectionUpdateParams::OnPaymentFailure::OrSymbol
|
|
177
|
+
),
|
|
178
|
+
proration_billing_mode_on_downgrade:
|
|
179
|
+
T.nilable(
|
|
180
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnDowngrade::OrSymbol
|
|
181
|
+
),
|
|
182
|
+
proration_billing_mode_on_upgrade:
|
|
183
|
+
T.nilable(
|
|
184
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnUpgrade::OrSymbol
|
|
185
|
+
),
|
|
76
186
|
request_options: Dodopayments::RequestOptions
|
|
77
187
|
}
|
|
78
188
|
)
|
|
79
189
|
end
|
|
80
190
|
def to_hash
|
|
81
191
|
end
|
|
192
|
+
|
|
193
|
+
# Effective_at setting for downgrades: Some(Some(val)) = set, Some(None) = clear
|
|
194
|
+
# (inherit), None = no change
|
|
195
|
+
module EffectiveAtOnDowngrade
|
|
196
|
+
extend Dodopayments::Internal::Type::Enum
|
|
197
|
+
|
|
198
|
+
TaggedSymbol =
|
|
199
|
+
T.type_alias do
|
|
200
|
+
T.all(
|
|
201
|
+
Symbol,
|
|
202
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnDowngrade
|
|
203
|
+
)
|
|
204
|
+
end
|
|
205
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
206
|
+
|
|
207
|
+
IMMEDIATELY =
|
|
208
|
+
T.let(
|
|
209
|
+
:immediately,
|
|
210
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnDowngrade::TaggedSymbol
|
|
211
|
+
)
|
|
212
|
+
NEXT_BILLING_DATE =
|
|
213
|
+
T.let(
|
|
214
|
+
:next_billing_date,
|
|
215
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnDowngrade::TaggedSymbol
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
sig do
|
|
219
|
+
override.returns(
|
|
220
|
+
T::Array[
|
|
221
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnDowngrade::TaggedSymbol
|
|
222
|
+
]
|
|
223
|
+
)
|
|
224
|
+
end
|
|
225
|
+
def self.values
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Effective_at setting for upgrades: Some(Some(val)) = set, Some(None) = clear
|
|
230
|
+
# (inherit), None = no change
|
|
231
|
+
module EffectiveAtOnUpgrade
|
|
232
|
+
extend Dodopayments::Internal::Type::Enum
|
|
233
|
+
|
|
234
|
+
TaggedSymbol =
|
|
235
|
+
T.type_alias do
|
|
236
|
+
T.all(
|
|
237
|
+
Symbol,
|
|
238
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnUpgrade
|
|
239
|
+
)
|
|
240
|
+
end
|
|
241
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
242
|
+
|
|
243
|
+
IMMEDIATELY =
|
|
244
|
+
T.let(
|
|
245
|
+
:immediately,
|
|
246
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnUpgrade::TaggedSymbol
|
|
247
|
+
)
|
|
248
|
+
NEXT_BILLING_DATE =
|
|
249
|
+
T.let(
|
|
250
|
+
:next_billing_date,
|
|
251
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnUpgrade::TaggedSymbol
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
sig do
|
|
255
|
+
override.returns(
|
|
256
|
+
T::Array[
|
|
257
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnUpgrade::TaggedSymbol
|
|
258
|
+
]
|
|
259
|
+
)
|
|
260
|
+
end
|
|
261
|
+
def self.values
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# On payment failure behavior: Some(Some(val)) = set, Some(None) = clear
|
|
266
|
+
# (inherit), None = no change
|
|
267
|
+
module OnPaymentFailure
|
|
268
|
+
extend Dodopayments::Internal::Type::Enum
|
|
269
|
+
|
|
270
|
+
TaggedSymbol =
|
|
271
|
+
T.type_alias do
|
|
272
|
+
T.all(
|
|
273
|
+
Symbol,
|
|
274
|
+
Dodopayments::ProductCollectionUpdateParams::OnPaymentFailure
|
|
275
|
+
)
|
|
276
|
+
end
|
|
277
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
278
|
+
|
|
279
|
+
PREVENT_CHANGE =
|
|
280
|
+
T.let(
|
|
281
|
+
:prevent_change,
|
|
282
|
+
Dodopayments::ProductCollectionUpdateParams::OnPaymentFailure::TaggedSymbol
|
|
283
|
+
)
|
|
284
|
+
APPLY_CHANGE =
|
|
285
|
+
T.let(
|
|
286
|
+
:apply_change,
|
|
287
|
+
Dodopayments::ProductCollectionUpdateParams::OnPaymentFailure::TaggedSymbol
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
sig do
|
|
291
|
+
override.returns(
|
|
292
|
+
T::Array[
|
|
293
|
+
Dodopayments::ProductCollectionUpdateParams::OnPaymentFailure::TaggedSymbol
|
|
294
|
+
]
|
|
295
|
+
)
|
|
296
|
+
end
|
|
297
|
+
def self.values
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Proration billing mode for downgrades: Some(Some(val)) = set, Some(None) = clear
|
|
302
|
+
# (inherit), None = no change
|
|
303
|
+
module ProrationBillingModeOnDowngrade
|
|
304
|
+
extend Dodopayments::Internal::Type::Enum
|
|
305
|
+
|
|
306
|
+
TaggedSymbol =
|
|
307
|
+
T.type_alias do
|
|
308
|
+
T.all(
|
|
309
|
+
Symbol,
|
|
310
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnDowngrade
|
|
311
|
+
)
|
|
312
|
+
end
|
|
313
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
314
|
+
|
|
315
|
+
PRORATED_IMMEDIATELY =
|
|
316
|
+
T.let(
|
|
317
|
+
:prorated_immediately,
|
|
318
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnDowngrade::TaggedSymbol
|
|
319
|
+
)
|
|
320
|
+
FULL_IMMEDIATELY =
|
|
321
|
+
T.let(
|
|
322
|
+
:full_immediately,
|
|
323
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnDowngrade::TaggedSymbol
|
|
324
|
+
)
|
|
325
|
+
DIFFERENCE_IMMEDIATELY =
|
|
326
|
+
T.let(
|
|
327
|
+
:difference_immediately,
|
|
328
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnDowngrade::TaggedSymbol
|
|
329
|
+
)
|
|
330
|
+
DO_NOT_BILL =
|
|
331
|
+
T.let(
|
|
332
|
+
:do_not_bill,
|
|
333
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnDowngrade::TaggedSymbol
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
sig do
|
|
337
|
+
override.returns(
|
|
338
|
+
T::Array[
|
|
339
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnDowngrade::TaggedSymbol
|
|
340
|
+
]
|
|
341
|
+
)
|
|
342
|
+
end
|
|
343
|
+
def self.values
|
|
344
|
+
end
|
|
345
|
+
end
|
|
346
|
+
|
|
347
|
+
# Proration billing mode for upgrades: Some(Some(val)) = set, Some(None) = clear
|
|
348
|
+
# (inherit), None = no change
|
|
349
|
+
module ProrationBillingModeOnUpgrade
|
|
350
|
+
extend Dodopayments::Internal::Type::Enum
|
|
351
|
+
|
|
352
|
+
TaggedSymbol =
|
|
353
|
+
T.type_alias do
|
|
354
|
+
T.all(
|
|
355
|
+
Symbol,
|
|
356
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnUpgrade
|
|
357
|
+
)
|
|
358
|
+
end
|
|
359
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
360
|
+
|
|
361
|
+
PRORATED_IMMEDIATELY =
|
|
362
|
+
T.let(
|
|
363
|
+
:prorated_immediately,
|
|
364
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnUpgrade::TaggedSymbol
|
|
365
|
+
)
|
|
366
|
+
FULL_IMMEDIATELY =
|
|
367
|
+
T.let(
|
|
368
|
+
:full_immediately,
|
|
369
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnUpgrade::TaggedSymbol
|
|
370
|
+
)
|
|
371
|
+
DIFFERENCE_IMMEDIATELY =
|
|
372
|
+
T.let(
|
|
373
|
+
:difference_immediately,
|
|
374
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnUpgrade::TaggedSymbol
|
|
375
|
+
)
|
|
376
|
+
DO_NOT_BILL =
|
|
377
|
+
T.let(
|
|
378
|
+
:do_not_bill,
|
|
379
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnUpgrade::TaggedSymbol
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
sig do
|
|
383
|
+
override.returns(
|
|
384
|
+
T::Array[
|
|
385
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnUpgrade::TaggedSymbol
|
|
386
|
+
]
|
|
387
|
+
)
|
|
388
|
+
end
|
|
389
|
+
def self.values
|
|
390
|
+
end
|
|
391
|
+
end
|
|
82
392
|
end
|
|
83
393
|
end
|
|
84
394
|
end
|
|
@@ -21,16 +21,12 @@ module Dodopayments
|
|
|
21
21
|
).returns(Dodopayments::Discount)
|
|
22
22
|
end
|
|
23
23
|
def create(
|
|
24
|
-
# The discount amount.
|
|
25
|
-
#
|
|
26
|
-
# - If `discount_type` is **not** `percentage`, `amount` is in **USD cents**. For
|
|
27
|
-
# example, `100` means `$1.00`. Only USD is allowed.
|
|
28
|
-
# - If `discount_type` **is** `percentage`, `amount` is in **basis points**. For
|
|
29
|
-
# example, `540` means `5.4%`.
|
|
24
|
+
# The discount amount in **basis points** (e.g. `540` means `5.4%`, `10000` means
|
|
25
|
+
# `100%`).
|
|
30
26
|
#
|
|
31
27
|
# Must be at least 1.
|
|
32
28
|
amount:,
|
|
33
|
-
# The discount type
|
|
29
|
+
# The discount type. Currently only `percentage` is supported.
|
|
34
30
|
type:,
|
|
35
31
|
# Optionally supply a code (will be uppercased).
|
|
36
32
|
#
|
|
@@ -91,11 +87,8 @@ module Dodopayments
|
|
|
91
87
|
def update(
|
|
92
88
|
# Discount Id
|
|
93
89
|
discount_id,
|
|
94
|
-
# If present, update the discount amount
|
|
95
|
-
#
|
|
96
|
-
# - If `discount_type` is `percentage`, this represents **basis points** (e.g.,
|
|
97
|
-
# `540` = `5.4%`).
|
|
98
|
-
# - Otherwise, this represents **USD cents** (e.g., `100` = `$1.00`).
|
|
90
|
+
# If present, update the discount amount in **basis points** (e.g., `540` =
|
|
91
|
+
# `5.4%`, `10000` = `100%`).
|
|
99
92
|
#
|
|
100
93
|
# Must be at least 1 if provided.
|
|
101
94
|
amount: nil,
|
|
@@ -115,7 +108,7 @@ module Dodopayments
|
|
|
115
108
|
# provided, the discount will be applied indefinitely to all recurring payments
|
|
116
109
|
# related to the subscription.
|
|
117
110
|
subscription_cycles: nil,
|
|
118
|
-
# If present, update the discount type.
|
|
111
|
+
# If present, update the discount type. Currently only `percentage` is supported.
|
|
119
112
|
type: nil,
|
|
120
113
|
usage_limit: nil,
|
|
121
114
|
request_options: {}
|
|
@@ -143,7 +136,7 @@ module Dodopayments
|
|
|
143
136
|
active: nil,
|
|
144
137
|
# Filter by discount code (partial match, case-insensitive)
|
|
145
138
|
code: nil,
|
|
146
|
-
# Filter by discount type
|
|
139
|
+
# Filter by discount type
|
|
147
140
|
discount_type: nil,
|
|
148
141
|
# Page number (default = 0).
|
|
149
142
|
page_number: nil,
|
|
@@ -15,6 +15,26 @@ module Dodopayments
|
|
|
15
15
|
name: String,
|
|
16
16
|
brand_id: T.nilable(String),
|
|
17
17
|
description: T.nilable(String),
|
|
18
|
+
effective_at_on_downgrade:
|
|
19
|
+
T.nilable(
|
|
20
|
+
Dodopayments::ProductCollectionCreateParams::EffectiveAtOnDowngrade::OrSymbol
|
|
21
|
+
),
|
|
22
|
+
effective_at_on_upgrade:
|
|
23
|
+
T.nilable(
|
|
24
|
+
Dodopayments::ProductCollectionCreateParams::EffectiveAtOnUpgrade::OrSymbol
|
|
25
|
+
),
|
|
26
|
+
on_payment_failure:
|
|
27
|
+
T.nilable(
|
|
28
|
+
Dodopayments::ProductCollectionCreateParams::OnPaymentFailure::OrSymbol
|
|
29
|
+
),
|
|
30
|
+
proration_billing_mode_on_downgrade:
|
|
31
|
+
T.nilable(
|
|
32
|
+
Dodopayments::ProductCollectionCreateParams::ProrationBillingModeOnDowngrade::OrSymbol
|
|
33
|
+
),
|
|
34
|
+
proration_billing_mode_on_upgrade:
|
|
35
|
+
T.nilable(
|
|
36
|
+
Dodopayments::ProductCollectionCreateParams::ProrationBillingModeOnUpgrade::OrSymbol
|
|
37
|
+
),
|
|
18
38
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
19
39
|
).returns(Dodopayments::ProductCollection)
|
|
20
40
|
end
|
|
@@ -27,6 +47,21 @@ module Dodopayments
|
|
|
27
47
|
brand_id: nil,
|
|
28
48
|
# Optional description of the product collection
|
|
29
49
|
description: nil,
|
|
50
|
+
# Default effective_at setting for subscription plan downgrades (NULL = inherit
|
|
51
|
+
# from business)
|
|
52
|
+
effective_at_on_downgrade: nil,
|
|
53
|
+
# Default effective_at setting for subscription plan upgrades (NULL = inherit from
|
|
54
|
+
# business)
|
|
55
|
+
effective_at_on_upgrade: nil,
|
|
56
|
+
# Default behavior for subscription plan changes on payment failure (NULL =
|
|
57
|
+
# inherit from business)
|
|
58
|
+
on_payment_failure: nil,
|
|
59
|
+
# Default proration billing mode for subscription plan downgrades (NULL = inherit
|
|
60
|
+
# from business)
|
|
61
|
+
proration_billing_mode_on_downgrade: nil,
|
|
62
|
+
# Default proration billing mode for subscription plan upgrades (NULL = inherit
|
|
63
|
+
# from business)
|
|
64
|
+
proration_billing_mode_on_upgrade: nil,
|
|
30
65
|
request_options: {}
|
|
31
66
|
)
|
|
32
67
|
end
|
|
@@ -49,9 +84,29 @@ module Dodopayments
|
|
|
49
84
|
id: String,
|
|
50
85
|
brand_id: T.nilable(String),
|
|
51
86
|
description: T.nilable(String),
|
|
87
|
+
effective_at_on_downgrade:
|
|
88
|
+
T.nilable(
|
|
89
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnDowngrade::OrSymbol
|
|
90
|
+
),
|
|
91
|
+
effective_at_on_upgrade:
|
|
92
|
+
T.nilable(
|
|
93
|
+
Dodopayments::ProductCollectionUpdateParams::EffectiveAtOnUpgrade::OrSymbol
|
|
94
|
+
),
|
|
52
95
|
group_order: T.nilable(T::Array[String]),
|
|
53
96
|
image_id: T.nilable(String),
|
|
54
97
|
name: T.nilable(String),
|
|
98
|
+
on_payment_failure:
|
|
99
|
+
T.nilable(
|
|
100
|
+
Dodopayments::ProductCollectionUpdateParams::OnPaymentFailure::OrSymbol
|
|
101
|
+
),
|
|
102
|
+
proration_billing_mode_on_downgrade:
|
|
103
|
+
T.nilable(
|
|
104
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnDowngrade::OrSymbol
|
|
105
|
+
),
|
|
106
|
+
proration_billing_mode_on_upgrade:
|
|
107
|
+
T.nilable(
|
|
108
|
+
Dodopayments::ProductCollectionUpdateParams::ProrationBillingModeOnUpgrade::OrSymbol
|
|
109
|
+
),
|
|
55
110
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
56
111
|
).void
|
|
57
112
|
end
|
|
@@ -62,12 +117,27 @@ module Dodopayments
|
|
|
62
117
|
brand_id: nil,
|
|
63
118
|
# Optional description update - pass null to remove, omit to keep unchanged
|
|
64
119
|
description: nil,
|
|
120
|
+
# Effective_at setting for downgrades: Some(Some(val)) = set, Some(None) = clear
|
|
121
|
+
# (inherit), None = no change
|
|
122
|
+
effective_at_on_downgrade: nil,
|
|
123
|
+
# Effective_at setting for upgrades: Some(Some(val)) = set, Some(None) = clear
|
|
124
|
+
# (inherit), None = no change
|
|
125
|
+
effective_at_on_upgrade: nil,
|
|
65
126
|
# Optional new order for groups (array of group UUIDs in desired order)
|
|
66
127
|
group_order: nil,
|
|
67
128
|
# Optional image update - pass null to remove, omit to keep unchanged
|
|
68
129
|
image_id: nil,
|
|
69
130
|
# Optional new name for the collection
|
|
70
131
|
name: nil,
|
|
132
|
+
# On payment failure behavior: Some(Some(val)) = set, Some(None) = clear
|
|
133
|
+
# (inherit), None = no change
|
|
134
|
+
on_payment_failure: nil,
|
|
135
|
+
# Proration billing mode for downgrades: Some(Some(val)) = set, Some(None) = clear
|
|
136
|
+
# (inherit), None = no change
|
|
137
|
+
proration_billing_mode_on_downgrade: nil,
|
|
138
|
+
# Proration billing mode for upgrades: Some(Some(val)) = set, Some(None) = clear
|
|
139
|
+
# (inherit), None = no change
|
|
140
|
+
proration_billing_mode_on_upgrade: nil,
|
|
71
141
|
request_options: {}
|
|
72
142
|
)
|
|
73
143
|
end
|
|
@@ -92,6 +92,7 @@ module Dodopayments
|
|
|
92
92
|
| :currency_conversion
|
|
93
93
|
| :abandoned_cart_recovery_fee
|
|
94
94
|
| :dunning_fees
|
|
95
|
+
| :payment_retry_fee
|
|
95
96
|
|
|
96
97
|
module EventType
|
|
97
98
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -116,6 +117,7 @@ module Dodopayments
|
|
|
116
117
|
CURRENCY_CONVERSION: :currency_conversion
|
|
117
118
|
ABANDONED_CART_RECOVERY_FEE: :abandoned_cart_recovery_fee
|
|
118
119
|
DUNNING_FEES: :dunning_fees
|
|
120
|
+
PAYMENT_RETRY_FEE: :payment_retry_fee
|
|
119
121
|
|
|
120
122
|
def self?.values: -> ::Array[Dodopayments::Models::BalanceLedgerEntry::event_type]
|
|
121
123
|
end
|
|
@@ -397,6 +397,7 @@ module Dodopayments
|
|
|
397
397
|
| :currency_conversion
|
|
398
398
|
| :abandoned_cart_recovery_fee
|
|
399
399
|
| :dunning_fees
|
|
400
|
+
| :payment_retry_fee
|
|
400
401
|
|
|
401
402
|
module EventType
|
|
402
403
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -421,6 +422,7 @@ module Dodopayments
|
|
|
421
422
|
CURRENCY_CONVERSION: :currency_conversion
|
|
422
423
|
ABANDONED_CART_RECOVERY_FEE: :abandoned_cart_recovery_fee
|
|
423
424
|
DUNNING_FEES: :dunning_fees
|
|
425
|
+
PAYMENT_RETRY_FEE: :payment_retry_fee
|
|
424
426
|
|
|
425
427
|
def self?.values: -> ::Array[Dodopayments::Models::BalanceRetrieveLedgerParams::event_type]
|
|
426
428
|
end
|
|
@@ -13,6 +13,7 @@ module Dodopayments
|
|
|
13
13
|
metadata: ::Hash[Symbol, String],
|
|
14
14
|
payment_id: String,
|
|
15
15
|
refunds: ::Array[Dodopayments::RefundListItem],
|
|
16
|
+
retry_attempt: Integer,
|
|
16
17
|
settlement_amount: Integer,
|
|
17
18
|
settlement_currency: Dodopayments::Models::currency,
|
|
18
19
|
total_amount: Integer,
|
|
@@ -64,6 +65,8 @@ module Dodopayments
|
|
|
64
65
|
|
|
65
66
|
attr_accessor refunds: ::Array[Dodopayments::RefundListItem]
|
|
66
67
|
|
|
68
|
+
attr_accessor retry_attempt: Integer
|
|
69
|
+
|
|
67
70
|
attr_accessor settlement_amount: Integer
|
|
68
71
|
|
|
69
72
|
attr_accessor settlement_currency: Dodopayments::Models::currency
|
|
@@ -128,6 +131,7 @@ module Dodopayments
|
|
|
128
131
|
metadata: ::Hash[Symbol, String],
|
|
129
132
|
payment_id: String,
|
|
130
133
|
refunds: ::Array[Dodopayments::RefundListItem],
|
|
134
|
+
retry_attempt: Integer,
|
|
131
135
|
settlement_amount: Integer,
|
|
132
136
|
settlement_currency: Dodopayments::Models::currency,
|
|
133
137
|
total_amount: Integer,
|
|
@@ -168,6 +172,7 @@ module Dodopayments
|
|
|
168
172
|
metadata: ::Hash[Symbol, String],
|
|
169
173
|
payment_id: String,
|
|
170
174
|
refunds: ::Array[Dodopayments::RefundListItem],
|
|
175
|
+
retry_attempt: Integer,
|
|
171
176
|
settlement_amount: Integer,
|
|
172
177
|
settlement_currency: Dodopayments::Models::currency,
|
|
173
178
|
total_amount: Integer,
|