dodopayments 1.69.0 → 1.70.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 +8 -0
- data/README.md +1 -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/payment_create_params.rb +11 -1
- data/lib/dodopayments/models/subscription_create_params.rb +11 -1
- 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/rbi/dodopayments/models/checkout_session_request.rbi +10 -0
- data/rbi/dodopayments/models/checkout_session_response.rbi +13 -9
- data/rbi/dodopayments/models/payment_create_params.rbi +12 -0
- data/rbi/dodopayments/models/subscription_create_params.rbi +12 -0
- 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/payment_create_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_create_params.rbs +5 -0
- 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 +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7932166a1d9dd3a1c92b74bba30f1e90185636d1ff275a488d0a6ec947dfe40f
|
|
4
|
+
data.tar.gz: 41746077380ff697dc721bbf0b7eb83c3f17a1c500e47f94847b69f0e4627b20
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 288ad614c3627a92156c49ba02528256b8ba9e61ece9cfd94c55c8b2aa75ba567d57a443d1d517fa54967f273fc599927486c37114b70c90dde316c785fba26a
|
|
7
|
+
data.tar.gz: 5676e86af86d993869af700970ad3c6fa1b1a63cdec0014820d708ccbb078d0ee09c7bf0fe164aa6d2cb564d87db6bc32cd18303f9f6830dbf1a99889161d8a5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.70.0 (2025-12-23)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.69.0...v1.70.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.69.0...v1.70.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([83dc45a](https://github.com/dodopayments/dodopayments-ruby/commit/83dc45ae1eae356bc67e34c4eedb01390ff621e5))
|
|
10
|
+
|
|
3
11
|
## 1.69.0 (2025-12-23)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v1.68.0...v1.69.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.68.0...v1.69.0)
|
data/README.md
CHANGED
|
@@ -83,6 +83,13 @@ module Dodopayments
|
|
|
83
83
|
# @return [Boolean, nil]
|
|
84
84
|
optional :minimal_address, Dodopayments::Internal::Type::Boolean
|
|
85
85
|
|
|
86
|
+
# @!attribute payment_method_id
|
|
87
|
+
# Optional payment method ID to use for this checkout session. Only allowed when
|
|
88
|
+
# `confirm` is true. If provided, existing customer id must also be provided.
|
|
89
|
+
#
|
|
90
|
+
# @return [String, nil]
|
|
91
|
+
optional :payment_method_id, String, nil?: true
|
|
92
|
+
|
|
86
93
|
# @!attribute return_url
|
|
87
94
|
# The url to redirect after payment failure or success.
|
|
88
95
|
#
|
|
@@ -106,7 +113,7 @@ module Dodopayments
|
|
|
106
113
|
# @return [Dodopayments::Models::CheckoutSessionRequest::SubscriptionData, nil]
|
|
107
114
|
optional :subscription_data, -> { Dodopayments::CheckoutSessionRequest::SubscriptionData }, nil?: true
|
|
108
115
|
|
|
109
|
-
# @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, minimal_address: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil)
|
|
116
|
+
# @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil)
|
|
110
117
|
# Some parameter documentations has been truncated, see
|
|
111
118
|
# {Dodopayments::Models::CheckoutSessionRequest} for more details.
|
|
112
119
|
#
|
|
@@ -134,6 +141,8 @@ module Dodopayments
|
|
|
134
141
|
#
|
|
135
142
|
# @param minimal_address [Boolean] If true, only zipcode is required when confirm is true; other address fields rem
|
|
136
143
|
#
|
|
144
|
+
# @param payment_method_id [String, nil] Optional payment method ID to use for this checkout session.
|
|
145
|
+
#
|
|
137
146
|
# @param return_url [String, nil] The url to redirect after payment failure or success.
|
|
138
147
|
#
|
|
139
148
|
# @param short_link [Boolean] If true, returns a shortened checkout URL.
|
|
@@ -4,22 +4,22 @@ module Dodopayments
|
|
|
4
4
|
module Models
|
|
5
5
|
# @see Dodopayments::Resources::CheckoutSessions#create
|
|
6
6
|
class CheckoutSessionResponse < Dodopayments::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute checkout_url
|
|
8
|
-
# Checkout url
|
|
9
|
-
#
|
|
10
|
-
# @return [String]
|
|
11
|
-
required :checkout_url, String
|
|
12
|
-
|
|
13
7
|
# @!attribute session_id
|
|
14
8
|
# The ID of the created checkout session
|
|
15
9
|
#
|
|
16
10
|
# @return [String]
|
|
17
11
|
required :session_id, String
|
|
18
12
|
|
|
19
|
-
# @!
|
|
20
|
-
#
|
|
13
|
+
# @!attribute checkout_url
|
|
14
|
+
# Checkout url (None when payment_method_id is provided)
|
|
21
15
|
#
|
|
16
|
+
# @return [String, nil]
|
|
17
|
+
optional :checkout_url, String, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!method initialize(session_id:, checkout_url: nil)
|
|
22
20
|
# @param session_id [String] The ID of the created checkout session
|
|
21
|
+
#
|
|
22
|
+
# @param checkout_url [String, nil] Checkout url (None when payment_method_id is provided)
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -70,6 +70,14 @@ module Dodopayments
|
|
|
70
70
|
# @return [Boolean, nil]
|
|
71
71
|
optional :payment_link, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
72
72
|
|
|
73
|
+
# @!attribute payment_method_id
|
|
74
|
+
# Optional payment method ID to use for this payment. If provided, customer_id
|
|
75
|
+
# must also be provided. The payment method will be validated for eligibility with
|
|
76
|
+
# the payment's currency.
|
|
77
|
+
#
|
|
78
|
+
# @return [String, nil]
|
|
79
|
+
optional :payment_method_id, String, nil?: true
|
|
80
|
+
|
|
73
81
|
# @!attribute redirect_immediately
|
|
74
82
|
# If true, redirects the customer immediately after payment completion False by
|
|
75
83
|
# default
|
|
@@ -103,7 +111,7 @@ module Dodopayments
|
|
|
103
111
|
# @return [String, nil]
|
|
104
112
|
optional :tax_id, String, nil?: true
|
|
105
113
|
|
|
106
|
-
# @!method initialize(billing:, customer:, product_cart:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, payment_link: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
114
|
+
# @!method initialize(billing:, customer:, product_cart:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
107
115
|
# Some parameter documentations has been truncated, see
|
|
108
116
|
# {Dodopayments::Models::PaymentCreateParams} for more details.
|
|
109
117
|
#
|
|
@@ -125,6 +133,8 @@ module Dodopayments
|
|
|
125
133
|
#
|
|
126
134
|
# @param payment_link [Boolean, nil] Whether to generate a payment link. Defaults to false if not specified.
|
|
127
135
|
#
|
|
136
|
+
# @param payment_method_id [String, nil] Optional payment method ID to use for this payment.
|
|
137
|
+
#
|
|
128
138
|
# @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
129
139
|
#
|
|
130
140
|
# @param return_url [String, nil] Optional URL to redirect the customer after payment.
|
|
@@ -95,6 +95,14 @@ module Dodopayments
|
|
|
95
95
|
# @return [Boolean, nil]
|
|
96
96
|
optional :payment_link, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
97
97
|
|
|
98
|
+
# @!attribute payment_method_id
|
|
99
|
+
# Optional payment method ID to use for this subscription. If provided,
|
|
100
|
+
# customer_id must also be provided (via AttachExistingCustomer). The payment
|
|
101
|
+
# method will be validated for eligibility with the subscription's currency.
|
|
102
|
+
#
|
|
103
|
+
# @return [String, nil]
|
|
104
|
+
optional :payment_method_id, String, nil?: true
|
|
105
|
+
|
|
98
106
|
# @!attribute redirect_immediately
|
|
99
107
|
# If true, redirects the customer immediately after payment completion False by
|
|
100
108
|
# default
|
|
@@ -134,7 +142,7 @@ module Dodopayments
|
|
|
134
142
|
# @return [Integer, nil]
|
|
135
143
|
optional :trial_period_days, Integer, nil?: true
|
|
136
144
|
|
|
137
|
-
# @!method initialize(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
|
145
|
+
# @!method initialize(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
|
138
146
|
# Some parameter documentations has been truncated, see
|
|
139
147
|
# {Dodopayments::Models::SubscriptionCreateParams} for more details.
|
|
140
148
|
#
|
|
@@ -164,6 +172,8 @@ module Dodopayments
|
|
|
164
172
|
#
|
|
165
173
|
# @param payment_link [Boolean, nil] If true, generates a payment link.
|
|
166
174
|
#
|
|
175
|
+
# @param payment_method_id [String, nil] Optional payment method ID to use for this subscription.
|
|
176
|
+
#
|
|
167
177
|
# @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
168
178
|
#
|
|
169
179
|
# @param return_url [String, nil] Optional URL to redirect after successful subscription creation
|
|
@@ -6,7 +6,7 @@ module Dodopayments
|
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
|
7
7
|
# {Dodopayments::Models::CheckoutSessionCreateParams} for more details.
|
|
8
8
|
#
|
|
9
|
-
# @overload create(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, minimal_address: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, request_options: {})
|
|
9
|
+
# @overload create(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, request_options: {})
|
|
10
10
|
#
|
|
11
11
|
# @param product_cart [Array<Dodopayments::Models::CheckoutSessionRequest::ProductCart>]
|
|
12
12
|
#
|
|
@@ -32,6 +32,8 @@ module Dodopayments
|
|
|
32
32
|
#
|
|
33
33
|
# @param minimal_address [Boolean] If true, only zipcode is required when confirm is true; other address fields rem
|
|
34
34
|
#
|
|
35
|
+
# @param payment_method_id [String, nil] Optional payment method ID to use for this checkout session.
|
|
36
|
+
#
|
|
35
37
|
# @param return_url [String, nil] The url to redirect after payment failure or success.
|
|
36
38
|
#
|
|
37
39
|
# @param short_link [Boolean] If true, returns a shortened checkout URL.
|
|
@@ -8,7 +8,7 @@ module Dodopayments
|
|
|
8
8
|
# Some parameter documentations has been truncated, see
|
|
9
9
|
# {Dodopayments::Models::PaymentCreateParams} for more details.
|
|
10
10
|
#
|
|
11
|
-
# @overload create(billing:, customer:, product_cart:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, payment_link: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
11
|
+
# @overload create(billing:, customer:, product_cart:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
12
12
|
#
|
|
13
13
|
# @param billing [Dodopayments::Models::BillingAddress] Billing address details for the payment
|
|
14
14
|
#
|
|
@@ -28,6 +28,8 @@ module Dodopayments
|
|
|
28
28
|
#
|
|
29
29
|
# @param payment_link [Boolean, nil] Whether to generate a payment link. Defaults to false if not specified.
|
|
30
30
|
#
|
|
31
|
+
# @param payment_method_id [String, nil] Optional payment method ID to use for this payment.
|
|
32
|
+
#
|
|
31
33
|
# @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
32
34
|
#
|
|
33
35
|
# @param return_url [String, nil] Optional URL to redirect the customer after payment.
|
|
@@ -8,7 +8,7 @@ module Dodopayments
|
|
|
8
8
|
# Some parameter documentations has been truncated, see
|
|
9
9
|
# {Dodopayments::Models::SubscriptionCreateParams} for more details.
|
|
10
10
|
#
|
|
11
|
-
# @overload create(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
|
11
|
+
# @overload create(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, on_demand: nil, one_time_product_cart: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
|
12
12
|
#
|
|
13
13
|
# @param billing [Dodopayments::Models::BillingAddress] Billing address information for the subscription
|
|
14
14
|
#
|
|
@@ -36,6 +36,8 @@ module Dodopayments
|
|
|
36
36
|
#
|
|
37
37
|
# @param payment_link [Boolean, nil] If true, generates a payment link.
|
|
38
38
|
#
|
|
39
|
+
# @param payment_method_id [String, nil] Optional payment method ID to use for this subscription.
|
|
40
|
+
#
|
|
39
41
|
# @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
40
42
|
#
|
|
41
43
|
# @param return_url [String, nil] Optional URL to redirect after successful subscription creation
|
data/lib/dodopayments/version.rb
CHANGED
|
@@ -115,6 +115,11 @@ module Dodopayments
|
|
|
115
115
|
sig { params(minimal_address: T::Boolean).void }
|
|
116
116
|
attr_writer :minimal_address
|
|
117
117
|
|
|
118
|
+
# Optional payment method ID to use for this checkout session. Only allowed when
|
|
119
|
+
# `confirm` is true. If provided, existing customer id must also be provided.
|
|
120
|
+
sig { returns(T.nilable(String)) }
|
|
121
|
+
attr_accessor :payment_method_id
|
|
122
|
+
|
|
118
123
|
# The url to redirect after payment failure or success.
|
|
119
124
|
sig { returns(T.nilable(String)) }
|
|
120
125
|
attr_accessor :return_url
|
|
@@ -177,6 +182,7 @@ module Dodopayments
|
|
|
177
182
|
force_3ds: T.nilable(T::Boolean),
|
|
178
183
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
179
184
|
minimal_address: T::Boolean,
|
|
185
|
+
payment_method_id: T.nilable(String),
|
|
180
186
|
return_url: T.nilable(String),
|
|
181
187
|
short_link: T::Boolean,
|
|
182
188
|
show_saved_payment_methods: T::Boolean,
|
|
@@ -216,6 +222,9 @@ module Dodopayments
|
|
|
216
222
|
# If true, only zipcode is required when confirm is true; other address fields
|
|
217
223
|
# remain optional
|
|
218
224
|
minimal_address: nil,
|
|
225
|
+
# Optional payment method ID to use for this checkout session. Only allowed when
|
|
226
|
+
# `confirm` is true. If provided, existing customer id must also be provided.
|
|
227
|
+
payment_method_id: nil,
|
|
219
228
|
# The url to redirect after payment failure or success.
|
|
220
229
|
return_url: nil,
|
|
221
230
|
# If true, returns a shortened checkout URL. Defaults to false if not specified.
|
|
@@ -250,6 +259,7 @@ module Dodopayments
|
|
|
250
259
|
force_3ds: T.nilable(T::Boolean),
|
|
251
260
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
252
261
|
minimal_address: T::Boolean,
|
|
262
|
+
payment_method_id: T.nilable(String),
|
|
253
263
|
return_url: T.nilable(String),
|
|
254
264
|
short_link: T::Boolean,
|
|
255
265
|
show_saved_payment_methods: T::Boolean,
|
|
@@ -11,28 +11,32 @@ module Dodopayments
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# Checkout url
|
|
15
|
-
sig { returns(String) }
|
|
16
|
-
attr_accessor :checkout_url
|
|
17
|
-
|
|
18
14
|
# The ID of the created checkout session
|
|
19
15
|
sig { returns(String) }
|
|
20
16
|
attr_accessor :session_id
|
|
21
17
|
|
|
18
|
+
# Checkout url (None when payment_method_id is provided)
|
|
19
|
+
sig { returns(T.nilable(String)) }
|
|
20
|
+
attr_accessor :checkout_url
|
|
21
|
+
|
|
22
22
|
sig do
|
|
23
|
-
params(
|
|
23
|
+
params(session_id: String, checkout_url: T.nilable(String)).returns(
|
|
24
24
|
T.attached_class
|
|
25
25
|
)
|
|
26
26
|
end
|
|
27
27
|
def self.new(
|
|
28
|
-
# Checkout url
|
|
29
|
-
checkout_url:,
|
|
30
28
|
# The ID of the created checkout session
|
|
31
|
-
session_id
|
|
29
|
+
session_id:,
|
|
30
|
+
# Checkout url (None when payment_method_id is provided)
|
|
31
|
+
checkout_url: nil
|
|
32
32
|
)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
sig
|
|
35
|
+
sig do
|
|
36
|
+
override.returns(
|
|
37
|
+
{ session_id: String, checkout_url: T.nilable(String) }
|
|
38
|
+
)
|
|
39
|
+
end
|
|
36
40
|
def to_hash
|
|
37
41
|
end
|
|
38
42
|
end
|
|
@@ -69,6 +69,12 @@ module Dodopayments
|
|
|
69
69
|
sig { returns(T.nilable(T::Boolean)) }
|
|
70
70
|
attr_accessor :payment_link
|
|
71
71
|
|
|
72
|
+
# Optional payment method ID to use for this payment. If provided, customer_id
|
|
73
|
+
# must also be provided. The payment method will be validated for eligibility with
|
|
74
|
+
# the payment's currency.
|
|
75
|
+
sig { returns(T.nilable(String)) }
|
|
76
|
+
attr_accessor :payment_method_id
|
|
77
|
+
|
|
72
78
|
# If true, redirects the customer immediately after payment completion False by
|
|
73
79
|
# default
|
|
74
80
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -114,6 +120,7 @@ module Dodopayments
|
|
|
114
120
|
force_3ds: T.nilable(T::Boolean),
|
|
115
121
|
metadata: T::Hash[Symbol, String],
|
|
116
122
|
payment_link: T.nilable(T::Boolean),
|
|
123
|
+
payment_method_id: T.nilable(String),
|
|
117
124
|
redirect_immediately: T::Boolean,
|
|
118
125
|
return_url: T.nilable(String),
|
|
119
126
|
short_link: T.nilable(T::Boolean),
|
|
@@ -148,6 +155,10 @@ module Dodopayments
|
|
|
148
155
|
metadata: nil,
|
|
149
156
|
# Whether to generate a payment link. Defaults to false if not specified.
|
|
150
157
|
payment_link: nil,
|
|
158
|
+
# Optional payment method ID to use for this payment. If provided, customer_id
|
|
159
|
+
# must also be provided. The payment method will be validated for eligibility with
|
|
160
|
+
# the payment's currency.
|
|
161
|
+
payment_method_id: nil,
|
|
151
162
|
# If true, redirects the customer immediately after payment completion False by
|
|
152
163
|
# default
|
|
153
164
|
redirect_immediately: nil,
|
|
@@ -182,6 +193,7 @@ module Dodopayments
|
|
|
182
193
|
force_3ds: T.nilable(T::Boolean),
|
|
183
194
|
metadata: T::Hash[Symbol, String],
|
|
184
195
|
payment_link: T.nilable(T::Boolean),
|
|
196
|
+
payment_method_id: T.nilable(String),
|
|
185
197
|
redirect_immediately: T::Boolean,
|
|
186
198
|
return_url: T.nilable(String),
|
|
187
199
|
short_link: T.nilable(T::Boolean),
|
|
@@ -91,6 +91,12 @@ module Dodopayments
|
|
|
91
91
|
sig { returns(T.nilable(T::Boolean)) }
|
|
92
92
|
attr_accessor :payment_link
|
|
93
93
|
|
|
94
|
+
# Optional payment method ID to use for this subscription. If provided,
|
|
95
|
+
# customer_id must also be provided (via AttachExistingCustomer). The payment
|
|
96
|
+
# method will be validated for eligibility with the subscription's currency.
|
|
97
|
+
sig { returns(T.nilable(String)) }
|
|
98
|
+
attr_accessor :payment_method_id
|
|
99
|
+
|
|
94
100
|
# If true, redirects the customer immediately after payment completion False by
|
|
95
101
|
# default
|
|
96
102
|
sig { returns(T.nilable(T::Boolean)) }
|
|
@@ -145,6 +151,7 @@ module Dodopayments
|
|
|
145
151
|
one_time_product_cart:
|
|
146
152
|
T.nilable(T::Array[Dodopayments::OneTimeProductCartItem::OrHash]),
|
|
147
153
|
payment_link: T.nilable(T::Boolean),
|
|
154
|
+
payment_method_id: T.nilable(String),
|
|
148
155
|
redirect_immediately: T::Boolean,
|
|
149
156
|
return_url: T.nilable(String),
|
|
150
157
|
short_link: T.nilable(T::Boolean),
|
|
@@ -187,6 +194,10 @@ module Dodopayments
|
|
|
187
194
|
one_time_product_cart: nil,
|
|
188
195
|
# If true, generates a payment link. Defaults to false if not specified.
|
|
189
196
|
payment_link: nil,
|
|
197
|
+
# Optional payment method ID to use for this subscription. If provided,
|
|
198
|
+
# customer_id must also be provided (via AttachExistingCustomer). The payment
|
|
199
|
+
# method will be validated for eligibility with the subscription's currency.
|
|
200
|
+
payment_method_id: nil,
|
|
190
201
|
# If true, redirects the customer immediately after payment completion False by
|
|
191
202
|
# default
|
|
192
203
|
redirect_immediately: nil,
|
|
@@ -228,6 +239,7 @@ module Dodopayments
|
|
|
228
239
|
one_time_product_cart:
|
|
229
240
|
T.nilable(T::Array[Dodopayments::OneTimeProductCartItem]),
|
|
230
241
|
payment_link: T.nilable(T::Boolean),
|
|
242
|
+
payment_method_id: T.nilable(String),
|
|
231
243
|
redirect_immediately: T::Boolean,
|
|
232
244
|
return_url: T.nilable(String),
|
|
233
245
|
short_link: T.nilable(T::Boolean),
|
|
@@ -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
|
|
@@ -11,6 +11,7 @@ module Dodopayments
|
|
|
11
11
|
:force_3ds => bool?,
|
|
12
12
|
metadata: ::Hash[Symbol, String],
|
|
13
13
|
payment_link: bool?,
|
|
14
|
+
payment_method_id: String?,
|
|
14
15
|
redirect_immediately: bool,
|
|
15
16
|
return_url: String?,
|
|
16
17
|
short_link: bool?,
|
|
@@ -43,6 +44,8 @@ module Dodopayments
|
|
|
43
44
|
|
|
44
45
|
attr_accessor payment_link: bool?
|
|
45
46
|
|
|
47
|
+
attr_accessor payment_method_id: String?
|
|
48
|
+
|
|
46
49
|
attr_reader redirect_immediately: bool?
|
|
47
50
|
|
|
48
51
|
def redirect_immediately=: (bool) -> bool
|
|
@@ -67,6 +70,7 @@ module Dodopayments
|
|
|
67
70
|
?force_3ds: bool?,
|
|
68
71
|
?metadata: ::Hash[Symbol, String],
|
|
69
72
|
?payment_link: bool?,
|
|
73
|
+
?payment_method_id: String?,
|
|
70
74
|
?redirect_immediately: bool,
|
|
71
75
|
?return_url: String?,
|
|
72
76
|
?short_link: bool?,
|
|
@@ -85,6 +89,7 @@ module Dodopayments
|
|
|
85
89
|
:force_3ds => bool?,
|
|
86
90
|
metadata: ::Hash[Symbol, String],
|
|
87
91
|
payment_link: bool?,
|
|
92
|
+
payment_method_id: String?,
|
|
88
93
|
redirect_immediately: bool,
|
|
89
94
|
return_url: String?,
|
|
90
95
|
short_link: bool?,
|
|
@@ -15,6 +15,7 @@ module Dodopayments
|
|
|
15
15
|
on_demand: Dodopayments::OnDemandSubscription?,
|
|
16
16
|
one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
|
|
17
17
|
payment_link: bool?,
|
|
18
|
+
payment_method_id: String?,
|
|
18
19
|
redirect_immediately: bool,
|
|
19
20
|
return_url: String?,
|
|
20
21
|
short_link: bool?,
|
|
@@ -56,6 +57,8 @@ module Dodopayments
|
|
|
56
57
|
|
|
57
58
|
attr_accessor payment_link: bool?
|
|
58
59
|
|
|
60
|
+
attr_accessor payment_method_id: String?
|
|
61
|
+
|
|
59
62
|
attr_reader redirect_immediately: bool?
|
|
60
63
|
|
|
61
64
|
def redirect_immediately=: (bool) -> bool
|
|
@@ -86,6 +89,7 @@ module Dodopayments
|
|
|
86
89
|
?on_demand: Dodopayments::OnDemandSubscription?,
|
|
87
90
|
?one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
|
|
88
91
|
?payment_link: bool?,
|
|
92
|
+
?payment_method_id: String?,
|
|
89
93
|
?redirect_immediately: bool,
|
|
90
94
|
?return_url: String?,
|
|
91
95
|
?short_link: bool?,
|
|
@@ -109,6 +113,7 @@ module Dodopayments
|
|
|
109
113
|
on_demand: Dodopayments::OnDemandSubscription?,
|
|
110
114
|
one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
|
|
111
115
|
payment_link: bool?,
|
|
116
|
+
payment_method_id: String?,
|
|
112
117
|
redirect_immediately: bool,
|
|
113
118
|
return_url: String?,
|
|
114
119
|
short_link: bool?,
|
|
@@ -15,6 +15,7 @@ module Dodopayments
|
|
|
15
15
|
?on_demand: Dodopayments::OnDemandSubscription?,
|
|
16
16
|
?one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
|
|
17
17
|
?payment_link: bool?,
|
|
18
|
+
?payment_method_id: String?,
|
|
18
19
|
?redirect_immediately: bool,
|
|
19
20
|
?return_url: String?,
|
|
20
21
|
?short_link: bool?,
|