dodopayments 1.56.3 → 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 +21 -0
- data/README.md +1 -1
- data/lib/dodopayments/internal/transport/base_client.rb +7 -1
- data/lib/dodopayments/internal/transport/pooled_net_requester.rb +6 -2
- 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 +5 -0
- data/manifest.yaml +1 -0
- data/rbi/dodopayments/internal/transport/base_client.rbi +5 -0
- data/rbi/dodopayments/internal/transport/pooled_net_requester.rbi +6 -2
- data/rbi/dodopayments/internal/type/base_model.rbi +8 -4
- 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/internal/transport/base_client.rbs +2 -0
- data/sig/dodopayments/internal/transport/pooled_net_requester.rbs +4 -1
- 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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type subscription_update_payment_method_params =
|
|
4
|
+
{
|
|
5
|
+
type: Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::type_,
|
|
6
|
+
return_url: String?,
|
|
7
|
+
payment_method_id: String
|
|
8
|
+
}
|
|
9
|
+
& Dodopayments::Internal::Type::request_parameters
|
|
10
|
+
|
|
11
|
+
class SubscriptionUpdatePaymentMethodParams < Dodopayments::Internal::Type::BaseModel
|
|
12
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
13
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
14
|
+
|
|
15
|
+
attr_accessor type: Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::type_
|
|
16
|
+
|
|
17
|
+
attr_accessor return_url: String?
|
|
18
|
+
|
|
19
|
+
attr_accessor payment_method_id: String
|
|
20
|
+
|
|
21
|
+
def initialize: (
|
|
22
|
+
type: Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::type_,
|
|
23
|
+
payment_method_id: String,
|
|
24
|
+
?return_url: String?,
|
|
25
|
+
?request_options: Dodopayments::request_opts
|
|
26
|
+
) -> void
|
|
27
|
+
|
|
28
|
+
def to_hash: -> {
|
|
29
|
+
type: Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::type_,
|
|
30
|
+
return_url: String?,
|
|
31
|
+
payment_method_id: String,
|
|
32
|
+
request_options: Dodopayments::RequestOptions
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type type_ = :existing
|
|
36
|
+
|
|
37
|
+
module Type
|
|
38
|
+
extend Dodopayments::Internal::Type::Enum
|
|
39
|
+
|
|
40
|
+
EXISTING: :existing
|
|
41
|
+
|
|
42
|
+
def self?.values: -> ::Array[Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::type_]
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type subscription_update_payment_method_response =
|
|
4
|
+
{
|
|
5
|
+
client_secret: String?,
|
|
6
|
+
expires_on: Time?,
|
|
7
|
+
payment_id: String?,
|
|
8
|
+
payment_link: String?
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class SubscriptionUpdatePaymentMethodResponse < Dodopayments::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor client_secret: String?
|
|
13
|
+
|
|
14
|
+
attr_accessor expires_on: Time?
|
|
15
|
+
|
|
16
|
+
attr_accessor payment_id: String?
|
|
17
|
+
|
|
18
|
+
attr_accessor payment_link: String?
|
|
19
|
+
|
|
20
|
+
def initialize: (
|
|
21
|
+
?client_secret: String?,
|
|
22
|
+
?expires_on: Time?,
|
|
23
|
+
?payment_id: String?,
|
|
24
|
+
?payment_link: String?
|
|
25
|
+
) -> void
|
|
26
|
+
|
|
27
|
+
def to_hash: -> {
|
|
28
|
+
client_secret: String?,
|
|
29
|
+
expires_on: Time?,
|
|
30
|
+
payment_id: String?,
|
|
31
|
+
payment_link: String?
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
data/sig/dodopayments/models.rbs
CHANGED
|
@@ -63,6 +63,8 @@ module Dodopayments
|
|
|
63
63
|
|
|
64
64
|
class CustomerRetrieveParams = Dodopayments::Models::CustomerRetrieveParams
|
|
65
65
|
|
|
66
|
+
class CustomerRetrievePaymentMethodsParams = Dodopayments::Models::CustomerRetrievePaymentMethodsParams
|
|
67
|
+
|
|
66
68
|
module Customers = Dodopayments::Models::Customers
|
|
67
69
|
|
|
68
70
|
class CustomerUpdateParams = Dodopayments::Models::CustomerUpdateParams
|
|
@@ -255,6 +257,8 @@ module Dodopayments
|
|
|
255
257
|
|
|
256
258
|
class SubscriptionUpdateParams = Dodopayments::Models::SubscriptionUpdateParams
|
|
257
259
|
|
|
260
|
+
class SubscriptionUpdatePaymentMethodParams = Dodopayments::Models::SubscriptionUpdatePaymentMethodParams
|
|
261
|
+
|
|
258
262
|
module TaxCategory = Dodopayments::Models::TaxCategory
|
|
259
263
|
|
|
260
264
|
module TimeInterval = Dodopayments::Models::TimeInterval
|
|
@@ -8,6 +8,7 @@ module Dodopayments
|
|
|
8
8
|
def create: (
|
|
9
9
|
email: String,
|
|
10
10
|
name: String,
|
|
11
|
+
?metadata: ::Hash[Symbol, String],
|
|
11
12
|
?phone_number: String?,
|
|
12
13
|
?request_options: Dodopayments::request_opts
|
|
13
14
|
) -> Dodopayments::Customer
|
|
@@ -19,6 +20,7 @@ module Dodopayments
|
|
|
19
20
|
|
|
20
21
|
def update: (
|
|
21
22
|
String customer_id,
|
|
23
|
+
?metadata: ::Hash[Symbol, String]?,
|
|
22
24
|
?name: String?,
|
|
23
25
|
?phone_number: String?,
|
|
24
26
|
?request_options: Dodopayments::request_opts
|
|
@@ -31,6 +33,11 @@ module Dodopayments
|
|
|
31
33
|
?request_options: Dodopayments::request_opts
|
|
32
34
|
) -> Dodopayments::Internal::DefaultPageNumberPagination[Dodopayments::Customer]
|
|
33
35
|
|
|
36
|
+
def retrieve_payment_methods: (
|
|
37
|
+
String customer_id,
|
|
38
|
+
?request_options: Dodopayments::request_opts
|
|
39
|
+
) -> Dodopayments::Models::CustomerRetrievePaymentMethodsResponse
|
|
40
|
+
|
|
34
41
|
def initialize: (client: Dodopayments::Client) -> void
|
|
35
42
|
end
|
|
36
43
|
end
|
|
@@ -4,6 +4,7 @@ module Dodopayments
|
|
|
4
4
|
attr_reader images: Dodopayments::Resources::Products::Images
|
|
5
5
|
|
|
6
6
|
def create: (
|
|
7
|
+
name: String,
|
|
7
8
|
price: Dodopayments::Models::price,
|
|
8
9
|
tax_category: Dodopayments::Models::tax_category,
|
|
9
10
|
?addons: ::Array[String]?,
|
|
@@ -15,7 +16,6 @@ module Dodopayments
|
|
|
15
16
|
?license_key_duration: Dodopayments::LicenseKeyDuration?,
|
|
16
17
|
?license_key_enabled: bool?,
|
|
17
18
|
?metadata: ::Hash[Symbol, String],
|
|
18
|
-
?name: String?,
|
|
19
19
|
?request_options: Dodopayments::request_opts
|
|
20
20
|
) -> Dodopayments::Product
|
|
21
21
|
|
|
@@ -80,6 +80,14 @@ module Dodopayments
|
|
|
80
80
|
?request_options: Dodopayments::request_opts
|
|
81
81
|
) -> Dodopayments::Internal::DefaultPageNumberPagination[Dodopayments::Models::SubscriptionRetrieveUsageHistoryResponse]
|
|
82
82
|
|
|
83
|
+
def update_payment_method: (
|
|
84
|
+
String subscription_id,
|
|
85
|
+
type: Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::type_,
|
|
86
|
+
payment_method_id: String,
|
|
87
|
+
?return_url: String?,
|
|
88
|
+
?request_options: Dodopayments::request_opts
|
|
89
|
+
) -> Dodopayments::Models::SubscriptionUpdatePaymentMethodResponse
|
|
90
|
+
|
|
83
91
|
def initialize: (client: Dodopayments::Client) -> void
|
|
84
92
|
end
|
|
85
93
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dodopayments
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.60.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dodo Payments
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-11-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: connection_pool
|
|
@@ -92,6 +92,8 @@ files:
|
|
|
92
92
|
- lib/dodopayments/models/customer_portal_session.rb
|
|
93
93
|
- lib/dodopayments/models/customer_request.rb
|
|
94
94
|
- lib/dodopayments/models/customer_retrieve_params.rb
|
|
95
|
+
- lib/dodopayments/models/customer_retrieve_payment_methods_params.rb
|
|
96
|
+
- lib/dodopayments/models/customer_retrieve_payment_methods_response.rb
|
|
95
97
|
- lib/dodopayments/models/customer_update_params.rb
|
|
96
98
|
- lib/dodopayments/models/customers/customer_portal_create_params.rb
|
|
97
99
|
- lib/dodopayments/models/customers/customer_wallet.rb
|
|
@@ -211,6 +213,8 @@ files:
|
|
|
211
213
|
- lib/dodopayments/models/subscription_retrieve_usage_history_response.rb
|
|
212
214
|
- lib/dodopayments/models/subscription_status.rb
|
|
213
215
|
- lib/dodopayments/models/subscription_update_params.rb
|
|
216
|
+
- lib/dodopayments/models/subscription_update_payment_method_params.rb
|
|
217
|
+
- lib/dodopayments/models/subscription_update_payment_method_response.rb
|
|
214
218
|
- lib/dodopayments/models/tax_category.rb
|
|
215
219
|
- lib/dodopayments/models/time_interval.rb
|
|
216
220
|
- lib/dodopayments/models/unsafe_unwrap_webhook_event.rb
|
|
@@ -319,6 +323,8 @@ files:
|
|
|
319
323
|
- rbi/dodopayments/models/customer_portal_session.rbi
|
|
320
324
|
- rbi/dodopayments/models/customer_request.rbi
|
|
321
325
|
- rbi/dodopayments/models/customer_retrieve_params.rbi
|
|
326
|
+
- rbi/dodopayments/models/customer_retrieve_payment_methods_params.rbi
|
|
327
|
+
- rbi/dodopayments/models/customer_retrieve_payment_methods_response.rbi
|
|
322
328
|
- rbi/dodopayments/models/customer_update_params.rbi
|
|
323
329
|
- rbi/dodopayments/models/customers/customer_portal_create_params.rbi
|
|
324
330
|
- rbi/dodopayments/models/customers/customer_wallet.rbi
|
|
@@ -438,6 +444,8 @@ files:
|
|
|
438
444
|
- rbi/dodopayments/models/subscription_retrieve_usage_history_response.rbi
|
|
439
445
|
- rbi/dodopayments/models/subscription_status.rbi
|
|
440
446
|
- rbi/dodopayments/models/subscription_update_params.rbi
|
|
447
|
+
- rbi/dodopayments/models/subscription_update_payment_method_params.rbi
|
|
448
|
+
- rbi/dodopayments/models/subscription_update_payment_method_response.rbi
|
|
441
449
|
- rbi/dodopayments/models/tax_category.rbi
|
|
442
450
|
- rbi/dodopayments/models/time_interval.rbi
|
|
443
451
|
- rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi
|
|
@@ -545,6 +553,8 @@ files:
|
|
|
545
553
|
- sig/dodopayments/models/customer_portal_session.rbs
|
|
546
554
|
- sig/dodopayments/models/customer_request.rbs
|
|
547
555
|
- sig/dodopayments/models/customer_retrieve_params.rbs
|
|
556
|
+
- sig/dodopayments/models/customer_retrieve_payment_methods_params.rbs
|
|
557
|
+
- sig/dodopayments/models/customer_retrieve_payment_methods_response.rbs
|
|
548
558
|
- sig/dodopayments/models/customer_update_params.rbs
|
|
549
559
|
- sig/dodopayments/models/customers/customer_portal_create_params.rbs
|
|
550
560
|
- sig/dodopayments/models/customers/customer_wallet.rbs
|
|
@@ -664,6 +674,8 @@ files:
|
|
|
664
674
|
- sig/dodopayments/models/subscription_retrieve_usage_history_response.rbs
|
|
665
675
|
- sig/dodopayments/models/subscription_status.rbs
|
|
666
676
|
- sig/dodopayments/models/subscription_update_params.rbs
|
|
677
|
+
- sig/dodopayments/models/subscription_update_payment_method_params.rbs
|
|
678
|
+
- sig/dodopayments/models/subscription_update_payment_method_response.rbs
|
|
667
679
|
- sig/dodopayments/models/tax_category.rbs
|
|
668
680
|
- sig/dodopayments/models/time_interval.rbs
|
|
669
681
|
- sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs
|