dodopayments 1.67.2 → 1.68.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 +20 -2
- data/lib/dodopayments/models/payment_create_params.rb +18 -1
- data/lib/dodopayments/models/subscription_create_params.rb +18 -1
- data/lib/dodopayments/resources/checkout_sessions.rb +3 -1
- data/lib/dodopayments/resources/payments.rb +5 -1
- data/lib/dodopayments/resources/subscriptions.rb +5 -1
- data/lib/dodopayments/version.rb +1 -1
- data/rbi/dodopayments/models/checkout_session_request.rbi +29 -3
- data/rbi/dodopayments/models/payment_create_params.rbi +21 -0
- data/rbi/dodopayments/models/subscription_create_params.rbi +21 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +3 -0
- data/rbi/dodopayments/resources/payments.rbi +7 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +7 -0
- data/sig/dodopayments/models/checkout_session_request.rbs +17 -3
- data/sig/dodopayments/models/payment_create_params.rbs +12 -0
- data/sig/dodopayments/models/subscription_create_params.rbs +12 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +1 -0
- data/sig/dodopayments/resources/payments.rbs +2 -0
- data/sig/dodopayments/resources/subscriptions.rbs +2 -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: cbc5ebc492dd27b97a18b069e5dafdb0f4699ac2a17723fb53ba75ad64349fdb
|
|
4
|
+
data.tar.gz: 35f1af6bd6e7b96d17abd850f7f02b70f69743ba499183ad3c4777a3bc87e346
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d69b3e9b87777621c52503650d511596a94851382cd5d8334a008df9062aa7566a8f28a837c0b0a79115c073e99c5251c8a0eecc88043ab22431276fbc2b7f1a
|
|
7
|
+
data.tar.gz: 78ad85f5dc0512ac803e47dffa6fa96968138db519cdf8cbc95b1e6843162b7ae27dcb371962ea2d1abf2f63c064d23aa257f1c0d0845d2e446267382170edf4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.68.0 (2025-12-19)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.67.2...v1.68.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.67.2...v1.68.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** updated openapi spec to v1.68.4 ([668ee05](https://github.com/dodopayments/dodopayments-ruby/commit/668ee05b1a74d277f8cf208a29f987d11f549ee0))
|
|
10
|
+
|
|
3
11
|
## 1.67.2 (2025-12-19)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v1.67.1...v1.67.2](https://github.com/dodopayments/dodopayments-ruby/compare/v1.67.1...v1.67.2)
|
data/README.md
CHANGED
|
@@ -89,6 +89,12 @@ module Dodopayments
|
|
|
89
89
|
# @return [String, nil]
|
|
90
90
|
optional :return_url, String, nil?: true
|
|
91
91
|
|
|
92
|
+
# @!attribute short_link
|
|
93
|
+
# If true, returns a shortened checkout URL. Defaults to false if not specified.
|
|
94
|
+
#
|
|
95
|
+
# @return [Boolean, nil]
|
|
96
|
+
optional :short_link, Dodopayments::Internal::Type::Boolean
|
|
97
|
+
|
|
92
98
|
# @!attribute show_saved_payment_methods
|
|
93
99
|
# Display saved payment methods of a returning customer False by default
|
|
94
100
|
#
|
|
@@ -100,7 +106,7 @@ module Dodopayments
|
|
|
100
106
|
# @return [Dodopayments::Models::CheckoutSessionRequest::SubscriptionData, nil]
|
|
101
107
|
optional :subscription_data, -> { Dodopayments::CheckoutSessionRequest::SubscriptionData }, nil?: true
|
|
102
108
|
|
|
103
|
-
# @!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, show_saved_payment_methods: nil, subscription_data: nil)
|
|
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)
|
|
104
110
|
# Some parameter documentations has been truncated, see
|
|
105
111
|
# {Dodopayments::Models::CheckoutSessionRequest} for more details.
|
|
106
112
|
#
|
|
@@ -130,6 +136,8 @@ module Dodopayments
|
|
|
130
136
|
#
|
|
131
137
|
# @param return_url [String, nil] The url to redirect after payment failure or success.
|
|
132
138
|
#
|
|
139
|
+
# @param short_link [Boolean] If true, returns a shortened checkout URL.
|
|
140
|
+
#
|
|
133
141
|
# @param show_saved_payment_methods [Boolean] Display saved payment methods of a returning customer False by default
|
|
134
142
|
#
|
|
135
143
|
# @param subscription_data [Dodopayments::Models::CheckoutSessionRequest::SubscriptionData, nil]
|
|
@@ -364,7 +372,15 @@ module Dodopayments
|
|
|
364
372
|
# @return [Boolean, nil]
|
|
365
373
|
optional :always_create_new_customer, Dodopayments::Internal::Type::Boolean
|
|
366
374
|
|
|
367
|
-
# @!
|
|
375
|
+
# @!attribute redirect_immediately
|
|
376
|
+
# If true, redirects the customer immediately after payment completion
|
|
377
|
+
#
|
|
378
|
+
# Default is false
|
|
379
|
+
#
|
|
380
|
+
# @return [Boolean, nil]
|
|
381
|
+
optional :redirect_immediately, Dodopayments::Internal::Type::Boolean
|
|
382
|
+
|
|
383
|
+
# @!method initialize(allow_currency_selection: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil)
|
|
368
384
|
# Some parameter documentations has been truncated, see
|
|
369
385
|
# {Dodopayments::Models::CheckoutSessionRequest::FeatureFlags} for more details.
|
|
370
386
|
#
|
|
@@ -391,6 +407,8 @@ module Dodopayments
|
|
|
391
407
|
# @param allow_tax_id [Boolean] If the customer is allowed to add tax id, set it to true
|
|
392
408
|
#
|
|
393
409
|
# @param always_create_new_customer [Boolean] Set to true if a new customer object should be created.
|
|
410
|
+
#
|
|
411
|
+
# @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
394
412
|
end
|
|
395
413
|
|
|
396
414
|
# @see Dodopayments::Models::CheckoutSessionRequest#subscription_data
|
|
@@ -70,6 +70,13 @@ module Dodopayments
|
|
|
70
70
|
# @return [Boolean, nil]
|
|
71
71
|
optional :payment_link, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
72
72
|
|
|
73
|
+
# @!attribute redirect_immediately
|
|
74
|
+
# If true, redirects the customer immediately after payment completion False by
|
|
75
|
+
# default
|
|
76
|
+
#
|
|
77
|
+
# @return [Boolean, nil]
|
|
78
|
+
optional :redirect_immediately, Dodopayments::Internal::Type::Boolean
|
|
79
|
+
|
|
73
80
|
# @!attribute return_url
|
|
74
81
|
# Optional URL to redirect the customer after payment. Must be a valid URL if
|
|
75
82
|
# provided.
|
|
@@ -77,6 +84,12 @@ module Dodopayments
|
|
|
77
84
|
# @return [String, nil]
|
|
78
85
|
optional :return_url, String, nil?: true
|
|
79
86
|
|
|
87
|
+
# @!attribute short_link
|
|
88
|
+
# If true, returns a shortened payment link. Defaults to false if not specified.
|
|
89
|
+
#
|
|
90
|
+
# @return [Boolean, nil]
|
|
91
|
+
optional :short_link, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
92
|
+
|
|
80
93
|
# @!attribute show_saved_payment_methods
|
|
81
94
|
# Display saved payment methods of a returning customer False by default
|
|
82
95
|
#
|
|
@@ -90,7 +103,7 @@ module Dodopayments
|
|
|
90
103
|
# @return [String, nil]
|
|
91
104
|
optional :tax_id, String, nil?: true
|
|
92
105
|
|
|
93
|
-
# @!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, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
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: {})
|
|
94
107
|
# Some parameter documentations has been truncated, see
|
|
95
108
|
# {Dodopayments::Models::PaymentCreateParams} for more details.
|
|
96
109
|
#
|
|
@@ -112,8 +125,12 @@ module Dodopayments
|
|
|
112
125
|
#
|
|
113
126
|
# @param payment_link [Boolean, nil] Whether to generate a payment link. Defaults to false if not specified.
|
|
114
127
|
#
|
|
128
|
+
# @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
129
|
+
#
|
|
115
130
|
# @param return_url [String, nil] Optional URL to redirect the customer after payment.
|
|
116
131
|
#
|
|
132
|
+
# @param short_link [Boolean, nil] If true, returns a shortened payment link.
|
|
133
|
+
#
|
|
117
134
|
# @param show_saved_payment_methods [Boolean] Display saved payment methods of a returning customer
|
|
118
135
|
#
|
|
119
136
|
# @param tax_id [String, nil] Tax ID in case the payment is B2B. If tax id validation fails the payment creati
|
|
@@ -95,12 +95,25 @@ module Dodopayments
|
|
|
95
95
|
# @return [Boolean, nil]
|
|
96
96
|
optional :payment_link, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
97
97
|
|
|
98
|
+
# @!attribute redirect_immediately
|
|
99
|
+
# If true, redirects the customer immediately after payment completion False by
|
|
100
|
+
# default
|
|
101
|
+
#
|
|
102
|
+
# @return [Boolean, nil]
|
|
103
|
+
optional :redirect_immediately, Dodopayments::Internal::Type::Boolean
|
|
104
|
+
|
|
98
105
|
# @!attribute return_url
|
|
99
106
|
# Optional URL to redirect after successful subscription creation
|
|
100
107
|
#
|
|
101
108
|
# @return [String, nil]
|
|
102
109
|
optional :return_url, String, nil?: true
|
|
103
110
|
|
|
111
|
+
# @!attribute short_link
|
|
112
|
+
# If true, returns a shortened payment link. Defaults to false if not specified.
|
|
113
|
+
#
|
|
114
|
+
# @return [Boolean, nil]
|
|
115
|
+
optional :short_link, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
116
|
+
|
|
104
117
|
# @!attribute show_saved_payment_methods
|
|
105
118
|
# Display saved payment methods of a returning customer False by default
|
|
106
119
|
#
|
|
@@ -121,7 +134,7 @@ module Dodopayments
|
|
|
121
134
|
# @return [Integer, nil]
|
|
122
135
|
optional :trial_period_days, Integer, nil?: true
|
|
123
136
|
|
|
124
|
-
# @!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, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
|
|
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: {})
|
|
125
138
|
# Some parameter documentations has been truncated, see
|
|
126
139
|
# {Dodopayments::Models::SubscriptionCreateParams} for more details.
|
|
127
140
|
#
|
|
@@ -151,8 +164,12 @@ module Dodopayments
|
|
|
151
164
|
#
|
|
152
165
|
# @param payment_link [Boolean, nil] If true, generates a payment link.
|
|
153
166
|
#
|
|
167
|
+
# @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
168
|
+
#
|
|
154
169
|
# @param return_url [String, nil] Optional URL to redirect after successful subscription creation
|
|
155
170
|
#
|
|
171
|
+
# @param short_link [Boolean, nil] If true, returns a shortened payment link.
|
|
172
|
+
#
|
|
156
173
|
# @param show_saved_payment_methods [Boolean] Display saved payment methods of a returning customer
|
|
157
174
|
#
|
|
158
175
|
# @param tax_id [String, nil] Tax ID in case the payment is B2B. If tax id validation fails the payment creati
|
|
@@ -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, 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, 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
|
#
|
|
@@ -34,6 +34,8 @@ module Dodopayments
|
|
|
34
34
|
#
|
|
35
35
|
# @param return_url [String, nil] The url to redirect after payment failure or success.
|
|
36
36
|
#
|
|
37
|
+
# @param short_link [Boolean] If true, returns a shortened checkout URL.
|
|
38
|
+
#
|
|
37
39
|
# @param show_saved_payment_methods [Boolean] Display saved payment methods of a returning customer False by default
|
|
38
40
|
#
|
|
39
41
|
# @param subscription_data [Dodopayments::Models::CheckoutSessionRequest::SubscriptionData, nil]
|
|
@@ -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, return_url: 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, 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,8 +28,12 @@ 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 redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
32
|
+
#
|
|
31
33
|
# @param return_url [String, nil] Optional URL to redirect the customer after payment.
|
|
32
34
|
#
|
|
35
|
+
# @param short_link [Boolean, nil] If true, returns a shortened payment link.
|
|
36
|
+
#
|
|
33
37
|
# @param show_saved_payment_methods [Boolean] Display saved payment methods of a returning customer
|
|
34
38
|
#
|
|
35
39
|
# @param tax_id [String, nil] Tax ID in case the payment is B2B. If tax id validation fails the payment creati
|
|
@@ -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, return_url: 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, 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,8 +36,12 @@ module Dodopayments
|
|
|
36
36
|
#
|
|
37
37
|
# @param payment_link [Boolean, nil] If true, generates a payment link.
|
|
38
38
|
#
|
|
39
|
+
# @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
40
|
+
#
|
|
39
41
|
# @param return_url [String, nil] Optional URL to redirect after successful subscription creation
|
|
40
42
|
#
|
|
43
|
+
# @param short_link [Boolean, nil] If true, returns a shortened payment link.
|
|
44
|
+
#
|
|
41
45
|
# @param show_saved_payment_methods [Boolean] Display saved payment methods of a returning customer
|
|
42
46
|
#
|
|
43
47
|
# @param tax_id [String, nil] Tax ID in case the payment is B2B. If tax id validation fails the payment creati
|
data/lib/dodopayments/version.rb
CHANGED
|
@@ -119,6 +119,13 @@ module Dodopayments
|
|
|
119
119
|
sig { returns(T.nilable(String)) }
|
|
120
120
|
attr_accessor :return_url
|
|
121
121
|
|
|
122
|
+
# If true, returns a shortened checkout URL. Defaults to false if not specified.
|
|
123
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
124
|
+
attr_reader :short_link
|
|
125
|
+
|
|
126
|
+
sig { params(short_link: T::Boolean).void }
|
|
127
|
+
attr_writer :short_link
|
|
128
|
+
|
|
122
129
|
# Display saved payment methods of a returning customer False by default
|
|
123
130
|
sig { returns(T.nilable(T::Boolean)) }
|
|
124
131
|
attr_reader :show_saved_payment_methods
|
|
@@ -171,6 +178,7 @@ module Dodopayments
|
|
|
171
178
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
172
179
|
minimal_address: T::Boolean,
|
|
173
180
|
return_url: T.nilable(String),
|
|
181
|
+
short_link: T::Boolean,
|
|
174
182
|
show_saved_payment_methods: T::Boolean,
|
|
175
183
|
subscription_data:
|
|
176
184
|
T.nilable(
|
|
@@ -210,6 +218,8 @@ module Dodopayments
|
|
|
210
218
|
minimal_address: nil,
|
|
211
219
|
# The url to redirect after payment failure or success.
|
|
212
220
|
return_url: nil,
|
|
221
|
+
# If true, returns a shortened checkout URL. Defaults to false if not specified.
|
|
222
|
+
short_link: nil,
|
|
213
223
|
# Display saved payment methods of a returning customer False by default
|
|
214
224
|
show_saved_payment_methods: nil,
|
|
215
225
|
subscription_data: nil
|
|
@@ -241,6 +251,7 @@ module Dodopayments
|
|
|
241
251
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
242
252
|
minimal_address: T::Boolean,
|
|
243
253
|
return_url: T.nilable(String),
|
|
254
|
+
short_link: T::Boolean,
|
|
244
255
|
show_saved_payment_methods: T::Boolean,
|
|
245
256
|
subscription_data:
|
|
246
257
|
T.nilable(Dodopayments::CheckoutSessionRequest::SubscriptionData)
|
|
@@ -620,6 +631,15 @@ module Dodopayments
|
|
|
620
631
|
sig { params(always_create_new_customer: T::Boolean).void }
|
|
621
632
|
attr_writer :always_create_new_customer
|
|
622
633
|
|
|
634
|
+
# If true, redirects the customer immediately after payment completion
|
|
635
|
+
#
|
|
636
|
+
# Default is false
|
|
637
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
638
|
+
attr_reader :redirect_immediately
|
|
639
|
+
|
|
640
|
+
sig { params(redirect_immediately: T::Boolean).void }
|
|
641
|
+
attr_writer :redirect_immediately
|
|
642
|
+
|
|
623
643
|
sig do
|
|
624
644
|
params(
|
|
625
645
|
allow_currency_selection: T::Boolean,
|
|
@@ -633,7 +653,8 @@ module Dodopayments
|
|
|
633
653
|
allow_discount_code: T::Boolean,
|
|
634
654
|
allow_phone_number_collection: T::Boolean,
|
|
635
655
|
allow_tax_id: T::Boolean,
|
|
636
|
-
always_create_new_customer: T::Boolean
|
|
656
|
+
always_create_new_customer: T::Boolean,
|
|
657
|
+
redirect_immediately: T::Boolean
|
|
637
658
|
).returns(T.attached_class)
|
|
638
659
|
end
|
|
639
660
|
def self.new(
|
|
@@ -664,7 +685,11 @@ module Dodopayments
|
|
|
664
685
|
# to find an existing customer to attach the session to
|
|
665
686
|
#
|
|
666
687
|
# Default is false
|
|
667
|
-
always_create_new_customer: nil
|
|
688
|
+
always_create_new_customer: nil,
|
|
689
|
+
# If true, redirects the customer immediately after payment completion
|
|
690
|
+
#
|
|
691
|
+
# Default is false
|
|
692
|
+
redirect_immediately: nil
|
|
668
693
|
)
|
|
669
694
|
end
|
|
670
695
|
|
|
@@ -682,7 +707,8 @@ module Dodopayments
|
|
|
682
707
|
allow_discount_code: T::Boolean,
|
|
683
708
|
allow_phone_number_collection: T::Boolean,
|
|
684
709
|
allow_tax_id: T::Boolean,
|
|
685
|
-
always_create_new_customer: T::Boolean
|
|
710
|
+
always_create_new_customer: T::Boolean,
|
|
711
|
+
redirect_immediately: T::Boolean
|
|
686
712
|
}
|
|
687
713
|
)
|
|
688
714
|
end
|
|
@@ -69,11 +69,23 @@ module Dodopayments
|
|
|
69
69
|
sig { returns(T.nilable(T::Boolean)) }
|
|
70
70
|
attr_accessor :payment_link
|
|
71
71
|
|
|
72
|
+
# If true, redirects the customer immediately after payment completion False by
|
|
73
|
+
# default
|
|
74
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
75
|
+
attr_reader :redirect_immediately
|
|
76
|
+
|
|
77
|
+
sig { params(redirect_immediately: T::Boolean).void }
|
|
78
|
+
attr_writer :redirect_immediately
|
|
79
|
+
|
|
72
80
|
# Optional URL to redirect the customer after payment. Must be a valid URL if
|
|
73
81
|
# provided.
|
|
74
82
|
sig { returns(T.nilable(String)) }
|
|
75
83
|
attr_accessor :return_url
|
|
76
84
|
|
|
85
|
+
# If true, returns a shortened payment link. Defaults to false if not specified.
|
|
86
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
87
|
+
attr_accessor :short_link
|
|
88
|
+
|
|
77
89
|
# Display saved payment methods of a returning customer False by default
|
|
78
90
|
sig { returns(T.nilable(T::Boolean)) }
|
|
79
91
|
attr_reader :show_saved_payment_methods
|
|
@@ -102,7 +114,9 @@ module Dodopayments
|
|
|
102
114
|
force_3ds: T.nilable(T::Boolean),
|
|
103
115
|
metadata: T::Hash[Symbol, String],
|
|
104
116
|
payment_link: T.nilable(T::Boolean),
|
|
117
|
+
redirect_immediately: T::Boolean,
|
|
105
118
|
return_url: T.nilable(String),
|
|
119
|
+
short_link: T.nilable(T::Boolean),
|
|
106
120
|
show_saved_payment_methods: T::Boolean,
|
|
107
121
|
tax_id: T.nilable(String),
|
|
108
122
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
@@ -134,9 +148,14 @@ module Dodopayments
|
|
|
134
148
|
metadata: nil,
|
|
135
149
|
# Whether to generate a payment link. Defaults to false if not specified.
|
|
136
150
|
payment_link: nil,
|
|
151
|
+
# If true, redirects the customer immediately after payment completion False by
|
|
152
|
+
# default
|
|
153
|
+
redirect_immediately: nil,
|
|
137
154
|
# Optional URL to redirect the customer after payment. Must be a valid URL if
|
|
138
155
|
# provided.
|
|
139
156
|
return_url: nil,
|
|
157
|
+
# If true, returns a shortened payment link. Defaults to false if not specified.
|
|
158
|
+
short_link: nil,
|
|
140
159
|
# Display saved payment methods of a returning customer False by default
|
|
141
160
|
show_saved_payment_methods: nil,
|
|
142
161
|
# Tax ID in case the payment is B2B. If tax id validation fails the payment
|
|
@@ -163,7 +182,9 @@ module Dodopayments
|
|
|
163
182
|
force_3ds: T.nilable(T::Boolean),
|
|
164
183
|
metadata: T::Hash[Symbol, String],
|
|
165
184
|
payment_link: T.nilable(T::Boolean),
|
|
185
|
+
redirect_immediately: T::Boolean,
|
|
166
186
|
return_url: T.nilable(String),
|
|
187
|
+
short_link: T.nilable(T::Boolean),
|
|
167
188
|
show_saved_payment_methods: T::Boolean,
|
|
168
189
|
tax_id: T.nilable(String),
|
|
169
190
|
request_options: Dodopayments::RequestOptions
|
|
@@ -91,10 +91,22 @@ module Dodopayments
|
|
|
91
91
|
sig { returns(T.nilable(T::Boolean)) }
|
|
92
92
|
attr_accessor :payment_link
|
|
93
93
|
|
|
94
|
+
# If true, redirects the customer immediately after payment completion False by
|
|
95
|
+
# default
|
|
96
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
97
|
+
attr_reader :redirect_immediately
|
|
98
|
+
|
|
99
|
+
sig { params(redirect_immediately: T::Boolean).void }
|
|
100
|
+
attr_writer :redirect_immediately
|
|
101
|
+
|
|
94
102
|
# Optional URL to redirect after successful subscription creation
|
|
95
103
|
sig { returns(T.nilable(String)) }
|
|
96
104
|
attr_accessor :return_url
|
|
97
105
|
|
|
106
|
+
# If true, returns a shortened payment link. Defaults to false if not specified.
|
|
107
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
108
|
+
attr_accessor :short_link
|
|
109
|
+
|
|
98
110
|
# Display saved payment methods of a returning customer False by default
|
|
99
111
|
sig { returns(T.nilable(T::Boolean)) }
|
|
100
112
|
attr_reader :show_saved_payment_methods
|
|
@@ -133,7 +145,9 @@ module Dodopayments
|
|
|
133
145
|
one_time_product_cart:
|
|
134
146
|
T.nilable(T::Array[Dodopayments::OneTimeProductCartItem::OrHash]),
|
|
135
147
|
payment_link: T.nilable(T::Boolean),
|
|
148
|
+
redirect_immediately: T::Boolean,
|
|
136
149
|
return_url: T.nilable(String),
|
|
150
|
+
short_link: T.nilable(T::Boolean),
|
|
137
151
|
show_saved_payment_methods: T::Boolean,
|
|
138
152
|
tax_id: T.nilable(String),
|
|
139
153
|
trial_period_days: T.nilable(Integer),
|
|
@@ -173,8 +187,13 @@ module Dodopayments
|
|
|
173
187
|
one_time_product_cart: nil,
|
|
174
188
|
# If true, generates a payment link. Defaults to false if not specified.
|
|
175
189
|
payment_link: nil,
|
|
190
|
+
# If true, redirects the customer immediately after payment completion False by
|
|
191
|
+
# default
|
|
192
|
+
redirect_immediately: nil,
|
|
176
193
|
# Optional URL to redirect after successful subscription creation
|
|
177
194
|
return_url: nil,
|
|
195
|
+
# If true, returns a shortened payment link. Defaults to false if not specified.
|
|
196
|
+
short_link: nil,
|
|
178
197
|
# Display saved payment methods of a returning customer False by default
|
|
179
198
|
show_saved_payment_methods: nil,
|
|
180
199
|
# Tax ID in case the payment is B2B. If tax id validation fails the payment
|
|
@@ -209,7 +228,9 @@ module Dodopayments
|
|
|
209
228
|
one_time_product_cart:
|
|
210
229
|
T.nilable(T::Array[Dodopayments::OneTimeProductCartItem]),
|
|
211
230
|
payment_link: T.nilable(T::Boolean),
|
|
231
|
+
redirect_immediately: T::Boolean,
|
|
212
232
|
return_url: T.nilable(String),
|
|
233
|
+
short_link: T.nilable(T::Boolean),
|
|
213
234
|
show_saved_payment_methods: T::Boolean,
|
|
214
235
|
tax_id: T.nilable(String),
|
|
215
236
|
trial_period_days: T.nilable(Integer),
|
|
@@ -31,6 +31,7 @@ module Dodopayments
|
|
|
31
31
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
32
32
|
minimal_address: T::Boolean,
|
|
33
33
|
return_url: T.nilable(String),
|
|
34
|
+
short_link: T::Boolean,
|
|
34
35
|
show_saved_payment_methods: T::Boolean,
|
|
35
36
|
subscription_data:
|
|
36
37
|
T.nilable(
|
|
@@ -71,6 +72,8 @@ module Dodopayments
|
|
|
71
72
|
minimal_address: nil,
|
|
72
73
|
# The url to redirect after payment failure or success.
|
|
73
74
|
return_url: nil,
|
|
75
|
+
# If true, returns a shortened checkout URL. Defaults to false if not specified.
|
|
76
|
+
short_link: nil,
|
|
74
77
|
# Display saved payment methods of a returning customer False by default
|
|
75
78
|
show_saved_payment_methods: nil,
|
|
76
79
|
subscription_data: nil,
|
|
@@ -19,7 +19,9 @@ 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
|
+
redirect_immediately: T::Boolean,
|
|
22
23
|
return_url: T.nilable(String),
|
|
24
|
+
short_link: T.nilable(T::Boolean),
|
|
23
25
|
show_saved_payment_methods: T::Boolean,
|
|
24
26
|
tax_id: T.nilable(String),
|
|
25
27
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
@@ -51,9 +53,14 @@ module Dodopayments
|
|
|
51
53
|
metadata: nil,
|
|
52
54
|
# Whether to generate a payment link. Defaults to false if not specified.
|
|
53
55
|
payment_link: nil,
|
|
56
|
+
# If true, redirects the customer immediately after payment completion False by
|
|
57
|
+
# default
|
|
58
|
+
redirect_immediately: nil,
|
|
54
59
|
# Optional URL to redirect the customer after payment. Must be a valid URL if
|
|
55
60
|
# provided.
|
|
56
61
|
return_url: nil,
|
|
62
|
+
# If true, returns a shortened payment link. Defaults to false if not specified.
|
|
63
|
+
short_link: nil,
|
|
57
64
|
# Display saved payment methods of a returning customer False by default
|
|
58
65
|
show_saved_payment_methods: nil,
|
|
59
66
|
# Tax ID in case the payment is B2B. If tax id validation fails the payment
|
|
@@ -24,7 +24,9 @@ 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
|
+
redirect_immediately: T::Boolean,
|
|
27
28
|
return_url: T.nilable(String),
|
|
29
|
+
short_link: T.nilable(T::Boolean),
|
|
28
30
|
show_saved_payment_methods: T::Boolean,
|
|
29
31
|
tax_id: T.nilable(String),
|
|
30
32
|
trial_period_days: T.nilable(Integer),
|
|
@@ -64,8 +66,13 @@ module Dodopayments
|
|
|
64
66
|
one_time_product_cart: nil,
|
|
65
67
|
# If true, generates a payment link. Defaults to false if not specified.
|
|
66
68
|
payment_link: nil,
|
|
69
|
+
# If true, redirects the customer immediately after payment completion False by
|
|
70
|
+
# default
|
|
71
|
+
redirect_immediately: nil,
|
|
67
72
|
# Optional URL to redirect after successful subscription creation
|
|
68
73
|
return_url: nil,
|
|
74
|
+
# If true, returns a shortened payment link. Defaults to false if not specified.
|
|
75
|
+
short_link: nil,
|
|
69
76
|
# Display saved payment methods of a returning customer False by default
|
|
70
77
|
show_saved_payment_methods: nil,
|
|
71
78
|
# Tax ID in case the payment is B2B. If tax id validation fails the payment
|
|
@@ -15,6 +15,7 @@ module Dodopayments
|
|
|
15
15
|
metadata: ::Hash[Symbol, String]?,
|
|
16
16
|
minimal_address: bool,
|
|
17
17
|
return_url: String?,
|
|
18
|
+
short_link: bool,
|
|
18
19
|
show_saved_payment_methods: bool,
|
|
19
20
|
subscription_data: Dodopayments::CheckoutSessionRequest::SubscriptionData?
|
|
20
21
|
}
|
|
@@ -58,6 +59,10 @@ module Dodopayments
|
|
|
58
59
|
|
|
59
60
|
attr_accessor return_url: String?
|
|
60
61
|
|
|
62
|
+
attr_reader short_link: bool?
|
|
63
|
+
|
|
64
|
+
def short_link=: (bool) -> bool
|
|
65
|
+
|
|
61
66
|
attr_reader show_saved_payment_methods: bool?
|
|
62
67
|
|
|
63
68
|
def show_saved_payment_methods=: (bool) -> bool
|
|
@@ -78,6 +83,7 @@ module Dodopayments
|
|
|
78
83
|
?metadata: ::Hash[Symbol, String]?,
|
|
79
84
|
?minimal_address: bool,
|
|
80
85
|
?return_url: String?,
|
|
86
|
+
?short_link: bool,
|
|
81
87
|
?show_saved_payment_methods: bool,
|
|
82
88
|
?subscription_data: Dodopayments::CheckoutSessionRequest::SubscriptionData?
|
|
83
89
|
) -> void
|
|
@@ -96,6 +102,7 @@ module Dodopayments
|
|
|
96
102
|
metadata: ::Hash[Symbol, String]?,
|
|
97
103
|
minimal_address: bool,
|
|
98
104
|
return_url: String?,
|
|
105
|
+
short_link: bool,
|
|
99
106
|
show_saved_payment_methods: bool,
|
|
100
107
|
subscription_data: Dodopayments::CheckoutSessionRequest::SubscriptionData?
|
|
101
108
|
}
|
|
@@ -234,7 +241,8 @@ module Dodopayments
|
|
|
234
241
|
allow_discount_code: bool,
|
|
235
242
|
allow_phone_number_collection: bool,
|
|
236
243
|
allow_tax_id: bool,
|
|
237
|
-
always_create_new_customer: bool
|
|
244
|
+
always_create_new_customer: bool,
|
|
245
|
+
redirect_immediately: bool
|
|
238
246
|
}
|
|
239
247
|
|
|
240
248
|
class FeatureFlags < Dodopayments::Internal::Type::BaseModel
|
|
@@ -286,6 +294,10 @@ module Dodopayments
|
|
|
286
294
|
|
|
287
295
|
def always_create_new_customer=: (bool) -> bool
|
|
288
296
|
|
|
297
|
+
attr_reader redirect_immediately: bool?
|
|
298
|
+
|
|
299
|
+
def redirect_immediately=: (bool) -> bool
|
|
300
|
+
|
|
289
301
|
def initialize: (
|
|
290
302
|
?allow_currency_selection: bool,
|
|
291
303
|
?allow_customer_editing_city: bool,
|
|
@@ -298,7 +310,8 @@ module Dodopayments
|
|
|
298
310
|
?allow_discount_code: bool,
|
|
299
311
|
?allow_phone_number_collection: bool,
|
|
300
312
|
?allow_tax_id: bool,
|
|
301
|
-
?always_create_new_customer: bool
|
|
313
|
+
?always_create_new_customer: bool,
|
|
314
|
+
?redirect_immediately: bool
|
|
302
315
|
) -> void
|
|
303
316
|
|
|
304
317
|
def to_hash: -> {
|
|
@@ -313,7 +326,8 @@ module Dodopayments
|
|
|
313
326
|
allow_discount_code: bool,
|
|
314
327
|
allow_phone_number_collection: bool,
|
|
315
328
|
allow_tax_id: bool,
|
|
316
|
-
always_create_new_customer: bool
|
|
329
|
+
always_create_new_customer: bool,
|
|
330
|
+
redirect_immediately: bool
|
|
317
331
|
}
|
|
318
332
|
end
|
|
319
333
|
|
|
@@ -11,7 +11,9 @@ module Dodopayments
|
|
|
11
11
|
:force_3ds => bool?,
|
|
12
12
|
metadata: ::Hash[Symbol, String],
|
|
13
13
|
payment_link: bool?,
|
|
14
|
+
redirect_immediately: bool,
|
|
14
15
|
return_url: String?,
|
|
16
|
+
short_link: bool?,
|
|
15
17
|
show_saved_payment_methods: bool,
|
|
16
18
|
tax_id: String?
|
|
17
19
|
}
|
|
@@ -41,8 +43,14 @@ module Dodopayments
|
|
|
41
43
|
|
|
42
44
|
attr_accessor payment_link: bool?
|
|
43
45
|
|
|
46
|
+
attr_reader redirect_immediately: bool?
|
|
47
|
+
|
|
48
|
+
def redirect_immediately=: (bool) -> bool
|
|
49
|
+
|
|
44
50
|
attr_accessor return_url: String?
|
|
45
51
|
|
|
52
|
+
attr_accessor short_link: bool?
|
|
53
|
+
|
|
46
54
|
attr_reader show_saved_payment_methods: bool?
|
|
47
55
|
|
|
48
56
|
def show_saved_payment_methods=: (bool) -> bool
|
|
@@ -59,7 +67,9 @@ module Dodopayments
|
|
|
59
67
|
?force_3ds: bool?,
|
|
60
68
|
?metadata: ::Hash[Symbol, String],
|
|
61
69
|
?payment_link: bool?,
|
|
70
|
+
?redirect_immediately: bool,
|
|
62
71
|
?return_url: String?,
|
|
72
|
+
?short_link: bool?,
|
|
63
73
|
?show_saved_payment_methods: bool,
|
|
64
74
|
?tax_id: String?,
|
|
65
75
|
?request_options: Dodopayments::request_opts
|
|
@@ -75,7 +85,9 @@ module Dodopayments
|
|
|
75
85
|
:force_3ds => bool?,
|
|
76
86
|
metadata: ::Hash[Symbol, String],
|
|
77
87
|
payment_link: bool?,
|
|
88
|
+
redirect_immediately: bool,
|
|
78
89
|
return_url: String?,
|
|
90
|
+
short_link: bool?,
|
|
79
91
|
show_saved_payment_methods: bool,
|
|
80
92
|
tax_id: String?,
|
|
81
93
|
request_options: Dodopayments::RequestOptions
|
|
@@ -15,7 +15,9 @@ module Dodopayments
|
|
|
15
15
|
on_demand: Dodopayments::OnDemandSubscription?,
|
|
16
16
|
one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
|
|
17
17
|
payment_link: bool?,
|
|
18
|
+
redirect_immediately: bool,
|
|
18
19
|
return_url: String?,
|
|
20
|
+
short_link: bool?,
|
|
19
21
|
show_saved_payment_methods: bool,
|
|
20
22
|
tax_id: String?,
|
|
21
23
|
trial_period_days: Integer?
|
|
@@ -54,8 +56,14 @@ module Dodopayments
|
|
|
54
56
|
|
|
55
57
|
attr_accessor payment_link: bool?
|
|
56
58
|
|
|
59
|
+
attr_reader redirect_immediately: bool?
|
|
60
|
+
|
|
61
|
+
def redirect_immediately=: (bool) -> bool
|
|
62
|
+
|
|
57
63
|
attr_accessor return_url: String?
|
|
58
64
|
|
|
65
|
+
attr_accessor short_link: bool?
|
|
66
|
+
|
|
59
67
|
attr_reader show_saved_payment_methods: bool?
|
|
60
68
|
|
|
61
69
|
def show_saved_payment_methods=: (bool) -> bool
|
|
@@ -78,7 +86,9 @@ module Dodopayments
|
|
|
78
86
|
?on_demand: Dodopayments::OnDemandSubscription?,
|
|
79
87
|
?one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
|
|
80
88
|
?payment_link: bool?,
|
|
89
|
+
?redirect_immediately: bool,
|
|
81
90
|
?return_url: String?,
|
|
91
|
+
?short_link: bool?,
|
|
82
92
|
?show_saved_payment_methods: bool,
|
|
83
93
|
?tax_id: String?,
|
|
84
94
|
?trial_period_days: Integer?,
|
|
@@ -99,7 +109,9 @@ module Dodopayments
|
|
|
99
109
|
on_demand: Dodopayments::OnDemandSubscription?,
|
|
100
110
|
one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
|
|
101
111
|
payment_link: bool?,
|
|
112
|
+
redirect_immediately: bool,
|
|
102
113
|
return_url: String?,
|
|
114
|
+
short_link: bool?,
|
|
103
115
|
show_saved_payment_methods: bool,
|
|
104
116
|
tax_id: String?,
|
|
105
117
|
trial_period_days: Integer?,
|
|
@@ -15,6 +15,7 @@ module Dodopayments
|
|
|
15
15
|
?metadata: ::Hash[Symbol, String]?,
|
|
16
16
|
?minimal_address: bool,
|
|
17
17
|
?return_url: String?,
|
|
18
|
+
?short_link: bool,
|
|
18
19
|
?show_saved_payment_methods: bool,
|
|
19
20
|
?subscription_data: Dodopayments::CheckoutSessionRequest::SubscriptionData?,
|
|
20
21
|
?request_options: Dodopayments::request_opts
|
|
@@ -11,7 +11,9 @@ module Dodopayments
|
|
|
11
11
|
?force_3ds: bool?,
|
|
12
12
|
?metadata: ::Hash[Symbol, String],
|
|
13
13
|
?payment_link: bool?,
|
|
14
|
+
?redirect_immediately: bool,
|
|
14
15
|
?return_url: String?,
|
|
16
|
+
?short_link: bool?,
|
|
15
17
|
?show_saved_payment_methods: bool,
|
|
16
18
|
?tax_id: String?,
|
|
17
19
|
?request_options: Dodopayments::request_opts
|
|
@@ -15,7 +15,9 @@ module Dodopayments
|
|
|
15
15
|
?on_demand: Dodopayments::OnDemandSubscription?,
|
|
16
16
|
?one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
|
|
17
17
|
?payment_link: bool?,
|
|
18
|
+
?redirect_immediately: bool,
|
|
18
19
|
?return_url: String?,
|
|
20
|
+
?short_link: bool?,
|
|
19
21
|
?show_saved_payment_methods: bool,
|
|
20
22
|
?tax_id: String?,
|
|
21
23
|
?trial_period_days: Integer?,
|