dodopayments 1.69.0 → 1.71.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 +26 -0
- data/README.md +10 -1
- data/lib/dodopayments/models/checkout_session_request.rb +10 -1
- data/lib/dodopayments/models/checkout_session_response.rb +8 -8
- data/lib/dodopayments/models/customer_retrieve_payment_methods_response.rb +9 -18
- data/lib/dodopayments/models/dispute_accepted_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_cancelled_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_challenged_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_expired_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_lost_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_opened_webhook_event.rb +3 -28
- data/lib/dodopayments/models/dispute_won_webhook_event.rb +3 -28
- data/lib/dodopayments/models/license_key_created_webhook_event.rb +3 -28
- data/lib/dodopayments/models/payment.rb +9 -1
- data/lib/dodopayments/models/payment_cancelled_webhook_event.rb +3 -28
- data/lib/dodopayments/models/payment_create_params.rb +11 -1
- data/lib/dodopayments/models/payment_failed_webhook_event.rb +3 -28
- data/lib/dodopayments/models/payment_method_types.rb +98 -13
- data/lib/dodopayments/models/payment_processing_webhook_event.rb +3 -28
- data/lib/dodopayments/models/payment_succeeded_webhook_event.rb +3 -28
- data/lib/dodopayments/models/refund_failed_webhook_event.rb +3 -28
- data/lib/dodopayments/models/refund_succeeded_webhook_event.rb +3 -28
- data/lib/dodopayments/models/subscription_active_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_cancelled_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_create_params.rb +11 -1
- data/lib/dodopayments/models/subscription_expired_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_failed_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_on_hold_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_plan_changed_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_renewed_webhook_event.rb +4 -28
- data/lib/dodopayments/models/subscription_updated_webhook_event.rb +4 -28
- data/lib/dodopayments/resources/checkout_sessions.rb +3 -1
- data/lib/dodopayments/resources/payments.rb +3 -1
- data/lib/dodopayments/resources/subscriptions.rb +3 -1
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +3 -3
- data/rbi/dodopayments/models/checkout_session_request.rbi +10 -0
- data/rbi/dodopayments/models/checkout_session_response.rbi +13 -9
- data/rbi/dodopayments/models/customer_retrieve_payment_methods_response.rbi +6 -9
- data/rbi/dodopayments/models/dispute_accepted_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/dispute_cancelled_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/dispute_challenged_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/dispute_expired_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/dispute_lost_webhook_event.rbi +4 -90
- data/rbi/dodopayments/models/dispute_opened_webhook_event.rbi +4 -90
- data/rbi/dodopayments/models/dispute_won_webhook_event.rbi +4 -90
- data/rbi/dodopayments/models/license_key_created_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/payment.rbi +8 -0
- data/rbi/dodopayments/models/payment_cancelled_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/payment_create_params.rbi +12 -0
- data/rbi/dodopayments/models/payment_failed_webhook_event.rbi +4 -90
- data/rbi/dodopayments/models/payment_method_types.rbi +186 -18
- data/rbi/dodopayments/models/payment_processing_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/payment_succeeded_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/refund_failed_webhook_event.rbi +4 -90
- data/rbi/dodopayments/models/refund_succeeded_webhook_event.rbi +4 -92
- data/rbi/dodopayments/models/subscription_active_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_cancelled_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_create_params.rbi +12 -0
- data/rbi/dodopayments/models/subscription_expired_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_failed_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_on_hold_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_plan_changed_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_renewed_webhook_event.rbi +6 -92
- data/rbi/dodopayments/models/subscription_updated_webhook_event.rbi +6 -92
- data/rbi/dodopayments/resources/checkout_sessions.rbi +4 -0
- data/rbi/dodopayments/resources/payments.rbi +5 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +5 -0
- data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
- data/sig/dodopayments/models/checkout_session_response.rbs +5 -5
- data/sig/dodopayments/models/customer_retrieve_payment_methods_response.rbs +5 -0
- data/sig/dodopayments/models/dispute_accepted_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_cancelled_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_challenged_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_expired_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_lost_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_opened_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/dispute_won_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/license_key_created_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/payment.rbs +5 -0
- data/sig/dodopayments/models/payment_cancelled_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/payment_create_params.rbs +5 -0
- data/sig/dodopayments/models/payment_failed_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/payment_method_types.rbs +196 -26
- data/sig/dodopayments/models/payment_processing_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/payment_succeeded_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/refund_failed_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/refund_succeeded_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_active_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_cancelled_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_create_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_expired_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_failed_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_on_hold_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_plan_changed_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_renewed_webhook_event.rbs +4 -35
- data/sig/dodopayments/models/subscription_updated_webhook_event.rbs +4 -35
- data/sig/dodopayments/resources/checkout_sessions.rbs +1 -0
- data/sig/dodopayments/resources/payments.rbs +1 -0
- data/sig/dodopayments/resources/subscriptions.rbs +1 -0
- metadata +2 -2
|
@@ -15,15 +15,11 @@ module Dodopayments
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :business_id
|
|
17
17
|
|
|
18
|
-
#
|
|
19
|
-
sig { returns(Dodopayments::
|
|
18
|
+
# Response struct representing subscription details
|
|
19
|
+
sig { returns(Dodopayments::Subscription) }
|
|
20
20
|
attr_reader :data
|
|
21
21
|
|
|
22
|
-
sig
|
|
23
|
-
params(
|
|
24
|
-
data: Dodopayments::SubscriptionOnHoldWebhookEvent::Data::OrHash
|
|
25
|
-
).void
|
|
26
|
-
end
|
|
22
|
+
sig { params(data: Dodopayments::Subscription::OrHash).void }
|
|
27
23
|
attr_writer :data
|
|
28
24
|
|
|
29
25
|
# The timestamp of when the event occurred
|
|
@@ -41,7 +37,7 @@ module Dodopayments
|
|
|
41
37
|
sig do
|
|
42
38
|
params(
|
|
43
39
|
business_id: String,
|
|
44
|
-
data: Dodopayments::
|
|
40
|
+
data: Dodopayments::Subscription::OrHash,
|
|
45
41
|
timestamp: Time,
|
|
46
42
|
type: Dodopayments::SubscriptionOnHoldWebhookEvent::Type::OrSymbol
|
|
47
43
|
).returns(T.attached_class)
|
|
@@ -49,7 +45,7 @@ module Dodopayments
|
|
|
49
45
|
def self.new(
|
|
50
46
|
# The business identifier
|
|
51
47
|
business_id:,
|
|
52
|
-
#
|
|
48
|
+
# Response struct representing subscription details
|
|
53
49
|
data:,
|
|
54
50
|
# The timestamp of when the event occurred
|
|
55
51
|
timestamp:,
|
|
@@ -62,7 +58,7 @@ module Dodopayments
|
|
|
62
58
|
override.returns(
|
|
63
59
|
{
|
|
64
60
|
business_id: String,
|
|
65
|
-
data: Dodopayments::
|
|
61
|
+
data: Dodopayments::Subscription,
|
|
66
62
|
timestamp: Time,
|
|
67
63
|
type:
|
|
68
64
|
Dodopayments::SubscriptionOnHoldWebhookEvent::Type::TaggedSymbol
|
|
@@ -72,88 +68,6 @@ module Dodopayments
|
|
|
72
68
|
def to_hash
|
|
73
69
|
end
|
|
74
70
|
|
|
75
|
-
class Data < Dodopayments::Models::Subscription
|
|
76
|
-
OrHash =
|
|
77
|
-
T.type_alias do
|
|
78
|
-
T.any(
|
|
79
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Data,
|
|
80
|
-
Dodopayments::Internal::AnyHash
|
|
81
|
-
)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# The type of payload in the data field
|
|
85
|
-
sig do
|
|
86
|
-
returns(
|
|
87
|
-
T.nilable(
|
|
88
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
89
|
-
)
|
|
90
|
-
)
|
|
91
|
-
end
|
|
92
|
-
attr_reader :payload_type
|
|
93
|
-
|
|
94
|
-
sig do
|
|
95
|
-
params(
|
|
96
|
-
payload_type:
|
|
97
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Data::PayloadType::OrSymbol
|
|
98
|
-
).void
|
|
99
|
-
end
|
|
100
|
-
attr_writer :payload_type
|
|
101
|
-
|
|
102
|
-
# Event-specific data
|
|
103
|
-
sig do
|
|
104
|
-
params(
|
|
105
|
-
payload_type:
|
|
106
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Data::PayloadType::OrSymbol
|
|
107
|
-
).returns(T.attached_class)
|
|
108
|
-
end
|
|
109
|
-
def self.new(
|
|
110
|
-
# The type of payload in the data field
|
|
111
|
-
payload_type: nil
|
|
112
|
-
)
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
sig do
|
|
116
|
-
override.returns(
|
|
117
|
-
{
|
|
118
|
-
payload_type:
|
|
119
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
end
|
|
123
|
-
def to_hash
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
# The type of payload in the data field
|
|
127
|
-
module PayloadType
|
|
128
|
-
extend Dodopayments::Internal::Type::Enum
|
|
129
|
-
|
|
130
|
-
TaggedSymbol =
|
|
131
|
-
T.type_alias do
|
|
132
|
-
T.all(
|
|
133
|
-
Symbol,
|
|
134
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Data::PayloadType
|
|
135
|
-
)
|
|
136
|
-
end
|
|
137
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
138
|
-
|
|
139
|
-
SUBSCRIPTION =
|
|
140
|
-
T.let(
|
|
141
|
-
:Subscription,
|
|
142
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
sig do
|
|
146
|
-
override.returns(
|
|
147
|
-
T::Array[
|
|
148
|
-
Dodopayments::SubscriptionOnHoldWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
149
|
-
]
|
|
150
|
-
)
|
|
151
|
-
end
|
|
152
|
-
def self.values
|
|
153
|
-
end
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
|
|
157
71
|
# The event type
|
|
158
72
|
module Type
|
|
159
73
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -15,15 +15,11 @@ module Dodopayments
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :business_id
|
|
17
17
|
|
|
18
|
-
#
|
|
19
|
-
sig { returns(Dodopayments::
|
|
18
|
+
# Response struct representing subscription details
|
|
19
|
+
sig { returns(Dodopayments::Subscription) }
|
|
20
20
|
attr_reader :data
|
|
21
21
|
|
|
22
|
-
sig
|
|
23
|
-
params(
|
|
24
|
-
data: Dodopayments::SubscriptionPlanChangedWebhookEvent::Data::OrHash
|
|
25
|
-
).void
|
|
26
|
-
end
|
|
22
|
+
sig { params(data: Dodopayments::Subscription::OrHash).void }
|
|
27
23
|
attr_writer :data
|
|
28
24
|
|
|
29
25
|
# The timestamp of when the event occurred
|
|
@@ -41,7 +37,7 @@ module Dodopayments
|
|
|
41
37
|
sig do
|
|
42
38
|
params(
|
|
43
39
|
business_id: String,
|
|
44
|
-
data: Dodopayments::
|
|
40
|
+
data: Dodopayments::Subscription::OrHash,
|
|
45
41
|
timestamp: Time,
|
|
46
42
|
type:
|
|
47
43
|
Dodopayments::SubscriptionPlanChangedWebhookEvent::Type::OrSymbol
|
|
@@ -50,7 +46,7 @@ module Dodopayments
|
|
|
50
46
|
def self.new(
|
|
51
47
|
# The business identifier
|
|
52
48
|
business_id:,
|
|
53
|
-
#
|
|
49
|
+
# Response struct representing subscription details
|
|
54
50
|
data:,
|
|
55
51
|
# The timestamp of when the event occurred
|
|
56
52
|
timestamp:,
|
|
@@ -63,7 +59,7 @@ module Dodopayments
|
|
|
63
59
|
override.returns(
|
|
64
60
|
{
|
|
65
61
|
business_id: String,
|
|
66
|
-
data: Dodopayments::
|
|
62
|
+
data: Dodopayments::Subscription,
|
|
67
63
|
timestamp: Time,
|
|
68
64
|
type:
|
|
69
65
|
Dodopayments::SubscriptionPlanChangedWebhookEvent::Type::TaggedSymbol
|
|
@@ -73,88 +69,6 @@ module Dodopayments
|
|
|
73
69
|
def to_hash
|
|
74
70
|
end
|
|
75
71
|
|
|
76
|
-
class Data < Dodopayments::Models::Subscription
|
|
77
|
-
OrHash =
|
|
78
|
-
T.type_alias do
|
|
79
|
-
T.any(
|
|
80
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Data,
|
|
81
|
-
Dodopayments::Internal::AnyHash
|
|
82
|
-
)
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
# The type of payload in the data field
|
|
86
|
-
sig do
|
|
87
|
-
returns(
|
|
88
|
-
T.nilable(
|
|
89
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
90
|
-
)
|
|
91
|
-
)
|
|
92
|
-
end
|
|
93
|
-
attr_reader :payload_type
|
|
94
|
-
|
|
95
|
-
sig do
|
|
96
|
-
params(
|
|
97
|
-
payload_type:
|
|
98
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Data::PayloadType::OrSymbol
|
|
99
|
-
).void
|
|
100
|
-
end
|
|
101
|
-
attr_writer :payload_type
|
|
102
|
-
|
|
103
|
-
# Event-specific data
|
|
104
|
-
sig do
|
|
105
|
-
params(
|
|
106
|
-
payload_type:
|
|
107
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Data::PayloadType::OrSymbol
|
|
108
|
-
).returns(T.attached_class)
|
|
109
|
-
end
|
|
110
|
-
def self.new(
|
|
111
|
-
# The type of payload in the data field
|
|
112
|
-
payload_type: nil
|
|
113
|
-
)
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
sig do
|
|
117
|
-
override.returns(
|
|
118
|
-
{
|
|
119
|
-
payload_type:
|
|
120
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
end
|
|
124
|
-
def to_hash
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
# The type of payload in the data field
|
|
128
|
-
module PayloadType
|
|
129
|
-
extend Dodopayments::Internal::Type::Enum
|
|
130
|
-
|
|
131
|
-
TaggedSymbol =
|
|
132
|
-
T.type_alias do
|
|
133
|
-
T.all(
|
|
134
|
-
Symbol,
|
|
135
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Data::PayloadType
|
|
136
|
-
)
|
|
137
|
-
end
|
|
138
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
139
|
-
|
|
140
|
-
SUBSCRIPTION =
|
|
141
|
-
T.let(
|
|
142
|
-
:Subscription,
|
|
143
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
sig do
|
|
147
|
-
override.returns(
|
|
148
|
-
T::Array[
|
|
149
|
-
Dodopayments::SubscriptionPlanChangedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
150
|
-
]
|
|
151
|
-
)
|
|
152
|
-
end
|
|
153
|
-
def self.values
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
end
|
|
157
|
-
|
|
158
72
|
# The event type
|
|
159
73
|
module Type
|
|
160
74
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -15,15 +15,11 @@ module Dodopayments
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :business_id
|
|
17
17
|
|
|
18
|
-
#
|
|
19
|
-
sig { returns(Dodopayments::
|
|
18
|
+
# Response struct representing subscription details
|
|
19
|
+
sig { returns(Dodopayments::Subscription) }
|
|
20
20
|
attr_reader :data
|
|
21
21
|
|
|
22
|
-
sig
|
|
23
|
-
params(
|
|
24
|
-
data: Dodopayments::SubscriptionRenewedWebhookEvent::Data::OrHash
|
|
25
|
-
).void
|
|
26
|
-
end
|
|
22
|
+
sig { params(data: Dodopayments::Subscription::OrHash).void }
|
|
27
23
|
attr_writer :data
|
|
28
24
|
|
|
29
25
|
# The timestamp of when the event occurred
|
|
@@ -41,7 +37,7 @@ module Dodopayments
|
|
|
41
37
|
sig do
|
|
42
38
|
params(
|
|
43
39
|
business_id: String,
|
|
44
|
-
data: Dodopayments::
|
|
40
|
+
data: Dodopayments::Subscription::OrHash,
|
|
45
41
|
timestamp: Time,
|
|
46
42
|
type: Dodopayments::SubscriptionRenewedWebhookEvent::Type::OrSymbol
|
|
47
43
|
).returns(T.attached_class)
|
|
@@ -49,7 +45,7 @@ module Dodopayments
|
|
|
49
45
|
def self.new(
|
|
50
46
|
# The business identifier
|
|
51
47
|
business_id:,
|
|
52
|
-
#
|
|
48
|
+
# Response struct representing subscription details
|
|
53
49
|
data:,
|
|
54
50
|
# The timestamp of when the event occurred
|
|
55
51
|
timestamp:,
|
|
@@ -62,7 +58,7 @@ module Dodopayments
|
|
|
62
58
|
override.returns(
|
|
63
59
|
{
|
|
64
60
|
business_id: String,
|
|
65
|
-
data: Dodopayments::
|
|
61
|
+
data: Dodopayments::Subscription,
|
|
66
62
|
timestamp: Time,
|
|
67
63
|
type:
|
|
68
64
|
Dodopayments::SubscriptionRenewedWebhookEvent::Type::TaggedSymbol
|
|
@@ -72,88 +68,6 @@ module Dodopayments
|
|
|
72
68
|
def to_hash
|
|
73
69
|
end
|
|
74
70
|
|
|
75
|
-
class Data < Dodopayments::Models::Subscription
|
|
76
|
-
OrHash =
|
|
77
|
-
T.type_alias do
|
|
78
|
-
T.any(
|
|
79
|
-
Dodopayments::SubscriptionRenewedWebhookEvent::Data,
|
|
80
|
-
Dodopayments::Internal::AnyHash
|
|
81
|
-
)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# The type of payload in the data field
|
|
85
|
-
sig do
|
|
86
|
-
returns(
|
|
87
|
-
T.nilable(
|
|
88
|
-
Dodopayments::SubscriptionRenewedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
89
|
-
)
|
|
90
|
-
)
|
|
91
|
-
end
|
|
92
|
-
attr_reader :payload_type
|
|
93
|
-
|
|
94
|
-
sig do
|
|
95
|
-
params(
|
|
96
|
-
payload_type:
|
|
97
|
-
Dodopayments::SubscriptionRenewedWebhookEvent::Data::PayloadType::OrSymbol
|
|
98
|
-
).void
|
|
99
|
-
end
|
|
100
|
-
attr_writer :payload_type
|
|
101
|
-
|
|
102
|
-
# Event-specific data
|
|
103
|
-
sig do
|
|
104
|
-
params(
|
|
105
|
-
payload_type:
|
|
106
|
-
Dodopayments::SubscriptionRenewedWebhookEvent::Data::PayloadType::OrSymbol
|
|
107
|
-
).returns(T.attached_class)
|
|
108
|
-
end
|
|
109
|
-
def self.new(
|
|
110
|
-
# The type of payload in the data field
|
|
111
|
-
payload_type: nil
|
|
112
|
-
)
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
sig do
|
|
116
|
-
override.returns(
|
|
117
|
-
{
|
|
118
|
-
payload_type:
|
|
119
|
-
Dodopayments::SubscriptionRenewedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
end
|
|
123
|
-
def to_hash
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
# The type of payload in the data field
|
|
127
|
-
module PayloadType
|
|
128
|
-
extend Dodopayments::Internal::Type::Enum
|
|
129
|
-
|
|
130
|
-
TaggedSymbol =
|
|
131
|
-
T.type_alias do
|
|
132
|
-
T.all(
|
|
133
|
-
Symbol,
|
|
134
|
-
Dodopayments::SubscriptionRenewedWebhookEvent::Data::PayloadType
|
|
135
|
-
)
|
|
136
|
-
end
|
|
137
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
138
|
-
|
|
139
|
-
SUBSCRIPTION =
|
|
140
|
-
T.let(
|
|
141
|
-
:Subscription,
|
|
142
|
-
Dodopayments::SubscriptionRenewedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
sig do
|
|
146
|
-
override.returns(
|
|
147
|
-
T::Array[
|
|
148
|
-
Dodopayments::SubscriptionRenewedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
149
|
-
]
|
|
150
|
-
)
|
|
151
|
-
end
|
|
152
|
-
def self.values
|
|
153
|
-
end
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
|
|
157
71
|
# The event type
|
|
158
72
|
module Type
|
|
159
73
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -15,15 +15,11 @@ module Dodopayments
|
|
|
15
15
|
sig { returns(String) }
|
|
16
16
|
attr_accessor :business_id
|
|
17
17
|
|
|
18
|
-
#
|
|
19
|
-
sig { returns(Dodopayments::
|
|
18
|
+
# Response struct representing subscription details
|
|
19
|
+
sig { returns(Dodopayments::Subscription) }
|
|
20
20
|
attr_reader :data
|
|
21
21
|
|
|
22
|
-
sig
|
|
23
|
-
params(
|
|
24
|
-
data: Dodopayments::SubscriptionUpdatedWebhookEvent::Data::OrHash
|
|
25
|
-
).void
|
|
26
|
-
end
|
|
22
|
+
sig { params(data: Dodopayments::Subscription::OrHash).void }
|
|
27
23
|
attr_writer :data
|
|
28
24
|
|
|
29
25
|
# The timestamp of when the event occurred
|
|
@@ -41,7 +37,7 @@ module Dodopayments
|
|
|
41
37
|
sig do
|
|
42
38
|
params(
|
|
43
39
|
business_id: String,
|
|
44
|
-
data: Dodopayments::
|
|
40
|
+
data: Dodopayments::Subscription::OrHash,
|
|
45
41
|
timestamp: Time,
|
|
46
42
|
type: Dodopayments::SubscriptionUpdatedWebhookEvent::Type::OrSymbol
|
|
47
43
|
).returns(T.attached_class)
|
|
@@ -49,7 +45,7 @@ module Dodopayments
|
|
|
49
45
|
def self.new(
|
|
50
46
|
# The business identifier
|
|
51
47
|
business_id:,
|
|
52
|
-
#
|
|
48
|
+
# Response struct representing subscription details
|
|
53
49
|
data:,
|
|
54
50
|
# The timestamp of when the event occurred
|
|
55
51
|
timestamp:,
|
|
@@ -62,7 +58,7 @@ module Dodopayments
|
|
|
62
58
|
override.returns(
|
|
63
59
|
{
|
|
64
60
|
business_id: String,
|
|
65
|
-
data: Dodopayments::
|
|
61
|
+
data: Dodopayments::Subscription,
|
|
66
62
|
timestamp: Time,
|
|
67
63
|
type:
|
|
68
64
|
Dodopayments::SubscriptionUpdatedWebhookEvent::Type::TaggedSymbol
|
|
@@ -72,88 +68,6 @@ module Dodopayments
|
|
|
72
68
|
def to_hash
|
|
73
69
|
end
|
|
74
70
|
|
|
75
|
-
class Data < Dodopayments::Models::Subscription
|
|
76
|
-
OrHash =
|
|
77
|
-
T.type_alias do
|
|
78
|
-
T.any(
|
|
79
|
-
Dodopayments::SubscriptionUpdatedWebhookEvent::Data,
|
|
80
|
-
Dodopayments::Internal::AnyHash
|
|
81
|
-
)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# The type of payload in the data field
|
|
85
|
-
sig do
|
|
86
|
-
returns(
|
|
87
|
-
T.nilable(
|
|
88
|
-
Dodopayments::SubscriptionUpdatedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
89
|
-
)
|
|
90
|
-
)
|
|
91
|
-
end
|
|
92
|
-
attr_reader :payload_type
|
|
93
|
-
|
|
94
|
-
sig do
|
|
95
|
-
params(
|
|
96
|
-
payload_type:
|
|
97
|
-
Dodopayments::SubscriptionUpdatedWebhookEvent::Data::PayloadType::OrSymbol
|
|
98
|
-
).void
|
|
99
|
-
end
|
|
100
|
-
attr_writer :payload_type
|
|
101
|
-
|
|
102
|
-
# Event-specific data
|
|
103
|
-
sig do
|
|
104
|
-
params(
|
|
105
|
-
payload_type:
|
|
106
|
-
Dodopayments::SubscriptionUpdatedWebhookEvent::Data::PayloadType::OrSymbol
|
|
107
|
-
).returns(T.attached_class)
|
|
108
|
-
end
|
|
109
|
-
def self.new(
|
|
110
|
-
# The type of payload in the data field
|
|
111
|
-
payload_type: nil
|
|
112
|
-
)
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
sig do
|
|
116
|
-
override.returns(
|
|
117
|
-
{
|
|
118
|
-
payload_type:
|
|
119
|
-
Dodopayments::SubscriptionUpdatedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
end
|
|
123
|
-
def to_hash
|
|
124
|
-
end
|
|
125
|
-
|
|
126
|
-
# The type of payload in the data field
|
|
127
|
-
module PayloadType
|
|
128
|
-
extend Dodopayments::Internal::Type::Enum
|
|
129
|
-
|
|
130
|
-
TaggedSymbol =
|
|
131
|
-
T.type_alias do
|
|
132
|
-
T.all(
|
|
133
|
-
Symbol,
|
|
134
|
-
Dodopayments::SubscriptionUpdatedWebhookEvent::Data::PayloadType
|
|
135
|
-
)
|
|
136
|
-
end
|
|
137
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
138
|
-
|
|
139
|
-
SUBSCRIPTION =
|
|
140
|
-
T.let(
|
|
141
|
-
:Subscription,
|
|
142
|
-
Dodopayments::SubscriptionUpdatedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
sig do
|
|
146
|
-
override.returns(
|
|
147
|
-
T::Array[
|
|
148
|
-
Dodopayments::SubscriptionUpdatedWebhookEvent::Data::PayloadType::TaggedSymbol
|
|
149
|
-
]
|
|
150
|
-
)
|
|
151
|
-
end
|
|
152
|
-
def self.values
|
|
153
|
-
end
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
|
|
157
71
|
# The event type
|
|
158
72
|
module Type
|
|
159
73
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -30,6 +30,7 @@ module Dodopayments
|
|
|
30
30
|
force_3ds: T.nilable(T::Boolean),
|
|
31
31
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
32
32
|
minimal_address: T::Boolean,
|
|
33
|
+
payment_method_id: T.nilable(String),
|
|
33
34
|
return_url: T.nilable(String),
|
|
34
35
|
short_link: T::Boolean,
|
|
35
36
|
show_saved_payment_methods: T::Boolean,
|
|
@@ -70,6 +71,9 @@ module Dodopayments
|
|
|
70
71
|
# If true, only zipcode is required when confirm is true; other address fields
|
|
71
72
|
# remain optional
|
|
72
73
|
minimal_address: nil,
|
|
74
|
+
# Optional payment method ID to use for this checkout session. Only allowed when
|
|
75
|
+
# `confirm` is true. If provided, existing customer id must also be provided.
|
|
76
|
+
payment_method_id: nil,
|
|
73
77
|
# The url to redirect after payment failure or success.
|
|
74
78
|
return_url: nil,
|
|
75
79
|
# If true, returns a shortened checkout URL. Defaults to false if not specified.
|
|
@@ -19,6 +19,7 @@ module Dodopayments
|
|
|
19
19
|
force_3ds: T.nilable(T::Boolean),
|
|
20
20
|
metadata: T::Hash[Symbol, String],
|
|
21
21
|
payment_link: T.nilable(T::Boolean),
|
|
22
|
+
payment_method_id: T.nilable(String),
|
|
22
23
|
redirect_immediately: T::Boolean,
|
|
23
24
|
return_url: T.nilable(String),
|
|
24
25
|
short_link: T.nilable(T::Boolean),
|
|
@@ -53,6 +54,10 @@ module Dodopayments
|
|
|
53
54
|
metadata: nil,
|
|
54
55
|
# Whether to generate a payment link. Defaults to false if not specified.
|
|
55
56
|
payment_link: nil,
|
|
57
|
+
# Optional payment method ID to use for this payment. If provided, customer_id
|
|
58
|
+
# must also be provided. The payment method will be validated for eligibility with
|
|
59
|
+
# the payment's currency.
|
|
60
|
+
payment_method_id: nil,
|
|
56
61
|
# If true, redirects the customer immediately after payment completion False by
|
|
57
62
|
# default
|
|
58
63
|
redirect_immediately: nil,
|
|
@@ -24,6 +24,7 @@ module Dodopayments
|
|
|
24
24
|
one_time_product_cart:
|
|
25
25
|
T.nilable(T::Array[Dodopayments::OneTimeProductCartItem::OrHash]),
|
|
26
26
|
payment_link: T.nilable(T::Boolean),
|
|
27
|
+
payment_method_id: T.nilable(String),
|
|
27
28
|
redirect_immediately: T::Boolean,
|
|
28
29
|
return_url: T.nilable(String),
|
|
29
30
|
short_link: T.nilable(T::Boolean),
|
|
@@ -66,6 +67,10 @@ module Dodopayments
|
|
|
66
67
|
one_time_product_cart: nil,
|
|
67
68
|
# If true, generates a payment link. Defaults to false if not specified.
|
|
68
69
|
payment_link: nil,
|
|
70
|
+
# Optional payment method ID to use for this subscription. If provided,
|
|
71
|
+
# customer_id must also be provided (via AttachExistingCustomer). The payment
|
|
72
|
+
# method will be validated for eligibility with the subscription's currency.
|
|
73
|
+
payment_method_id: nil,
|
|
69
74
|
# If true, redirects the customer immediately after payment completion False by
|
|
70
75
|
# default
|
|
71
76
|
redirect_immediately: nil,
|
|
@@ -14,6 +14,7 @@ module Dodopayments
|
|
|
14
14
|
:force_3ds => bool?,
|
|
15
15
|
metadata: ::Hash[Symbol, String]?,
|
|
16
16
|
minimal_address: bool,
|
|
17
|
+
payment_method_id: String?,
|
|
17
18
|
return_url: String?,
|
|
18
19
|
short_link: bool,
|
|
19
20
|
show_saved_payment_methods: bool,
|
|
@@ -57,6 +58,8 @@ module Dodopayments
|
|
|
57
58
|
|
|
58
59
|
def minimal_address=: (bool) -> bool
|
|
59
60
|
|
|
61
|
+
attr_accessor payment_method_id: String?
|
|
62
|
+
|
|
60
63
|
attr_accessor return_url: String?
|
|
61
64
|
|
|
62
65
|
attr_reader short_link: bool?
|
|
@@ -82,6 +85,7 @@ module Dodopayments
|
|
|
82
85
|
?force_3ds: bool?,
|
|
83
86
|
?metadata: ::Hash[Symbol, String]?,
|
|
84
87
|
?minimal_address: bool,
|
|
88
|
+
?payment_method_id: String?,
|
|
85
89
|
?return_url: String?,
|
|
86
90
|
?short_link: bool,
|
|
87
91
|
?show_saved_payment_methods: bool,
|
|
@@ -101,6 +105,7 @@ module Dodopayments
|
|
|
101
105
|
:force_3ds => bool?,
|
|
102
106
|
metadata: ::Hash[Symbol, String]?,
|
|
103
107
|
minimal_address: bool,
|
|
108
|
+
payment_method_id: String?,
|
|
104
109
|
return_url: String?,
|
|
105
110
|
short_link: bool,
|
|
106
111
|
show_saved_payment_methods: bool,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
module Dodopayments
|
|
2
2
|
module Models
|
|
3
3
|
type checkout_session_response =
|
|
4
|
-
{
|
|
4
|
+
{ session_id: String, checkout_url: String? }
|
|
5
5
|
|
|
6
6
|
class CheckoutSessionResponse < Dodopayments::Internal::Type::BaseModel
|
|
7
|
-
attr_accessor checkout_url: String
|
|
8
|
-
|
|
9
7
|
attr_accessor session_id: String
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
attr_accessor checkout_url: String?
|
|
10
|
+
|
|
11
|
+
def initialize: (session_id: String, ?checkout_url: String?) -> void
|
|
12
12
|
|
|
13
|
-
def to_hash: -> {
|
|
13
|
+
def to_hash: -> { session_id: String, checkout_url: String? }
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
end
|
|
@@ -98,6 +98,7 @@ module Dodopayments
|
|
|
98
98
|
|
|
99
99
|
type card =
|
|
100
100
|
{
|
|
101
|
+
card_holder_name: String?,
|
|
101
102
|
card_issuing_country: Dodopayments::Models::country_code?,
|
|
102
103
|
card_network: String?,
|
|
103
104
|
card_type: String?,
|
|
@@ -107,6 +108,8 @@ module Dodopayments
|
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
class Card < Dodopayments::Internal::Type::BaseModel
|
|
111
|
+
attr_accessor card_holder_name: String?
|
|
112
|
+
|
|
110
113
|
attr_accessor card_issuing_country: Dodopayments::Models::country_code?
|
|
111
114
|
|
|
112
115
|
attr_accessor card_network: String?
|
|
@@ -120,6 +123,7 @@ module Dodopayments
|
|
|
120
123
|
attr_accessor last4_digits: String?
|
|
121
124
|
|
|
122
125
|
def initialize: (
|
|
126
|
+
?card_holder_name: String?,
|
|
123
127
|
?card_issuing_country: Dodopayments::Models::country_code?,
|
|
124
128
|
?card_network: String?,
|
|
125
129
|
?card_type: String?,
|
|
@@ -129,6 +133,7 @@ module Dodopayments
|
|
|
129
133
|
) -> void
|
|
130
134
|
|
|
131
135
|
def to_hash: -> {
|
|
136
|
+
card_holder_name: String?,
|
|
132
137
|
card_issuing_country: Dodopayments::Models::country_code?,
|
|
133
138
|
card_network: String?,
|
|
134
139
|
card_type: String?,
|