dodopayments 2.9.0 → 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 +23 -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/digital_product_delivery.rb +14 -7
- data/lib/dodopayments/models/digital_product_delivery_file.rb +12 -5
- 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.rb +31 -20
- data/lib/dodopayments/models/entitlement_create_params.rb +3 -3
- data/lib/dodopayments/models/entitlement_grant_created_webhook_event.rb +10 -17
- data/lib/dodopayments/models/entitlement_grant_delivered_webhook_event.rb +10 -17
- data/lib/dodopayments/models/entitlement_grant_failed_webhook_event.rb +10 -17
- data/lib/dodopayments/models/entitlement_grant_revoked_webhook_event.rb +10 -17
- data/lib/dodopayments/models/entitlement_update_params.rb +3 -3
- data/lib/dodopayments/models/entitlements/entitlement_grant.rb +50 -32
- data/lib/dodopayments/models/entitlements/file_upload_response.rb +3 -3
- data/lib/dodopayments/models/entitlements/license_key_grant.rb +14 -9
- data/lib/dodopayments/models/integration_config.rb +70 -27
- data/lib/dodopayments/models/integration_config_response.rb +88 -48
- 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 +6 -8
- data/lib/dodopayments/models/product_create_params.rb +3 -3
- data/lib/dodopayments/models/product_entitlement_summary.rb +5 -5
- 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 +57 -143
- data/lib/dodopayments/resources/checkout_sessions.rb +8 -4
- data/lib/dodopayments/resources/entitlements/files.rb +3 -10
- data/lib/dodopayments/resources/entitlements/grants.rb +2 -4
- data/lib/dodopayments/resources/entitlements.rb +2 -2
- 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/digital_product_delivery.rbi +15 -5
- data/rbi/dodopayments/models/digital_product_delivery_file.rbi +11 -0
- 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.rbi +35 -20
- data/rbi/dodopayments/models/entitlement_create_params.rbi +8 -5
- data/rbi/dodopayments/models/entitlement_grant_created_webhook_event.rbi +8 -40
- data/rbi/dodopayments/models/entitlement_grant_delivered_webhook_event.rbi +8 -40
- data/rbi/dodopayments/models/entitlement_grant_failed_webhook_event.rbi +8 -39
- data/rbi/dodopayments/models/entitlement_grant_revoked_webhook_event.rbi +8 -40
- data/rbi/dodopayments/models/entitlement_update_params.rbi +4 -4
- data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +54 -20
- data/rbi/dodopayments/models/entitlements/file_upload_response.rbi +4 -4
- data/rbi/dodopayments/models/entitlements/license_key_grant.rbi +10 -4
- data/rbi/dodopayments/models/integration_config.rbi +141 -26
- data/rbi/dodopayments/models/integration_config_response.rbi +153 -38
- 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.rbi +4 -8
- data/rbi/dodopayments/models/product_entitlement_summary.rbi +8 -8
- 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 +48 -466
- data/rbi/dodopayments/resources/checkout_sessions.rbi +12 -0
- data/rbi/dodopayments/resources/entitlements/files.rbi +3 -10
- data/rbi/dodopayments/resources/entitlements/grants.rbi +2 -4
- data/rbi/dodopayments/resources/entitlements.rbi +4 -4
- 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.rbs +8 -10
- data/sig/dodopayments/models/entitlement_create_params.rbs +6 -4
- 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/entitlements/entitlement_grant.rbs +4 -11
- data/sig/dodopayments/models/integration_config.rbs +28 -4
- data/sig/dodopayments/models/integration_config_response.rbs +28 -9
- 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/entitlements.rbs +1 -1
- data/sig/dodopayments/resources/payments.rbs +1 -0
- data/sig/dodopayments/resources/subscriptions.rbs +3 -0
- metadata +2 -2
|
@@ -23,6 +23,7 @@ module Dodopayments
|
|
|
23
23
|
),
|
|
24
24
|
customization: Dodopayments::CheckoutSessionCustomization::OrHash,
|
|
25
25
|
discount_code: T.nilable(String),
|
|
26
|
+
discount_codes: T.nilable(T::Array[String]),
|
|
26
27
|
feature_flags: Dodopayments::CheckoutSessionFlags::OrHash,
|
|
27
28
|
force_3ds: T.nilable(T::Boolean),
|
|
28
29
|
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
@@ -63,7 +64,12 @@ module Dodopayments
|
|
|
63
64
|
customer: nil,
|
|
64
65
|
# Customization for the checkout session page
|
|
65
66
|
customization: nil,
|
|
67
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
68
|
+
# discount_codes.
|
|
66
69
|
discount_code: nil,
|
|
70
|
+
# Stacked discount codes to apply, in order. Max 20. Cannot be used together with
|
|
71
|
+
# discount_code.
|
|
72
|
+
discount_codes: nil,
|
|
67
73
|
feature_flags: nil,
|
|
68
74
|
# Override merchant default 3DS behaviour for this session
|
|
69
75
|
force_3ds: nil,
|
|
@@ -128,6 +134,7 @@ module Dodopayments
|
|
|
128
134
|
),
|
|
129
135
|
customization: Dodopayments::CheckoutSessionCustomization::OrHash,
|
|
130
136
|
discount_code: T.nilable(String),
|
|
137
|
+
discount_codes: T.nilable(T::Array[String]),
|
|
131
138
|
feature_flags: Dodopayments::CheckoutSessionFlags::OrHash,
|
|
132
139
|
force_3ds: T.nilable(T::Boolean),
|
|
133
140
|
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
@@ -168,7 +175,12 @@ module Dodopayments
|
|
|
168
175
|
customer: nil,
|
|
169
176
|
# Customization for the checkout session page
|
|
170
177
|
customization: nil,
|
|
178
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
179
|
+
# discount_codes.
|
|
171
180
|
discount_code: nil,
|
|
181
|
+
# Stacked discount codes to apply, in order. Max 20. Cannot be used together with
|
|
182
|
+
# discount_code.
|
|
183
|
+
discount_codes: nil,
|
|
172
184
|
feature_flags: nil,
|
|
173
185
|
# Override merchant default 3DS behaviour for this session
|
|
174
186
|
force_3ds: nil,
|
|
@@ -4,10 +4,7 @@ module Dodopayments
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Entitlements
|
|
6
6
|
class Files
|
|
7
|
-
#
|
|
8
|
-
# Engine (force=true) and atomically removes the `file_id` from the entitlement's
|
|
9
|
-
# `integration_config.digital_file_ids` JSONB array. EE delete happens first; if
|
|
10
|
-
# it fails we surface the error and leave local state untouched.
|
|
7
|
+
# Detach a previously-attached file from a `digital_files` entitlement.
|
|
11
8
|
sig do
|
|
12
9
|
params(
|
|
13
10
|
file_id: String,
|
|
@@ -16,7 +13,7 @@ module Dodopayments
|
|
|
16
13
|
).void
|
|
17
14
|
end
|
|
18
15
|
def delete(
|
|
19
|
-
#
|
|
16
|
+
# Identifier of the attached file
|
|
20
17
|
file_id,
|
|
21
18
|
# Entitlement Id
|
|
22
19
|
id:,
|
|
@@ -24,11 +21,7 @@ module Dodopayments
|
|
|
24
21
|
)
|
|
25
22
|
end
|
|
26
23
|
|
|
27
|
-
#
|
|
28
|
-
# (`POST /api/digital-files/dodo/files/upload`) and appends the returned `file_id`
|
|
29
|
-
# to the entitlement's `integration_config.digital_file_ids` using a JSONB array
|
|
30
|
-
# append. Compensates EE-side on local DB write failure (best-effort delete of the
|
|
31
|
-
# just-uploaded file).
|
|
24
|
+
# Attach a file to a `digital_files` entitlement. Per-file size cap: 500 MiB.
|
|
32
25
|
sig do
|
|
33
26
|
params(
|
|
34
27
|
id: String,
|
|
@@ -35,10 +35,8 @@ module Dodopayments
|
|
|
35
35
|
)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
# already-revoked grant returns 200 with current state. The revocation reason is
|
|
41
|
-
# always set to "manual" for API-initiated revocations.
|
|
38
|
+
# Revoke a single grant. Idempotent: re-revoking an already-revoked grant returns
|
|
39
|
+
# the grant in its current state.
|
|
42
40
|
sig do
|
|
43
41
|
params(
|
|
44
42
|
grant_id: String,
|
|
@@ -26,7 +26,7 @@ module Dodopayments
|
|
|
26
26
|
integration_type: Dodopayments::EntitlementIntegrationType::OrSymbol,
|
|
27
27
|
name: String,
|
|
28
28
|
description: T.nilable(String),
|
|
29
|
-
metadata: T
|
|
29
|
+
metadata: T::Hash[Symbol, String],
|
|
30
30
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
31
31
|
).returns(Dodopayments::Entitlement)
|
|
32
32
|
end
|
|
@@ -39,7 +39,7 @@ module Dodopayments
|
|
|
39
39
|
name:,
|
|
40
40
|
# Optional description
|
|
41
41
|
description: nil,
|
|
42
|
-
#
|
|
42
|
+
# Additional metadata for the entitlement
|
|
43
43
|
metadata: nil,
|
|
44
44
|
request_options: {}
|
|
45
45
|
)
|
|
@@ -86,8 +86,8 @@ module Dodopayments
|
|
|
86
86
|
# Entitlement ID
|
|
87
87
|
id,
|
|
88
88
|
description: nil,
|
|
89
|
-
#
|
|
90
|
-
#
|
|
89
|
+
# Integration-specific configuration supplied when creating or updating an
|
|
90
|
+
# entitlement. The shape required matches the entitlement's `integration_type`.
|
|
91
91
|
integration_config: nil,
|
|
92
92
|
metadata: nil,
|
|
93
93
|
name: nil,
|
|
@@ -17,6 +17,7 @@ module Dodopayments
|
|
|
17
17
|
T.nilable(T::Array[Dodopayments::PaymentMethodTypes::OrSymbol]),
|
|
18
18
|
billing_currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
19
19
|
discount_code: T.nilable(String),
|
|
20
|
+
discount_codes: T.nilable(T::Array[String]),
|
|
20
21
|
force_3ds: T.nilable(T::Boolean),
|
|
21
22
|
metadata: T::Hash[Symbol, String],
|
|
22
23
|
payment_link: T.nilable(T::Boolean),
|
|
@@ -50,8 +51,12 @@ module Dodopayments
|
|
|
50
51
|
# Fix the currency in which the end customer is billed. If Dodo Payments cannot
|
|
51
52
|
# support that currency for this transaction, it will not proceed
|
|
52
53
|
billing_currency: nil,
|
|
53
|
-
#
|
|
54
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
55
|
+
# discount_codes.
|
|
54
56
|
discount_code: nil,
|
|
57
|
+
# Stacked discount codes to apply, in order of application. Max 20. Cannot be used
|
|
58
|
+
# together with discount_code.
|
|
59
|
+
discount_codes: nil,
|
|
55
60
|
# Override merchant default 3DS behaviour for this payment
|
|
56
61
|
force_3ds: nil,
|
|
57
62
|
# Additional metadata associated with the payment. Defaults to empty if not
|
|
@@ -18,6 +18,7 @@ module Dodopayments
|
|
|
18
18
|
T.nilable(T::Array[Dodopayments::PaymentMethodTypes::OrSymbol]),
|
|
19
19
|
billing_currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
20
20
|
discount_code: T.nilable(String),
|
|
21
|
+
discount_codes: T.nilable(T::Array[String]),
|
|
21
22
|
force_3ds: T.nilable(T::Boolean),
|
|
22
23
|
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
23
24
|
metadata: T::Hash[Symbol, String],
|
|
@@ -57,8 +58,12 @@ module Dodopayments
|
|
|
57
58
|
# Fix the currency in which the end customer is billed. If Dodo Payments cannot
|
|
58
59
|
# support that currency for this transaction, it will not proceed
|
|
59
60
|
billing_currency: nil,
|
|
60
|
-
#
|
|
61
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
62
|
+
# discount_codes.
|
|
61
63
|
discount_code: nil,
|
|
64
|
+
# Stacked discount codes to apply, in order of application. Max 20. Cannot be used
|
|
65
|
+
# together with discount_code.
|
|
66
|
+
discount_codes: nil,
|
|
62
67
|
# Override merchant default 3DS behaviour for this subscription
|
|
63
68
|
force_3ds: nil,
|
|
64
69
|
# Override the merchant-level mandate floor (in INR paise) for INR e-mandates on
|
|
@@ -232,6 +237,7 @@ module Dodopayments
|
|
|
232
237
|
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
|
233
238
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon::OrHash]),
|
|
234
239
|
discount_code: T.nilable(String),
|
|
240
|
+
discount_codes: T.nilable(T::Array[String]),
|
|
235
241
|
effective_at:
|
|
236
242
|
Dodopayments::UpdateSubscriptionPlanReq::EffectiveAt::OrSymbol,
|
|
237
243
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
@@ -257,11 +263,14 @@ module Dodopayments
|
|
|
257
263
|
# Addons for the new plan. Note : Leaving this empty would remove any existing
|
|
258
264
|
# addons
|
|
259
265
|
addons: nil,
|
|
260
|
-
#
|
|
261
|
-
#
|
|
262
|
-
# has an existing discount with `preserve_on_plan_change=true`, the existing
|
|
263
|
-
# discount will be preserved (if applicable to the new product).
|
|
266
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
267
|
+
# discount_codes.
|
|
264
268
|
discount_code: nil,
|
|
269
|
+
# Stacked discount codes to apply to the new plan. Max 20. Cannot be used together
|
|
270
|
+
# with discount_code. If provided, replaces any existing discount codes. Empty
|
|
271
|
+
# array removes all discounts. If not provided (None), existing discounts with
|
|
272
|
+
# preserve_on_plan_change=true are preserved.
|
|
273
|
+
discount_codes: nil,
|
|
265
274
|
# When to apply the plan change.
|
|
266
275
|
#
|
|
267
276
|
# - `immediately` (default): Apply the plan change right away
|
|
@@ -332,6 +341,7 @@ module Dodopayments
|
|
|
332
341
|
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
|
333
342
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon::OrHash]),
|
|
334
343
|
discount_code: T.nilable(String),
|
|
344
|
+
discount_codes: T.nilable(T::Array[String]),
|
|
335
345
|
effective_at:
|
|
336
346
|
Dodopayments::UpdateSubscriptionPlanReq::EffectiveAt::OrSymbol,
|
|
337
347
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
@@ -357,11 +367,14 @@ module Dodopayments
|
|
|
357
367
|
# Addons for the new plan. Note : Leaving this empty would remove any existing
|
|
358
368
|
# addons
|
|
359
369
|
addons: nil,
|
|
360
|
-
#
|
|
361
|
-
#
|
|
362
|
-
# has an existing discount with `preserve_on_plan_change=true`, the existing
|
|
363
|
-
# discount will be preserved (if applicable to the new product).
|
|
370
|
+
# DEPRECATED: Use discount_codes instead. Cannot be used together with
|
|
371
|
+
# discount_codes.
|
|
364
372
|
discount_code: nil,
|
|
373
|
+
# Stacked discount codes to apply to the new plan. Max 20. Cannot be used together
|
|
374
|
+
# with discount_code. If provided, replaces any existing discount codes. Empty
|
|
375
|
+
# array removes all discounts. If not provided (None), existing discounts with
|
|
376
|
+
# preserve_on_plan_change=true are preserved.
|
|
377
|
+
discount_codes: nil,
|
|
365
378
|
# When to apply the plan change.
|
|
366
379
|
#
|
|
367
380
|
# - `immediately` (default): Apply the plan change right away
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Data,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"abandoned_checkout.detected"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class AbandonedCheckoutDetectedWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
@@ -15,20 +15,20 @@ module Dodopayments
|
|
|
15
15
|
|
|
16
16
|
attr_accessor timestamp: Time
|
|
17
17
|
|
|
18
|
-
attr_accessor type:
|
|
18
|
+
attr_accessor type: :"abandoned_checkout.detected"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Data,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"abandoned_checkout.detected"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::AbandonedCheckoutDetectedWebhookEvent::Data,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"abandoned_checkout.detected"
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
type data =
|
|
@@ -98,16 +98,6 @@ module Dodopayments
|
|
|
98
98
|
def self?.values: -> ::Array[Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::Data::status]
|
|
99
99
|
end
|
|
100
100
|
end
|
|
101
|
-
|
|
102
|
-
type type_ = :"abandoned_checkout.detected"
|
|
103
|
-
|
|
104
|
-
module Type
|
|
105
|
-
extend Dodopayments::Internal::Type::Enum
|
|
106
|
-
|
|
107
|
-
ABANDONED_CHECKOUT_DETECTED: :"abandoned_checkout.detected"
|
|
108
|
-
|
|
109
|
-
def self?.values: -> ::Array[Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent::type_]
|
|
110
|
-
end
|
|
111
101
|
end
|
|
112
102
|
end
|
|
113
103
|
end
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::AbandonedCheckoutRecoveredWebhookEvent::Data,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"abandoned_checkout.recovered"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class AbandonedCheckoutRecoveredWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
@@ -15,20 +15,20 @@ module Dodopayments
|
|
|
15
15
|
|
|
16
16
|
attr_accessor timestamp: Time
|
|
17
17
|
|
|
18
|
-
attr_accessor type:
|
|
18
|
+
attr_accessor type: :"abandoned_checkout.recovered"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::AbandonedCheckoutRecoveredWebhookEvent::Data,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"abandoned_checkout.recovered"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::AbandonedCheckoutRecoveredWebhookEvent::Data,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"abandoned_checkout.recovered"
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
type data =
|
|
@@ -98,16 +98,6 @@ module Dodopayments
|
|
|
98
98
|
def self?.values: -> ::Array[Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::Data::status]
|
|
99
99
|
end
|
|
100
100
|
end
|
|
101
|
-
|
|
102
|
-
type type_ = :"abandoned_checkout.recovered"
|
|
103
|
-
|
|
104
|
-
module Type
|
|
105
|
-
extend Dodopayments::Internal::Type::Enum
|
|
106
|
-
|
|
107
|
-
ABANDONED_CHECKOUT_RECOVERED: :"abandoned_checkout.recovered"
|
|
108
|
-
|
|
109
|
-
def self?.values: -> ::Array[Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent::type_]
|
|
110
|
-
end
|
|
111
101
|
end
|
|
112
102
|
end
|
|
113
103
|
end
|
|
@@ -12,6 +12,7 @@ module Dodopayments
|
|
|
12
12
|
customer: Dodopayments::Models::customer_request?,
|
|
13
13
|
customization: Dodopayments::CheckoutSessionCustomization,
|
|
14
14
|
discount_code: String?,
|
|
15
|
+
discount_codes: ::Array[String]?,
|
|
15
16
|
feature_flags: Dodopayments::CheckoutSessionFlags,
|
|
16
17
|
:force_3ds => bool?,
|
|
17
18
|
mandate_min_amount_inr_paise: Integer?,
|
|
@@ -53,6 +54,8 @@ module Dodopayments
|
|
|
53
54
|
|
|
54
55
|
attr_accessor discount_code: String?
|
|
55
56
|
|
|
57
|
+
attr_accessor discount_codes: ::Array[String]?
|
|
58
|
+
|
|
56
59
|
attr_reader feature_flags: Dodopayments::CheckoutSessionFlags?
|
|
57
60
|
|
|
58
61
|
def feature_flags=: (
|
|
@@ -98,6 +101,7 @@ module Dodopayments
|
|
|
98
101
|
?customer: Dodopayments::Models::customer_request?,
|
|
99
102
|
?customization: Dodopayments::CheckoutSessionCustomization,
|
|
100
103
|
?discount_code: String?,
|
|
104
|
+
?discount_codes: ::Array[String]?,
|
|
101
105
|
?feature_flags: Dodopayments::CheckoutSessionFlags,
|
|
102
106
|
?force_3ds: bool?,
|
|
103
107
|
?mandate_min_amount_inr_paise: Integer?,
|
|
@@ -123,6 +127,7 @@ module Dodopayments
|
|
|
123
127
|
customer: Dodopayments::Models::customer_request?,
|
|
124
128
|
customization: Dodopayments::CheckoutSessionCustomization,
|
|
125
129
|
discount_code: String?,
|
|
130
|
+
discount_codes: ::Array[String]?,
|
|
126
131
|
feature_flags: Dodopayments::CheckoutSessionFlags,
|
|
127
132
|
:force_3ds => bool?,
|
|
128
133
|
mandate_min_amount_inr_paise: Integer?,
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"credit.added"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class CreditAddedWebhookEvent < 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: :"credit.added"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"credit.added"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"credit.added"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"credit.added"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
CREDIT_ADDED: :"credit.added"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::CreditAddedWebhookEvent::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::CreditBalanceLowWebhookEvent::Data,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"credit.balance_low"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class CreditBalanceLowWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
@@ -15,20 +15,20 @@ module Dodopayments
|
|
|
15
15
|
|
|
16
16
|
attr_accessor timestamp: Time
|
|
17
17
|
|
|
18
|
-
attr_accessor type:
|
|
18
|
+
attr_accessor type: :"credit.balance_low"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::CreditBalanceLowWebhookEvent::Data,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"credit.balance_low"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::CreditBalanceLowWebhookEvent::Data,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"credit.balance_low"
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
type data =
|
|
@@ -82,16 +82,6 @@ module Dodopayments
|
|
|
82
82
|
threshold_percent: Integer
|
|
83
83
|
}
|
|
84
84
|
end
|
|
85
|
-
|
|
86
|
-
type type_ = :"credit.balance_low"
|
|
87
|
-
|
|
88
|
-
module Type
|
|
89
|
-
extend Dodopayments::Internal::Type::Enum
|
|
90
|
-
|
|
91
|
-
CREDIT_BALANCE_LOW: :"credit.balance_low"
|
|
92
|
-
|
|
93
|
-
def self?.values: -> ::Array[Dodopayments::Models::CreditBalanceLowWebhookEvent::type_]
|
|
94
|
-
end
|
|
95
85
|
end
|
|
96
86
|
end
|
|
97
87
|
end
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"credit.deducted"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class CreditDeductedWebhookEvent < 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: :"credit.deducted"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"credit.deducted"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"credit.deducted"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"credit.deducted"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
CREDIT_DEDUCTED: :"credit.deducted"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::CreditDeductedWebhookEvent::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::CreditEntitlements::CreditLedgerEntry,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"credit.expired"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class CreditExpiredWebhookEvent < 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: :"credit.expired"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"credit.expired"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"credit.expired"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"credit.expired"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
CREDIT_EXPIRED: :"credit.expired"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::CreditExpiredWebhookEvent::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::CreditEntitlements::CreditLedgerEntry,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"credit.manual_adjustment"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class CreditManualAdjustmentWebhookEvent < 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: :"credit.manual_adjustment"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"credit.manual_adjustment"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"credit.manual_adjustment"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"credit.manual_adjustment"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
CREDIT_MANUAL_ADJUSTMENT: :"credit.manual_adjustment"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::CreditManualAdjustmentWebhookEvent::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::CreditEntitlements::CreditLedgerEntry,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"credit.overage_charged"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class CreditOverageChargedWebhookEvent < 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: :"credit.overage_charged"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"credit.overage_charged"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"credit.overage_charged"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"credit.overage_charged"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
CREDIT_OVERAGE_CHARGED: :"credit.overage_charged"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::CreditOverageChargedWebhookEvent::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::CreditEntitlements::CreditLedgerEntry,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"credit.overage_reset"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class CreditOverageResetWebhookEvent < 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: :"credit.overage_reset"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"credit.overage_reset"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::CreditEntitlements::CreditLedgerEntry,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"credit.overage_reset"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"credit.overage_reset"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
CREDIT_OVERAGE_RESET: :"credit.overage_reset"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::CreditOverageResetWebhookEvent::type_]
|
|
42
|
-
end
|
|
43
33
|
end
|
|
44
34
|
end
|
|
45
35
|
end
|