dodopayments 1.56.4 → 1.60.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 +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 +183 -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 +392 -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 +180 -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
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
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type customer_retrieve_payment_methods_response =
|
|
4
|
+
{
|
|
5
|
+
items: ::Array[Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item]
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
class CustomerRetrievePaymentMethodsResponse < Dodopayments::Internal::Type::BaseModel
|
|
9
|
+
attr_accessor items: ::Array[Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item]
|
|
10
|
+
|
|
11
|
+
def initialize: (
|
|
12
|
+
items: ::Array[Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item]
|
|
13
|
+
) -> void
|
|
14
|
+
|
|
15
|
+
def to_hash: -> {
|
|
16
|
+
items: ::Array[Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item]
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
type item =
|
|
20
|
+
{
|
|
21
|
+
connector_payment_methods: ::Hash[Symbol, Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::ConnectorPaymentMethod],
|
|
22
|
+
payment_method: Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::payment_method,
|
|
23
|
+
payment_method_id: String,
|
|
24
|
+
profile_map: ::Hash[Symbol, String],
|
|
25
|
+
card: Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::Card?,
|
|
26
|
+
last_used_at: Time?,
|
|
27
|
+
recurring_enabled: bool?
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
class Item < Dodopayments::Internal::Type::BaseModel
|
|
31
|
+
attr_accessor connector_payment_methods: ::Hash[Symbol, Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::ConnectorPaymentMethod]
|
|
32
|
+
|
|
33
|
+
attr_accessor payment_method: Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::payment_method
|
|
34
|
+
|
|
35
|
+
attr_accessor payment_method_id: String
|
|
36
|
+
|
|
37
|
+
attr_accessor profile_map: ::Hash[Symbol, String]
|
|
38
|
+
|
|
39
|
+
attr_accessor card: Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::Card?
|
|
40
|
+
|
|
41
|
+
attr_accessor last_used_at: Time?
|
|
42
|
+
|
|
43
|
+
attr_accessor recurring_enabled: bool?
|
|
44
|
+
|
|
45
|
+
def initialize: (
|
|
46
|
+
connector_payment_methods: ::Hash[Symbol, Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::ConnectorPaymentMethod],
|
|
47
|
+
payment_method: Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::payment_method,
|
|
48
|
+
payment_method_id: String,
|
|
49
|
+
profile_map: ::Hash[Symbol, String],
|
|
50
|
+
?card: Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::Card?,
|
|
51
|
+
?last_used_at: Time?,
|
|
52
|
+
?recurring_enabled: bool?
|
|
53
|
+
) -> void
|
|
54
|
+
|
|
55
|
+
def to_hash: -> {
|
|
56
|
+
connector_payment_methods: ::Hash[Symbol, Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::ConnectorPaymentMethod],
|
|
57
|
+
payment_method: Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::payment_method,
|
|
58
|
+
payment_method_id: String,
|
|
59
|
+
profile_map: ::Hash[Symbol, String],
|
|
60
|
+
card: Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::Card?,
|
|
61
|
+
last_used_at: Time?,
|
|
62
|
+
recurring_enabled: bool?
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
type connector_payment_method =
|
|
66
|
+
{
|
|
67
|
+
connector_mandate_id: String,
|
|
68
|
+
original_payment_authorized_amount: Integer,
|
|
69
|
+
original_payment_authorized_currency: Dodopayments::Models::currency,
|
|
70
|
+
payment_method_type: Dodopayments::Models::payment_method_types?
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
class ConnectorPaymentMethod < Dodopayments::Internal::Type::BaseModel
|
|
74
|
+
attr_accessor connector_mandate_id: String
|
|
75
|
+
|
|
76
|
+
attr_accessor original_payment_authorized_amount: Integer
|
|
77
|
+
|
|
78
|
+
attr_accessor original_payment_authorized_currency: Dodopayments::Models::currency
|
|
79
|
+
|
|
80
|
+
attr_accessor payment_method_type: Dodopayments::Models::payment_method_types?
|
|
81
|
+
|
|
82
|
+
def initialize: (
|
|
83
|
+
connector_mandate_id: String,
|
|
84
|
+
original_payment_authorized_amount: Integer,
|
|
85
|
+
original_payment_authorized_currency: Dodopayments::Models::currency,
|
|
86
|
+
?payment_method_type: Dodopayments::Models::payment_method_types?
|
|
87
|
+
) -> void
|
|
88
|
+
|
|
89
|
+
def to_hash: -> {
|
|
90
|
+
connector_mandate_id: String,
|
|
91
|
+
original_payment_authorized_amount: Integer,
|
|
92
|
+
original_payment_authorized_currency: Dodopayments::Models::currency,
|
|
93
|
+
payment_method_type: Dodopayments::Models::payment_method_types?
|
|
94
|
+
}
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
type payment_method =
|
|
98
|
+
:card
|
|
99
|
+
| :card_redirect
|
|
100
|
+
| :pay_later
|
|
101
|
+
| :wallet
|
|
102
|
+
| :bank_redirect
|
|
103
|
+
| :bank_transfer
|
|
104
|
+
| :crypto
|
|
105
|
+
| :bank_debit
|
|
106
|
+
| :reward
|
|
107
|
+
| :real_time_payment
|
|
108
|
+
| :upi
|
|
109
|
+
| :voucher
|
|
110
|
+
| :gift_card
|
|
111
|
+
| :open_banking
|
|
112
|
+
| :mobile_payment
|
|
113
|
+
|
|
114
|
+
module PaymentMethod
|
|
115
|
+
extend Dodopayments::Internal::Type::Enum
|
|
116
|
+
|
|
117
|
+
CARD: :card
|
|
118
|
+
CARD_REDIRECT: :card_redirect
|
|
119
|
+
PAY_LATER: :pay_later
|
|
120
|
+
WALLET: :wallet
|
|
121
|
+
BANK_REDIRECT: :bank_redirect
|
|
122
|
+
BANK_TRANSFER: :bank_transfer
|
|
123
|
+
CRYPTO: :crypto
|
|
124
|
+
BANK_DEBIT: :bank_debit
|
|
125
|
+
REWARD: :reward
|
|
126
|
+
REAL_TIME_PAYMENT: :real_time_payment
|
|
127
|
+
UPI: :upi
|
|
128
|
+
VOUCHER: :voucher
|
|
129
|
+
GIFT_CARD: :gift_card
|
|
130
|
+
OPEN_BANKING: :open_banking
|
|
131
|
+
MOBILE_PAYMENT: :mobile_payment
|
|
132
|
+
|
|
133
|
+
def self?.values: -> ::Array[Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::payment_method]
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
type card =
|
|
137
|
+
{
|
|
138
|
+
card_issuing_country: Dodopayments::Models::country_code?,
|
|
139
|
+
card_network: String?,
|
|
140
|
+
card_type: String?,
|
|
141
|
+
expiry_month: String?,
|
|
142
|
+
expiry_year: String?,
|
|
143
|
+
:last4_digits => String?
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
class Card < Dodopayments::Internal::Type::BaseModel
|
|
147
|
+
attr_accessor card_issuing_country: Dodopayments::Models::country_code?
|
|
148
|
+
|
|
149
|
+
attr_accessor card_network: String?
|
|
150
|
+
|
|
151
|
+
attr_accessor card_type: String?
|
|
152
|
+
|
|
153
|
+
attr_accessor expiry_month: String?
|
|
154
|
+
|
|
155
|
+
attr_accessor expiry_year: String?
|
|
156
|
+
|
|
157
|
+
attr_accessor last4_digits: String?
|
|
158
|
+
|
|
159
|
+
def initialize: (
|
|
160
|
+
?card_issuing_country: Dodopayments::Models::country_code?,
|
|
161
|
+
?card_network: String?,
|
|
162
|
+
?card_type: String?,
|
|
163
|
+
?expiry_month: String?,
|
|
164
|
+
?expiry_year: String?,
|
|
165
|
+
?last4_digits: String?
|
|
166
|
+
) -> void
|
|
167
|
+
|
|
168
|
+
def to_hash: -> {
|
|
169
|
+
card_issuing_country: Dodopayments::Models::country_code?,
|
|
170
|
+
card_network: String?,
|
|
171
|
+
card_type: String?,
|
|
172
|
+
expiry_month: String?,
|
|
173
|
+
expiry_year: String?,
|
|
174
|
+
:last4_digits => String?
|
|
175
|
+
}
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
module Dodopayments
|
|
2
2
|
module Models
|
|
3
3
|
type customer_update_params =
|
|
4
|
-
{
|
|
4
|
+
{
|
|
5
|
+
metadata: ::Hash[Symbol, String]?,
|
|
6
|
+
name: String?,
|
|
7
|
+
phone_number: String?
|
|
8
|
+
}
|
|
5
9
|
& Dodopayments::Internal::Type::request_parameters
|
|
6
10
|
|
|
7
11
|
class CustomerUpdateParams < Dodopayments::Internal::Type::BaseModel
|
|
8
12
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
13
|
include Dodopayments::Internal::Type::RequestParameters
|
|
10
14
|
|
|
15
|
+
attr_accessor metadata: ::Hash[Symbol, String]?
|
|
16
|
+
|
|
11
17
|
attr_accessor name: String?
|
|
12
18
|
|
|
13
19
|
attr_accessor phone_number: String?
|
|
14
20
|
|
|
15
21
|
def initialize: (
|
|
22
|
+
?metadata: ::Hash[Symbol, String]?,
|
|
16
23
|
?name: String?,
|
|
17
24
|
?phone_number: String?,
|
|
18
25
|
?request_options: Dodopayments::request_opts
|
|
19
26
|
) -> void
|
|
20
27
|
|
|
21
28
|
def to_hash: -> {
|
|
29
|
+
metadata: ::Hash[Symbol, String]?,
|
|
22
30
|
name: String?,
|
|
23
31
|
phone_number: String?,
|
|
24
32
|
request_options: Dodopayments::RequestOptions
|
|
@@ -2,6 +2,7 @@ module Dodopayments
|
|
|
2
2
|
module Models
|
|
3
3
|
type product_create_params =
|
|
4
4
|
{
|
|
5
|
+
name: String,
|
|
5
6
|
price: Dodopayments::Models::price,
|
|
6
7
|
tax_category: Dodopayments::Models::tax_category,
|
|
7
8
|
addons: ::Array[String]?,
|
|
@@ -12,8 +13,7 @@ module Dodopayments
|
|
|
12
13
|
license_key_activations_limit: Integer?,
|
|
13
14
|
license_key_duration: Dodopayments::LicenseKeyDuration?,
|
|
14
15
|
license_key_enabled: bool?,
|
|
15
|
-
metadata: ::Hash[Symbol, String]
|
|
16
|
-
name: String?
|
|
16
|
+
metadata: ::Hash[Symbol, String]
|
|
17
17
|
}
|
|
18
18
|
& Dodopayments::Internal::Type::request_parameters
|
|
19
19
|
|
|
@@ -21,6 +21,8 @@ module Dodopayments
|
|
|
21
21
|
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
22
22
|
include Dodopayments::Internal::Type::RequestParameters
|
|
23
23
|
|
|
24
|
+
attr_accessor name: String
|
|
25
|
+
|
|
24
26
|
attr_accessor price: Dodopayments::Models::price
|
|
25
27
|
|
|
26
28
|
attr_accessor tax_category: Dodopayments::Models::tax_category
|
|
@@ -45,9 +47,8 @@ module Dodopayments
|
|
|
45
47
|
|
|
46
48
|
def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
47
49
|
|
|
48
|
-
attr_accessor name: String?
|
|
49
|
-
|
|
50
50
|
def initialize: (
|
|
51
|
+
name: String,
|
|
51
52
|
price: Dodopayments::Models::price,
|
|
52
53
|
tax_category: Dodopayments::Models::tax_category,
|
|
53
54
|
?addons: ::Array[String]?,
|
|
@@ -59,11 +60,11 @@ module Dodopayments
|
|
|
59
60
|
?license_key_duration: Dodopayments::LicenseKeyDuration?,
|
|
60
61
|
?license_key_enabled: bool?,
|
|
61
62
|
?metadata: ::Hash[Symbol, String],
|
|
62
|
-
?name: String?,
|
|
63
63
|
?request_options: Dodopayments::request_opts
|
|
64
64
|
) -> void
|
|
65
65
|
|
|
66
66
|
def to_hash: -> {
|
|
67
|
+
name: String,
|
|
67
68
|
price: Dodopayments::Models::price,
|
|
68
69
|
tax_category: Dodopayments::Models::tax_category,
|
|
69
70
|
addons: ::Array[String]?,
|
|
@@ -75,7 +76,6 @@ module Dodopayments
|
|
|
75
76
|
license_key_duration: Dodopayments::LicenseKeyDuration?,
|
|
76
77
|
license_key_enabled: bool?,
|
|
77
78
|
metadata: ::Hash[Symbol, String],
|
|
78
|
-
name: String?,
|
|
79
79
|
request_options: Dodopayments::RequestOptions
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -28,6 +28,7 @@ module Dodopayments
|
|
|
28
28
|
discount_cycles_remaining: Integer?,
|
|
29
29
|
discount_id: String?,
|
|
30
30
|
expires_at: Time?,
|
|
31
|
+
payment_method_id: String?,
|
|
31
32
|
tax_id: String?
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -84,6 +85,8 @@ module Dodopayments
|
|
|
84
85
|
|
|
85
86
|
attr_accessor expires_at: Time?
|
|
86
87
|
|
|
88
|
+
attr_accessor payment_method_id: String?
|
|
89
|
+
|
|
87
90
|
attr_accessor tax_id: String?
|
|
88
91
|
|
|
89
92
|
def initialize: (
|
|
@@ -113,6 +116,7 @@ module Dodopayments
|
|
|
113
116
|
?discount_cycles_remaining: Integer?,
|
|
114
117
|
?discount_id: String?,
|
|
115
118
|
?expires_at: Time?,
|
|
119
|
+
?payment_method_id: String?,
|
|
116
120
|
?tax_id: String?
|
|
117
121
|
) -> void
|
|
118
122
|
|
|
@@ -143,6 +147,7 @@ module Dodopayments
|
|
|
143
147
|
discount_cycles_remaining: Integer?,
|
|
144
148
|
discount_id: String?,
|
|
145
149
|
expires_at: Time?,
|
|
150
|
+
payment_method_id: String?,
|
|
146
151
|
tax_id: String?
|
|
147
152
|
}
|
|
148
153
|
|
|
@@ -25,6 +25,7 @@ module Dodopayments
|
|
|
25
25
|
cancelled_at: Time?,
|
|
26
26
|
discount_cycles_remaining: Integer?,
|
|
27
27
|
discount_id: String?,
|
|
28
|
+
payment_method_id: String?,
|
|
28
29
|
tax_id: String?
|
|
29
30
|
}
|
|
30
31
|
|
|
@@ -75,6 +76,8 @@ module Dodopayments
|
|
|
75
76
|
|
|
76
77
|
attr_accessor discount_id: String?
|
|
77
78
|
|
|
79
|
+
attr_accessor payment_method_id: String?
|
|
80
|
+
|
|
78
81
|
attr_accessor tax_id: String?
|
|
79
82
|
|
|
80
83
|
def initialize: (
|
|
@@ -101,6 +104,7 @@ module Dodopayments
|
|
|
101
104
|
?cancelled_at: Time?,
|
|
102
105
|
?discount_cycles_remaining: Integer?,
|
|
103
106
|
?discount_id: String?,
|
|
107
|
+
?payment_method_id: String?,
|
|
104
108
|
?tax_id: String?
|
|
105
109
|
) -> void
|
|
106
110
|
|
|
@@ -128,6 +132,7 @@ module Dodopayments
|
|
|
128
132
|
cancelled_at: Time?,
|
|
129
133
|
discount_cycles_remaining: Integer?,
|
|
130
134
|
discount_id: String?,
|
|
135
|
+
payment_method_id: String?,
|
|
131
136
|
tax_id: String?
|
|
132
137
|
}
|
|
133
138
|
end
|