dodopayments 2.32.1 → 2.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/dodopayments/internal/cursor_page_pagination.rb +1 -1
- data/lib/dodopayments/models/balance_ledger_entry.rb +3 -0
- data/lib/dodopayments/models/balance_retrieve_ledger_params.rb +3 -0
- data/lib/dodopayments/models/checkout_session_flags.rb +3 -0
- data/lib/dodopayments/models/manual_retry_state.rb +27 -1
- data/lib/dodopayments/models/payment.rb +14 -1
- data/lib/dodopayments/models/payment_list_response.rb +33 -1
- data/lib/dodopayments/models/product_collection.rb +2 -0
- data/lib/dodopayments/models/product_collection_create_params.rb +2 -0
- data/lib/dodopayments/models/product_collection_update_params.rb +2 -0
- data/lib/dodopayments/models/refund.rb +11 -1
- data/lib/dodopayments/models/refund_list_item.rb +11 -1
- data/lib/dodopayments/models/subscription_active_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_cancelled_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_expired_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_failed_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_on_hold_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_past_due_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_paused_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_plan_changed_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_renewed_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_service_period.rb +39 -0
- data/lib/dodopayments/models/subscription_unpaused_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_update_payment_method_webhook_event.rb +10 -1
- data/lib/dodopayments/models/subscription_updated_webhook_event.rb +10 -1
- data/lib/dodopayments/models/update_subscription_plan_req.rb +1 -0
- data/lib/dodopayments/models/webhook_payload.rb +10 -1
- data/lib/dodopayments/models.rb +2 -0
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +1 -0
- data/rbi/dodopayments/models/balance_ledger_entry.rbi +15 -0
- data/rbi/dodopayments/models/balance_retrieve_ledger_params.rbi +15 -0
- data/rbi/dodopayments/models/checkout_session_flags.rbi +6 -0
- data/rbi/dodopayments/models/manual_retry_state.rbi +28 -0
- data/rbi/dodopayments/models/payment.rbi +17 -0
- data/rbi/dodopayments/models/payment_list_response.rbi +39 -0
- data/rbi/dodopayments/models/product_collection.rbi +10 -0
- data/rbi/dodopayments/models/product_collection_create_params.rbi +10 -0
- data/rbi/dodopayments/models/product_collection_update_params.rbi +10 -0
- data/rbi/dodopayments/models/refund.rbi +12 -0
- data/rbi/dodopayments/models/refund_list_item.rbi +12 -0
- data/rbi/dodopayments/models/subscription_active_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_cancelled_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_expired_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_failed_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_on_hold_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_past_due_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_paused_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_plan_changed_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_renewed_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_service_period.rbi +55 -0
- data/rbi/dodopayments/models/subscription_unpaused_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_update_payment_method_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +18 -3
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +5 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +14 -1
- data/rbi/dodopayments/models.rbi +2 -0
- data/sig/dodopayments/models/balance_ledger_entry.rbs +6 -0
- data/sig/dodopayments/models/balance_retrieve_ledger_params.rbs +6 -0
- data/sig/dodopayments/models/manual_retry_state.rbs +15 -0
- data/sig/dodopayments/models/payment.rbs +5 -0
- data/sig/dodopayments/models/payment_list_response.rbs +15 -0
- data/sig/dodopayments/models/product_collection.rbs +4 -0
- data/sig/dodopayments/models/product_collection_create_params.rbs +4 -0
- data/sig/dodopayments/models/product_collection_update_params.rbs +4 -0
- data/sig/dodopayments/models/refund.rbs +5 -0
- data/sig/dodopayments/models/refund_list_item.rbs +5 -0
- data/sig/dodopayments/models/subscription_active_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_cancelled_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_expired_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_failed_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_on_hold_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_past_due_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_paused_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_plan_changed_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_renewed_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_service_period.rbs +26 -0
- data/sig/dodopayments/models/subscription_unpaused_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_update_payment_method_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +7 -3
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +2 -0
- data/sig/dodopayments/models/webhook_payload.rbs +12 -2
- data/sig/dodopayments/models.rbs +2 -0
- metadata +5 -2
|
@@ -88,10 +88,18 @@ module Dodopayments
|
|
|
88
88
|
sig { returns(T.nilable(Time)) }
|
|
89
89
|
attr_accessor :past_due_ends_at
|
|
90
90
|
|
|
91
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
92
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
93
|
+
sig { returns(T.nilable(String)) }
|
|
94
|
+
attr_accessor :payment_id
|
|
95
|
+
|
|
91
96
|
# Subscription payload sent on a webhook. It carries every field of
|
|
92
97
|
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
93
98
|
sig do
|
|
94
|
-
params(
|
|
99
|
+
params(
|
|
100
|
+
past_due_ends_at: T.nilable(Time),
|
|
101
|
+
payment_id: T.nilable(String)
|
|
102
|
+
).returns(T.attached_class)
|
|
95
103
|
end
|
|
96
104
|
def self.new(
|
|
97
105
|
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
@@ -101,11 +109,18 @@ module Dodopayments
|
|
|
101
109
|
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
102
110
|
# a window at that moment. A delayed event of another type therefore carries the
|
|
103
111
|
# deadline too, next to a `past_due` status.
|
|
104
|
-
past_due_ends_at: nil
|
|
112
|
+
past_due_ends_at: nil,
|
|
113
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
114
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
115
|
+
payment_id: nil
|
|
105
116
|
)
|
|
106
117
|
end
|
|
107
118
|
|
|
108
|
-
sig
|
|
119
|
+
sig do
|
|
120
|
+
override.returns(
|
|
121
|
+
{ past_due_ends_at: T.nilable(Time), payment_id: T.nilable(String) }
|
|
122
|
+
)
|
|
123
|
+
end
|
|
109
124
|
def to_hash
|
|
110
125
|
end
|
|
111
126
|
end
|
|
@@ -88,10 +88,18 @@ module Dodopayments
|
|
|
88
88
|
sig { returns(T.nilable(Time)) }
|
|
89
89
|
attr_accessor :past_due_ends_at
|
|
90
90
|
|
|
91
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
92
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
93
|
+
sig { returns(T.nilable(String)) }
|
|
94
|
+
attr_accessor :payment_id
|
|
95
|
+
|
|
91
96
|
# Subscription payload sent on a webhook. It carries every field of
|
|
92
97
|
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
93
98
|
sig do
|
|
94
|
-
params(
|
|
99
|
+
params(
|
|
100
|
+
past_due_ends_at: T.nilable(Time),
|
|
101
|
+
payment_id: T.nilable(String)
|
|
102
|
+
).returns(T.attached_class)
|
|
95
103
|
end
|
|
96
104
|
def self.new(
|
|
97
105
|
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
@@ -101,11 +109,18 @@ module Dodopayments
|
|
|
101
109
|
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
102
110
|
# a window at that moment. A delayed event of another type therefore carries the
|
|
103
111
|
# deadline too, next to a `past_due` status.
|
|
104
|
-
past_due_ends_at: nil
|
|
112
|
+
past_due_ends_at: nil,
|
|
113
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
114
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
115
|
+
payment_id: nil
|
|
105
116
|
)
|
|
106
117
|
end
|
|
107
118
|
|
|
108
|
-
sig
|
|
119
|
+
sig do
|
|
120
|
+
override.returns(
|
|
121
|
+
{ past_due_ends_at: T.nilable(Time), payment_id: T.nilable(String) }
|
|
122
|
+
)
|
|
123
|
+
end
|
|
109
124
|
def to_hash
|
|
110
125
|
end
|
|
111
126
|
end
|
|
@@ -88,10 +88,18 @@ module Dodopayments
|
|
|
88
88
|
sig { returns(T.nilable(Time)) }
|
|
89
89
|
attr_accessor :past_due_ends_at
|
|
90
90
|
|
|
91
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
92
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
93
|
+
sig { returns(T.nilable(String)) }
|
|
94
|
+
attr_accessor :payment_id
|
|
95
|
+
|
|
91
96
|
# Subscription payload sent on a webhook. It carries every field of
|
|
92
97
|
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
93
98
|
sig do
|
|
94
|
-
params(
|
|
99
|
+
params(
|
|
100
|
+
past_due_ends_at: T.nilable(Time),
|
|
101
|
+
payment_id: T.nilable(String)
|
|
102
|
+
).returns(T.attached_class)
|
|
95
103
|
end
|
|
96
104
|
def self.new(
|
|
97
105
|
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
@@ -101,11 +109,18 @@ module Dodopayments
|
|
|
101
109
|
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
102
110
|
# a window at that moment. A delayed event of another type therefore carries the
|
|
103
111
|
# deadline too, next to a `past_due` status.
|
|
104
|
-
past_due_ends_at: nil
|
|
112
|
+
past_due_ends_at: nil,
|
|
113
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
114
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
115
|
+
payment_id: nil
|
|
105
116
|
)
|
|
106
117
|
end
|
|
107
118
|
|
|
108
|
-
sig
|
|
119
|
+
sig do
|
|
120
|
+
override.returns(
|
|
121
|
+
{ past_due_ends_at: T.nilable(Time), payment_id: T.nilable(String) }
|
|
122
|
+
)
|
|
123
|
+
end
|
|
109
124
|
def to_hash
|
|
110
125
|
end
|
|
111
126
|
end
|
|
@@ -88,10 +88,18 @@ module Dodopayments
|
|
|
88
88
|
sig { returns(T.nilable(Time)) }
|
|
89
89
|
attr_accessor :past_due_ends_at
|
|
90
90
|
|
|
91
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
92
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
93
|
+
sig { returns(T.nilable(String)) }
|
|
94
|
+
attr_accessor :payment_id
|
|
95
|
+
|
|
91
96
|
# Subscription payload sent on a webhook. It carries every field of
|
|
92
97
|
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
93
98
|
sig do
|
|
94
|
-
params(
|
|
99
|
+
params(
|
|
100
|
+
past_due_ends_at: T.nilable(Time),
|
|
101
|
+
payment_id: T.nilable(String)
|
|
102
|
+
).returns(T.attached_class)
|
|
95
103
|
end
|
|
96
104
|
def self.new(
|
|
97
105
|
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
@@ -101,11 +109,18 @@ module Dodopayments
|
|
|
101
109
|
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
102
110
|
# a window at that moment. A delayed event of another type therefore carries the
|
|
103
111
|
# deadline too, next to a `past_due` status.
|
|
104
|
-
past_due_ends_at: nil
|
|
112
|
+
past_due_ends_at: nil,
|
|
113
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
114
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
115
|
+
payment_id: nil
|
|
105
116
|
)
|
|
106
117
|
end
|
|
107
118
|
|
|
108
|
-
sig
|
|
119
|
+
sig do
|
|
120
|
+
override.returns(
|
|
121
|
+
{ past_due_ends_at: T.nilable(Time), payment_id: T.nilable(String) }
|
|
122
|
+
)
|
|
123
|
+
end
|
|
109
124
|
def to_hash
|
|
110
125
|
end
|
|
111
126
|
end
|
|
@@ -88,10 +88,18 @@ module Dodopayments
|
|
|
88
88
|
sig { returns(T.nilable(Time)) }
|
|
89
89
|
attr_accessor :past_due_ends_at
|
|
90
90
|
|
|
91
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
92
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
93
|
+
sig { returns(T.nilable(String)) }
|
|
94
|
+
attr_accessor :payment_id
|
|
95
|
+
|
|
91
96
|
# Subscription payload sent on a webhook. It carries every field of
|
|
92
97
|
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
93
98
|
sig do
|
|
94
|
-
params(
|
|
99
|
+
params(
|
|
100
|
+
past_due_ends_at: T.nilable(Time),
|
|
101
|
+
payment_id: T.nilable(String)
|
|
102
|
+
).returns(T.attached_class)
|
|
95
103
|
end
|
|
96
104
|
def self.new(
|
|
97
105
|
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
@@ -101,11 +109,18 @@ module Dodopayments
|
|
|
101
109
|
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
102
110
|
# a window at that moment. A delayed event of another type therefore carries the
|
|
103
111
|
# deadline too, next to a `past_due` status.
|
|
104
|
-
past_due_ends_at: nil
|
|
112
|
+
past_due_ends_at: nil,
|
|
113
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
114
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
115
|
+
payment_id: nil
|
|
105
116
|
)
|
|
106
117
|
end
|
|
107
118
|
|
|
108
|
-
sig
|
|
119
|
+
sig do
|
|
120
|
+
override.returns(
|
|
121
|
+
{ past_due_ends_at: T.nilable(Time), payment_id: T.nilable(String) }
|
|
122
|
+
)
|
|
123
|
+
end
|
|
109
124
|
def to_hash
|
|
110
125
|
end
|
|
111
126
|
end
|
|
@@ -88,10 +88,18 @@ module Dodopayments
|
|
|
88
88
|
sig { returns(T.nilable(Time)) }
|
|
89
89
|
attr_accessor :past_due_ends_at
|
|
90
90
|
|
|
91
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
92
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
93
|
+
sig { returns(T.nilable(String)) }
|
|
94
|
+
attr_accessor :payment_id
|
|
95
|
+
|
|
91
96
|
# Subscription payload sent on a webhook. It carries every field of
|
|
92
97
|
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
93
98
|
sig do
|
|
94
|
-
params(
|
|
99
|
+
params(
|
|
100
|
+
past_due_ends_at: T.nilable(Time),
|
|
101
|
+
payment_id: T.nilable(String)
|
|
102
|
+
).returns(T.attached_class)
|
|
95
103
|
end
|
|
96
104
|
def self.new(
|
|
97
105
|
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
@@ -101,11 +109,18 @@ module Dodopayments
|
|
|
101
109
|
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
102
110
|
# a window at that moment. A delayed event of another type therefore carries the
|
|
103
111
|
# deadline too, next to a `past_due` status.
|
|
104
|
-
past_due_ends_at: nil
|
|
112
|
+
past_due_ends_at: nil,
|
|
113
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
114
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
115
|
+
payment_id: nil
|
|
105
116
|
)
|
|
106
117
|
end
|
|
107
118
|
|
|
108
|
-
sig
|
|
119
|
+
sig do
|
|
120
|
+
override.returns(
|
|
121
|
+
{ past_due_ends_at: T.nilable(Time), payment_id: T.nilable(String) }
|
|
122
|
+
)
|
|
123
|
+
end
|
|
109
124
|
def to_hash
|
|
110
125
|
end
|
|
111
126
|
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class SubscriptionServicePeriod < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Dodopayments::SubscriptionServicePeriod,
|
|
10
|
+
Dodopayments::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# End of the service period.
|
|
15
|
+
sig { returns(Time) }
|
|
16
|
+
attr_accessor :ends_at
|
|
17
|
+
|
|
18
|
+
# Start of the service period. For a renewal, this is the billing date. For a plan
|
|
19
|
+
# change that applies at the next billing date, this is the time when the change
|
|
20
|
+
# applied. This time can be some minutes after the billing date.
|
|
21
|
+
sig { returns(Time) }
|
|
22
|
+
attr_accessor :starts_at
|
|
23
|
+
|
|
24
|
+
# Identifier of the subscription.
|
|
25
|
+
sig { returns(String) }
|
|
26
|
+
attr_accessor :subscription_id
|
|
27
|
+
|
|
28
|
+
# The service period that a payment pays for, for one subscription.
|
|
29
|
+
sig do
|
|
30
|
+
params(ends_at: Time, starts_at: Time, subscription_id: String).returns(
|
|
31
|
+
T.attached_class
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def self.new(
|
|
35
|
+
# End of the service period.
|
|
36
|
+
ends_at:,
|
|
37
|
+
# Start of the service period. For a renewal, this is the billing date. For a plan
|
|
38
|
+
# change that applies at the next billing date, this is the time when the change
|
|
39
|
+
# applied. This time can be some minutes after the billing date.
|
|
40
|
+
starts_at:,
|
|
41
|
+
# Identifier of the subscription.
|
|
42
|
+
subscription_id:
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
sig do
|
|
47
|
+
override.returns(
|
|
48
|
+
{ ends_at: Time, starts_at: Time, subscription_id: String }
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
def to_hash
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -88,10 +88,18 @@ module Dodopayments
|
|
|
88
88
|
sig { returns(T.nilable(Time)) }
|
|
89
89
|
attr_accessor :past_due_ends_at
|
|
90
90
|
|
|
91
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
92
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
93
|
+
sig { returns(T.nilable(String)) }
|
|
94
|
+
attr_accessor :payment_id
|
|
95
|
+
|
|
91
96
|
# Subscription payload sent on a webhook. It carries every field of
|
|
92
97
|
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
93
98
|
sig do
|
|
94
|
-
params(
|
|
99
|
+
params(
|
|
100
|
+
past_due_ends_at: T.nilable(Time),
|
|
101
|
+
payment_id: T.nilable(String)
|
|
102
|
+
).returns(T.attached_class)
|
|
95
103
|
end
|
|
96
104
|
def self.new(
|
|
97
105
|
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
@@ -101,11 +109,18 @@ module Dodopayments
|
|
|
101
109
|
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
102
110
|
# a window at that moment. A delayed event of another type therefore carries the
|
|
103
111
|
# deadline too, next to a `past_due` status.
|
|
104
|
-
past_due_ends_at: nil
|
|
112
|
+
past_due_ends_at: nil,
|
|
113
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
114
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
115
|
+
payment_id: nil
|
|
105
116
|
)
|
|
106
117
|
end
|
|
107
118
|
|
|
108
|
-
sig
|
|
119
|
+
sig do
|
|
120
|
+
override.returns(
|
|
121
|
+
{ past_due_ends_at: T.nilable(Time), payment_id: T.nilable(String) }
|
|
122
|
+
)
|
|
123
|
+
end
|
|
109
124
|
def to_hash
|
|
110
125
|
end
|
|
111
126
|
end
|
|
@@ -93,10 +93,18 @@ module Dodopayments
|
|
|
93
93
|
sig { returns(T.nilable(Time)) }
|
|
94
94
|
attr_accessor :past_due_ends_at
|
|
95
95
|
|
|
96
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
97
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
98
|
+
sig { returns(T.nilable(String)) }
|
|
99
|
+
attr_accessor :payment_id
|
|
100
|
+
|
|
96
101
|
# Subscription payload sent on a webhook. It carries every field of
|
|
97
102
|
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
98
103
|
sig do
|
|
99
|
-
params(
|
|
104
|
+
params(
|
|
105
|
+
past_due_ends_at: T.nilable(Time),
|
|
106
|
+
payment_id: T.nilable(String)
|
|
107
|
+
).returns(T.attached_class)
|
|
100
108
|
end
|
|
101
109
|
def self.new(
|
|
102
110
|
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
@@ -106,11 +114,18 @@ module Dodopayments
|
|
|
106
114
|
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
107
115
|
# a window at that moment. A delayed event of another type therefore carries the
|
|
108
116
|
# deadline too, next to a `past_due` status.
|
|
109
|
-
past_due_ends_at: nil
|
|
117
|
+
past_due_ends_at: nil,
|
|
118
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
119
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
120
|
+
payment_id: nil
|
|
110
121
|
)
|
|
111
122
|
end
|
|
112
123
|
|
|
113
|
-
sig
|
|
124
|
+
sig do
|
|
125
|
+
override.returns(
|
|
126
|
+
{ past_due_ends_at: T.nilable(Time), payment_id: T.nilable(String) }
|
|
127
|
+
)
|
|
128
|
+
end
|
|
114
129
|
def to_hash
|
|
115
130
|
end
|
|
116
131
|
end
|
|
@@ -88,10 +88,18 @@ module Dodopayments
|
|
|
88
88
|
sig { returns(T.nilable(Time)) }
|
|
89
89
|
attr_accessor :past_due_ends_at
|
|
90
90
|
|
|
91
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
92
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
93
|
+
sig { returns(T.nilable(String)) }
|
|
94
|
+
attr_accessor :payment_id
|
|
95
|
+
|
|
91
96
|
# Subscription payload sent on a webhook. It carries every field of
|
|
92
97
|
# `SubscriptionResponse`, plus the grace-period deadline.
|
|
93
98
|
sig do
|
|
94
|
-
params(
|
|
99
|
+
params(
|
|
100
|
+
past_due_ends_at: T.nilable(Time),
|
|
101
|
+
payment_id: T.nilable(String)
|
|
102
|
+
).returns(T.attached_class)
|
|
95
103
|
end
|
|
96
104
|
def self.new(
|
|
97
105
|
# Time when the grace period ends. The subscription moves to `on_hold` or to
|
|
@@ -101,11 +109,18 @@ module Dodopayments
|
|
|
101
109
|
# row snapshot that produced `status`. It is set whenever the subscription sits in
|
|
102
110
|
# a window at that moment. A delayed event of another type therefore carries the
|
|
103
111
|
# deadline too, next to a `past_due` status.
|
|
104
|
-
past_due_ends_at: nil
|
|
112
|
+
past_due_ends_at: nil,
|
|
113
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
114
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
115
|
+
payment_id: nil
|
|
105
116
|
)
|
|
106
117
|
end
|
|
107
118
|
|
|
108
|
-
sig
|
|
119
|
+
sig do
|
|
120
|
+
override.returns(
|
|
121
|
+
{ past_due_ends_at: T.nilable(Time), payment_id: T.nilable(String) }
|
|
122
|
+
)
|
|
123
|
+
end
|
|
109
124
|
def to_hash
|
|
110
125
|
end
|
|
111
126
|
end
|
|
@@ -330,6 +330,11 @@ module Dodopayments
|
|
|
330
330
|
:do_not_bill,
|
|
331
331
|
Dodopayments::UpdateSubscriptionPlanReq::ProrationBillingMode::TaggedSymbol
|
|
332
332
|
)
|
|
333
|
+
PRORATED_IMMEDIATELY_KEEP_CYCLE =
|
|
334
|
+
T.let(
|
|
335
|
+
:prorated_immediately_keep_cycle,
|
|
336
|
+
Dodopayments::UpdateSubscriptionPlanReq::ProrationBillingMode::TaggedSymbol
|
|
337
|
+
)
|
|
333
338
|
|
|
334
339
|
sig do
|
|
335
340
|
override.returns(
|
|
@@ -163,10 +163,16 @@ module Dodopayments
|
|
|
163
163
|
sig { returns(T.nilable(Time)) }
|
|
164
164
|
attr_accessor :past_due_ends_at
|
|
165
165
|
|
|
166
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
167
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
168
|
+
sig { returns(T.nilable(String)) }
|
|
169
|
+
attr_accessor :payment_id
|
|
170
|
+
|
|
166
171
|
# Response struct representing subscription details
|
|
167
172
|
sig do
|
|
168
173
|
params(
|
|
169
174
|
past_due_ends_at: T.nilable(Time),
|
|
175
|
+
payment_id: T.nilable(String),
|
|
170
176
|
payload_type: Symbol
|
|
171
177
|
).returns(T.attached_class)
|
|
172
178
|
end
|
|
@@ -179,13 +185,20 @@ module Dodopayments
|
|
|
179
185
|
# a window at that moment. A delayed event of another type therefore carries the
|
|
180
186
|
# deadline too, next to a `past_due` status.
|
|
181
187
|
past_due_ends_at: nil,
|
|
188
|
+
# Identifier of the payment that caused this event. It is set only for
|
|
189
|
+
# `subscription.renewed`. It is null for all other subscription events.
|
|
190
|
+
payment_id: nil,
|
|
182
191
|
payload_type: :Subscription
|
|
183
192
|
)
|
|
184
193
|
end
|
|
185
194
|
|
|
186
195
|
sig do
|
|
187
196
|
override.returns(
|
|
188
|
-
{
|
|
197
|
+
{
|
|
198
|
+
payload_type: Symbol,
|
|
199
|
+
past_due_ends_at: T.nilable(Time),
|
|
200
|
+
payment_id: T.nilable(String)
|
|
201
|
+
}
|
|
189
202
|
)
|
|
190
203
|
end
|
|
191
204
|
def to_hash
|
data/rbi/dodopayments/models.rbi
CHANGED
|
@@ -551,6 +551,8 @@ module Dodopayments
|
|
|
551
551
|
SubscriptionRetrieveUsageHistoryParams =
|
|
552
552
|
Dodopayments::Models::SubscriptionRetrieveUsageHistoryParams
|
|
553
553
|
|
|
554
|
+
SubscriptionServicePeriod = Dodopayments::Models::SubscriptionServicePeriod
|
|
555
|
+
|
|
554
556
|
SubscriptionStatus = Dodopayments::Models::SubscriptionStatus
|
|
555
557
|
|
|
556
558
|
SubscriptionUnpausedWebhookEvent =
|
|
@@ -108,6 +108,9 @@ module Dodopayments
|
|
|
108
108
|
| :reserve_hold
|
|
109
109
|
| :reserve_release
|
|
110
110
|
| :moderation_fees
|
|
111
|
+
| :dodo_fixed_fee
|
|
112
|
+
| :interchange_fee
|
|
113
|
+
| :scheme_fee
|
|
111
114
|
|
|
112
115
|
module EventType
|
|
113
116
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -143,6 +146,9 @@ module Dodopayments
|
|
|
143
146
|
RESERVE_HOLD: :reserve_hold
|
|
144
147
|
RESERVE_RELEASE: :reserve_release
|
|
145
148
|
MODERATION_FEES: :moderation_fees
|
|
149
|
+
DODO_FIXED_FEE: :dodo_fixed_fee
|
|
150
|
+
INTERCHANGE_FEE: :interchange_fee
|
|
151
|
+
SCHEME_FEE: :scheme_fee
|
|
146
152
|
|
|
147
153
|
def self?.values: -> ::Array[Dodopayments::Models::BalanceLedgerEntry::event_type]
|
|
148
154
|
end
|
|
@@ -408,6 +408,9 @@ module Dodopayments
|
|
|
408
408
|
| :reserve_hold
|
|
409
409
|
| :reserve_release
|
|
410
410
|
| :moderation_fees
|
|
411
|
+
| :dodo_fixed_fee
|
|
412
|
+
| :interchange_fee
|
|
413
|
+
| :scheme_fee
|
|
411
414
|
|
|
412
415
|
module EventType
|
|
413
416
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -443,6 +446,9 @@ module Dodopayments
|
|
|
443
446
|
RESERVE_HOLD: :reserve_hold
|
|
444
447
|
RESERVE_RELEASE: :reserve_release
|
|
445
448
|
MODERATION_FEES: :moderation_fees
|
|
449
|
+
DODO_FIXED_FEE: :dodo_fixed_fee
|
|
450
|
+
INTERCHANGE_FEE: :interchange_fee
|
|
451
|
+
SCHEME_FEE: :scheme_fee
|
|
446
452
|
|
|
447
453
|
def self?.values: -> ::Array[Dodopayments::Models::BalanceRetrieveLedgerParams::event_type]
|
|
448
454
|
end
|
|
@@ -5,6 +5,9 @@ module Dodopayments
|
|
|
5
5
|
can_retry: bool,
|
|
6
6
|
sends_allowed: Integer,
|
|
7
7
|
sends_used: Integer,
|
|
8
|
+
automatic_retry_number: Integer?,
|
|
9
|
+
automatic_retry_total: Integer?,
|
|
10
|
+
next_automatic_retry_at: Time?,
|
|
8
11
|
reason: String?,
|
|
9
12
|
retry_available_at: Time?
|
|
10
13
|
}
|
|
@@ -16,6 +19,12 @@ module Dodopayments
|
|
|
16
19
|
|
|
17
20
|
attr_accessor sends_used: Integer
|
|
18
21
|
|
|
22
|
+
attr_accessor automatic_retry_number: Integer?
|
|
23
|
+
|
|
24
|
+
attr_accessor automatic_retry_total: Integer?
|
|
25
|
+
|
|
26
|
+
attr_accessor next_automatic_retry_at: Time?
|
|
27
|
+
|
|
19
28
|
attr_accessor reason: String?
|
|
20
29
|
|
|
21
30
|
attr_accessor retry_available_at: Time?
|
|
@@ -24,6 +33,9 @@ module Dodopayments
|
|
|
24
33
|
can_retry: bool,
|
|
25
34
|
sends_allowed: Integer,
|
|
26
35
|
sends_used: Integer,
|
|
36
|
+
?automatic_retry_number: Integer?,
|
|
37
|
+
?automatic_retry_total: Integer?,
|
|
38
|
+
?next_automatic_retry_at: Time?,
|
|
27
39
|
?reason: String?,
|
|
28
40
|
?retry_available_at: Time?
|
|
29
41
|
) -> void
|
|
@@ -32,6 +44,9 @@ module Dodopayments
|
|
|
32
44
|
can_retry: bool,
|
|
33
45
|
sends_allowed: Integer,
|
|
34
46
|
sends_used: Integer,
|
|
47
|
+
automatic_retry_number: Integer?,
|
|
48
|
+
automatic_retry_total: Integer?,
|
|
49
|
+
next_automatic_retry_at: Time?,
|
|
35
50
|
reason: String?,
|
|
36
51
|
retry_available_at: Time?
|
|
37
52
|
}
|
|
@@ -17,6 +17,7 @@ module Dodopayments
|
|
|
17
17
|
payment_provider: Dodopayments::Models::Payment::payment_provider,
|
|
18
18
|
refunds: ::Array[Dodopayments::RefundListItem],
|
|
19
19
|
retry_attempt: Integer,
|
|
20
|
+
service_periods: ::Array[Dodopayments::SubscriptionServicePeriod],
|
|
20
21
|
settlement_amount: Integer,
|
|
21
22
|
settlement_currency: Dodopayments::Models::currency,
|
|
22
23
|
subscription_ids: ::Array[String],
|
|
@@ -78,6 +79,8 @@ module Dodopayments
|
|
|
78
79
|
|
|
79
80
|
attr_accessor retry_attempt: Integer
|
|
80
81
|
|
|
82
|
+
attr_accessor service_periods: ::Array[Dodopayments::SubscriptionServicePeriod]
|
|
83
|
+
|
|
81
84
|
attr_accessor settlement_amount: Integer
|
|
82
85
|
|
|
83
86
|
attr_accessor settlement_currency: Dodopayments::Models::currency
|
|
@@ -150,6 +153,7 @@ module Dodopayments
|
|
|
150
153
|
payment_provider: Dodopayments::Models::Payment::payment_provider,
|
|
151
154
|
refunds: ::Array[Dodopayments::RefundListItem],
|
|
152
155
|
retry_attempt: Integer,
|
|
156
|
+
service_periods: ::Array[Dodopayments::SubscriptionServicePeriod],
|
|
153
157
|
settlement_amount: Integer,
|
|
154
158
|
settlement_currency: Dodopayments::Models::currency,
|
|
155
159
|
subscription_ids: ::Array[String],
|
|
@@ -196,6 +200,7 @@ module Dodopayments
|
|
|
196
200
|
payment_provider: Dodopayments::Models::Payment::payment_provider,
|
|
197
201
|
refunds: ::Array[Dodopayments::RefundListItem],
|
|
198
202
|
retry_attempt: Integer,
|
|
203
|
+
service_periods: ::Array[Dodopayments::SubscriptionServicePeriod],
|
|
199
204
|
settlement_amount: Integer,
|
|
200
205
|
settlement_currency: Dodopayments::Models::currency,
|
|
201
206
|
subscription_ids: ::Array[String],
|
|
@@ -12,10 +12,13 @@ module Dodopayments
|
|
|
12
12
|
metadata: Dodopayments::Models::metadata,
|
|
13
13
|
payment_id: String,
|
|
14
14
|
payment_provider: Dodopayments::Models::PaymentListResponse::payment_provider,
|
|
15
|
+
retry_attempt: Integer,
|
|
16
|
+
service_periods: ::Array[Dodopayments::SubscriptionServicePeriod],
|
|
15
17
|
subscription_ids: ::Array[String],
|
|
16
18
|
total_amount: Integer,
|
|
17
19
|
card_last_four: String?,
|
|
18
20
|
card_network: String?,
|
|
21
|
+
checkout_session_id: String?,
|
|
19
22
|
dispute_status: Dodopayments::Models::dispute_status?,
|
|
20
23
|
invoice_id: String?,
|
|
21
24
|
invoice_url: String?,
|
|
@@ -47,6 +50,10 @@ module Dodopayments
|
|
|
47
50
|
|
|
48
51
|
attr_accessor payment_provider: Dodopayments::Models::PaymentListResponse::payment_provider
|
|
49
52
|
|
|
53
|
+
attr_accessor retry_attempt: Integer
|
|
54
|
+
|
|
55
|
+
attr_accessor service_periods: ::Array[Dodopayments::SubscriptionServicePeriod]
|
|
56
|
+
|
|
50
57
|
attr_accessor subscription_ids: ::Array[String]
|
|
51
58
|
|
|
52
59
|
attr_accessor total_amount: Integer
|
|
@@ -55,6 +62,8 @@ module Dodopayments
|
|
|
55
62
|
|
|
56
63
|
attr_accessor card_network: String?
|
|
57
64
|
|
|
65
|
+
attr_accessor checkout_session_id: String?
|
|
66
|
+
|
|
58
67
|
attr_accessor dispute_status: Dodopayments::Models::dispute_status?
|
|
59
68
|
|
|
60
69
|
attr_accessor invoice_id: String?
|
|
@@ -82,10 +91,13 @@ module Dodopayments
|
|
|
82
91
|
metadata: Dodopayments::Models::metadata,
|
|
83
92
|
payment_id: String,
|
|
84
93
|
payment_provider: Dodopayments::Models::PaymentListResponse::payment_provider,
|
|
94
|
+
retry_attempt: Integer,
|
|
95
|
+
service_periods: ::Array[Dodopayments::SubscriptionServicePeriod],
|
|
85
96
|
subscription_ids: ::Array[String],
|
|
86
97
|
total_amount: Integer,
|
|
87
98
|
?card_last_four: String?,
|
|
88
99
|
?card_network: String?,
|
|
100
|
+
?checkout_session_id: String?,
|
|
89
101
|
?dispute_status: Dodopayments::Models::dispute_status?,
|
|
90
102
|
?invoice_id: String?,
|
|
91
103
|
?invoice_url: String?,
|
|
@@ -107,10 +119,13 @@ module Dodopayments
|
|
|
107
119
|
metadata: Dodopayments::Models::metadata,
|
|
108
120
|
payment_id: String,
|
|
109
121
|
payment_provider: Dodopayments::Models::PaymentListResponse::payment_provider,
|
|
122
|
+
retry_attempt: Integer,
|
|
123
|
+
service_periods: ::Array[Dodopayments::SubscriptionServicePeriod],
|
|
110
124
|
subscription_ids: ::Array[String],
|
|
111
125
|
total_amount: Integer,
|
|
112
126
|
card_last_four: String?,
|
|
113
127
|
card_network: String?,
|
|
128
|
+
checkout_session_id: String?,
|
|
114
129
|
dispute_status: Dodopayments::Models::dispute_status?,
|
|
115
130
|
invoice_id: String?,
|
|
116
131
|
invoice_url: String?,
|