dodopayments 2.25.0 → 2.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/dodopayments/client.rb +4 -0
- data/lib/dodopayments/models/balance_ledger_entry.rb +7 -1
- data/lib/dodopayments/models/blocklist/block_by_customer_id.rb +18 -0
- data/lib/dodopayments/models/blocklist/block_by_email.rb +18 -0
- data/lib/dodopayments/models/blocklist/block_identifier.rb +21 -0
- data/lib/dodopayments/models/blocklist/blocked_customer.rb +128 -0
- data/lib/dodopayments/models/blocklist/blocked_customer_source.rb +22 -0
- data/lib/dodopayments/models/blocklist/create_blocked_customer_request.rb +66 -0
- data/lib/dodopayments/models/blocklist/customer_create_params.rb +16 -0
- data/lib/dodopayments/models/blocklist/customer_delete_params.rb +22 -0
- data/lib/dodopayments/models/blocklist/customer_list_params.rb +64 -0
- data/lib/dodopayments/models/blocklist/customer_retrieve_params.rb +22 -0
- data/lib/dodopayments/models/blocklist/customers/blocked_customer_note.rb +44 -0
- data/lib/dodopayments/models/blocklist/customers/note_create_params.rb +24 -0
- data/lib/dodopayments/models/blocklist/customers/note_request.rb +19 -0
- data/lib/dodopayments/models/blocklist/customers/note_update_params.rb +30 -0
- data/lib/dodopayments/models/customer.rb +22 -1
- data/lib/dodopayments/models/dunning_recovered_webhook_event.rb +1 -0
- data/lib/dodopayments/models/dunning_started_webhook_event.rb +1 -0
- data/lib/dodopayments/models/entitlements/license_key_grant.rb +24 -3
- data/lib/dodopayments/models/manual_retry.rb +76 -0
- data/lib/dodopayments/models/manual_retry_state.rb +50 -0
- data/lib/dodopayments/models/payment_retrieve_retry_state_params.rb +20 -0
- data/lib/dodopayments/models/payment_retry_params.rb +20 -0
- data/lib/dodopayments/models/price.rb +34 -30
- data/lib/dodopayments/models/subscription_active_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_cancelled_webhook_event.rb +33 -4
- data/lib/dodopayments/models/subscription_change_plan_response.rb +47 -0
- data/lib/dodopayments/models/subscription_expired_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_failed_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_list_params.rb +1 -0
- data/lib/dodopayments/models/subscription_on_hold_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_past_due_webhook_event.rb +68 -0
- data/lib/dodopayments/models/subscription_paused_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_plan_changed_webhook_event.rb +33 -4
- data/lib/dodopayments/models/subscription_renewed_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_status.rb +1 -0
- data/lib/dodopayments/models/subscription_unpaused_webhook_event.rb +32 -4
- data/lib/dodopayments/models/subscription_update_params.rb +17 -4
- data/lib/dodopayments/models/subscription_update_payment_method_webhook_event.rb +34 -4
- data/lib/dodopayments/models/subscription_updated_webhook_event.rb +32 -4
- data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +3 -1
- data/lib/dodopayments/models/unwrap_webhook_event.rb +3 -1
- data/lib/dodopayments/models/update_subscription_plan_req.rb +35 -1
- data/lib/dodopayments/models/webhook_event_type.rb +1 -0
- data/lib/dodopayments/models/webhook_payload.rb +19 -1
- data/lib/dodopayments/models.rb +12 -0
- data/lib/dodopayments/resources/blocklist/customers/notes.rb +68 -0
- data/lib/dodopayments/resources/blocklist/customers.rb +107 -0
- data/lib/dodopayments/resources/blocklist.rb +18 -0
- data/lib/dodopayments/resources/payments.rb +36 -0
- data/lib/dodopayments/resources/subscriptions.rb +14 -6
- data/lib/dodopayments/resources/webhooks.rb +2 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +24 -1
- data/rbi/dodopayments/client.rbi +3 -0
- data/rbi/dodopayments/models/balance_ledger_entry.rbi +6 -0
- data/rbi/dodopayments/models/blocklist/block_by_customer_id.rbi +32 -0
- data/rbi/dodopayments/models/blocklist/block_by_email.rbi +32 -0
- data/rbi/dodopayments/models/blocklist/block_identifier.rbi +30 -0
- data/rbi/dodopayments/models/blocklist/blocked_customer.rbi +161 -0
- data/rbi/dodopayments/models/blocklist/blocked_customer_source.rbi +55 -0
- data/rbi/dodopayments/models/blocklist/create_blocked_customer_request.rbi +143 -0
- data/rbi/dodopayments/models/blocklist/customer_create_params.rbi +34 -0
- data/rbi/dodopayments/models/blocklist/customer_delete_params.rbi +40 -0
- data/rbi/dodopayments/models/blocklist/customer_list_params.rbi +88 -0
- data/rbi/dodopayments/models/blocklist/customer_retrieve_params.rbi +40 -0
- data/rbi/dodopayments/models/blocklist/customers/blocked_customer_note.rbi +66 -0
- data/rbi/dodopayments/models/blocklist/customers/note_create_params.rbi +45 -0
- data/rbi/dodopayments/models/blocklist/customers/note_request.rbi +30 -0
- data/rbi/dodopayments/models/blocklist/customers/note_update_params.rbi +50 -0
- data/rbi/dodopayments/models/customer.rbi +20 -0
- data/rbi/dodopayments/models/dunning_recovered_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/dunning_started_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/entitlements/license_key_grant.rbi +22 -2
- data/rbi/dodopayments/models/manual_retry.rbi +93 -0
- data/rbi/dodopayments/models/manual_retry_state.rbi +65 -0
- data/rbi/dodopayments/models/payment_retrieve_retry_state_params.rbi +38 -0
- data/rbi/dodopayments/models/payment_retry_params.rbi +38 -0
- data/rbi/dodopayments/models/price.rbi +47 -30
- data/rbi/dodopayments/models/subscription_active_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_cancelled_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_change_plan_response.rbi +69 -0
- data/rbi/dodopayments/models/subscription_expired_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_failed_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_list_params.rbi +5 -0
- data/rbi/dodopayments/models/subscription_on_hold_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_past_due_webhook_event.rbi +114 -0
- data/rbi/dodopayments/models/subscription_paused_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_plan_changed_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_renewed_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_status.rbi +2 -0
- data/rbi/dodopayments/models/subscription_unpaused_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/subscription_update_params.rbi +33 -4
- data/rbi/dodopayments/models/subscription_update_payment_method_webhook_event.rbi +58 -6
- data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +53 -6
- data/rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi +1 -0
- data/rbi/dodopayments/models/unwrap_webhook_event.rbi +1 -0
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +58 -0
- data/rbi/dodopayments/models/webhook_event_type.rbi +5 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +37 -3
- data/rbi/dodopayments/models.rbi +14 -0
- data/rbi/dodopayments/resources/blocklist/customers/notes.rbi +50 -0
- data/rbi/dodopayments/resources/blocklist/customers.rbi +88 -0
- data/rbi/dodopayments/resources/blocklist.rbi +15 -0
- data/rbi/dodopayments/resources/payments.rbi +26 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +63 -3
- data/rbi/dodopayments/resources/webhooks.rbi +2 -0
- data/sig/dodopayments/client.rbs +2 -0
- data/sig/dodopayments/models/balance_ledger_entry.rbs +5 -0
- data/sig/dodopayments/models/blocklist/block_by_customer_id.rbs +15 -0
- data/sig/dodopayments/models/blocklist/block_by_email.rbs +15 -0
- data/sig/dodopayments/models/blocklist/block_identifier.rbs +15 -0
- data/sig/dodopayments/models/blocklist/blocked_customer.rbs +87 -0
- data/sig/dodopayments/models/blocklist/blocked_customer_source.rbs +20 -0
- data/sig/dodopayments/models/blocklist/create_blocked_customer_request.rbs +71 -0
- data/sig/dodopayments/models/blocklist/customer_create_params.rbs +17 -0
- data/sig/dodopayments/models/blocklist/customer_delete_params.rbs +25 -0
- data/sig/dodopayments/models/blocklist/customer_list_params.rbs +53 -0
- data/sig/dodopayments/models/blocklist/customer_retrieve_params.rbs +25 -0
- data/sig/dodopayments/models/blocklist/customers/blocked_customer_note.rbs +44 -0
- data/sig/dodopayments/models/blocklist/customers/note_create_params.rbs +30 -0
- data/sig/dodopayments/models/blocklist/customers/note_request.rbs +17 -0
- data/sig/dodopayments/models/blocklist/customers/note_update_params.rbs +36 -0
- data/sig/dodopayments/models/customer.rbs +10 -0
- data/sig/dodopayments/models/dunning_recovered_webhook_event.rbs +2 -1
- data/sig/dodopayments/models/dunning_started_webhook_event.rbs +2 -1
- data/sig/dodopayments/models/entitlements/license_key_grant.rbs +10 -0
- data/sig/dodopayments/models/manual_retry.rbs +55 -0
- data/sig/dodopayments/models/manual_retry_state.rbs +40 -0
- data/sig/dodopayments/models/payment_retrieve_retry_state_params.rbs +23 -0
- data/sig/dodopayments/models/payment_retry_params.rbs +23 -0
- data/sig/dodopayments/models/price.rbs +21 -15
- data/sig/dodopayments/models/subscription_active_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_cancelled_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_change_plan_response.rbs +35 -0
- data/sig/dodopayments/models/subscription_expired_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_failed_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_list_params.rbs +2 -0
- data/sig/dodopayments/models/subscription_on_hold_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_past_due_webhook_event.rbs +47 -0
- data/sig/dodopayments/models/subscription_paused_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_plan_changed_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_renewed_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_status.rbs +9 -1
- data/sig/dodopayments/models/subscription_unpaused_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_update_params.rbs +2 -0
- data/sig/dodopayments/models/subscription_update_payment_method_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +16 -4
- data/sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs +1 -0
- data/sig/dodopayments/models/unwrap_webhook_event.rbs +1 -0
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +14 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +2 -0
- data/sig/dodopayments/models/webhook_payload.rbs +16 -4
- data/sig/dodopayments/models.rbs +12 -0
- data/sig/dodopayments/resources/blocklist/customers/notes.rbs +24 -0
- data/sig/dodopayments/resources/blocklist/customers.rbs +36 -0
- data/sig/dodopayments/resources/blocklist.rbs +9 -0
- data/sig/dodopayments/resources/payments.rbs +10 -0
- data/sig/dodopayments/resources/subscriptions.rbs +5 -1
- data/sig/dodopayments/resources/webhooks.rbs +2 -0
- metadata +71 -2
|
@@ -10,10 +10,11 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
14
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
14
15
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
16
|
+
# @return [Dodopayments::Models::SubscriptionOnHoldWebhookEvent::Data]
|
|
17
|
+
required :data, -> { Dodopayments::SubscriptionOnHoldWebhookEvent::Data }
|
|
17
18
|
|
|
18
19
|
# @!attribute timestamp
|
|
19
20
|
# The timestamp of when the event occurred
|
|
@@ -28,13 +29,40 @@ module Dodopayments
|
|
|
28
29
|
required :type, const: :"subscription.on_hold"
|
|
29
30
|
|
|
30
31
|
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.on_hold")
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::SubscriptionOnHoldWebhookEvent} for more details.
|
|
34
|
+
#
|
|
31
35
|
# @param business_id [String] The business identifier
|
|
32
36
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
37
|
+
# @param data [Dodopayments::Models::SubscriptionOnHoldWebhookEvent::Data] Subscription payload sent on a webhook. It carries every field of
|
|
34
38
|
#
|
|
35
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
40
|
#
|
|
37
41
|
# @param type [Symbol, :"subscription.on_hold"] The event type
|
|
42
|
+
|
|
43
|
+
# @see Dodopayments::Models::SubscriptionOnHoldWebhookEvent#data
|
|
44
|
+
class Data < Dodopayments::Models::Subscription
|
|
45
|
+
# @!attribute past_due_ends_at
|
|
46
|
+
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
47
|
+
# `cancelled` at this time.
|
|
48
|
+
#
|
|
49
|
+
# Read in the same query as the rest of the payload, so it always comes from the
|
|
50
|
+
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
51
|
+
# a window at that moment. A delayed event of another type therefore carries the
|
|
52
|
+
# deadline too, next to a `past_due` status.
|
|
53
|
+
#
|
|
54
|
+
# @return [Time, nil]
|
|
55
|
+
optional :past_due_ends_at, Time, nil?: true
|
|
56
|
+
|
|
57
|
+
# @!method initialize(past_due_ends_at: nil)
|
|
58
|
+
# Some parameter documentations has been truncated, see
|
|
59
|
+
# {Dodopayments::Models::SubscriptionOnHoldWebhookEvent::Data} for more details.
|
|
60
|
+
#
|
|
61
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
62
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
63
|
+
#
|
|
64
|
+
# @param past_due_ends_at [Time, nil] Time when the grace period ends. The subscription moves to `on_hold` or
|
|
65
|
+
end
|
|
38
66
|
end
|
|
39
67
|
end
|
|
40
68
|
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class SubscriptionPastDueWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute business_id
|
|
7
|
+
# The business identifier
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :business_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
14
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
15
|
+
#
|
|
16
|
+
# @return [Dodopayments::Models::SubscriptionPastDueWebhookEvent::Data]
|
|
17
|
+
required :data, -> { Dodopayments::SubscriptionPastDueWebhookEvent::Data }
|
|
18
|
+
|
|
19
|
+
# @!attribute timestamp
|
|
20
|
+
# The timestamp of when the event occurred
|
|
21
|
+
#
|
|
22
|
+
# @return [Time]
|
|
23
|
+
required :timestamp, Time
|
|
24
|
+
|
|
25
|
+
# @!attribute type
|
|
26
|
+
# The event type
|
|
27
|
+
#
|
|
28
|
+
# @return [Symbol, :"subscription.past_due"]
|
|
29
|
+
required :type, const: :"subscription.past_due"
|
|
30
|
+
|
|
31
|
+
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.past_due")
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::SubscriptionPastDueWebhookEvent} for more details.
|
|
34
|
+
#
|
|
35
|
+
# @param business_id [String] The business identifier
|
|
36
|
+
#
|
|
37
|
+
# @param data [Dodopayments::Models::SubscriptionPastDueWebhookEvent::Data] Subscription payload sent on a webhook. It carries every field of
|
|
38
|
+
#
|
|
39
|
+
# @param timestamp [Time] The timestamp of when the event occurred
|
|
40
|
+
#
|
|
41
|
+
# @param type [Symbol, :"subscription.past_due"] The event type
|
|
42
|
+
|
|
43
|
+
# @see Dodopayments::Models::SubscriptionPastDueWebhookEvent#data
|
|
44
|
+
class Data < Dodopayments::Models::Subscription
|
|
45
|
+
# @!attribute past_due_ends_at
|
|
46
|
+
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
47
|
+
# `cancelled` at this time.
|
|
48
|
+
#
|
|
49
|
+
# Read in the same query as the rest of the payload, so it always comes from the
|
|
50
|
+
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
51
|
+
# a window at that moment. A delayed event of another type therefore carries the
|
|
52
|
+
# deadline too, next to a `past_due` status.
|
|
53
|
+
#
|
|
54
|
+
# @return [Time, nil]
|
|
55
|
+
optional :past_due_ends_at, Time, nil?: true
|
|
56
|
+
|
|
57
|
+
# @!method initialize(past_due_ends_at: nil)
|
|
58
|
+
# Some parameter documentations has been truncated, see
|
|
59
|
+
# {Dodopayments::Models::SubscriptionPastDueWebhookEvent::Data} for more details.
|
|
60
|
+
#
|
|
61
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
62
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
63
|
+
#
|
|
64
|
+
# @param past_due_ends_at [Time, nil] Time when the grace period ends. The subscription moves to `on_hold` or
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -10,10 +10,11 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
14
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
14
15
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
16
|
+
# @return [Dodopayments::Models::SubscriptionPausedWebhookEvent::Data]
|
|
17
|
+
required :data, -> { Dodopayments::SubscriptionPausedWebhookEvent::Data }
|
|
17
18
|
|
|
18
19
|
# @!attribute timestamp
|
|
19
20
|
# The timestamp of when the event occurred
|
|
@@ -28,13 +29,40 @@ module Dodopayments
|
|
|
28
29
|
required :type, const: :"subscription.paused"
|
|
29
30
|
|
|
30
31
|
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.paused")
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::SubscriptionPausedWebhookEvent} for more details.
|
|
34
|
+
#
|
|
31
35
|
# @param business_id [String] The business identifier
|
|
32
36
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
37
|
+
# @param data [Dodopayments::Models::SubscriptionPausedWebhookEvent::Data] Subscription payload sent on a webhook. It carries every field of
|
|
34
38
|
#
|
|
35
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
40
|
#
|
|
37
41
|
# @param type [Symbol, :"subscription.paused"] The event type
|
|
42
|
+
|
|
43
|
+
# @see Dodopayments::Models::SubscriptionPausedWebhookEvent#data
|
|
44
|
+
class Data < Dodopayments::Models::Subscription
|
|
45
|
+
# @!attribute past_due_ends_at
|
|
46
|
+
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
47
|
+
# `cancelled` at this time.
|
|
48
|
+
#
|
|
49
|
+
# Read in the same query as the rest of the payload, so it always comes from the
|
|
50
|
+
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
51
|
+
# a window at that moment. A delayed event of another type therefore carries the
|
|
52
|
+
# deadline too, next to a `past_due` status.
|
|
53
|
+
#
|
|
54
|
+
# @return [Time, nil]
|
|
55
|
+
optional :past_due_ends_at, Time, nil?: true
|
|
56
|
+
|
|
57
|
+
# @!method initialize(past_due_ends_at: nil)
|
|
58
|
+
# Some parameter documentations has been truncated, see
|
|
59
|
+
# {Dodopayments::Models::SubscriptionPausedWebhookEvent::Data} for more details.
|
|
60
|
+
#
|
|
61
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
62
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
63
|
+
#
|
|
64
|
+
# @param past_due_ends_at [Time, nil] Time when the grace period ends. The subscription moves to `on_hold` or
|
|
65
|
+
end
|
|
38
66
|
end
|
|
39
67
|
end
|
|
40
68
|
end
|
|
@@ -10,10 +10,11 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
14
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
14
15
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
16
|
+
# @return [Dodopayments::Models::SubscriptionPlanChangedWebhookEvent::Data]
|
|
17
|
+
required :data, -> { Dodopayments::SubscriptionPlanChangedWebhookEvent::Data }
|
|
17
18
|
|
|
18
19
|
# @!attribute timestamp
|
|
19
20
|
# The timestamp of when the event occurred
|
|
@@ -28,13 +29,41 @@ module Dodopayments
|
|
|
28
29
|
required :type, const: :"subscription.plan_changed"
|
|
29
30
|
|
|
30
31
|
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.plan_changed")
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::SubscriptionPlanChangedWebhookEvent} for more details.
|
|
34
|
+
#
|
|
31
35
|
# @param business_id [String] The business identifier
|
|
32
36
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
37
|
+
# @param data [Dodopayments::Models::SubscriptionPlanChangedWebhookEvent::Data] Subscription payload sent on a webhook. It carries every field of
|
|
34
38
|
#
|
|
35
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
40
|
#
|
|
37
41
|
# @param type [Symbol, :"subscription.plan_changed"] The event type
|
|
42
|
+
|
|
43
|
+
# @see Dodopayments::Models::SubscriptionPlanChangedWebhookEvent#data
|
|
44
|
+
class Data < Dodopayments::Models::Subscription
|
|
45
|
+
# @!attribute past_due_ends_at
|
|
46
|
+
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
47
|
+
# `cancelled` at this time.
|
|
48
|
+
#
|
|
49
|
+
# Read in the same query as the rest of the payload, so it always comes from the
|
|
50
|
+
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
51
|
+
# a window at that moment. A delayed event of another type therefore carries the
|
|
52
|
+
# deadline too, next to a `past_due` status.
|
|
53
|
+
#
|
|
54
|
+
# @return [Time, nil]
|
|
55
|
+
optional :past_due_ends_at, Time, nil?: true
|
|
56
|
+
|
|
57
|
+
# @!method initialize(past_due_ends_at: nil)
|
|
58
|
+
# Some parameter documentations has been truncated, see
|
|
59
|
+
# {Dodopayments::Models::SubscriptionPlanChangedWebhookEvent::Data} for more
|
|
60
|
+
# details.
|
|
61
|
+
#
|
|
62
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
63
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
64
|
+
#
|
|
65
|
+
# @param past_due_ends_at [Time, nil] Time when the grace period ends. The subscription moves to `on_hold` or
|
|
66
|
+
end
|
|
38
67
|
end
|
|
39
68
|
end
|
|
40
69
|
end
|
|
@@ -10,10 +10,11 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
14
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
14
15
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
16
|
+
# @return [Dodopayments::Models::SubscriptionRenewedWebhookEvent::Data]
|
|
17
|
+
required :data, -> { Dodopayments::SubscriptionRenewedWebhookEvent::Data }
|
|
17
18
|
|
|
18
19
|
# @!attribute timestamp
|
|
19
20
|
# The timestamp of when the event occurred
|
|
@@ -28,13 +29,40 @@ module Dodopayments
|
|
|
28
29
|
required :type, const: :"subscription.renewed"
|
|
29
30
|
|
|
30
31
|
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.renewed")
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::SubscriptionRenewedWebhookEvent} for more details.
|
|
34
|
+
#
|
|
31
35
|
# @param business_id [String] The business identifier
|
|
32
36
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
37
|
+
# @param data [Dodopayments::Models::SubscriptionRenewedWebhookEvent::Data] Subscription payload sent on a webhook. It carries every field of
|
|
34
38
|
#
|
|
35
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
40
|
#
|
|
37
41
|
# @param type [Symbol, :"subscription.renewed"] The event type
|
|
42
|
+
|
|
43
|
+
# @see Dodopayments::Models::SubscriptionRenewedWebhookEvent#data
|
|
44
|
+
class Data < Dodopayments::Models::Subscription
|
|
45
|
+
# @!attribute past_due_ends_at
|
|
46
|
+
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
47
|
+
# `cancelled` at this time.
|
|
48
|
+
#
|
|
49
|
+
# Read in the same query as the rest of the payload, so it always comes from the
|
|
50
|
+
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
51
|
+
# a window at that moment. A delayed event of another type therefore carries the
|
|
52
|
+
# deadline too, next to a `past_due` status.
|
|
53
|
+
#
|
|
54
|
+
# @return [Time, nil]
|
|
55
|
+
optional :past_due_ends_at, Time, nil?: true
|
|
56
|
+
|
|
57
|
+
# @!method initialize(past_due_ends_at: nil)
|
|
58
|
+
# Some parameter documentations has been truncated, see
|
|
59
|
+
# {Dodopayments::Models::SubscriptionRenewedWebhookEvent::Data} for more details.
|
|
60
|
+
#
|
|
61
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
62
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
63
|
+
#
|
|
64
|
+
# @param past_due_ends_at [Time, nil] Time when the grace period ends. The subscription moves to `on_hold` or
|
|
65
|
+
end
|
|
38
66
|
end
|
|
39
67
|
end
|
|
40
68
|
end
|
|
@@ -10,10 +10,11 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
14
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
14
15
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
16
|
+
# @return [Dodopayments::Models::SubscriptionUnpausedWebhookEvent::Data]
|
|
17
|
+
required :data, -> { Dodopayments::SubscriptionUnpausedWebhookEvent::Data }
|
|
17
18
|
|
|
18
19
|
# @!attribute timestamp
|
|
19
20
|
# The timestamp of when the event occurred
|
|
@@ -28,13 +29,40 @@ module Dodopayments
|
|
|
28
29
|
required :type, const: :"subscription.unpaused"
|
|
29
30
|
|
|
30
31
|
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.unpaused")
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::SubscriptionUnpausedWebhookEvent} for more details.
|
|
34
|
+
#
|
|
31
35
|
# @param business_id [String] The business identifier
|
|
32
36
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
37
|
+
# @param data [Dodopayments::Models::SubscriptionUnpausedWebhookEvent::Data] Subscription payload sent on a webhook. It carries every field of
|
|
34
38
|
#
|
|
35
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
40
|
#
|
|
37
41
|
# @param type [Symbol, :"subscription.unpaused"] The event type
|
|
42
|
+
|
|
43
|
+
# @see Dodopayments::Models::SubscriptionUnpausedWebhookEvent#data
|
|
44
|
+
class Data < Dodopayments::Models::Subscription
|
|
45
|
+
# @!attribute past_due_ends_at
|
|
46
|
+
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
47
|
+
# `cancelled` at this time.
|
|
48
|
+
#
|
|
49
|
+
# Read in the same query as the rest of the payload, so it always comes from the
|
|
50
|
+
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
51
|
+
# a window at that moment. A delayed event of another type therefore carries the
|
|
52
|
+
# deadline too, next to a `past_due` status.
|
|
53
|
+
#
|
|
54
|
+
# @return [Time, nil]
|
|
55
|
+
optional :past_due_ends_at, Time, nil?: true
|
|
56
|
+
|
|
57
|
+
# @!method initialize(past_due_ends_at: nil)
|
|
58
|
+
# Some parameter documentations has been truncated, see
|
|
59
|
+
# {Dodopayments::Models::SubscriptionUnpausedWebhookEvent::Data} for more details.
|
|
60
|
+
#
|
|
61
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
62
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
63
|
+
#
|
|
64
|
+
# @param past_due_ends_at [Time, nil] Time when the grace period ends. The subscription moves to `on_hold` or
|
|
65
|
+
end
|
|
38
66
|
end
|
|
39
67
|
end
|
|
40
68
|
end
|
|
@@ -85,13 +85,25 @@ module Dodopayments
|
|
|
85
85
|
optional :next_billing_date, Time, nil?: true
|
|
86
86
|
|
|
87
87
|
# @!attribute pause
|
|
88
|
-
# `
|
|
89
|
-
#
|
|
88
|
+
# Removed. Use `status: paused` to pause and `status: active` to resume. This
|
|
89
|
+
# field always fails with 422, so a caller still on it gets a loud error instead
|
|
90
|
+
# of a silent no-op.
|
|
90
91
|
#
|
|
91
92
|
# @return [Boolean, nil]
|
|
92
93
|
optional :pause, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
93
94
|
|
|
94
95
|
# @!attribute status
|
|
96
|
+
# Set to `cancelled` to cancel the subscription. See `cancel_reason`,
|
|
97
|
+
# `cancellation_feedback`, `cancellation_comment`, and
|
|
98
|
+
# `cancel_at_next_billing_date` for cancellation options.
|
|
99
|
+
#
|
|
100
|
+
# Set to `paused` to pause an active subscription. Set to `active` to resume a
|
|
101
|
+
# `paused` subscription. `active` also resumes an `on_hold` subscription that has
|
|
102
|
+
# an unpaid pause invoice. This voids that invoice.
|
|
103
|
+
#
|
|
104
|
+
# Send `paused` or `active` alone. A request that combines either with any other
|
|
105
|
+
# field fails with 422. `cancelled` is not exclusive this way — see
|
|
106
|
+
# `cancel_reason` and friends below.
|
|
95
107
|
#
|
|
96
108
|
# @return [Symbol, Dodopayments::Models::SubscriptionStatus, nil]
|
|
97
109
|
optional :status, enum: -> { Dodopayments::SubscriptionStatus }, nil?: true
|
|
@@ -146,9 +158,9 @@ module Dodopayments
|
|
|
146
158
|
#
|
|
147
159
|
# @param next_billing_date [Time, nil]
|
|
148
160
|
#
|
|
149
|
-
# @param pause [Boolean, nil] `
|
|
161
|
+
# @param pause [Boolean, nil] Removed. Use `status: paused` to pause and `status: active` to resume.
|
|
150
162
|
#
|
|
151
|
-
# @param status [Symbol, Dodopayments::Models::SubscriptionStatus, nil]
|
|
163
|
+
# @param status [Symbol, Dodopayments::Models::SubscriptionStatus, nil] Set to `cancelled` to cancel the subscription. See `cancel_reason`,
|
|
152
164
|
#
|
|
153
165
|
# @param subscription_period_count [Integer, nil] New number of `subscription_period_interval` units the subscription
|
|
154
166
|
#
|
|
@@ -164,6 +176,7 @@ module Dodopayments
|
|
|
164
176
|
CANCELLED_BY_CUSTOMER = :cancelled_by_customer
|
|
165
177
|
CANCELLED_BY_MERCHANT = :cancelled_by_merchant
|
|
166
178
|
CANCELLED_BY_MERCHANT_SEND_DUNNING = :cancelled_by_merchant_send_dunning
|
|
179
|
+
CANCELLED_BY_MERCHANT_GRACE_PERIOD_EXPIRED = :cancelled_by_merchant_grace_period_expired
|
|
167
180
|
DODO_TEAM = :dodo_team
|
|
168
181
|
|
|
169
182
|
# @!method self.values
|
|
@@ -10,10 +10,11 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
14
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
14
15
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
16
|
+
# @return [Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent::Data]
|
|
17
|
+
required :data, -> { Dodopayments::SubscriptionUpdatePaymentMethodWebhookEvent::Data }
|
|
17
18
|
|
|
18
19
|
# @!attribute timestamp
|
|
19
20
|
# The timestamp of when the event occurred
|
|
@@ -28,13 +29,42 @@ module Dodopayments
|
|
|
28
29
|
required :type, const: :"subscription.update_payment_method"
|
|
29
30
|
|
|
30
31
|
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.update_payment_method")
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent} for more
|
|
34
|
+
# details.
|
|
35
|
+
#
|
|
31
36
|
# @param business_id [String] The business identifier
|
|
32
37
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
38
|
+
# @param data [Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent::Data] Subscription payload sent on a webhook. It carries every field of
|
|
34
39
|
#
|
|
35
40
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
41
|
#
|
|
37
42
|
# @param type [Symbol, :"subscription.update_payment_method"] The event type
|
|
43
|
+
|
|
44
|
+
# @see Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent#data
|
|
45
|
+
class Data < Dodopayments::Models::Subscription
|
|
46
|
+
# @!attribute past_due_ends_at
|
|
47
|
+
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
48
|
+
# `cancelled` at this time.
|
|
49
|
+
#
|
|
50
|
+
# Read in the same query as the rest of the payload, so it always comes from the
|
|
51
|
+
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
52
|
+
# a window at that moment. A delayed event of another type therefore carries the
|
|
53
|
+
# deadline too, next to a `past_due` status.
|
|
54
|
+
#
|
|
55
|
+
# @return [Time, nil]
|
|
56
|
+
optional :past_due_ends_at, Time, nil?: true
|
|
57
|
+
|
|
58
|
+
# @!method initialize(past_due_ends_at: nil)
|
|
59
|
+
# Some parameter documentations has been truncated, see
|
|
60
|
+
# {Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent::Data} for
|
|
61
|
+
# more details.
|
|
62
|
+
#
|
|
63
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
64
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
65
|
+
#
|
|
66
|
+
# @param past_due_ends_at [Time, nil] Time when the grace period ends. The subscription moves to `on_hold` or
|
|
67
|
+
end
|
|
38
68
|
end
|
|
39
69
|
end
|
|
40
70
|
end
|
|
@@ -10,10 +10,11 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
-
#
|
|
13
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
14
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
14
15
|
#
|
|
15
|
-
# @return [Dodopayments::Models::
|
|
16
|
-
required :data, -> { Dodopayments::
|
|
16
|
+
# @return [Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data]
|
|
17
|
+
required :data, -> { Dodopayments::SubscriptionUpdatedWebhookEvent::Data }
|
|
17
18
|
|
|
18
19
|
# @!attribute timestamp
|
|
19
20
|
# The timestamp of when the event occurred
|
|
@@ -28,13 +29,40 @@ module Dodopayments
|
|
|
28
29
|
required :type, const: :"subscription.updated"
|
|
29
30
|
|
|
30
31
|
# @!method initialize(business_id:, data:, timestamp:, type: :"subscription.updated")
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::SubscriptionUpdatedWebhookEvent} for more details.
|
|
34
|
+
#
|
|
31
35
|
# @param business_id [String] The business identifier
|
|
32
36
|
#
|
|
33
|
-
# @param data [Dodopayments::Models::
|
|
37
|
+
# @param data [Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data] Subscription payload sent on a webhook. It carries every field of
|
|
34
38
|
#
|
|
35
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
40
|
#
|
|
37
41
|
# @param type [Symbol, :"subscription.updated"] The event type
|
|
42
|
+
|
|
43
|
+
# @see Dodopayments::Models::SubscriptionUpdatedWebhookEvent#data
|
|
44
|
+
class Data < Dodopayments::Models::Subscription
|
|
45
|
+
# @!attribute past_due_ends_at
|
|
46
|
+
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
47
|
+
# `cancelled` at this time.
|
|
48
|
+
#
|
|
49
|
+
# Read in the same query as the rest of the payload, so it always comes from the
|
|
50
|
+
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
51
|
+
# a window at that moment. A delayed event of another type therefore carries the
|
|
52
|
+
# deadline too, next to a `past_due` status.
|
|
53
|
+
#
|
|
54
|
+
# @return [Time, nil]
|
|
55
|
+
optional :past_due_ends_at, Time, nil?: true
|
|
56
|
+
|
|
57
|
+
# @!method initialize(past_due_ends_at: nil)
|
|
58
|
+
# Some parameter documentations has been truncated, see
|
|
59
|
+
# {Dodopayments::Models::SubscriptionUpdatedWebhookEvent::Data} for more details.
|
|
60
|
+
#
|
|
61
|
+
# Subscription payload sent on a webhook. It carries every field of
|
|
62
|
+
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
63
|
+
#
|
|
64
|
+
# @param past_due_ends_at [Time, nil] Time when the grace period ends. The subscription moves to `on_hold` or
|
|
65
|
+
end
|
|
38
66
|
end
|
|
39
67
|
end
|
|
40
68
|
end
|
|
@@ -89,6 +89,8 @@ module Dodopayments
|
|
|
89
89
|
|
|
90
90
|
variant :"subscription.on_hold", -> { Dodopayments::SubscriptionOnHoldWebhookEvent }
|
|
91
91
|
|
|
92
|
+
variant :"subscription.past_due", -> { Dodopayments::SubscriptionPastDueWebhookEvent }
|
|
93
|
+
|
|
92
94
|
variant :"subscription.paused", -> { Dodopayments::SubscriptionPausedWebhookEvent }
|
|
93
95
|
|
|
94
96
|
variant :"subscription.plan_changed", -> { Dodopayments::SubscriptionPlanChangedWebhookEvent }
|
|
@@ -103,7 +105,7 @@ module Dodopayments
|
|
|
103
105
|
variant :"subscription.updated", -> { Dodopayments::SubscriptionUpdatedWebhookEvent }
|
|
104
106
|
|
|
105
107
|
# @!method self.variants
|
|
106
|
-
# @return [Array(Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent, Dodopayments::Models::CreditAddedWebhookEvent, Dodopayments::Models::CreditBalanceLowWebhookEvent, Dodopayments::Models::CreditDeductedWebhookEvent, Dodopayments::Models::CreditExpiredWebhookEvent, Dodopayments::Models::CreditManualAdjustmentWebhookEvent, Dodopayments::Models::CreditOverageChargedWebhookEvent, Dodopayments::Models::CreditOverageResetWebhookEvent, Dodopayments::Models::CreditRolledOverWebhookEvent, Dodopayments::Models::CreditRolloverForfeitedWebhookEvent, Dodopayments::Models::DisputeAcceptedWebhookEvent, Dodopayments::Models::DisputeCancelledWebhookEvent, Dodopayments::Models::DisputeChallengedWebhookEvent, Dodopayments::Models::DisputeExpiredWebhookEvent, Dodopayments::Models::DisputeLostWebhookEvent, Dodopayments::Models::DisputeOpenedWebhookEvent, Dodopayments::Models::DisputeWonWebhookEvent, Dodopayments::Models::DunningRecoveredWebhookEvent, Dodopayments::Models::DunningStartedWebhookEvent, Dodopayments::Models::EntitlementGrantCreatedWebhookEvent, Dodopayments::Models::EntitlementGrantDeliveredWebhookEvent, Dodopayments::Models::EntitlementGrantFailedWebhookEvent, Dodopayments::Models::EntitlementGrantRevokedWebhookEvent, Dodopayments::Models::LicenseKeyCreatedWebhookEvent, Dodopayments::Models::PaymentCancelledWebhookEvent, Dodopayments::Models::PaymentFailedWebhookEvent, Dodopayments::Models::PaymentProcessingWebhookEvent, Dodopayments::Models::PaymentSucceededWebhookEvent, Dodopayments::Models::PayoutCreatedWebhookEvent, Dodopayments::Models::PayoutFailedWebhookEvent, Dodopayments::Models::PayoutInProgressWebhookEvent, Dodopayments::Models::PayoutOnHoldWebhookEvent, Dodopayments::Models::PayoutSuccessWebhookEvent, Dodopayments::Models::RefundFailedWebhookEvent, Dodopayments::Models::RefundSucceededWebhookEvent, Dodopayments::Models::SubscriptionActiveWebhookEvent, Dodopayments::Models::SubscriptionCancelledWebhookEvent, Dodopayments::Models::SubscriptionExpiredWebhookEvent, Dodopayments::Models::SubscriptionFailedWebhookEvent, Dodopayments::Models::SubscriptionOnHoldWebhookEvent, Dodopayments::Models::SubscriptionPausedWebhookEvent, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent, Dodopayments::Models::SubscriptionRenewedWebhookEvent, Dodopayments::Models::SubscriptionUnpausedWebhookEvent, Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent, Dodopayments::Models::SubscriptionUpdatedWebhookEvent)]
|
|
108
|
+
# @return [Array(Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent, Dodopayments::Models::CreditAddedWebhookEvent, Dodopayments::Models::CreditBalanceLowWebhookEvent, Dodopayments::Models::CreditDeductedWebhookEvent, Dodopayments::Models::CreditExpiredWebhookEvent, Dodopayments::Models::CreditManualAdjustmentWebhookEvent, Dodopayments::Models::CreditOverageChargedWebhookEvent, Dodopayments::Models::CreditOverageResetWebhookEvent, Dodopayments::Models::CreditRolledOverWebhookEvent, Dodopayments::Models::CreditRolloverForfeitedWebhookEvent, Dodopayments::Models::DisputeAcceptedWebhookEvent, Dodopayments::Models::DisputeCancelledWebhookEvent, Dodopayments::Models::DisputeChallengedWebhookEvent, Dodopayments::Models::DisputeExpiredWebhookEvent, Dodopayments::Models::DisputeLostWebhookEvent, Dodopayments::Models::DisputeOpenedWebhookEvent, Dodopayments::Models::DisputeWonWebhookEvent, Dodopayments::Models::DunningRecoveredWebhookEvent, Dodopayments::Models::DunningStartedWebhookEvent, Dodopayments::Models::EntitlementGrantCreatedWebhookEvent, Dodopayments::Models::EntitlementGrantDeliveredWebhookEvent, Dodopayments::Models::EntitlementGrantFailedWebhookEvent, Dodopayments::Models::EntitlementGrantRevokedWebhookEvent, Dodopayments::Models::LicenseKeyCreatedWebhookEvent, Dodopayments::Models::PaymentCancelledWebhookEvent, Dodopayments::Models::PaymentFailedWebhookEvent, Dodopayments::Models::PaymentProcessingWebhookEvent, Dodopayments::Models::PaymentSucceededWebhookEvent, Dodopayments::Models::PayoutCreatedWebhookEvent, Dodopayments::Models::PayoutFailedWebhookEvent, Dodopayments::Models::PayoutInProgressWebhookEvent, Dodopayments::Models::PayoutOnHoldWebhookEvent, Dodopayments::Models::PayoutSuccessWebhookEvent, Dodopayments::Models::RefundFailedWebhookEvent, Dodopayments::Models::RefundSucceededWebhookEvent, Dodopayments::Models::SubscriptionActiveWebhookEvent, Dodopayments::Models::SubscriptionCancelledWebhookEvent, Dodopayments::Models::SubscriptionExpiredWebhookEvent, Dodopayments::Models::SubscriptionFailedWebhookEvent, Dodopayments::Models::SubscriptionOnHoldWebhookEvent, Dodopayments::Models::SubscriptionPastDueWebhookEvent, Dodopayments::Models::SubscriptionPausedWebhookEvent, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent, Dodopayments::Models::SubscriptionRenewedWebhookEvent, Dodopayments::Models::SubscriptionUnpausedWebhookEvent, Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent, Dodopayments::Models::SubscriptionUpdatedWebhookEvent)]
|
|
107
109
|
end
|
|
108
110
|
end
|
|
109
111
|
end
|
|
@@ -89,6 +89,8 @@ module Dodopayments
|
|
|
89
89
|
|
|
90
90
|
variant :"subscription.on_hold", -> { Dodopayments::SubscriptionOnHoldWebhookEvent }
|
|
91
91
|
|
|
92
|
+
variant :"subscription.past_due", -> { Dodopayments::SubscriptionPastDueWebhookEvent }
|
|
93
|
+
|
|
92
94
|
variant :"subscription.paused", -> { Dodopayments::SubscriptionPausedWebhookEvent }
|
|
93
95
|
|
|
94
96
|
variant :"subscription.plan_changed", -> { Dodopayments::SubscriptionPlanChangedWebhookEvent }
|
|
@@ -103,7 +105,7 @@ module Dodopayments
|
|
|
103
105
|
variant :"subscription.updated", -> { Dodopayments::SubscriptionUpdatedWebhookEvent }
|
|
104
106
|
|
|
105
107
|
# @!method self.variants
|
|
106
|
-
# @return [Array(Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent, Dodopayments::Models::CreditAddedWebhookEvent, Dodopayments::Models::CreditBalanceLowWebhookEvent, Dodopayments::Models::CreditDeductedWebhookEvent, Dodopayments::Models::CreditExpiredWebhookEvent, Dodopayments::Models::CreditManualAdjustmentWebhookEvent, Dodopayments::Models::CreditOverageChargedWebhookEvent, Dodopayments::Models::CreditOverageResetWebhookEvent, Dodopayments::Models::CreditRolledOverWebhookEvent, Dodopayments::Models::CreditRolloverForfeitedWebhookEvent, Dodopayments::Models::DisputeAcceptedWebhookEvent, Dodopayments::Models::DisputeCancelledWebhookEvent, Dodopayments::Models::DisputeChallengedWebhookEvent, Dodopayments::Models::DisputeExpiredWebhookEvent, Dodopayments::Models::DisputeLostWebhookEvent, Dodopayments::Models::DisputeOpenedWebhookEvent, Dodopayments::Models::DisputeWonWebhookEvent, Dodopayments::Models::DunningRecoveredWebhookEvent, Dodopayments::Models::DunningStartedWebhookEvent, Dodopayments::Models::EntitlementGrantCreatedWebhookEvent, Dodopayments::Models::EntitlementGrantDeliveredWebhookEvent, Dodopayments::Models::EntitlementGrantFailedWebhookEvent, Dodopayments::Models::EntitlementGrantRevokedWebhookEvent, Dodopayments::Models::LicenseKeyCreatedWebhookEvent, Dodopayments::Models::PaymentCancelledWebhookEvent, Dodopayments::Models::PaymentFailedWebhookEvent, Dodopayments::Models::PaymentProcessingWebhookEvent, Dodopayments::Models::PaymentSucceededWebhookEvent, Dodopayments::Models::PayoutCreatedWebhookEvent, Dodopayments::Models::PayoutFailedWebhookEvent, Dodopayments::Models::PayoutInProgressWebhookEvent, Dodopayments::Models::PayoutOnHoldWebhookEvent, Dodopayments::Models::PayoutSuccessWebhookEvent, Dodopayments::Models::RefundFailedWebhookEvent, Dodopayments::Models::RefundSucceededWebhookEvent, Dodopayments::Models::SubscriptionActiveWebhookEvent, Dodopayments::Models::SubscriptionCancelledWebhookEvent, Dodopayments::Models::SubscriptionExpiredWebhookEvent, Dodopayments::Models::SubscriptionFailedWebhookEvent, Dodopayments::Models::SubscriptionOnHoldWebhookEvent, Dodopayments::Models::SubscriptionPausedWebhookEvent, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent, Dodopayments::Models::SubscriptionRenewedWebhookEvent, Dodopayments::Models::SubscriptionUnpausedWebhookEvent, Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent, Dodopayments::Models::SubscriptionUpdatedWebhookEvent)]
|
|
108
|
+
# @return [Array(Dodopayments::Models::AbandonedCheckoutDetectedWebhookEvent, Dodopayments::Models::AbandonedCheckoutRecoveredWebhookEvent, Dodopayments::Models::CreditAddedWebhookEvent, Dodopayments::Models::CreditBalanceLowWebhookEvent, Dodopayments::Models::CreditDeductedWebhookEvent, Dodopayments::Models::CreditExpiredWebhookEvent, Dodopayments::Models::CreditManualAdjustmentWebhookEvent, Dodopayments::Models::CreditOverageChargedWebhookEvent, Dodopayments::Models::CreditOverageResetWebhookEvent, Dodopayments::Models::CreditRolledOverWebhookEvent, Dodopayments::Models::CreditRolloverForfeitedWebhookEvent, Dodopayments::Models::DisputeAcceptedWebhookEvent, Dodopayments::Models::DisputeCancelledWebhookEvent, Dodopayments::Models::DisputeChallengedWebhookEvent, Dodopayments::Models::DisputeExpiredWebhookEvent, Dodopayments::Models::DisputeLostWebhookEvent, Dodopayments::Models::DisputeOpenedWebhookEvent, Dodopayments::Models::DisputeWonWebhookEvent, Dodopayments::Models::DunningRecoveredWebhookEvent, Dodopayments::Models::DunningStartedWebhookEvent, Dodopayments::Models::EntitlementGrantCreatedWebhookEvent, Dodopayments::Models::EntitlementGrantDeliveredWebhookEvent, Dodopayments::Models::EntitlementGrantFailedWebhookEvent, Dodopayments::Models::EntitlementGrantRevokedWebhookEvent, Dodopayments::Models::LicenseKeyCreatedWebhookEvent, Dodopayments::Models::PaymentCancelledWebhookEvent, Dodopayments::Models::PaymentFailedWebhookEvent, Dodopayments::Models::PaymentProcessingWebhookEvent, Dodopayments::Models::PaymentSucceededWebhookEvent, Dodopayments::Models::PayoutCreatedWebhookEvent, Dodopayments::Models::PayoutFailedWebhookEvent, Dodopayments::Models::PayoutInProgressWebhookEvent, Dodopayments::Models::PayoutOnHoldWebhookEvent, Dodopayments::Models::PayoutSuccessWebhookEvent, Dodopayments::Models::RefundFailedWebhookEvent, Dodopayments::Models::RefundSucceededWebhookEvent, Dodopayments::Models::SubscriptionActiveWebhookEvent, Dodopayments::Models::SubscriptionCancelledWebhookEvent, Dodopayments::Models::SubscriptionExpiredWebhookEvent, Dodopayments::Models::SubscriptionFailedWebhookEvent, Dodopayments::Models::SubscriptionOnHoldWebhookEvent, Dodopayments::Models::SubscriptionPastDueWebhookEvent, Dodopayments::Models::SubscriptionPausedWebhookEvent, Dodopayments::Models::SubscriptionPlanChangedWebhookEvent, Dodopayments::Models::SubscriptionRenewedWebhookEvent, Dodopayments::Models::SubscriptionUnpausedWebhookEvent, Dodopayments::Models::SubscriptionUpdatePaymentMethodWebhookEvent, Dodopayments::Models::SubscriptionUpdatedWebhookEvent)]
|
|
107
109
|
end
|
|
108
110
|
end
|
|
109
111
|
end
|
|
@@ -36,6 +36,36 @@ module Dodopayments
|
|
|
36
36
|
# @return [Array<Dodopayments::Models::AttachAddon>, nil]
|
|
37
37
|
optional :addons, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::AttachAddon] }, nil?: true
|
|
38
38
|
|
|
39
|
+
# @!attribute cancel_scheduled_change_plan
|
|
40
|
+
# Replace a scheduled plan change with this one.
|
|
41
|
+
#
|
|
42
|
+
# The scheduled change is cancelled by the transaction that applies this change. A
|
|
43
|
+
# change that never applies leaves the schedule in place.
|
|
44
|
+
#
|
|
45
|
+
# `effective_at: next_billing_date` is allowed. The new schedule then replaces the
|
|
46
|
+
# old one in the request transaction.
|
|
47
|
+
#
|
|
48
|
+
# A pending plan change still gets a `409`. This field does not affect it.
|
|
49
|
+
#
|
|
50
|
+
# The preview route shares this request body, so a preview that sets this field
|
|
51
|
+
# also passes the scheduled-change `409`.
|
|
52
|
+
#
|
|
53
|
+
# @return [Boolean, nil]
|
|
54
|
+
optional :cancel_scheduled_change_plan, Dodopayments::Internal::Type::Boolean
|
|
55
|
+
|
|
56
|
+
# @!attribute collect_via_payment_link
|
|
57
|
+
# Collect the plan-change amount with a payment link. The customer then pays on a
|
|
58
|
+
# checkout page.
|
|
59
|
+
#
|
|
60
|
+
# The business needs the `allow_plan_change_via_payment_link` capability. The
|
|
61
|
+
# request needs `effective_at: immediately`. The request also needs
|
|
62
|
+
# `on_payment_failure: prevent_change`.
|
|
63
|
+
#
|
|
64
|
+
# The preview route shares this request body and ignores this field.
|
|
65
|
+
#
|
|
66
|
+
# @return [Boolean, nil]
|
|
67
|
+
optional :collect_via_payment_link, Dodopayments::Internal::Type::Boolean
|
|
68
|
+
|
|
39
69
|
# @!attribute discount_code
|
|
40
70
|
# @deprecated Use `discount_id` instead.
|
|
41
71
|
#
|
|
@@ -86,7 +116,7 @@ module Dodopayments
|
|
|
86
116
|
enum: -> { Dodopayments::UpdateSubscriptionPlanReq::OnPaymentFailure },
|
|
87
117
|
nil?: true
|
|
88
118
|
|
|
89
|
-
# @!method initialize(product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, discount_code: nil, discount_codes: nil, effective_at: nil, metadata: nil, on_payment_failure: nil)
|
|
119
|
+
# @!method initialize(product_id:, proration_billing_mode:, quantity:, adaptive_currency_fees_inclusive: nil, addons: nil, cancel_scheduled_change_plan: nil, collect_via_payment_link: nil, discount_code: nil, discount_codes: nil, effective_at: nil, metadata: nil, on_payment_failure: nil)
|
|
90
120
|
# Some parameter documentations has been truncated, see
|
|
91
121
|
# {Dodopayments::Models::UpdateSubscriptionPlanReq} for more details.
|
|
92
122
|
#
|
|
@@ -100,6 +130,10 @@ module Dodopayments
|
|
|
100
130
|
#
|
|
101
131
|
# @param addons [Array<Dodopayments::Models::AttachAddon>, nil] Addons for the new plan.
|
|
102
132
|
#
|
|
133
|
+
# @param cancel_scheduled_change_plan [Boolean] Replace a scheduled plan change with this one.
|
|
134
|
+
#
|
|
135
|
+
# @param collect_via_payment_link [Boolean] Collect the plan-change amount with a payment link. The customer then
|
|
136
|
+
#
|
|
103
137
|
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
104
138
|
#
|
|
105
139
|
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply to the new plan. Max 20.
|