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
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::Subscription,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"subscription.failed"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class SubscriptionFailedWebhookEvent < 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: :"subscription.failed"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::Subscription,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"subscription.failed"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::Subscription,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"subscription.failed"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"subscription.failed"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
SUBSCRIPTION_FAILED: :"subscription.failed"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionFailedWebhookEvent::type_]
|
|
42
|
-
end
|
|
43
33
|
end
|
|
44
34
|
end
|
|
45
35
|
end
|
|
@@ -7,6 +7,7 @@ module Dodopayments
|
|
|
7
7
|
created_at: Time,
|
|
8
8
|
currency: Dodopayments::Models::currency,
|
|
9
9
|
customer: Dodopayments::CustomerLimitedDetails,
|
|
10
|
+
discounts: ::Array[Dodopayments::Models::SubscriptionListResponse::Discount],
|
|
10
11
|
metadata: ::Hash[Symbol, String],
|
|
11
12
|
next_billing_date: Time,
|
|
12
13
|
on_demand: bool,
|
|
@@ -42,6 +43,8 @@ module Dodopayments
|
|
|
42
43
|
|
|
43
44
|
attr_accessor customer: Dodopayments::CustomerLimitedDetails
|
|
44
45
|
|
|
46
|
+
attr_accessor discounts: ::Array[Dodopayments::Models::SubscriptionListResponse::Discount]
|
|
47
|
+
|
|
45
48
|
attr_accessor metadata: ::Hash[Symbol, String]
|
|
46
49
|
|
|
47
50
|
attr_accessor next_billing_date: Time
|
|
@@ -92,6 +95,7 @@ module Dodopayments
|
|
|
92
95
|
created_at: Time,
|
|
93
96
|
currency: Dodopayments::Models::currency,
|
|
94
97
|
customer: Dodopayments::CustomerLimitedDetails,
|
|
98
|
+
discounts: ::Array[Dodopayments::Models::SubscriptionListResponse::Discount],
|
|
95
99
|
metadata: ::Hash[Symbol, String],
|
|
96
100
|
next_billing_date: Time,
|
|
97
101
|
on_demand: bool,
|
|
@@ -122,6 +126,7 @@ module Dodopayments
|
|
|
122
126
|
created_at: Time,
|
|
123
127
|
currency: Dodopayments::Models::currency,
|
|
124
128
|
customer: Dodopayments::CustomerLimitedDetails,
|
|
129
|
+
discounts: ::Array[Dodopayments::Models::SubscriptionListResponse::Discount],
|
|
125
130
|
metadata: ::Hash[Symbol, String],
|
|
126
131
|
next_billing_date: Time,
|
|
127
132
|
on_demand: bool,
|
|
@@ -145,6 +150,25 @@ module Dodopayments
|
|
|
145
150
|
scheduled_change: Dodopayments::ScheduledPlanChange?,
|
|
146
151
|
tax_id: String?
|
|
147
152
|
}
|
|
153
|
+
|
|
154
|
+
type discount =
|
|
155
|
+
{ discount_id: String, discount_cycles_remaining: Integer? }
|
|
156
|
+
|
|
157
|
+
class Discount < Dodopayments::Internal::Type::BaseModel
|
|
158
|
+
attr_accessor discount_id: String
|
|
159
|
+
|
|
160
|
+
attr_accessor discount_cycles_remaining: Integer?
|
|
161
|
+
|
|
162
|
+
def initialize: (
|
|
163
|
+
discount_id: String,
|
|
164
|
+
?discount_cycles_remaining: Integer?
|
|
165
|
+
) -> void
|
|
166
|
+
|
|
167
|
+
def to_hash: -> {
|
|
168
|
+
discount_id: String,
|
|
169
|
+
discount_cycles_remaining: Integer?
|
|
170
|
+
}
|
|
171
|
+
end
|
|
148
172
|
end
|
|
149
173
|
end
|
|
150
174
|
end
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::Subscription,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"subscription.on_hold"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class SubscriptionOnHoldWebhookEvent < 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: :"subscription.on_hold"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::Subscription,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"subscription.on_hold"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::Subscription,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"subscription.on_hold"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"subscription.on_hold"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
SUBSCRIPTION_ON_HOLD: :"subscription.on_hold"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionOnHoldWebhookEvent::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::Subscription,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"subscription.plan_changed"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class SubscriptionPlanChangedWebhookEvent < 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: :"subscription.plan_changed"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::Subscription,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"subscription.plan_changed"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::Subscription,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"subscription.plan_changed"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"subscription.plan_changed"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
SUBSCRIPTION_PLAN_CHANGED: :"subscription.plan_changed"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPlanChangedWebhookEvent::type_]
|
|
42
|
-
end
|
|
43
33
|
end
|
|
44
34
|
end
|
|
45
35
|
end
|
|
@@ -63,7 +63,7 @@ module Dodopayments
|
|
|
63
63
|
proration_factor: Float,
|
|
64
64
|
quantity: Integer,
|
|
65
65
|
tax_inclusive: bool,
|
|
66
|
-
type:
|
|
66
|
+
type: :subscription,
|
|
67
67
|
unit_price: Integer,
|
|
68
68
|
description: String?,
|
|
69
69
|
name: String?,
|
|
@@ -84,7 +84,7 @@ module Dodopayments
|
|
|
84
84
|
|
|
85
85
|
attr_accessor tax_inclusive: bool
|
|
86
86
|
|
|
87
|
-
attr_accessor type:
|
|
87
|
+
attr_accessor type: :subscription
|
|
88
88
|
|
|
89
89
|
attr_accessor unit_price: Integer
|
|
90
90
|
|
|
@@ -103,12 +103,12 @@ module Dodopayments
|
|
|
103
103
|
proration_factor: Float,
|
|
104
104
|
quantity: Integer,
|
|
105
105
|
tax_inclusive: bool,
|
|
106
|
-
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::type_,
|
|
107
106
|
unit_price: Integer,
|
|
108
107
|
?description: String?,
|
|
109
108
|
?name: String?,
|
|
110
109
|
?tax: Integer?,
|
|
111
|
-
?tax_rate: Float
|
|
110
|
+
?tax_rate: Float?,
|
|
111
|
+
?type: :subscription
|
|
112
112
|
) -> void
|
|
113
113
|
|
|
114
114
|
def to_hash: -> {
|
|
@@ -118,23 +118,13 @@ module Dodopayments
|
|
|
118
118
|
proration_factor: Float,
|
|
119
119
|
quantity: Integer,
|
|
120
120
|
tax_inclusive: bool,
|
|
121
|
-
type:
|
|
121
|
+
type: :subscription,
|
|
122
122
|
unit_price: Integer,
|
|
123
123
|
description: String?,
|
|
124
124
|
name: String?,
|
|
125
125
|
tax: Integer?,
|
|
126
126
|
tax_rate: Float?
|
|
127
127
|
}
|
|
128
|
-
|
|
129
|
-
type type_ = :subscription
|
|
130
|
-
|
|
131
|
-
module Type
|
|
132
|
-
extend Dodopayments::Internal::Type::Enum
|
|
133
|
-
|
|
134
|
-
SUBSCRIPTION: :subscription
|
|
135
|
-
|
|
136
|
-
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::type_]
|
|
137
|
-
end
|
|
138
128
|
end
|
|
139
129
|
|
|
140
130
|
type addon =
|
|
@@ -147,7 +137,7 @@ module Dodopayments
|
|
|
147
137
|
tax_category: Dodopayments::Models::tax_category,
|
|
148
138
|
tax_inclusive: bool,
|
|
149
139
|
tax_rate: Float,
|
|
150
|
-
type:
|
|
140
|
+
type: :addon,
|
|
151
141
|
unit_price: Integer,
|
|
152
142
|
description: String?,
|
|
153
143
|
tax: Integer?
|
|
@@ -170,7 +160,7 @@ module Dodopayments
|
|
|
170
160
|
|
|
171
161
|
attr_accessor tax_rate: Float
|
|
172
162
|
|
|
173
|
-
attr_accessor type:
|
|
163
|
+
attr_accessor type: :addon
|
|
174
164
|
|
|
175
165
|
attr_accessor unit_price: Integer
|
|
176
166
|
|
|
@@ -187,10 +177,10 @@ module Dodopayments
|
|
|
187
177
|
tax_category: Dodopayments::Models::tax_category,
|
|
188
178
|
tax_inclusive: bool,
|
|
189
179
|
tax_rate: Float,
|
|
190
|
-
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::type_,
|
|
191
180
|
unit_price: Integer,
|
|
192
181
|
?description: String?,
|
|
193
|
-
?tax: Integer
|
|
182
|
+
?tax: Integer?,
|
|
183
|
+
?type: :addon
|
|
194
184
|
) -> void
|
|
195
185
|
|
|
196
186
|
def to_hash: -> {
|
|
@@ -202,21 +192,11 @@ module Dodopayments
|
|
|
202
192
|
tax_category: Dodopayments::Models::tax_category,
|
|
203
193
|
tax_inclusive: bool,
|
|
204
194
|
tax_rate: Float,
|
|
205
|
-
type:
|
|
195
|
+
type: :addon,
|
|
206
196
|
unit_price: Integer,
|
|
207
197
|
description: String?,
|
|
208
198
|
tax: Integer?
|
|
209
199
|
}
|
|
210
|
-
|
|
211
|
-
type type_ = :addon
|
|
212
|
-
|
|
213
|
-
module Type
|
|
214
|
-
extend Dodopayments::Internal::Type::Enum
|
|
215
|
-
|
|
216
|
-
ADDON: :addon
|
|
217
|
-
|
|
218
|
-
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::type_]
|
|
219
|
-
end
|
|
220
200
|
end
|
|
221
201
|
|
|
222
202
|
type meter =
|
|
@@ -230,7 +210,7 @@ module Dodopayments
|
|
|
230
210
|
subtotal: Integer,
|
|
231
211
|
tax_inclusive: bool,
|
|
232
212
|
tax_rate: Float,
|
|
233
|
-
type:
|
|
213
|
+
type: :meter,
|
|
234
214
|
units_consumed: String,
|
|
235
215
|
description: String?,
|
|
236
216
|
tax: Integer?
|
|
@@ -255,7 +235,7 @@ module Dodopayments
|
|
|
255
235
|
|
|
256
236
|
attr_accessor tax_rate: Float
|
|
257
237
|
|
|
258
|
-
attr_accessor type:
|
|
238
|
+
attr_accessor type: :meter
|
|
259
239
|
|
|
260
240
|
attr_accessor units_consumed: String
|
|
261
241
|
|
|
@@ -273,10 +253,10 @@ module Dodopayments
|
|
|
273
253
|
subtotal: Integer,
|
|
274
254
|
tax_inclusive: bool,
|
|
275
255
|
tax_rate: Float,
|
|
276
|
-
type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::type_,
|
|
277
256
|
units_consumed: String,
|
|
278
257
|
?description: String?,
|
|
279
|
-
?tax: Integer
|
|
258
|
+
?tax: Integer?,
|
|
259
|
+
?type: :meter
|
|
280
260
|
) -> void
|
|
281
261
|
|
|
282
262
|
def to_hash: -> {
|
|
@@ -289,21 +269,11 @@ module Dodopayments
|
|
|
289
269
|
subtotal: Integer,
|
|
290
270
|
tax_inclusive: bool,
|
|
291
271
|
tax_rate: Float,
|
|
292
|
-
type:
|
|
272
|
+
type: :meter,
|
|
293
273
|
units_consumed: String,
|
|
294
274
|
description: String?,
|
|
295
275
|
tax: Integer?
|
|
296
276
|
}
|
|
297
|
-
|
|
298
|
-
type type_ = :meter
|
|
299
|
-
|
|
300
|
-
module Type
|
|
301
|
-
extend Dodopayments::Internal::Type::Enum
|
|
302
|
-
|
|
303
|
-
METER: :meter
|
|
304
|
-
|
|
305
|
-
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::type_]
|
|
306
|
-
end
|
|
307
277
|
end
|
|
308
278
|
|
|
309
279
|
def self?.variants: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::line_item]
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::Subscription,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"subscription.renewed"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class SubscriptionRenewedWebhookEvent < 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: :"subscription.renewed"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::Subscription,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"subscription.renewed"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::Subscription,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"subscription.renewed"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"subscription.renewed"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
SUBSCRIPTION_RENEWED: :"subscription.renewed"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionRenewedWebhookEvent::type_]
|
|
42
|
-
end
|
|
43
33
|
end
|
|
44
34
|
end
|
|
45
35
|
end
|
|
@@ -34,68 +34,28 @@ module Dodopayments
|
|
|
34
34
|
module Body
|
|
35
35
|
extend Dodopayments::Internal::Type::Union
|
|
36
36
|
|
|
37
|
-
type new_ =
|
|
38
|
-
{
|
|
39
|
-
type: Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::New::type_,
|
|
40
|
-
return_url: String?
|
|
41
|
-
}
|
|
37
|
+
type new_ = { type: :new, return_url: String? }
|
|
42
38
|
|
|
43
39
|
class New < Dodopayments::Internal::Type::BaseModel
|
|
44
|
-
attr_accessor type:
|
|
40
|
+
attr_accessor type: :new
|
|
45
41
|
|
|
46
42
|
attr_accessor return_url: String?
|
|
47
43
|
|
|
48
|
-
def initialize: (
|
|
49
|
-
type: Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::New::type_,
|
|
50
|
-
?return_url: String?
|
|
51
|
-
) -> void
|
|
44
|
+
def initialize: (?return_url: String?, ?type: :new) -> void
|
|
52
45
|
|
|
53
|
-
def to_hash: -> {
|
|
54
|
-
type: Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::New::type_,
|
|
55
|
-
return_url: String?
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
type type_ = :new
|
|
59
|
-
|
|
60
|
-
module Type
|
|
61
|
-
extend Dodopayments::Internal::Type::Enum
|
|
62
|
-
|
|
63
|
-
NEW: :new
|
|
64
|
-
|
|
65
|
-
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::New::type_]
|
|
66
|
-
end
|
|
46
|
+
def to_hash: -> { type: :new, return_url: String? }
|
|
67
47
|
end
|
|
68
48
|
|
|
69
|
-
type existing =
|
|
70
|
-
{
|
|
71
|
-
payment_method_id: String,
|
|
72
|
-
type: Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::Existing::type_
|
|
73
|
-
}
|
|
49
|
+
type existing = { payment_method_id: String, type: :existing }
|
|
74
50
|
|
|
75
51
|
class Existing < Dodopayments::Internal::Type::BaseModel
|
|
76
52
|
attr_accessor payment_method_id: String
|
|
77
53
|
|
|
78
|
-
attr_accessor type:
|
|
79
|
-
|
|
80
|
-
def initialize: (
|
|
81
|
-
payment_method_id: String,
|
|
82
|
-
type: Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::Existing::type_
|
|
83
|
-
) -> void
|
|
84
|
-
|
|
85
|
-
def to_hash: -> {
|
|
86
|
-
payment_method_id: String,
|
|
87
|
-
type: Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Body::Existing::type_
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
type type_ = :existing
|
|
91
|
-
|
|
92
|
-
module Type
|
|
93
|
-
extend Dodopayments::Internal::Type::Enum
|
|
54
|
+
attr_accessor type: :existing
|
|
94
55
|
|
|
95
|
-
|
|
56
|
+
def initialize: (payment_method_id: String, ?type: :existing) -> void
|
|
96
57
|
|
|
97
|
-
|
|
98
|
-
end
|
|
58
|
+
def to_hash: -> { payment_method_id: String, type: :existing }
|
|
99
59
|
end
|
|
100
60
|
|
|
101
61
|
def self?.variants: -> ::Array[Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::body]
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
business_id: String,
|
|
6
6
|
data: Dodopayments::Subscription,
|
|
7
7
|
timestamp: Time,
|
|
8
|
-
type:
|
|
8
|
+
type: :"subscription.updated"
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
class SubscriptionUpdatedWebhookEvent < 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: :"subscription.updated"
|
|
19
19
|
|
|
20
20
|
def initialize: (
|
|
21
21
|
business_id: String,
|
|
22
22
|
data: Dodopayments::Subscription,
|
|
23
23
|
timestamp: Time,
|
|
24
|
-
type:
|
|
24
|
+
?type: :"subscription.updated"
|
|
25
25
|
) -> void
|
|
26
26
|
|
|
27
27
|
def to_hash: -> {
|
|
28
28
|
business_id: String,
|
|
29
29
|
data: Dodopayments::Subscription,
|
|
30
30
|
timestamp: Time,
|
|
31
|
-
type:
|
|
31
|
+
type: :"subscription.updated"
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
type type_ = :"subscription.updated"
|
|
35
|
-
|
|
36
|
-
module Type
|
|
37
|
-
extend Dodopayments::Internal::Type::Enum
|
|
38
|
-
|
|
39
|
-
SUBSCRIPTION_UPDATED: :"subscription.updated"
|
|
40
|
-
|
|
41
|
-
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionUpdatedWebhookEvent::type_]
|
|
42
|
-
end
|
|
43
33
|
end
|
|
44
34
|
end
|
|
45
35
|
end
|
|
@@ -8,6 +8,7 @@ module Dodopayments
|
|
|
8
8
|
adaptive_currency_fees_inclusive: bool?,
|
|
9
9
|
addons: ::Array[Dodopayments::AttachAddon]?,
|
|
10
10
|
discount_code: String?,
|
|
11
|
+
discount_codes: ::Array[String]?,
|
|
11
12
|
effective_at: Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at,
|
|
12
13
|
metadata: ::Hash[Symbol, String]?,
|
|
13
14
|
on_payment_failure: Dodopayments::Models::UpdateSubscriptionPlanReq::on_payment_failure?
|
|
@@ -26,6 +27,8 @@ module Dodopayments
|
|
|
26
27
|
|
|
27
28
|
attr_accessor discount_code: String?
|
|
28
29
|
|
|
30
|
+
attr_accessor discount_codes: ::Array[String]?
|
|
31
|
+
|
|
29
32
|
attr_reader effective_at: Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at?
|
|
30
33
|
|
|
31
34
|
def effective_at=: (
|
|
@@ -43,6 +46,7 @@ module Dodopayments
|
|
|
43
46
|
?adaptive_currency_fees_inclusive: bool?,
|
|
44
47
|
?addons: ::Array[Dodopayments::AttachAddon]?,
|
|
45
48
|
?discount_code: String?,
|
|
49
|
+
?discount_codes: ::Array[String]?,
|
|
46
50
|
?effective_at: Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at,
|
|
47
51
|
?metadata: ::Hash[Symbol, String]?,
|
|
48
52
|
?on_payment_failure: Dodopayments::Models::UpdateSubscriptionPlanReq::on_payment_failure?
|
|
@@ -55,6 +59,7 @@ module Dodopayments
|
|
|
55
59
|
adaptive_currency_fees_inclusive: bool?,
|
|
56
60
|
addons: ::Array[Dodopayments::AttachAddon]?,
|
|
57
61
|
discount_code: String?,
|
|
62
|
+
discount_codes: ::Array[String]?,
|
|
58
63
|
effective_at: Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at,
|
|
59
64
|
metadata: ::Hash[Symbol, String]?,
|
|
60
65
|
on_payment_failure: Dodopayments::Models::UpdateSubscriptionPlanReq::on_payment_failure?
|
|
@@ -18,6 +18,9 @@ module Dodopayments
|
|
|
18
18
|
| :"subscription.renewed"
|
|
19
19
|
| :"subscription.on_hold"
|
|
20
20
|
| :"subscription.cancelled"
|
|
21
|
+
| :"subscription.cancellation_scheduled"
|
|
22
|
+
| :"subscription.trial_ending"
|
|
23
|
+
| :"subscription.upcoming_renewal"
|
|
21
24
|
| :"subscription.failed"
|
|
22
25
|
| :"subscription.expired"
|
|
23
26
|
| :"subscription.plan_changed"
|
|
@@ -68,6 +71,9 @@ module Dodopayments
|
|
|
68
71
|
SUBSCRIPTION_RENEWED: :"subscription.renewed"
|
|
69
72
|
SUBSCRIPTION_ON_HOLD: :"subscription.on_hold"
|
|
70
73
|
SUBSCRIPTION_CANCELLED: :"subscription.cancelled"
|
|
74
|
+
SUBSCRIPTION_CANCELLATION_SCHEDULED: :"subscription.cancellation_scheduled"
|
|
75
|
+
SUBSCRIPTION_TRIAL_ENDING: :"subscription.trial_ending"
|
|
76
|
+
SUBSCRIPTION_UPCOMING_RENEWAL: :"subscription.upcoming_renewal"
|
|
71
77
|
SUBSCRIPTION_FAILED: :"subscription.failed"
|
|
72
78
|
SUBSCRIPTION_EXPIRED: :"subscription.expired"
|
|
73
79
|
SUBSCRIPTION_PLAN_CHANGED: :"subscription.plan_changed"
|