dodopayments 2.9.1 → 2.10.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 +15 -0
- data/README.md +1 -1
- data/lib/dodopayments/internal/transport/base_client.rb +2 -0
- data/lib/dodopayments/internal/type/union.rb +21 -7
- data/lib/dodopayments/models/abandoned_checkout_detected_webhook_event.rb +4 -16
- data/lib/dodopayments/models/abandoned_checkout_recovered_webhook_event.rb +4 -16
- data/lib/dodopayments/models/checkout_session_request.rb +15 -2
- data/lib/dodopayments/models/credit_added_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_balance_low_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_deducted_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_expired_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_manual_adjustment_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_overage_charged_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_overage_reset_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_rolled_over_webhook_event.rb +4 -16
- data/lib/dodopayments/models/credit_rollover_forfeited_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_accepted_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_cancelled_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_challenged_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_expired_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_lost_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_opened_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dispute_won_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dunning_recovered_webhook_event.rb +4 -16
- data/lib/dodopayments/models/dunning_started_webhook_event.rb +4 -16
- data/lib/dodopayments/models/entitlement_grant_created_webhook_event.rb +4 -16
- data/lib/dodopayments/models/entitlement_grant_delivered_webhook_event.rb +4 -16
- data/lib/dodopayments/models/entitlement_grant_failed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/entitlement_grant_revoked_webhook_event.rb +4 -16
- data/lib/dodopayments/models/license_key_created_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payment.rb +153 -3
- data/lib/dodopayments/models/payment_cancelled_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payment_create_params.rb +15 -3
- data/lib/dodopayments/models/payment_create_response.rb +14 -3
- data/lib/dodopayments/models/payment_failed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payment_processing_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payment_succeeded_webhook_event.rb +4 -16
- data/lib/dodopayments/models/payout_list_response.rb +6 -3
- data/lib/dodopayments/models/price.rb +20 -48
- data/lib/dodopayments/models/product.rb +3 -3
- data/lib/dodopayments/models/product_create_params.rb +3 -3
- data/lib/dodopayments/models/product_item_req.rb +42 -1
- data/lib/dodopayments/models/product_update_params.rb +3 -3
- data/lib/dodopayments/models/refund_failed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/refund_succeeded_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription.rb +153 -5
- data/lib/dodopayments/models/subscription_active_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_cancelled_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_create_params.rb +15 -3
- data/lib/dodopayments/models/subscription_create_response.rb +14 -3
- data/lib/dodopayments/models/subscription_expired_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_failed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_list_response.rb +36 -5
- data/lib/dodopayments/models/subscription_on_hold_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_plan_changed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +21 -49
- data/lib/dodopayments/models/subscription_renewed_webhook_event.rb +4 -16
- data/lib/dodopayments/models/subscription_update_payment_method_params.rb +12 -30
- data/lib/dodopayments/models/subscription_updated_webhook_event.rb +4 -16
- data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +41 -39
- data/lib/dodopayments/models/unwrap_webhook_event.rb +41 -39
- data/lib/dodopayments/models/update_subscription_plan_req.rb +17 -6
- data/lib/dodopayments/models/webhook_event_type.rb +3 -0
- data/lib/dodopayments/models/webhook_payload.rb +52 -143
- data/lib/dodopayments/resources/checkout_sessions.rb +8 -4
- data/lib/dodopayments/resources/payments.rb +4 -2
- data/lib/dodopayments/resources/subscriptions.rb +12 -6
- data/lib/dodopayments/version.rb +1 -1
- data/rbi/dodopayments/models/abandoned_checkout_detected_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/checkout_session_request.rbi +14 -0
- data/rbi/dodopayments/models/credit_added_webhook_event.rbi +4 -29
- data/rbi/dodopayments/models/credit_balance_low_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_deducted_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_expired_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_manual_adjustment_webhook_event.rbi +4 -39
- data/rbi/dodopayments/models/credit_overage_charged_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/credit_overage_reset_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/credit_rolled_over_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/credit_rollover_forfeited_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/dispute_accepted_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_cancelled_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_challenged_webhook_event.rbi +4 -34
- data/rbi/dodopayments/models/dispute_expired_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_lost_webhook_event.rbi +4 -29
- data/rbi/dodopayments/models/dispute_opened_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dispute_won_webhook_event.rbi +4 -29
- data/rbi/dodopayments/models/dunning_recovered_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/dunning_started_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/entitlement_grant_created_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/entitlement_grant_delivered_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/entitlement_grant_failed_webhook_event.rbi +4 -39
- data/rbi/dodopayments/models/entitlement_grant_revoked_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/license_key_created_webhook_event.rbi +4 -34
- data/rbi/dodopayments/models/payment.rbi +170 -2
- data/rbi/dodopayments/models/payment_cancelled_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/payment_create_params.rbi +14 -2
- data/rbi/dodopayments/models/payment_create_response.rbi +12 -2
- data/rbi/dodopayments/models/payment_failed_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/payment_processing_webhook_event.rbi +4 -34
- data/rbi/dodopayments/models/payment_succeeded_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/price.rbi +18 -90
- data/rbi/dodopayments/models/product_item_req.rbi +74 -3
- data/rbi/dodopayments/models/refund_failed_webhook_event.rbi +4 -31
- data/rbi/dodopayments/models/refund_succeeded_webhook_event.rbi +4 -33
- data/rbi/dodopayments/models/subscription.rbi +173 -4
- data/rbi/dodopayments/models/subscription_active_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_cancelled_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_create_params.rbi +14 -2
- data/rbi/dodopayments/models/subscription_create_response.rbi +12 -2
- data/rbi/dodopayments/models/subscription_expired_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_failed_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_list_response.rbi +67 -4
- data/rbi/dodopayments/models/subscription_on_hold_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_plan_changed_webhook_event.rbi +4 -40
- data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +18 -123
- data/rbi/dodopayments/models/subscription_renewed_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/subscription_update_payment_method_params.rbi +12 -96
- data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +4 -36
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +18 -8
- data/rbi/dodopayments/models/webhook_event_type.rbi +15 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +46 -466
- data/rbi/dodopayments/resources/checkout_sessions.rbi +12 -0
- data/rbi/dodopayments/resources/payments.rbi +6 -1
- data/rbi/dodopayments/resources/subscriptions.rbi +22 -9
- data/sig/dodopayments/models/abandoned_checkout_detected_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/abandoned_checkout_recovered_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
- data/sig/dodopayments/models/credit_added_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_balance_low_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_deducted_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_expired_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_manual_adjustment_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_overage_charged_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_overage_reset_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_rolled_over_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/credit_rollover_forfeited_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_accepted_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_cancelled_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_challenged_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_expired_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_lost_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_opened_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dispute_won_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dunning_recovered_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/dunning_started_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement_grant_created_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement_grant_delivered_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement_grant_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/entitlement_grant_revoked_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/license_key_created_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/payment.rbs +97 -0
- data/sig/dodopayments/models/payment_cancelled_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/payment_create_params.rbs +5 -0
- data/sig/dodopayments/models/payment_create_response.rbs +5 -0
- data/sig/dodopayments/models/payment_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/payment_processing_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/payment_succeeded_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/price.rbs +15 -45
- data/sig/dodopayments/models/product_item_req.rbs +27 -3
- data/sig/dodopayments/models/refund_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/refund_succeeded_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription.rbs +97 -0
- data/sig/dodopayments/models/subscription_active_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_cancelled_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_create_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_create_response.rbs +5 -0
- data/sig/dodopayments/models/subscription_expired_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_failed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_list_response.rbs +24 -0
- data/sig/dodopayments/models/subscription_on_hold_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_plan_changed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_preview_change_plan_response.rbs +15 -45
- data/sig/dodopayments/models/subscription_renewed_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/subscription_update_payment_method_params.rbs +8 -48
- data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +4 -14
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +5 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +6 -0
- data/sig/dodopayments/models/webhook_payload.rbs +50 -213
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/payments.rbs +1 -0
- data/sig/dodopayments/resources/subscriptions.rbs +3 -0
- metadata +2 -2
|
@@ -24,6 +24,7 @@ module Dodopayments
|
|
|
24
24
|
checkout_session_id: String?,
|
|
25
25
|
custom_field_responses: ::Array[Dodopayments::CustomFieldResponse]?,
|
|
26
26
|
discount_id: String?,
|
|
27
|
+
discounts: ::Array[Dodopayments::Payment::Discount]?,
|
|
27
28
|
error_code: String?,
|
|
28
29
|
error_message: String?,
|
|
29
30
|
invoice_id: String?,
|
|
@@ -85,6 +86,8 @@ module Dodopayments
|
|
|
85
86
|
|
|
86
87
|
attr_accessor discount_id: String?
|
|
87
88
|
|
|
89
|
+
attr_accessor discounts: ::Array[Dodopayments::Payment::Discount]?
|
|
90
|
+
|
|
88
91
|
attr_accessor error_code: String?
|
|
89
92
|
|
|
90
93
|
attr_accessor error_message: String?
|
|
@@ -136,6 +139,7 @@ module Dodopayments
|
|
|
136
139
|
?checkout_session_id: String?,
|
|
137
140
|
?custom_field_responses: ::Array[Dodopayments::CustomFieldResponse]?,
|
|
138
141
|
?discount_id: String?,
|
|
142
|
+
?discounts: ::Array[Dodopayments::Payment::Discount]?,
|
|
139
143
|
?error_code: String?,
|
|
140
144
|
?error_message: String?,
|
|
141
145
|
?invoice_id: String?,
|
|
@@ -175,6 +179,7 @@ module Dodopayments
|
|
|
175
179
|
checkout_session_id: String?,
|
|
176
180
|
custom_field_responses: ::Array[Dodopayments::CustomFieldResponse]?,
|
|
177
181
|
discount_id: String?,
|
|
182
|
+
discounts: ::Array[Dodopayments::Payment::Discount]?,
|
|
178
183
|
error_code: String?,
|
|
179
184
|
error_message: String?,
|
|
180
185
|
invoice_id: String?,
|
|
@@ -191,6 +196,98 @@ module Dodopayments
|
|
|
191
196
|
updated_at: Time?
|
|
192
197
|
}
|
|
193
198
|
|
|
199
|
+
type discount =
|
|
200
|
+
{
|
|
201
|
+
amount: Integer,
|
|
202
|
+
business_id: String,
|
|
203
|
+
code: String,
|
|
204
|
+
created_at: Time,
|
|
205
|
+
discount_id: String,
|
|
206
|
+
metadata: ::Hash[Symbol, String],
|
|
207
|
+
position: Integer,
|
|
208
|
+
preserve_on_plan_change: bool,
|
|
209
|
+
restricted_to: ::Array[String],
|
|
210
|
+
times_used: Integer,
|
|
211
|
+
type: Dodopayments::Models::discount_type,
|
|
212
|
+
cycles_remaining: Integer?,
|
|
213
|
+
expires_at: Time?,
|
|
214
|
+
name: String?,
|
|
215
|
+
subscription_cycles: Integer?,
|
|
216
|
+
usage_limit: Integer?
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
class Discount < Dodopayments::Internal::Type::BaseModel
|
|
220
|
+
attr_accessor amount: Integer
|
|
221
|
+
|
|
222
|
+
attr_accessor business_id: String
|
|
223
|
+
|
|
224
|
+
attr_accessor code: String
|
|
225
|
+
|
|
226
|
+
attr_accessor created_at: Time
|
|
227
|
+
|
|
228
|
+
attr_accessor discount_id: String
|
|
229
|
+
|
|
230
|
+
attr_accessor metadata: ::Hash[Symbol, String]
|
|
231
|
+
|
|
232
|
+
attr_accessor position: Integer
|
|
233
|
+
|
|
234
|
+
attr_accessor preserve_on_plan_change: bool
|
|
235
|
+
|
|
236
|
+
attr_accessor restricted_to: ::Array[String]
|
|
237
|
+
|
|
238
|
+
attr_accessor times_used: Integer
|
|
239
|
+
|
|
240
|
+
attr_accessor type: Dodopayments::Models::discount_type
|
|
241
|
+
|
|
242
|
+
attr_accessor cycles_remaining: Integer?
|
|
243
|
+
|
|
244
|
+
attr_accessor expires_at: Time?
|
|
245
|
+
|
|
246
|
+
attr_accessor name: String?
|
|
247
|
+
|
|
248
|
+
attr_accessor subscription_cycles: Integer?
|
|
249
|
+
|
|
250
|
+
attr_accessor usage_limit: Integer?
|
|
251
|
+
|
|
252
|
+
def initialize: (
|
|
253
|
+
amount: Integer,
|
|
254
|
+
business_id: String,
|
|
255
|
+
code: String,
|
|
256
|
+
created_at: Time,
|
|
257
|
+
discount_id: String,
|
|
258
|
+
metadata: ::Hash[Symbol, String],
|
|
259
|
+
position: Integer,
|
|
260
|
+
preserve_on_plan_change: bool,
|
|
261
|
+
restricted_to: ::Array[String],
|
|
262
|
+
times_used: Integer,
|
|
263
|
+
type: Dodopayments::Models::discount_type,
|
|
264
|
+
?cycles_remaining: Integer?,
|
|
265
|
+
?expires_at: Time?,
|
|
266
|
+
?name: String?,
|
|
267
|
+
?subscription_cycles: Integer?,
|
|
268
|
+
?usage_limit: Integer?
|
|
269
|
+
) -> void
|
|
270
|
+
|
|
271
|
+
def to_hash: -> {
|
|
272
|
+
amount: Integer,
|
|
273
|
+
business_id: String,
|
|
274
|
+
code: String,
|
|
275
|
+
created_at: Time,
|
|
276
|
+
discount_id: String,
|
|
277
|
+
metadata: ::Hash[Symbol, String],
|
|
278
|
+
position: Integer,
|
|
279
|
+
preserve_on_plan_change: bool,
|
|
280
|
+
restricted_to: ::Array[String],
|
|
281
|
+
times_used: Integer,
|
|
282
|
+
type: Dodopayments::Models::discount_type,
|
|
283
|
+
cycles_remaining: Integer?,
|
|
284
|
+
expires_at: Time?,
|
|
285
|
+
name: String?,
|
|
286
|
+
subscription_cycles: Integer?,
|
|
287
|
+
usage_limit: Integer?
|
|
288
|
+
}
|
|
289
|
+
end
|
|
290
|
+
|
|
194
291
|
type product_cart = { product_id: String, quantity: Integer }
|
|
195
292
|
|
|
196
293
|
class ProductCart < Dodopayments::Internal::Type::BaseModel
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::Payment,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"payment.cancelled"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class PaymentCancelledWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
@@ -15,31 +15,21 @@ module Dodopayments
|
|
|
15
15
|
|
|
16
16
|
attr_accessor timestamp: Time
|
|
17
17
|
|
|
18
|
-
attr_accessor type:
|
|
18
|
+
attr_accessor type: :"payment.cancelled"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::Payment,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"payment.cancelled"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::Payment,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"payment.cancelled"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"payment.cancelled"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
PAYMENT_CANCELLED: :"payment.cancelled"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::PaymentCancelledWebhookEvent::type_]
|
|
42
|
-
end
|
|
43
33
|
end
|
|
44
34
|
end
|
|
45
35
|
end
|
|
@@ -9,6 +9,7 @@ module Dodopayments
|
|
|
9
9
|
allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
|
|
10
10
|
billing_currency: Dodopayments::Models::currency?,
|
|
11
11
|
discount_code: String?,
|
|
12
|
+
discount_codes: ::Array[String]?,
|
|
12
13
|
:force_3ds => bool?,
|
|
13
14
|
metadata: ::Hash[Symbol, String],
|
|
14
15
|
payment_link: bool?,
|
|
@@ -40,6 +41,8 @@ module Dodopayments
|
|
|
40
41
|
|
|
41
42
|
attr_accessor discount_code: String?
|
|
42
43
|
|
|
44
|
+
attr_accessor discount_codes: ::Array[String]?
|
|
45
|
+
|
|
43
46
|
attr_accessor force_3ds: bool?
|
|
44
47
|
|
|
45
48
|
attr_reader metadata: ::Hash[Symbol, String]?
|
|
@@ -76,6 +79,7 @@ module Dodopayments
|
|
|
76
79
|
?allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
|
|
77
80
|
?billing_currency: Dodopayments::Models::currency?,
|
|
78
81
|
?discount_code: String?,
|
|
82
|
+
?discount_codes: ::Array[String]?,
|
|
79
83
|
?force_3ds: bool?,
|
|
80
84
|
?metadata: ::Hash[Symbol, String],
|
|
81
85
|
?payment_link: bool?,
|
|
@@ -97,6 +101,7 @@ module Dodopayments
|
|
|
97
101
|
allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
|
|
98
102
|
billing_currency: Dodopayments::Models::currency?,
|
|
99
103
|
discount_code: String?,
|
|
104
|
+
discount_codes: ::Array[String]?,
|
|
100
105
|
:force_3ds => bool?,
|
|
101
106
|
metadata: ::Hash[Symbol, String],
|
|
102
107
|
payment_link: bool?,
|
|
@@ -8,6 +8,7 @@ module Dodopayments
|
|
|
8
8
|
payment_id: String,
|
|
9
9
|
total_amount: Integer,
|
|
10
10
|
discount_id: String?,
|
|
11
|
+
discount_ids: ::Array[String]?,
|
|
11
12
|
expires_on: Time?,
|
|
12
13
|
payment_link: String?,
|
|
13
14
|
product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?
|
|
@@ -26,6 +27,8 @@ module Dodopayments
|
|
|
26
27
|
|
|
27
28
|
attr_accessor discount_id: String?
|
|
28
29
|
|
|
30
|
+
attr_accessor discount_ids: ::Array[String]?
|
|
31
|
+
|
|
29
32
|
attr_accessor expires_on: Time?
|
|
30
33
|
|
|
31
34
|
attr_accessor payment_link: String?
|
|
@@ -39,6 +42,7 @@ module Dodopayments
|
|
|
39
42
|
payment_id: String,
|
|
40
43
|
total_amount: Integer,
|
|
41
44
|
?discount_id: String?,
|
|
45
|
+
?discount_ids: ::Array[String]?,
|
|
42
46
|
?expires_on: Time?,
|
|
43
47
|
?payment_link: String?,
|
|
44
48
|
?product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?
|
|
@@ -51,6 +55,7 @@ module Dodopayments
|
|
|
51
55
|
payment_id: String,
|
|
52
56
|
total_amount: Integer,
|
|
53
57
|
discount_id: String?,
|
|
58
|
+
discount_ids: ::Array[String]?,
|
|
54
59
|
expires_on: Time?,
|
|
55
60
|
payment_link: String?,
|
|
56
61
|
product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::Payment,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"payment.failed"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class PaymentFailedWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
@@ -15,31 +15,21 @@ module Dodopayments
|
|
|
15
15
|
|
|
16
16
|
attr_accessor timestamp: Time
|
|
17
17
|
|
|
18
|
-
attr_accessor type:
|
|
18
|
+
attr_accessor type: :"payment.failed"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::Payment,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"payment.failed"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::Payment,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"payment.failed"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"payment.failed"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
PAYMENT_FAILED: :"payment.failed"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::PaymentFailedWebhookEvent::type_]
|
|
42
|
-
end
|
|
43
33
|
end
|
|
44
34
|
end
|
|
45
35
|
end
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::Payment,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"payment.processing"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class PaymentProcessingWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
@@ -15,31 +15,21 @@ module Dodopayments
|
|
|
15
15
|
|
|
16
16
|
attr_accessor timestamp: Time
|
|
17
17
|
|
|
18
|
-
attr_accessor type:
|
|
18
|
+
attr_accessor type: :"payment.processing"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::Payment,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"payment.processing"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::Payment,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"payment.processing"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"payment.processing"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
PAYMENT_PROCESSING: :"payment.processing"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::PaymentProcessingWebhookEvent::type_]
|
|
42
|
-
end
|
|
43
33
|
end
|
|
44
34
|
end
|
|
45
35
|
end
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::Payment,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"payment.succeeded"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class PaymentSucceededWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
@@ -15,31 +15,21 @@ module Dodopayments
|
|
|
15
15
|
|
|
16
16
|
attr_accessor timestamp: Time
|
|
17
17
|
|
|
18
|
-
attr_accessor type:
|
|
18
|
+
attr_accessor type: :"payment.succeeded"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::Payment,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"payment.succeeded"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::Payment,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"payment.succeeded"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"payment.succeeded"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
PAYMENT_SUCCEEDED: :"payment.succeeded"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::PaymentSucceededWebhookEvent::type_]
|
|
42
|
-
end
|
|
43
33
|
end
|
|
44
34
|
end
|
|
45
35
|
end
|
|
@@ -14,7 +14,7 @@ module Dodopayments
|
|
|
14
14
|
discount: Integer,
|
|
15
15
|
price: Integer,
|
|
16
16
|
purchasing_power_parity: bool,
|
|
17
|
-
type:
|
|
17
|
+
type: :one_time_price,
|
|
18
18
|
pay_what_you_want: bool,
|
|
19
19
|
suggested_price: Integer?,
|
|
20
20
|
tax_inclusive: bool?
|
|
@@ -29,7 +29,7 @@ module Dodopayments
|
|
|
29
29
|
|
|
30
30
|
attr_accessor purchasing_power_parity: bool
|
|
31
31
|
|
|
32
|
-
attr_accessor type:
|
|
32
|
+
attr_accessor type: :one_time_price
|
|
33
33
|
|
|
34
34
|
attr_reader pay_what_you_want: bool?
|
|
35
35
|
|
|
@@ -44,10 +44,10 @@ module Dodopayments
|
|
|
44
44
|
discount: Integer,
|
|
45
45
|
price: Integer,
|
|
46
46
|
purchasing_power_parity: bool,
|
|
47
|
-
type: Dodopayments::Models::Price::OneTimePrice::type_,
|
|
48
47
|
?pay_what_you_want: bool,
|
|
49
48
|
?suggested_price: Integer?,
|
|
50
|
-
?tax_inclusive: bool
|
|
49
|
+
?tax_inclusive: bool?,
|
|
50
|
+
?type: :one_time_price
|
|
51
51
|
) -> void
|
|
52
52
|
|
|
53
53
|
def to_hash: -> {
|
|
@@ -55,21 +55,11 @@ module Dodopayments
|
|
|
55
55
|
discount: Integer,
|
|
56
56
|
price: Integer,
|
|
57
57
|
purchasing_power_parity: bool,
|
|
58
|
-
type:
|
|
58
|
+
type: :one_time_price,
|
|
59
59
|
pay_what_you_want: bool,
|
|
60
60
|
suggested_price: Integer?,
|
|
61
61
|
tax_inclusive: bool?
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
type type_ = :one_time_price
|
|
65
|
-
|
|
66
|
-
module Type
|
|
67
|
-
extend Dodopayments::Internal::Type::Enum
|
|
68
|
-
|
|
69
|
-
ONE_TIME_PRICE: :one_time_price
|
|
70
|
-
|
|
71
|
-
def self?.values: -> ::Array[Dodopayments::Models::Price::OneTimePrice::type_]
|
|
72
|
-
end
|
|
73
63
|
end
|
|
74
64
|
|
|
75
65
|
type recurring_price =
|
|
@@ -82,7 +72,7 @@ module Dodopayments
|
|
|
82
72
|
purchasing_power_parity: bool,
|
|
83
73
|
subscription_period_count: Integer,
|
|
84
74
|
subscription_period_interval: Dodopayments::Models::time_interval,
|
|
85
|
-
type:
|
|
75
|
+
type: :recurring_price,
|
|
86
76
|
tax_inclusive: bool?,
|
|
87
77
|
trial_period_days: Integer
|
|
88
78
|
}
|
|
@@ -104,7 +94,7 @@ module Dodopayments
|
|
|
104
94
|
|
|
105
95
|
attr_accessor subscription_period_interval: Dodopayments::Models::time_interval
|
|
106
96
|
|
|
107
|
-
attr_accessor type:
|
|
97
|
+
attr_accessor type: :recurring_price
|
|
108
98
|
|
|
109
99
|
attr_accessor tax_inclusive: bool?
|
|
110
100
|
|
|
@@ -121,9 +111,9 @@ module Dodopayments
|
|
|
121
111
|
purchasing_power_parity: bool,
|
|
122
112
|
subscription_period_count: Integer,
|
|
123
113
|
subscription_period_interval: Dodopayments::Models::time_interval,
|
|
124
|
-
type: Dodopayments::Models::Price::RecurringPrice::type_,
|
|
125
114
|
?tax_inclusive: bool?,
|
|
126
|
-
?trial_period_days: Integer
|
|
115
|
+
?trial_period_days: Integer,
|
|
116
|
+
?type: :recurring_price
|
|
127
117
|
) -> void
|
|
128
118
|
|
|
129
119
|
def to_hash: -> {
|
|
@@ -135,20 +125,10 @@ module Dodopayments
|
|
|
135
125
|
purchasing_power_parity: bool,
|
|
136
126
|
subscription_period_count: Integer,
|
|
137
127
|
subscription_period_interval: Dodopayments::Models::time_interval,
|
|
138
|
-
type:
|
|
128
|
+
type: :recurring_price,
|
|
139
129
|
tax_inclusive: bool?,
|
|
140
130
|
trial_period_days: Integer
|
|
141
131
|
}
|
|
142
|
-
|
|
143
|
-
type type_ = :recurring_price
|
|
144
|
-
|
|
145
|
-
module Type
|
|
146
|
-
extend Dodopayments::Internal::Type::Enum
|
|
147
|
-
|
|
148
|
-
RECURRING_PRICE: :recurring_price
|
|
149
|
-
|
|
150
|
-
def self?.values: -> ::Array[Dodopayments::Models::Price::RecurringPrice::type_]
|
|
151
|
-
end
|
|
152
132
|
end
|
|
153
133
|
|
|
154
134
|
type usage_based_price =
|
|
@@ -161,7 +141,7 @@ module Dodopayments
|
|
|
161
141
|
purchasing_power_parity: bool,
|
|
162
142
|
subscription_period_count: Integer,
|
|
163
143
|
subscription_period_interval: Dodopayments::Models::time_interval,
|
|
164
|
-
type:
|
|
144
|
+
type: :usage_based_price,
|
|
165
145
|
meters: ::Array[Dodopayments::AddMeterToPrice]?,
|
|
166
146
|
tax_inclusive: bool?
|
|
167
147
|
}
|
|
@@ -183,7 +163,7 @@ module Dodopayments
|
|
|
183
163
|
|
|
184
164
|
attr_accessor subscription_period_interval: Dodopayments::Models::time_interval
|
|
185
165
|
|
|
186
|
-
attr_accessor type:
|
|
166
|
+
attr_accessor type: :usage_based_price
|
|
187
167
|
|
|
188
168
|
attr_accessor meters: ::Array[Dodopayments::AddMeterToPrice]?
|
|
189
169
|
|
|
@@ -198,9 +178,9 @@ module Dodopayments
|
|
|
198
178
|
purchasing_power_parity: bool,
|
|
199
179
|
subscription_period_count: Integer,
|
|
200
180
|
subscription_period_interval: Dodopayments::Models::time_interval,
|
|
201
|
-
type: Dodopayments::Models::Price::UsageBasedPrice::type_,
|
|
202
181
|
?meters: ::Array[Dodopayments::AddMeterToPrice]?,
|
|
203
|
-
?tax_inclusive: bool
|
|
182
|
+
?tax_inclusive: bool?,
|
|
183
|
+
?type: :usage_based_price
|
|
204
184
|
) -> void
|
|
205
185
|
|
|
206
186
|
def to_hash: -> {
|
|
@@ -212,20 +192,10 @@ module Dodopayments
|
|
|
212
192
|
purchasing_power_parity: bool,
|
|
213
193
|
subscription_period_count: Integer,
|
|
214
194
|
subscription_period_interval: Dodopayments::Models::time_interval,
|
|
215
|
-
type:
|
|
195
|
+
type: :usage_based_price,
|
|
216
196
|
meters: ::Array[Dodopayments::AddMeterToPrice]?,
|
|
217
197
|
tax_inclusive: bool?
|
|
218
198
|
}
|
|
219
|
-
|
|
220
|
-
type type_ = :usage_based_price
|
|
221
|
-
|
|
222
|
-
module Type
|
|
223
|
-
extend Dodopayments::Internal::Type::Enum
|
|
224
|
-
|
|
225
|
-
USAGE_BASED_PRICE: :usage_based_price
|
|
226
|
-
|
|
227
|
-
def self?.values: -> ::Array[Dodopayments::Models::Price::UsageBasedPrice::type_]
|
|
228
|
-
end
|
|
229
199
|
end
|
|
230
200
|
|
|
231
201
|
def self?.variants: -> ::Array[Dodopayments::Models::price]
|
|
@@ -5,7 +5,8 @@ module Dodopayments
|
|
|
5
5
|
product_id: String,
|
|
6
6
|
quantity: Integer,
|
|
7
7
|
addons: ::Array[Dodopayments::AttachAddon]?,
|
|
8
|
-
amount: Integer
|
|
8
|
+
amount: Integer?,
|
|
9
|
+
credit_entitlements: ::Array[Dodopayments::ProductItemReq::CreditEntitlement]?
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
class ProductItemReq < Dodopayments::Internal::Type::BaseModel
|
|
@@ -17,19 +18,42 @@ module Dodopayments
|
|
|
17
18
|
|
|
18
19
|
attr_accessor amount: Integer?
|
|
19
20
|
|
|
21
|
+
attr_accessor credit_entitlements: ::Array[Dodopayments::ProductItemReq::CreditEntitlement]?
|
|
22
|
+
|
|
20
23
|
def initialize: (
|
|
21
24
|
product_id: String,
|
|
22
25
|
quantity: Integer,
|
|
23
26
|
?addons: ::Array[Dodopayments::AttachAddon]?,
|
|
24
|
-
?amount: Integer
|
|
27
|
+
?amount: Integer?,
|
|
28
|
+
?credit_entitlements: ::Array[Dodopayments::ProductItemReq::CreditEntitlement]?
|
|
25
29
|
) -> void
|
|
26
30
|
|
|
27
31
|
def to_hash: -> {
|
|
28
32
|
product_id: String,
|
|
29
33
|
quantity: Integer,
|
|
30
34
|
addons: ::Array[Dodopayments::AttachAddon]?,
|
|
31
|
-
amount: Integer
|
|
35
|
+
amount: Integer?,
|
|
36
|
+
credit_entitlements: ::Array[Dodopayments::ProductItemReq::CreditEntitlement]?
|
|
32
37
|
}
|
|
38
|
+
|
|
39
|
+
type credit_entitlement =
|
|
40
|
+
{ credit_entitlement_id: String, credits_amount: String }
|
|
41
|
+
|
|
42
|
+
class CreditEntitlement < Dodopayments::Internal::Type::BaseModel
|
|
43
|
+
attr_accessor credit_entitlement_id: String
|
|
44
|
+
|
|
45
|
+
attr_accessor credits_amount: String
|
|
46
|
+
|
|
47
|
+
def initialize: (
|
|
48
|
+
credit_entitlement_id: String,
|
|
49
|
+
credits_amount: String
|
|
50
|
+
) -> void
|
|
51
|
+
|
|
52
|
+
def to_hash: -> {
|
|
53
|
+
credit_entitlement_id: String,
|
|
54
|
+
credits_amount: String
|
|
55
|
+
}
|
|
56
|
+
end
|
|
33
57
|
end
|
|
34
58
|
end
|
|
35
59
|
end
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::Refund,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"refund.failed"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class RefundFailedWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
@@ -15,31 +15,21 @@ module Dodopayments
|
|
|
15
15
|
|
|
16
16
|
attr_accessor timestamp: Time
|
|
17
17
|
|
|
18
|
-
attr_accessor type:
|
|
18
|
+
attr_accessor type: :"refund.failed"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::Refund,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"refund.failed"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::Refund,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"refund.failed"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"refund.failed"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
REFUND_FAILED: :"refund.failed"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::RefundFailedWebhookEvent::type_]
|
|
42
|
-
end
|
|
43
33
|
end
|
|
44
34
|
end
|
|
45
35
|
end
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::Refund,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"refund.succeeded"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class RefundSucceededWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
@@ -15,31 +15,21 @@ module Dodopayments
|
|
|
15
15
|
|
|
16
16
|
attr_accessor timestamp: Time
|
|
17
17
|
|
|
18
|
-
attr_accessor type:
|
|
18
|
+
attr_accessor type: :"refund.succeeded"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::Refund,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"refund.succeeded"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::Refund,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"refund.succeeded"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"refund.succeeded"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
REFUND_SUCCEEDED: :"refund.succeeded"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::RefundSucceededWebhookEvent::type_]
|
|
42
|
-
end
|
|
43
33
|
end
|
|
44
34
|
end
|
|
45
35
|
end
|