dodopayments 1.56.4 → 1.61.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/dodopayments/models/checkout_session_request.rb +50 -1
- data/lib/dodopayments/models/customer.rb +14 -1
- data/lib/dodopayments/models/customer_create_params.rb +12 -1
- data/lib/dodopayments/models/customer_limited_details.rb +9 -1
- data/lib/dodopayments/models/customer_retrieve_payment_methods_params.rb +14 -0
- data/lib/dodopayments/models/customer_retrieve_payment_methods_response.rb +147 -0
- data/lib/dodopayments/models/customer_update_params.rb +11 -1
- data/lib/dodopayments/models/product_create_params.rb +9 -9
- data/lib/dodopayments/models/subscription.rb +9 -1
- data/lib/dodopayments/models/subscription_list_response.rb +9 -1
- data/lib/dodopayments/models/subscription_update_payment_method_params.rb +41 -0
- data/lib/dodopayments/models/subscription_update_payment_method_response.rb +34 -0
- data/lib/dodopayments/models.rb +4 -0
- data/lib/dodopayments/resources/customers.rb +27 -2
- data/lib/dodopayments/resources/products.rb +3 -3
- data/lib/dodopayments/resources/subscriptions.rb +26 -0
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +4 -0
- data/rbi/dodopayments/models/checkout_session_request.rbi +63 -0
- data/rbi/dodopayments/models/customer.rbi +11 -0
- data/rbi/dodopayments/models/customer_create_params.rbi +17 -1
- data/rbi/dodopayments/models/customer_limited_details.rbi +11 -0
- data/rbi/dodopayments/models/customer_retrieve_payment_methods_params.rbi +32 -0
- data/rbi/dodopayments/models/customer_retrieve_payment_methods_response.rbi +318 -0
- data/rbi/dodopayments/models/customer_update_params.rbi +13 -1
- data/rbi/dodopayments/models/product_create_params.rbi +8 -8
- data/rbi/dodopayments/models/subscription.rbi +8 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +8 -0
- data/rbi/dodopayments/models/subscription_update_payment_method_params.rbi +91 -0
- data/rbi/dodopayments/models/subscription_update_payment_method_response.rbi +56 -0
- data/rbi/dodopayments/models.rbi +6 -0
- data/rbi/dodopayments/resources/customers.rbi +25 -1
- data/rbi/dodopayments/resources/products.rbi +3 -3
- data/rbi/dodopayments/resources/subscriptions.rbi +20 -0
- data/sig/dodopayments/models/checkout_session_request.rbs +49 -0
- data/sig/dodopayments/models/customer.rbs +7 -0
- data/sig/dodopayments/models/customer_create_params.rbs +12 -1
- data/sig/dodopayments/models/customer_limited_details.rbs +7 -0
- data/sig/dodopayments/models/customer_retrieve_payment_methods_params.rbs +15 -0
- data/sig/dodopayments/models/customer_retrieve_payment_methods_response.rbs +143 -0
- data/sig/dodopayments/models/customer_update_params.rbs +9 -1
- data/sig/dodopayments/models/product_create_params.rbs +6 -6
- data/sig/dodopayments/models/subscription.rbs +5 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +5 -0
- data/sig/dodopayments/models/subscription_update_payment_method_params.rbs +46 -0
- data/sig/dodopayments/models/subscription_update_payment_method_response.rbs +35 -0
- data/sig/dodopayments/models.rbs +4 -0
- data/sig/dodopayments/resources/customers.rbs +7 -0
- data/sig/dodopayments/resources/products.rbs +1 -1
- data/sig/dodopayments/resources/subscriptions.rbs +8 -0
- metadata +14 -2
|
@@ -14,6 +14,10 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
# Name of the product
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
17
21
|
# Price configuration for the product
|
|
18
22
|
sig do
|
|
19
23
|
returns(
|
|
@@ -93,12 +97,9 @@ module Dodopayments
|
|
|
93
97
|
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
94
98
|
attr_writer :metadata
|
|
95
99
|
|
|
96
|
-
# Optional name of the product
|
|
97
|
-
sig { returns(T.nilable(String)) }
|
|
98
|
-
attr_accessor :name
|
|
99
|
-
|
|
100
100
|
sig do
|
|
101
101
|
params(
|
|
102
|
+
name: String,
|
|
102
103
|
price:
|
|
103
104
|
T.any(
|
|
104
105
|
Dodopayments::Price::OneTimePrice::OrHash,
|
|
@@ -119,11 +120,12 @@ module Dodopayments
|
|
|
119
120
|
T.nilable(Dodopayments::LicenseKeyDuration::OrHash),
|
|
120
121
|
license_key_enabled: T.nilable(T::Boolean),
|
|
121
122
|
metadata: T::Hash[Symbol, String],
|
|
122
|
-
name: T.nilable(String),
|
|
123
123
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
124
124
|
).returns(T.attached_class)
|
|
125
125
|
end
|
|
126
126
|
def self.new(
|
|
127
|
+
# Name of the product
|
|
128
|
+
name:,
|
|
127
129
|
# Price configuration for the product
|
|
128
130
|
price:,
|
|
129
131
|
# Tax category applied to this product
|
|
@@ -148,8 +150,6 @@ module Dodopayments
|
|
|
148
150
|
license_key_enabled: nil,
|
|
149
151
|
# Additional metadata for the product
|
|
150
152
|
metadata: nil,
|
|
151
|
-
# Optional name of the product
|
|
152
|
-
name: nil,
|
|
153
153
|
request_options: {}
|
|
154
154
|
)
|
|
155
155
|
end
|
|
@@ -157,6 +157,7 @@ module Dodopayments
|
|
|
157
157
|
sig do
|
|
158
158
|
override.returns(
|
|
159
159
|
{
|
|
160
|
+
name: String,
|
|
160
161
|
price:
|
|
161
162
|
T.any(
|
|
162
163
|
Dodopayments::Price::OneTimePrice,
|
|
@@ -176,7 +177,6 @@ module Dodopayments
|
|
|
176
177
|
license_key_duration: T.nilable(Dodopayments::LicenseKeyDuration),
|
|
177
178
|
license_key_enabled: T.nilable(T::Boolean),
|
|
178
179
|
metadata: T::Hash[Symbol, String],
|
|
179
|
-
name: T.nilable(String),
|
|
180
180
|
request_options: Dodopayments::RequestOptions
|
|
181
181
|
}
|
|
182
182
|
)
|
|
@@ -122,6 +122,10 @@ module Dodopayments
|
|
|
122
122
|
sig { returns(T.nilable(Time)) }
|
|
123
123
|
attr_accessor :expires_at
|
|
124
124
|
|
|
125
|
+
# Saved payment method id used for recurring charges
|
|
126
|
+
sig { returns(T.nilable(String)) }
|
|
127
|
+
attr_accessor :payment_method_id
|
|
128
|
+
|
|
125
129
|
# Tax identifier provided for this subscription (if applicable)
|
|
126
130
|
sig { returns(T.nilable(String)) }
|
|
127
131
|
attr_accessor :tax_id
|
|
@@ -155,6 +159,7 @@ module Dodopayments
|
|
|
155
159
|
discount_cycles_remaining: T.nilable(Integer),
|
|
156
160
|
discount_id: T.nilable(String),
|
|
157
161
|
expires_at: T.nilable(Time),
|
|
162
|
+
payment_method_id: T.nilable(String),
|
|
158
163
|
tax_id: T.nilable(String)
|
|
159
164
|
).returns(T.attached_class)
|
|
160
165
|
end
|
|
@@ -213,6 +218,8 @@ module Dodopayments
|
|
|
213
218
|
discount_id: nil,
|
|
214
219
|
# Timestamp when the subscription will expire
|
|
215
220
|
expires_at: nil,
|
|
221
|
+
# Saved payment method id used for recurring charges
|
|
222
|
+
payment_method_id: nil,
|
|
216
223
|
# Tax identifier provided for this subscription (if applicable)
|
|
217
224
|
tax_id: nil
|
|
218
225
|
)
|
|
@@ -249,6 +256,7 @@ module Dodopayments
|
|
|
249
256
|
discount_cycles_remaining: T.nilable(Integer),
|
|
250
257
|
discount_id: T.nilable(String),
|
|
251
258
|
expires_at: T.nilable(Time),
|
|
259
|
+
payment_method_id: T.nilable(String),
|
|
252
260
|
tax_id: T.nilable(String)
|
|
253
261
|
}
|
|
254
262
|
)
|
|
@@ -113,6 +113,10 @@ module Dodopayments
|
|
|
113
113
|
sig { returns(T.nilable(String)) }
|
|
114
114
|
attr_accessor :discount_id
|
|
115
115
|
|
|
116
|
+
# Saved payment method id used for recurring charges
|
|
117
|
+
sig { returns(T.nilable(String)) }
|
|
118
|
+
attr_accessor :payment_method_id
|
|
119
|
+
|
|
116
120
|
# Tax identifier provided for this subscription (if applicable)
|
|
117
121
|
sig { returns(T.nilable(String)) }
|
|
118
122
|
attr_accessor :tax_id
|
|
@@ -143,6 +147,7 @@ module Dodopayments
|
|
|
143
147
|
cancelled_at: T.nilable(Time),
|
|
144
148
|
discount_cycles_remaining: T.nilable(Integer),
|
|
145
149
|
discount_id: T.nilable(String),
|
|
150
|
+
payment_method_id: T.nilable(String),
|
|
146
151
|
tax_id: T.nilable(String)
|
|
147
152
|
).returns(T.attached_class)
|
|
148
153
|
end
|
|
@@ -195,6 +200,8 @@ module Dodopayments
|
|
|
195
200
|
discount_cycles_remaining: nil,
|
|
196
201
|
# The discount id if discount is applied
|
|
197
202
|
discount_id: nil,
|
|
203
|
+
# Saved payment method id used for recurring charges
|
|
204
|
+
payment_method_id: nil,
|
|
198
205
|
# Tax identifier provided for this subscription (if applicable)
|
|
199
206
|
tax_id: nil
|
|
200
207
|
)
|
|
@@ -228,6 +235,7 @@ module Dodopayments
|
|
|
228
235
|
cancelled_at: T.nilable(Time),
|
|
229
236
|
discount_cycles_remaining: T.nilable(Integer),
|
|
230
237
|
discount_id: T.nilable(String),
|
|
238
|
+
payment_method_id: T.nilable(String),
|
|
231
239
|
tax_id: T.nilable(String)
|
|
232
240
|
}
|
|
233
241
|
)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class SubscriptionUpdatePaymentMethodParams < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams,
|
|
13
|
+
Dodopayments::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
returns(
|
|
19
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Type::OrSymbol
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
attr_accessor :type
|
|
23
|
+
|
|
24
|
+
sig { returns(T.nilable(String)) }
|
|
25
|
+
attr_accessor :return_url
|
|
26
|
+
|
|
27
|
+
sig { returns(String) }
|
|
28
|
+
attr_accessor :payment_method_id
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
params(
|
|
32
|
+
type:
|
|
33
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Type::OrSymbol,
|
|
34
|
+
payment_method_id: String,
|
|
35
|
+
return_url: T.nilable(String),
|
|
36
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
37
|
+
).returns(T.attached_class)
|
|
38
|
+
end
|
|
39
|
+
def self.new(
|
|
40
|
+
type:,
|
|
41
|
+
payment_method_id:,
|
|
42
|
+
return_url: nil,
|
|
43
|
+
request_options: {}
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
sig do
|
|
48
|
+
override.returns(
|
|
49
|
+
{
|
|
50
|
+
type:
|
|
51
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Type::OrSymbol,
|
|
52
|
+
return_url: T.nilable(String),
|
|
53
|
+
payment_method_id: String,
|
|
54
|
+
request_options: Dodopayments::RequestOptions
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
end
|
|
58
|
+
def to_hash
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
module Type
|
|
62
|
+
extend Dodopayments::Internal::Type::Enum
|
|
63
|
+
|
|
64
|
+
TaggedSymbol =
|
|
65
|
+
T.type_alias do
|
|
66
|
+
T.all(
|
|
67
|
+
Symbol,
|
|
68
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Type
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
72
|
+
|
|
73
|
+
EXISTING =
|
|
74
|
+
T.let(
|
|
75
|
+
:existing,
|
|
76
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Type::TaggedSymbol
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
sig do
|
|
80
|
+
override.returns(
|
|
81
|
+
T::Array[
|
|
82
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Type::TaggedSymbol
|
|
83
|
+
]
|
|
84
|
+
)
|
|
85
|
+
end
|
|
86
|
+
def self.values
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class SubscriptionUpdatePaymentMethodResponse < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Dodopayments::Models::SubscriptionUpdatePaymentMethodResponse,
|
|
10
|
+
Dodopayments::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig { returns(T.nilable(String)) }
|
|
15
|
+
attr_accessor :client_secret
|
|
16
|
+
|
|
17
|
+
sig { returns(T.nilable(Time)) }
|
|
18
|
+
attr_accessor :expires_on
|
|
19
|
+
|
|
20
|
+
sig { returns(T.nilable(String)) }
|
|
21
|
+
attr_accessor :payment_id
|
|
22
|
+
|
|
23
|
+
sig { returns(T.nilable(String)) }
|
|
24
|
+
attr_accessor :payment_link
|
|
25
|
+
|
|
26
|
+
sig do
|
|
27
|
+
params(
|
|
28
|
+
client_secret: T.nilable(String),
|
|
29
|
+
expires_on: T.nilable(Time),
|
|
30
|
+
payment_id: T.nilable(String),
|
|
31
|
+
payment_link: T.nilable(String)
|
|
32
|
+
).returns(T.attached_class)
|
|
33
|
+
end
|
|
34
|
+
def self.new(
|
|
35
|
+
client_secret: nil,
|
|
36
|
+
expires_on: nil,
|
|
37
|
+
payment_id: nil,
|
|
38
|
+
payment_link: nil
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
sig do
|
|
43
|
+
override.returns(
|
|
44
|
+
{
|
|
45
|
+
client_secret: T.nilable(String),
|
|
46
|
+
expires_on: T.nilable(Time),
|
|
47
|
+
payment_id: T.nilable(String),
|
|
48
|
+
payment_link: T.nilable(String)
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
end
|
|
52
|
+
def to_hash
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
data/rbi/dodopayments/models.rbi
CHANGED
|
@@ -67,6 +67,9 @@ module Dodopayments
|
|
|
67
67
|
|
|
68
68
|
CustomerRetrieveParams = Dodopayments::Models::CustomerRetrieveParams
|
|
69
69
|
|
|
70
|
+
CustomerRetrievePaymentMethodsParams =
|
|
71
|
+
Dodopayments::Models::CustomerRetrievePaymentMethodsParams
|
|
72
|
+
|
|
70
73
|
Customers = Dodopayments::Models::Customers
|
|
71
74
|
|
|
72
75
|
CustomerUpdateParams = Dodopayments::Models::CustomerUpdateParams
|
|
@@ -281,6 +284,9 @@ module Dodopayments
|
|
|
281
284
|
|
|
282
285
|
SubscriptionUpdateParams = Dodopayments::Models::SubscriptionUpdateParams
|
|
283
286
|
|
|
287
|
+
SubscriptionUpdatePaymentMethodParams =
|
|
288
|
+
Dodopayments::Models::SubscriptionUpdatePaymentMethodParams
|
|
289
|
+
|
|
284
290
|
TaxCategory = Dodopayments::Models::TaxCategory
|
|
285
291
|
|
|
286
292
|
TimeInterval = Dodopayments::Models::TimeInterval
|
|
@@ -13,11 +13,19 @@ module Dodopayments
|
|
|
13
13
|
params(
|
|
14
14
|
email: String,
|
|
15
15
|
name: String,
|
|
16
|
+
metadata: T::Hash[Symbol, String],
|
|
16
17
|
phone_number: T.nilable(String),
|
|
17
18
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
18
19
|
).returns(Dodopayments::Customer)
|
|
19
20
|
end
|
|
20
|
-
def create(
|
|
21
|
+
def create(
|
|
22
|
+
email:,
|
|
23
|
+
name:,
|
|
24
|
+
# Additional metadata for the customer
|
|
25
|
+
metadata: nil,
|
|
26
|
+
phone_number: nil,
|
|
27
|
+
request_options: {}
|
|
28
|
+
)
|
|
21
29
|
end
|
|
22
30
|
|
|
23
31
|
sig do
|
|
@@ -36,6 +44,7 @@ module Dodopayments
|
|
|
36
44
|
sig do
|
|
37
45
|
params(
|
|
38
46
|
customer_id: String,
|
|
47
|
+
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
39
48
|
name: T.nilable(String),
|
|
40
49
|
phone_number: T.nilable(String),
|
|
41
50
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
@@ -44,6 +53,8 @@ module Dodopayments
|
|
|
44
53
|
def update(
|
|
45
54
|
# Customer Id
|
|
46
55
|
customer_id,
|
|
56
|
+
# Additional metadata for the customer
|
|
57
|
+
metadata: nil,
|
|
47
58
|
name: nil,
|
|
48
59
|
phone_number: nil,
|
|
49
60
|
request_options: {}
|
|
@@ -73,6 +84,19 @@ module Dodopayments
|
|
|
73
84
|
)
|
|
74
85
|
end
|
|
75
86
|
|
|
87
|
+
sig do
|
|
88
|
+
params(
|
|
89
|
+
customer_id: String,
|
|
90
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
91
|
+
).returns(Dodopayments::Models::CustomerRetrievePaymentMethodsResponse)
|
|
92
|
+
end
|
|
93
|
+
def retrieve_payment_methods(
|
|
94
|
+
# Customer Id
|
|
95
|
+
customer_id,
|
|
96
|
+
request_options: {}
|
|
97
|
+
)
|
|
98
|
+
end
|
|
99
|
+
|
|
76
100
|
# @api private
|
|
77
101
|
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
|
78
102
|
def self.new(client:)
|
|
@@ -8,6 +8,7 @@ module Dodopayments
|
|
|
8
8
|
|
|
9
9
|
sig do
|
|
10
10
|
params(
|
|
11
|
+
name: String,
|
|
11
12
|
price:
|
|
12
13
|
T.any(
|
|
13
14
|
Dodopayments::Price::OneTimePrice::OrHash,
|
|
@@ -28,11 +29,12 @@ module Dodopayments
|
|
|
28
29
|
T.nilable(Dodopayments::LicenseKeyDuration::OrHash),
|
|
29
30
|
license_key_enabled: T.nilable(T::Boolean),
|
|
30
31
|
metadata: T::Hash[Symbol, String],
|
|
31
|
-
name: T.nilable(String),
|
|
32
32
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
33
33
|
).returns(Dodopayments::Product)
|
|
34
34
|
end
|
|
35
35
|
def create(
|
|
36
|
+
# Name of the product
|
|
37
|
+
name:,
|
|
36
38
|
# Price configuration for the product
|
|
37
39
|
price:,
|
|
38
40
|
# Tax category applied to this product
|
|
@@ -57,8 +59,6 @@ module Dodopayments
|
|
|
57
59
|
license_key_enabled: nil,
|
|
58
60
|
# Additional metadata for the product
|
|
59
61
|
metadata: nil,
|
|
60
|
-
# Optional name of the product
|
|
61
|
-
name: nil,
|
|
62
62
|
request_options: {}
|
|
63
63
|
)
|
|
64
64
|
end
|
|
@@ -295,6 +295,26 @@ module Dodopayments
|
|
|
295
295
|
)
|
|
296
296
|
end
|
|
297
297
|
|
|
298
|
+
sig do
|
|
299
|
+
params(
|
|
300
|
+
subscription_id: String,
|
|
301
|
+
type:
|
|
302
|
+
Dodopayments::SubscriptionUpdatePaymentMethodParams::Type::OrSymbol,
|
|
303
|
+
payment_method_id: String,
|
|
304
|
+
return_url: T.nilable(String),
|
|
305
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
306
|
+
).returns(Dodopayments::Models::SubscriptionUpdatePaymentMethodResponse)
|
|
307
|
+
end
|
|
308
|
+
def update_payment_method(
|
|
309
|
+
# Subscription Id
|
|
310
|
+
subscription_id,
|
|
311
|
+
type:,
|
|
312
|
+
payment_method_id:,
|
|
313
|
+
return_url: nil,
|
|
314
|
+
request_options: {}
|
|
315
|
+
)
|
|
316
|
+
end
|
|
317
|
+
|
|
298
318
|
# @api private
|
|
299
319
|
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
|
300
320
|
def self.new(client:)
|
|
@@ -217,6 +217,13 @@ module Dodopayments
|
|
|
217
217
|
type feature_flags =
|
|
218
218
|
{
|
|
219
219
|
allow_currency_selection: bool,
|
|
220
|
+
allow_customer_editing_city: bool,
|
|
221
|
+
allow_customer_editing_country: bool,
|
|
222
|
+
allow_customer_editing_email: bool,
|
|
223
|
+
allow_customer_editing_name: bool,
|
|
224
|
+
allow_customer_editing_state: bool,
|
|
225
|
+
allow_customer_editing_street: bool,
|
|
226
|
+
allow_customer_editing_zipcode: bool,
|
|
220
227
|
allow_discount_code: bool,
|
|
221
228
|
allow_phone_number_collection: bool,
|
|
222
229
|
allow_tax_id: bool,
|
|
@@ -228,6 +235,34 @@ module Dodopayments
|
|
|
228
235
|
|
|
229
236
|
def allow_currency_selection=: (bool) -> bool
|
|
230
237
|
|
|
238
|
+
attr_reader allow_customer_editing_city: bool?
|
|
239
|
+
|
|
240
|
+
def allow_customer_editing_city=: (bool) -> bool
|
|
241
|
+
|
|
242
|
+
attr_reader allow_customer_editing_country: bool?
|
|
243
|
+
|
|
244
|
+
def allow_customer_editing_country=: (bool) -> bool
|
|
245
|
+
|
|
246
|
+
attr_reader allow_customer_editing_email: bool?
|
|
247
|
+
|
|
248
|
+
def allow_customer_editing_email=: (bool) -> bool
|
|
249
|
+
|
|
250
|
+
attr_reader allow_customer_editing_name: bool?
|
|
251
|
+
|
|
252
|
+
def allow_customer_editing_name=: (bool) -> bool
|
|
253
|
+
|
|
254
|
+
attr_reader allow_customer_editing_state: bool?
|
|
255
|
+
|
|
256
|
+
def allow_customer_editing_state=: (bool) -> bool
|
|
257
|
+
|
|
258
|
+
attr_reader allow_customer_editing_street: bool?
|
|
259
|
+
|
|
260
|
+
def allow_customer_editing_street=: (bool) -> bool
|
|
261
|
+
|
|
262
|
+
attr_reader allow_customer_editing_zipcode: bool?
|
|
263
|
+
|
|
264
|
+
def allow_customer_editing_zipcode=: (bool) -> bool
|
|
265
|
+
|
|
231
266
|
attr_reader allow_discount_code: bool?
|
|
232
267
|
|
|
233
268
|
def allow_discount_code=: (bool) -> bool
|
|
@@ -246,6 +281,13 @@ module Dodopayments
|
|
|
246
281
|
|
|
247
282
|
def initialize: (
|
|
248
283
|
?allow_currency_selection: bool,
|
|
284
|
+
?allow_customer_editing_city: bool,
|
|
285
|
+
?allow_customer_editing_country: bool,
|
|
286
|
+
?allow_customer_editing_email: bool,
|
|
287
|
+
?allow_customer_editing_name: bool,
|
|
288
|
+
?allow_customer_editing_state: bool,
|
|
289
|
+
?allow_customer_editing_street: bool,
|
|
290
|
+
?allow_customer_editing_zipcode: bool,
|
|
249
291
|
?allow_discount_code: bool,
|
|
250
292
|
?allow_phone_number_collection: bool,
|
|
251
293
|
?allow_tax_id: bool,
|
|
@@ -254,6 +296,13 @@ module Dodopayments
|
|
|
254
296
|
|
|
255
297
|
def to_hash: -> {
|
|
256
298
|
allow_currency_selection: bool,
|
|
299
|
+
allow_customer_editing_city: bool,
|
|
300
|
+
allow_customer_editing_country: bool,
|
|
301
|
+
allow_customer_editing_email: bool,
|
|
302
|
+
allow_customer_editing_name: bool,
|
|
303
|
+
allow_customer_editing_state: bool,
|
|
304
|
+
allow_customer_editing_street: bool,
|
|
305
|
+
allow_customer_editing_zipcode: bool,
|
|
257
306
|
allow_discount_code: bool,
|
|
258
307
|
allow_phone_number_collection: bool,
|
|
259
308
|
allow_tax_id: bool,
|
|
@@ -7,6 +7,7 @@ module Dodopayments
|
|
|
7
7
|
customer_id: String,
|
|
8
8
|
email: String,
|
|
9
9
|
name: String,
|
|
10
|
+
metadata: ::Hash[Symbol, String],
|
|
10
11
|
phone_number: String?
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -21,6 +22,10 @@ module Dodopayments
|
|
|
21
22
|
|
|
22
23
|
attr_accessor name: String
|
|
23
24
|
|
|
25
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
26
|
+
|
|
27
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
28
|
+
|
|
24
29
|
attr_accessor phone_number: String?
|
|
25
30
|
|
|
26
31
|
def initialize: (
|
|
@@ -29,6 +34,7 @@ module Dodopayments
|
|
|
29
34
|
customer_id: String,
|
|
30
35
|
email: String,
|
|
31
36
|
name: String,
|
|
37
|
+
?metadata: ::Hash[Symbol, String],
|
|
32
38
|
?phone_number: String?
|
|
33
39
|
) -> void
|
|
34
40
|
|
|
@@ -38,6 +44,7 @@ module Dodopayments
|
|
|
38
44
|
customer_id: String,
|
|
39
45
|
email: String,
|
|
40
46
|
name: String,
|
|
47
|
+
metadata: ::Hash[Symbol, String],
|
|
41
48
|
phone_number: String?
|
|
42
49
|
}
|
|
43
50
|
end
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
module Dodopayments
|
|
2
2
|
module Models
|
|
3
3
|
type customer_create_params =
|
|
4
|
-
{
|
|
4
|
+
{
|
|
5
|
+
email: String,
|
|
6
|
+
name: String,
|
|
7
|
+
metadata: ::Hash[Symbol, String],
|
|
8
|
+
phone_number: String?
|
|
9
|
+
}
|
|
5
10
|
& Dodopayments::Internal::Type::request_parameters
|
|
6
11
|
|
|
7
12
|
class CustomerCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
@@ -12,11 +17,16 @@ module Dodopayments
|
|
|
12
17
|
|
|
13
18
|
attr_accessor name: String
|
|
14
19
|
|
|
20
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
21
|
+
|
|
22
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
23
|
+
|
|
15
24
|
attr_accessor phone_number: String?
|
|
16
25
|
|
|
17
26
|
def initialize: (
|
|
18
27
|
email: String,
|
|
19
28
|
name: String,
|
|
29
|
+
?metadata: ::Hash[Symbol, String],
|
|
20
30
|
?phone_number: String?,
|
|
21
31
|
?request_options: Dodopayments::request_opts
|
|
22
32
|
) -> void
|
|
@@ -24,6 +34,7 @@ module Dodopayments
|
|
|
24
34
|
def to_hash: -> {
|
|
25
35
|
email: String,
|
|
26
36
|
name: String,
|
|
37
|
+
metadata: ::Hash[Symbol, String],
|
|
27
38
|
phone_number: String?,
|
|
28
39
|
request_options: Dodopayments::RequestOptions
|
|
29
40
|
}
|
|
@@ -5,6 +5,7 @@ module Dodopayments
|
|
|
5
5
|
customer_id: String,
|
|
6
6
|
email: String,
|
|
7
7
|
name: String,
|
|
8
|
+
metadata: ::Hash[Symbol, String],
|
|
8
9
|
phone_number: String?
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -15,12 +16,17 @@ module Dodopayments
|
|
|
15
16
|
|
|
16
17
|
attr_accessor name: String
|
|
17
18
|
|
|
19
|
+
attr_reader metadata: ::Hash[Symbol, String]?
|
|
20
|
+
|
|
21
|
+
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
22
|
+
|
|
18
23
|
attr_accessor phone_number: String?
|
|
19
24
|
|
|
20
25
|
def initialize: (
|
|
21
26
|
customer_id: String,
|
|
22
27
|
email: String,
|
|
23
28
|
name: String,
|
|
29
|
+
?metadata: ::Hash[Symbol, String],
|
|
24
30
|
?phone_number: String?
|
|
25
31
|
) -> void
|
|
26
32
|
|
|
@@ -28,6 +34,7 @@ module Dodopayments
|
|
|
28
34
|
customer_id: String,
|
|
29
35
|
email: String,
|
|
30
36
|
name: String,
|
|
37
|
+
metadata: ::Hash[Symbol, String],
|
|
31
38
|
phone_number: String?
|
|
32
39
|
}
|
|
33
40
|
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type customer_retrieve_payment_methods_params =
|
|
4
|
+
{ } & Dodopayments::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class CustomerRetrievePaymentMethodsParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
def initialize: (?request_options: Dodopayments::request_opts) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { request_options: Dodopayments::RequestOptions }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|