dodopayments 1.61.6 → 1.66.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 +16 -0
- data/README.md +1 -1
- data/lib/dodopayments/internal/type/union.rb +7 -9
- data/lib/dodopayments/models/billing_address.rb +18 -18
- data/lib/dodopayments/models/checkout_session_request.rb +10 -1
- data/lib/dodopayments/models/subscription_preview_change_plan_params.rb +63 -0
- data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +388 -0
- data/lib/dodopayments/models/subscription_updated_webhook_event.rb +76 -0
- data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +3 -1
- data/lib/dodopayments/models/unwrap_webhook_event.rb +3 -1
- data/lib/dodopayments/models/webhook_event_type.rb +1 -0
- data/lib/dodopayments/models.rb +4 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +3 -1
- data/lib/dodopayments/resources/subscriptions.rb +31 -0
- data/lib/dodopayments/resources/webhooks.rb +2 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +4 -0
- data/rbi/dodopayments/models/billing_address.rbi +20 -20
- data/rbi/dodopayments/models/checkout_session_request.rbi +13 -0
- data/rbi/dodopayments/models/subscription_preview_change_plan_params.rbi +118 -0
- data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +633 -0
- data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +185 -0
- data/rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi +2 -1
- data/rbi/dodopayments/models/unwrap_webhook_event.rbi +2 -1
- data/rbi/dodopayments/models/webhook_event_type.rbi +5 -0
- data/rbi/dodopayments/models.rbi +6 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +4 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +27 -0
- data/rbi/dodopayments/resources/webhooks.rbi +4 -2
- data/sig/dodopayments/models/billing_address.rbs +17 -17
- data/sig/dodopayments/models/checkout_session_request.rbs +7 -0
- data/sig/dodopayments/models/subscription_preview_change_plan_params.rbs +54 -0
- data/sig/dodopayments/models/subscription_preview_change_plan_response.rbs +356 -0
- data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +76 -0
- data/sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs +1 -0
- data/sig/dodopayments/models/unwrap_webhook_event.rbs +1 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +2 -0
- data/sig/dodopayments/models.rbs +4 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +1 -0
- data/sig/dodopayments/resources/subscriptions.rbs +9 -0
- data/sig/dodopayments/resources/webhooks.rbs +4 -2
- metadata +11 -2
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type subscription_preview_change_plan_response =
|
|
4
|
+
{
|
|
5
|
+
immediate_charge: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge,
|
|
6
|
+
new_plan: Dodopayments::Subscription
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
class SubscriptionPreviewChangePlanResponse < Dodopayments::Internal::Type::BaseModel
|
|
10
|
+
attr_accessor immediate_charge: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge
|
|
11
|
+
|
|
12
|
+
attr_accessor new_plan: Dodopayments::Subscription
|
|
13
|
+
|
|
14
|
+
def initialize: (
|
|
15
|
+
immediate_charge: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge,
|
|
16
|
+
new_plan: Dodopayments::Subscription
|
|
17
|
+
) -> void
|
|
18
|
+
|
|
19
|
+
def to_hash: -> {
|
|
20
|
+
immediate_charge: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge,
|
|
21
|
+
new_plan: Dodopayments::Subscription
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
type immediate_charge =
|
|
25
|
+
{
|
|
26
|
+
line_items: ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::line_item],
|
|
27
|
+
summary: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
class ImmediateCharge < Dodopayments::Internal::Type::BaseModel
|
|
31
|
+
attr_accessor line_items: ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::line_item]
|
|
32
|
+
|
|
33
|
+
attr_accessor summary: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary
|
|
34
|
+
|
|
35
|
+
def initialize: (
|
|
36
|
+
line_items: ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::line_item],
|
|
37
|
+
summary: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary
|
|
38
|
+
) -> void
|
|
39
|
+
|
|
40
|
+
def to_hash: -> {
|
|
41
|
+
line_items: ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::line_item],
|
|
42
|
+
summary: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
type line_item =
|
|
46
|
+
Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0
|
|
47
|
+
| Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1
|
|
48
|
+
| Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2
|
|
49
|
+
|
|
50
|
+
module LineItem
|
|
51
|
+
extend Dodopayments::Internal::Type::Union
|
|
52
|
+
|
|
53
|
+
type union_member0 =
|
|
54
|
+
{
|
|
55
|
+
id: String,
|
|
56
|
+
currency: Dodopayments::Models::currency,
|
|
57
|
+
product_id: String,
|
|
58
|
+
proration_factor: Float,
|
|
59
|
+
quantity: Integer,
|
|
60
|
+
tax_inclusive: bool,
|
|
61
|
+
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::type_,
|
|
62
|
+
unit_price: Integer,
|
|
63
|
+
description: String?,
|
|
64
|
+
name: String?,
|
|
65
|
+
tax: Integer?,
|
|
66
|
+
tax_rate: Float?
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
class UnionMember0 < Dodopayments::Internal::Type::BaseModel
|
|
70
|
+
attr_accessor id: String
|
|
71
|
+
|
|
72
|
+
attr_accessor currency: Dodopayments::Models::currency
|
|
73
|
+
|
|
74
|
+
attr_accessor product_id: String
|
|
75
|
+
|
|
76
|
+
attr_accessor proration_factor: Float
|
|
77
|
+
|
|
78
|
+
attr_accessor quantity: Integer
|
|
79
|
+
|
|
80
|
+
attr_accessor tax_inclusive: bool
|
|
81
|
+
|
|
82
|
+
attr_accessor type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::type_
|
|
83
|
+
|
|
84
|
+
attr_accessor unit_price: Integer
|
|
85
|
+
|
|
86
|
+
attr_accessor description: String?
|
|
87
|
+
|
|
88
|
+
attr_accessor name: String?
|
|
89
|
+
|
|
90
|
+
attr_accessor tax: Integer?
|
|
91
|
+
|
|
92
|
+
attr_accessor tax_rate: Float?
|
|
93
|
+
|
|
94
|
+
def initialize: (
|
|
95
|
+
id: String,
|
|
96
|
+
currency: Dodopayments::Models::currency,
|
|
97
|
+
product_id: String,
|
|
98
|
+
proration_factor: Float,
|
|
99
|
+
quantity: Integer,
|
|
100
|
+
tax_inclusive: bool,
|
|
101
|
+
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::type_,
|
|
102
|
+
unit_price: Integer,
|
|
103
|
+
?description: String?,
|
|
104
|
+
?name: String?,
|
|
105
|
+
?tax: Integer?,
|
|
106
|
+
?tax_rate: Float?
|
|
107
|
+
) -> void
|
|
108
|
+
|
|
109
|
+
def to_hash: -> {
|
|
110
|
+
id: String,
|
|
111
|
+
currency: Dodopayments::Models::currency,
|
|
112
|
+
product_id: String,
|
|
113
|
+
proration_factor: Float,
|
|
114
|
+
quantity: Integer,
|
|
115
|
+
tax_inclusive: bool,
|
|
116
|
+
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::type_,
|
|
117
|
+
unit_price: Integer,
|
|
118
|
+
description: String?,
|
|
119
|
+
name: String?,
|
|
120
|
+
tax: Integer?,
|
|
121
|
+
tax_rate: Float?
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
type type_ = :subscription
|
|
125
|
+
|
|
126
|
+
module Type
|
|
127
|
+
extend Dodopayments::Internal::Type::Enum
|
|
128
|
+
|
|
129
|
+
SUBSCRIPTION: :subscription
|
|
130
|
+
|
|
131
|
+
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::type_]
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
type union_member1 =
|
|
136
|
+
{
|
|
137
|
+
id: String,
|
|
138
|
+
currency: Dodopayments::Models::currency,
|
|
139
|
+
name: String,
|
|
140
|
+
proration_factor: Float,
|
|
141
|
+
quantity: Integer,
|
|
142
|
+
tax_category: Dodopayments::Models::tax_category,
|
|
143
|
+
tax_inclusive: bool,
|
|
144
|
+
tax_rate: Float,
|
|
145
|
+
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::type_,
|
|
146
|
+
unit_price: Integer,
|
|
147
|
+
description: String?,
|
|
148
|
+
tax: Integer?
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
class UnionMember1 < Dodopayments::Internal::Type::BaseModel
|
|
152
|
+
attr_accessor id: String
|
|
153
|
+
|
|
154
|
+
attr_accessor currency: Dodopayments::Models::currency
|
|
155
|
+
|
|
156
|
+
attr_accessor name: String
|
|
157
|
+
|
|
158
|
+
attr_accessor proration_factor: Float
|
|
159
|
+
|
|
160
|
+
attr_accessor quantity: Integer
|
|
161
|
+
|
|
162
|
+
attr_accessor tax_category: Dodopayments::Models::tax_category
|
|
163
|
+
|
|
164
|
+
attr_accessor tax_inclusive: bool
|
|
165
|
+
|
|
166
|
+
attr_accessor tax_rate: Float
|
|
167
|
+
|
|
168
|
+
attr_accessor type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::type_
|
|
169
|
+
|
|
170
|
+
attr_accessor unit_price: Integer
|
|
171
|
+
|
|
172
|
+
attr_accessor description: String?
|
|
173
|
+
|
|
174
|
+
attr_accessor tax: Integer?
|
|
175
|
+
|
|
176
|
+
def initialize: (
|
|
177
|
+
id: String,
|
|
178
|
+
currency: Dodopayments::Models::currency,
|
|
179
|
+
name: String,
|
|
180
|
+
proration_factor: Float,
|
|
181
|
+
quantity: Integer,
|
|
182
|
+
tax_category: Dodopayments::Models::tax_category,
|
|
183
|
+
tax_inclusive: bool,
|
|
184
|
+
tax_rate: Float,
|
|
185
|
+
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::type_,
|
|
186
|
+
unit_price: Integer,
|
|
187
|
+
?description: String?,
|
|
188
|
+
?tax: Integer?
|
|
189
|
+
) -> void
|
|
190
|
+
|
|
191
|
+
def to_hash: -> {
|
|
192
|
+
id: String,
|
|
193
|
+
currency: Dodopayments::Models::currency,
|
|
194
|
+
name: String,
|
|
195
|
+
proration_factor: Float,
|
|
196
|
+
quantity: Integer,
|
|
197
|
+
tax_category: Dodopayments::Models::tax_category,
|
|
198
|
+
tax_inclusive: bool,
|
|
199
|
+
tax_rate: Float,
|
|
200
|
+
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::type_,
|
|
201
|
+
unit_price: Integer,
|
|
202
|
+
description: String?,
|
|
203
|
+
tax: Integer?
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
type type_ = :addon
|
|
207
|
+
|
|
208
|
+
module Type
|
|
209
|
+
extend Dodopayments::Internal::Type::Enum
|
|
210
|
+
|
|
211
|
+
ADDON: :addon
|
|
212
|
+
|
|
213
|
+
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::type_]
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
type union_member2 =
|
|
218
|
+
{
|
|
219
|
+
id: String,
|
|
220
|
+
chargeable_units: String,
|
|
221
|
+
currency: Dodopayments::Models::currency,
|
|
222
|
+
free_threshold: Integer,
|
|
223
|
+
name: String,
|
|
224
|
+
price_per_unit: String,
|
|
225
|
+
subtotal: Integer,
|
|
226
|
+
tax_inclusive: bool,
|
|
227
|
+
tax_rate: Float,
|
|
228
|
+
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::type_,
|
|
229
|
+
units_consumed: String,
|
|
230
|
+
description: String?,
|
|
231
|
+
tax: Integer?
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
class UnionMember2 < Dodopayments::Internal::Type::BaseModel
|
|
235
|
+
attr_accessor id: String
|
|
236
|
+
|
|
237
|
+
attr_accessor chargeable_units: String
|
|
238
|
+
|
|
239
|
+
attr_accessor currency: Dodopayments::Models::currency
|
|
240
|
+
|
|
241
|
+
attr_accessor free_threshold: Integer
|
|
242
|
+
|
|
243
|
+
attr_accessor name: String
|
|
244
|
+
|
|
245
|
+
attr_accessor price_per_unit: String
|
|
246
|
+
|
|
247
|
+
attr_accessor subtotal: Integer
|
|
248
|
+
|
|
249
|
+
attr_accessor tax_inclusive: bool
|
|
250
|
+
|
|
251
|
+
attr_accessor tax_rate: Float
|
|
252
|
+
|
|
253
|
+
attr_accessor type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::type_
|
|
254
|
+
|
|
255
|
+
attr_accessor units_consumed: String
|
|
256
|
+
|
|
257
|
+
attr_accessor description: String?
|
|
258
|
+
|
|
259
|
+
attr_accessor tax: Integer?
|
|
260
|
+
|
|
261
|
+
def initialize: (
|
|
262
|
+
id: String,
|
|
263
|
+
chargeable_units: String,
|
|
264
|
+
currency: Dodopayments::Models::currency,
|
|
265
|
+
free_threshold: Integer,
|
|
266
|
+
name: String,
|
|
267
|
+
price_per_unit: String,
|
|
268
|
+
subtotal: Integer,
|
|
269
|
+
tax_inclusive: bool,
|
|
270
|
+
tax_rate: Float,
|
|
271
|
+
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::type_,
|
|
272
|
+
units_consumed: String,
|
|
273
|
+
?description: String?,
|
|
274
|
+
?tax: Integer?
|
|
275
|
+
) -> void
|
|
276
|
+
|
|
277
|
+
def to_hash: -> {
|
|
278
|
+
id: String,
|
|
279
|
+
chargeable_units: String,
|
|
280
|
+
currency: Dodopayments::Models::currency,
|
|
281
|
+
free_threshold: Integer,
|
|
282
|
+
name: String,
|
|
283
|
+
price_per_unit: String,
|
|
284
|
+
subtotal: Integer,
|
|
285
|
+
tax_inclusive: bool,
|
|
286
|
+
tax_rate: Float,
|
|
287
|
+
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::type_,
|
|
288
|
+
units_consumed: String,
|
|
289
|
+
description: String?,
|
|
290
|
+
tax: Integer?
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
type type_ = :meter
|
|
294
|
+
|
|
295
|
+
module Type
|
|
296
|
+
extend Dodopayments::Internal::Type::Enum
|
|
297
|
+
|
|
298
|
+
METER: :meter
|
|
299
|
+
|
|
300
|
+
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::type_]
|
|
301
|
+
end
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
def self?.variants: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::line_item]
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
type summary =
|
|
308
|
+
{
|
|
309
|
+
currency: Dodopayments::Models::currency,
|
|
310
|
+
customer_credits: Integer,
|
|
311
|
+
settlement_amount: Integer,
|
|
312
|
+
settlement_currency: Dodopayments::Models::currency,
|
|
313
|
+
total_amount: Integer,
|
|
314
|
+
settlement_tax: Integer?,
|
|
315
|
+
tax: Integer?
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
class Summary < Dodopayments::Internal::Type::BaseModel
|
|
319
|
+
attr_accessor currency: Dodopayments::Models::currency
|
|
320
|
+
|
|
321
|
+
attr_accessor customer_credits: Integer
|
|
322
|
+
|
|
323
|
+
attr_accessor settlement_amount: Integer
|
|
324
|
+
|
|
325
|
+
attr_accessor settlement_currency: Dodopayments::Models::currency
|
|
326
|
+
|
|
327
|
+
attr_accessor total_amount: Integer
|
|
328
|
+
|
|
329
|
+
attr_accessor settlement_tax: Integer?
|
|
330
|
+
|
|
331
|
+
attr_accessor tax: Integer?
|
|
332
|
+
|
|
333
|
+
def initialize: (
|
|
334
|
+
currency: Dodopayments::Models::currency,
|
|
335
|
+
customer_credits: Integer,
|
|
336
|
+
settlement_amount: Integer,
|
|
337
|
+
settlement_currency: Dodopayments::Models::currency,
|
|
338
|
+
total_amount: Integer,
|
|
339
|
+
?settlement_tax: Integer?,
|
|
340
|
+
?tax: Integer?
|
|
341
|
+
) -> void
|
|
342
|
+
|
|
343
|
+
def to_hash: -> {
|
|
344
|
+
currency: Dodopayments::Models::currency,
|
|
345
|
+
customer_credits: Integer,
|
|
346
|
+
settlement_amount: Integer,
|
|
347
|
+
settlement_currency: Dodopayments::Models::currency,
|
|
348
|
+
total_amount: Integer,
|
|
349
|
+
settlement_tax: Integer?,
|
|
350
|
+
tax: Integer?
|
|
351
|
+
}
|
|
352
|
+
end
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
end
|
|
356
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type subscription_updated_webhook_event =
|
|
4
|
+
{
|
|
5
|
+
business_id: String,
|
|
6
|
+
data: Dodopayments::SubscriptionUpdatedWebhookEvent::Data,
|
|
7
|
+
timestamp: Time,
|
|
8
|
+
type: Dodopayments::Models::SubscriptionUpdatedWebhookEvent::type_
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class SubscriptionUpdatedWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor business_id: String
|
|
13
|
+
|
|
14
|
+
attr_accessor data: Dodopayments::SubscriptionUpdatedWebhookEvent::Data
|
|
15
|
+
|
|
16
|
+
attr_accessor timestamp: Time
|
|
17
|
+
|
|
18
|
+
attr_accessor type: Dodopayments::Models::SubscriptionUpdatedWebhookEvent::type_
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
business_id: String,
|
|
22
|
+
data: Dodopayments::SubscriptionUpdatedWebhookEvent::Data,
|
|
23
|
+
timestamp: Time,
|
|
24
|
+
type: Dodopayments::Models::SubscriptionUpdatedWebhookEvent::type_
|
|
25
|
+
) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> {
|
|
28
|
+
business_id: String,
|
|
29
|
+
data: Dodopayments::SubscriptionUpdatedWebhookEvent::Data,
|
|
30
|
+
timestamp: Time,
|
|
31
|
+
type: Dodopayments::Models::SubscriptionUpdatedWebhookEvent::type_
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type data =
|
|
35
|
+
{
|
|
36
|
+
payload_type: Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data::payload_type
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
class Data < Dodopayments::Models::Subscription
|
|
40
|
+
def payload_type: -> Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data::payload_type?
|
|
41
|
+
|
|
42
|
+
def payload_type=: (
|
|
43
|
+
Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data::payload_type _
|
|
44
|
+
) -> Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data::payload_type
|
|
45
|
+
|
|
46
|
+
def initialize: (
|
|
47
|
+
?payload_type: Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data::payload_type
|
|
48
|
+
) -> void
|
|
49
|
+
|
|
50
|
+
def to_hash: -> {
|
|
51
|
+
payload_type: Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data::payload_type
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
type payload_type = :Subscription
|
|
55
|
+
|
|
56
|
+
module PayloadType
|
|
57
|
+
extend Dodopayments::Internal::Type::Enum
|
|
58
|
+
|
|
59
|
+
SUBSCRIPTION: :Subscription
|
|
60
|
+
|
|
61
|
+
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data::payload_type]
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
type type_ = :"subscription.updated"
|
|
66
|
+
|
|
67
|
+
module Type
|
|
68
|
+
extend Dodopayments::Internal::Type::Enum
|
|
69
|
+
|
|
70
|
+
SUBSCRIPTION_UPDATED: :"subscription.updated"
|
|
71
|
+
|
|
72
|
+
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionUpdatedWebhookEvent::type_]
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -22,6 +22,7 @@ module Dodopayments
|
|
|
22
22
|
| Dodopayments::SubscriptionOnHoldWebhookEvent
|
|
23
23
|
| Dodopayments::SubscriptionPlanChangedWebhookEvent
|
|
24
24
|
| Dodopayments::SubscriptionRenewedWebhookEvent
|
|
25
|
+
| Dodopayments::SubscriptionUpdatedWebhookEvent
|
|
25
26
|
|
|
26
27
|
module UnsafeUnwrapWebhookEvent
|
|
27
28
|
extend Dodopayments::Internal::Type::Union
|
|
@@ -22,6 +22,7 @@ module Dodopayments
|
|
|
22
22
|
| Dodopayments::SubscriptionOnHoldWebhookEvent
|
|
23
23
|
| Dodopayments::SubscriptionPlanChangedWebhookEvent
|
|
24
24
|
| Dodopayments::SubscriptionRenewedWebhookEvent
|
|
25
|
+
| Dodopayments::SubscriptionUpdatedWebhookEvent
|
|
25
26
|
|
|
26
27
|
module UnwrapWebhookEvent
|
|
27
28
|
extend Dodopayments::Internal::Type::Union
|
|
@@ -21,6 +21,7 @@ module Dodopayments
|
|
|
21
21
|
| :"subscription.failed"
|
|
22
22
|
| :"subscription.expired"
|
|
23
23
|
| :"subscription.plan_changed"
|
|
24
|
+
| :"subscription.updated"
|
|
24
25
|
| :"license_key.created"
|
|
25
26
|
|
|
26
27
|
module WebhookEventType
|
|
@@ -46,6 +47,7 @@ module Dodopayments
|
|
|
46
47
|
SUBSCRIPTION_FAILED: :"subscription.failed"
|
|
47
48
|
SUBSCRIPTION_EXPIRED: :"subscription.expired"
|
|
48
49
|
SUBSCRIPTION_PLAN_CHANGED: :"subscription.plan_changed"
|
|
50
|
+
SUBSCRIPTION_UPDATED: :"subscription.updated"
|
|
49
51
|
LICENSE_KEY_CREATED: :"license_key.created"
|
|
50
52
|
|
|
51
53
|
def self?.values: -> ::Array[Dodopayments::Models::webhook_event_type]
|
data/sig/dodopayments/models.rbs
CHANGED
|
@@ -247,6 +247,8 @@ module Dodopayments
|
|
|
247
247
|
|
|
248
248
|
class SubscriptionPlanChangedWebhookEvent = Dodopayments::Models::SubscriptionPlanChangedWebhookEvent
|
|
249
249
|
|
|
250
|
+
class SubscriptionPreviewChangePlanParams = Dodopayments::Models::SubscriptionPreviewChangePlanParams
|
|
251
|
+
|
|
250
252
|
class SubscriptionRenewedWebhookEvent = Dodopayments::Models::SubscriptionRenewedWebhookEvent
|
|
251
253
|
|
|
252
254
|
class SubscriptionRetrieveParams = Dodopayments::Models::SubscriptionRetrieveParams
|
|
@@ -255,6 +257,8 @@ module Dodopayments
|
|
|
255
257
|
|
|
256
258
|
module SubscriptionStatus = Dodopayments::Models::SubscriptionStatus
|
|
257
259
|
|
|
260
|
+
class SubscriptionUpdatedWebhookEvent = Dodopayments::Models::SubscriptionUpdatedWebhookEvent
|
|
261
|
+
|
|
258
262
|
class SubscriptionUpdateParams = Dodopayments::Models::SubscriptionUpdateParams
|
|
259
263
|
|
|
260
264
|
class SubscriptionUpdatePaymentMethodParams = Dodopayments::Models::SubscriptionUpdatePaymentMethodParams
|
|
@@ -13,6 +13,7 @@ module Dodopayments
|
|
|
13
13
|
?feature_flags: Dodopayments::CheckoutSessionRequest::FeatureFlags,
|
|
14
14
|
?force_3ds: bool?,
|
|
15
15
|
?metadata: ::Hash[Symbol, String]?,
|
|
16
|
+
?minimal_address: bool,
|
|
16
17
|
?return_url: String?,
|
|
17
18
|
?show_saved_payment_methods: bool,
|
|
18
19
|
?subscription_data: Dodopayments::CheckoutSessionRequest::SubscriptionData?,
|
|
@@ -70,6 +70,15 @@ module Dodopayments
|
|
|
70
70
|
?request_options: Dodopayments::request_opts
|
|
71
71
|
) -> Dodopayments::Models::SubscriptionChargeResponse
|
|
72
72
|
|
|
73
|
+
def preview_change_plan: (
|
|
74
|
+
String subscription_id,
|
|
75
|
+
product_id: String,
|
|
76
|
+
proration_billing_mode: Dodopayments::Models::SubscriptionPreviewChangePlanParams::proration_billing_mode,
|
|
77
|
+
quantity: Integer,
|
|
78
|
+
?addons: ::Array[Dodopayments::AttachAddon]?,
|
|
79
|
+
?request_options: Dodopayments::request_opts
|
|
80
|
+
) -> Dodopayments::Models::SubscriptionPreviewChangePlanResponse
|
|
81
|
+
|
|
73
82
|
def retrieve_usage_history: (
|
|
74
83
|
String subscription_id,
|
|
75
84
|
?end_date: Time?,
|
|
@@ -69,7 +69,8 @@ module Dodopayments
|
|
|
69
69
|
| Dodopayments::SubscriptionFailedWebhookEvent
|
|
70
70
|
| Dodopayments::SubscriptionOnHoldWebhookEvent
|
|
71
71
|
| Dodopayments::SubscriptionPlanChangedWebhookEvent
|
|
72
|
-
| Dodopayments::SubscriptionRenewedWebhookEvent
|
|
72
|
+
| Dodopayments::SubscriptionRenewedWebhookEvent
|
|
73
|
+
| Dodopayments::SubscriptionUpdatedWebhookEvent)
|
|
73
74
|
|
|
74
75
|
def unwrap: (
|
|
75
76
|
String payload
|
|
@@ -93,7 +94,8 @@ module Dodopayments
|
|
|
93
94
|
| Dodopayments::SubscriptionFailedWebhookEvent
|
|
94
95
|
| Dodopayments::SubscriptionOnHoldWebhookEvent
|
|
95
96
|
| Dodopayments::SubscriptionPlanChangedWebhookEvent
|
|
96
|
-
| Dodopayments::SubscriptionRenewedWebhookEvent
|
|
97
|
+
| Dodopayments::SubscriptionRenewedWebhookEvent
|
|
98
|
+
| Dodopayments::SubscriptionUpdatedWebhookEvent)
|
|
97
99
|
|
|
98
100
|
def initialize: (client: Dodopayments::Client) -> void
|
|
99
101
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dodopayments
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.66.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dodo Payments
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|
|
@@ -207,6 +207,8 @@ files:
|
|
|
207
207
|
- lib/dodopayments/models/subscription_list_response.rb
|
|
208
208
|
- lib/dodopayments/models/subscription_on_hold_webhook_event.rb
|
|
209
209
|
- lib/dodopayments/models/subscription_plan_changed_webhook_event.rb
|
|
210
|
+
- lib/dodopayments/models/subscription_preview_change_plan_params.rb
|
|
211
|
+
- lib/dodopayments/models/subscription_preview_change_plan_response.rb
|
|
210
212
|
- lib/dodopayments/models/subscription_renewed_webhook_event.rb
|
|
211
213
|
- lib/dodopayments/models/subscription_retrieve_params.rb
|
|
212
214
|
- lib/dodopayments/models/subscription_retrieve_usage_history_params.rb
|
|
@@ -215,6 +217,7 @@ files:
|
|
|
215
217
|
- lib/dodopayments/models/subscription_update_params.rb
|
|
216
218
|
- lib/dodopayments/models/subscription_update_payment_method_params.rb
|
|
217
219
|
- lib/dodopayments/models/subscription_update_payment_method_response.rb
|
|
220
|
+
- lib/dodopayments/models/subscription_updated_webhook_event.rb
|
|
218
221
|
- lib/dodopayments/models/tax_category.rb
|
|
219
222
|
- lib/dodopayments/models/time_interval.rb
|
|
220
223
|
- lib/dodopayments/models/unsafe_unwrap_webhook_event.rb
|
|
@@ -438,6 +441,8 @@ files:
|
|
|
438
441
|
- rbi/dodopayments/models/subscription_list_response.rbi
|
|
439
442
|
- rbi/dodopayments/models/subscription_on_hold_webhook_event.rbi
|
|
440
443
|
- rbi/dodopayments/models/subscription_plan_changed_webhook_event.rbi
|
|
444
|
+
- rbi/dodopayments/models/subscription_preview_change_plan_params.rbi
|
|
445
|
+
- rbi/dodopayments/models/subscription_preview_change_plan_response.rbi
|
|
441
446
|
- rbi/dodopayments/models/subscription_renewed_webhook_event.rbi
|
|
442
447
|
- rbi/dodopayments/models/subscription_retrieve_params.rbi
|
|
443
448
|
- rbi/dodopayments/models/subscription_retrieve_usage_history_params.rbi
|
|
@@ -446,6 +451,7 @@ files:
|
|
|
446
451
|
- rbi/dodopayments/models/subscription_update_params.rbi
|
|
447
452
|
- rbi/dodopayments/models/subscription_update_payment_method_params.rbi
|
|
448
453
|
- rbi/dodopayments/models/subscription_update_payment_method_response.rbi
|
|
454
|
+
- rbi/dodopayments/models/subscription_updated_webhook_event.rbi
|
|
449
455
|
- rbi/dodopayments/models/tax_category.rbi
|
|
450
456
|
- rbi/dodopayments/models/time_interval.rbi
|
|
451
457
|
- rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi
|
|
@@ -668,6 +674,8 @@ files:
|
|
|
668
674
|
- sig/dodopayments/models/subscription_list_response.rbs
|
|
669
675
|
- sig/dodopayments/models/subscription_on_hold_webhook_event.rbs
|
|
670
676
|
- sig/dodopayments/models/subscription_plan_changed_webhook_event.rbs
|
|
677
|
+
- sig/dodopayments/models/subscription_preview_change_plan_params.rbs
|
|
678
|
+
- sig/dodopayments/models/subscription_preview_change_plan_response.rbs
|
|
671
679
|
- sig/dodopayments/models/subscription_renewed_webhook_event.rbs
|
|
672
680
|
- sig/dodopayments/models/subscription_retrieve_params.rbs
|
|
673
681
|
- sig/dodopayments/models/subscription_retrieve_usage_history_params.rbs
|
|
@@ -676,6 +684,7 @@ files:
|
|
|
676
684
|
- sig/dodopayments/models/subscription_update_params.rbs
|
|
677
685
|
- sig/dodopayments/models/subscription_update_payment_method_params.rbs
|
|
678
686
|
- sig/dodopayments/models/subscription_update_payment_method_response.rbs
|
|
687
|
+
- sig/dodopayments/models/subscription_updated_webhook_event.rbs
|
|
679
688
|
- sig/dodopayments/models/tax_category.rbs
|
|
680
689
|
- sig/dodopayments/models/time_interval.rbs
|
|
681
690
|
- sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs
|