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,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::Subscriptions#update_payment_method
|
|
6
|
+
class SubscriptionUpdatePaymentMethodResponse < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute client_secret
|
|
8
|
+
#
|
|
9
|
+
# @return [String, nil]
|
|
10
|
+
optional :client_secret, String, nil?: true
|
|
11
|
+
|
|
12
|
+
# @!attribute expires_on
|
|
13
|
+
#
|
|
14
|
+
# @return [Time, nil]
|
|
15
|
+
optional :expires_on, Time, nil?: true
|
|
16
|
+
|
|
17
|
+
# @!attribute payment_id
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :payment_id, String, nil?: true
|
|
21
|
+
|
|
22
|
+
# @!attribute payment_link
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :payment_link, String, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!method initialize(client_secret: nil, expires_on: nil, payment_id: nil, payment_link: nil)
|
|
28
|
+
# @param client_secret [String, nil]
|
|
29
|
+
# @param expires_on [Time, nil]
|
|
30
|
+
# @param payment_id [String, nil]
|
|
31
|
+
# @param payment_link [String, nil]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
data/lib/dodopayments/models.rb
CHANGED
|
@@ -103,6 +103,8 @@ module Dodopayments
|
|
|
103
103
|
|
|
104
104
|
CustomerRetrieveParams = Dodopayments::Models::CustomerRetrieveParams
|
|
105
105
|
|
|
106
|
+
CustomerRetrievePaymentMethodsParams = Dodopayments::Models::CustomerRetrievePaymentMethodsParams
|
|
107
|
+
|
|
106
108
|
Customers = Dodopayments::Models::Customers
|
|
107
109
|
|
|
108
110
|
CustomerUpdateParams = Dodopayments::Models::CustomerUpdateParams
|
|
@@ -295,6 +297,8 @@ module Dodopayments
|
|
|
295
297
|
|
|
296
298
|
SubscriptionUpdateParams = Dodopayments::Models::SubscriptionUpdateParams
|
|
297
299
|
|
|
300
|
+
SubscriptionUpdatePaymentMethodParams = Dodopayments::Models::SubscriptionUpdatePaymentMethodParams
|
|
301
|
+
|
|
298
302
|
TaxCategory = Dodopayments::Models::TaxCategory
|
|
299
303
|
|
|
300
304
|
TimeInterval = Dodopayments::Models::TimeInterval
|
|
@@ -9,11 +9,16 @@ module Dodopayments
|
|
|
9
9
|
# @return [Dodopayments::Resources::Customers::Wallets]
|
|
10
10
|
attr_reader :wallets
|
|
11
11
|
|
|
12
|
-
# @overload create(email:, name:, phone_number: nil, request_options: {})
|
|
12
|
+
# @overload create(email:, name:, metadata: nil, phone_number: nil, request_options: {})
|
|
13
13
|
#
|
|
14
14
|
# @param email [String]
|
|
15
|
+
#
|
|
15
16
|
# @param name [String]
|
|
17
|
+
#
|
|
18
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata for the customer
|
|
19
|
+
#
|
|
16
20
|
# @param phone_number [String, nil]
|
|
21
|
+
#
|
|
17
22
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
18
23
|
#
|
|
19
24
|
# @return [Dodopayments::Models::Customer]
|
|
@@ -48,10 +53,12 @@ module Dodopayments
|
|
|
48
53
|
)
|
|
49
54
|
end
|
|
50
55
|
|
|
51
|
-
# @overload update(customer_id, name: nil, phone_number: nil, request_options: {})
|
|
56
|
+
# @overload update(customer_id, metadata: nil, name: nil, phone_number: nil, request_options: {})
|
|
52
57
|
#
|
|
53
58
|
# @param customer_id [String] Customer Id
|
|
54
59
|
#
|
|
60
|
+
# @param metadata [Hash{Symbol=>String}, nil] Additional metadata for the customer
|
|
61
|
+
#
|
|
55
62
|
# @param name [String, nil]
|
|
56
63
|
#
|
|
57
64
|
# @param phone_number [String, nil]
|
|
@@ -97,6 +104,24 @@ module Dodopayments
|
|
|
97
104
|
)
|
|
98
105
|
end
|
|
99
106
|
|
|
107
|
+
# @overload retrieve_payment_methods(customer_id, request_options: {})
|
|
108
|
+
#
|
|
109
|
+
# @param customer_id [String] Customer Id
|
|
110
|
+
#
|
|
111
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
112
|
+
#
|
|
113
|
+
# @return [Dodopayments::Models::CustomerRetrievePaymentMethodsResponse]
|
|
114
|
+
#
|
|
115
|
+
# @see Dodopayments::Models::CustomerRetrievePaymentMethodsParams
|
|
116
|
+
def retrieve_payment_methods(customer_id, params = {})
|
|
117
|
+
@client.request(
|
|
118
|
+
method: :get,
|
|
119
|
+
path: ["customers/%1$s/payment-methods", customer_id],
|
|
120
|
+
model: Dodopayments::Models::CustomerRetrievePaymentMethodsResponse,
|
|
121
|
+
options: params[:request_options]
|
|
122
|
+
)
|
|
123
|
+
end
|
|
124
|
+
|
|
100
125
|
# @api private
|
|
101
126
|
#
|
|
102
127
|
# @param client [Dodopayments::Client]
|
|
@@ -9,7 +9,9 @@ module Dodopayments
|
|
|
9
9
|
# Some parameter documentations has been truncated, see
|
|
10
10
|
# {Dodopayments::Models::ProductCreateParams} for more details.
|
|
11
11
|
#
|
|
12
|
-
# @overload create(price:, tax_category:, addons: nil, brand_id: nil, description: nil, digital_product_delivery: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil,
|
|
12
|
+
# @overload create(name:, price:, tax_category:, addons: nil, brand_id: nil, description: nil, digital_product_delivery: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, metadata: nil, request_options: {})
|
|
13
|
+
#
|
|
14
|
+
# @param name [String] Name of the product
|
|
13
15
|
#
|
|
14
16
|
# @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice] Price configuration for the product
|
|
15
17
|
#
|
|
@@ -33,8 +35,6 @@ module Dodopayments
|
|
|
33
35
|
#
|
|
34
36
|
# @param metadata [Hash{Symbol=>String}] Additional metadata for the product
|
|
35
37
|
#
|
|
36
|
-
# @param name [String, nil] Optional name of the product
|
|
37
|
-
#
|
|
38
38
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
39
39
|
#
|
|
40
40
|
# @return [Dodopayments::Models::Product]
|
|
@@ -283,6 +283,32 @@ module Dodopayments
|
|
|
283
283
|
)
|
|
284
284
|
end
|
|
285
285
|
|
|
286
|
+
# @overload update_payment_method(subscription_id, type:, payment_method_id:, return_url: nil, request_options: {})
|
|
287
|
+
#
|
|
288
|
+
# @param subscription_id [String] Subscription Id
|
|
289
|
+
#
|
|
290
|
+
# @param type [Symbol, Dodopayments::Models::SubscriptionUpdatePaymentMethodParams::Type]
|
|
291
|
+
#
|
|
292
|
+
# @param payment_method_id [String]
|
|
293
|
+
#
|
|
294
|
+
# @param return_url [String, nil]
|
|
295
|
+
#
|
|
296
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
297
|
+
#
|
|
298
|
+
# @return [Dodopayments::Models::SubscriptionUpdatePaymentMethodResponse]
|
|
299
|
+
#
|
|
300
|
+
# @see Dodopayments::Models::SubscriptionUpdatePaymentMethodParams
|
|
301
|
+
def update_payment_method(subscription_id, params)
|
|
302
|
+
parsed, options = Dodopayments::SubscriptionUpdatePaymentMethodParams.dump_request(params)
|
|
303
|
+
@client.request(
|
|
304
|
+
method: :post,
|
|
305
|
+
path: ["subscriptions/%1$s/update-payment-method", subscription_id],
|
|
306
|
+
body: parsed,
|
|
307
|
+
model: Dodopayments::Models::SubscriptionUpdatePaymentMethodResponse,
|
|
308
|
+
options: options
|
|
309
|
+
)
|
|
310
|
+
end
|
|
311
|
+
|
|
286
312
|
# @api private
|
|
287
313
|
#
|
|
288
314
|
# @param client [Dodopayments::Client]
|
data/lib/dodopayments/version.rb
CHANGED
data/lib/dodopayments.rb
CHANGED
|
@@ -9,6 +9,7 @@ require "erb"
|
|
|
9
9
|
require "etc"
|
|
10
10
|
require "json"
|
|
11
11
|
require "net/http"
|
|
12
|
+
require "openssl"
|
|
12
13
|
require "pathname"
|
|
13
14
|
require "rbconfig"
|
|
14
15
|
require "securerandom"
|
|
@@ -93,6 +94,8 @@ require_relative "dodopayments/models/customer_list_params"
|
|
|
93
94
|
require_relative "dodopayments/models/customer_portal_session"
|
|
94
95
|
require_relative "dodopayments/models/customer_request"
|
|
95
96
|
require_relative "dodopayments/models/customer_retrieve_params"
|
|
97
|
+
require_relative "dodopayments/models/customer_retrieve_payment_methods_params"
|
|
98
|
+
require_relative "dodopayments/models/customer_retrieve_payment_methods_response"
|
|
96
99
|
require_relative "dodopayments/models/customers/customer_portal_create_params"
|
|
97
100
|
require_relative "dodopayments/models/customers/customer_wallet"
|
|
98
101
|
require_relative "dodopayments/models/customers/wallet_list_params"
|
|
@@ -227,6 +230,8 @@ require_relative "dodopayments/models/subscription_retrieve_usage_history_params
|
|
|
227
230
|
require_relative "dodopayments/models/subscription_retrieve_usage_history_response"
|
|
228
231
|
require_relative "dodopayments/models/subscription_status"
|
|
229
232
|
require_relative "dodopayments/models/subscription_update_params"
|
|
233
|
+
require_relative "dodopayments/models/subscription_update_payment_method_params"
|
|
234
|
+
require_relative "dodopayments/models/subscription_update_payment_method_response"
|
|
230
235
|
require_relative "dodopayments/models/tax_category"
|
|
231
236
|
require_relative "dodopayments/models/time_interval"
|
|
232
237
|
require_relative "dodopayments/models/unsafe_unwrap_webhook_event"
|
data/manifest.yaml
CHANGED
|
@@ -26,8 +26,12 @@ module Dodopayments
|
|
|
26
26
|
|
|
27
27
|
class << self
|
|
28
28
|
# @api private
|
|
29
|
-
sig
|
|
30
|
-
|
|
29
|
+
sig do
|
|
30
|
+
params(cert_store: OpenSSL::X509::Store, url: URI::Generic).returns(
|
|
31
|
+
Net::HTTP
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
def connect(cert_store:, url:)
|
|
31
35
|
end
|
|
32
36
|
|
|
33
37
|
# @api private
|
|
@@ -31,7 +31,7 @@ module Dodopayments
|
|
|
31
31
|
#
|
|
32
32
|
# Assumes superclass fields are totally defined before fields are accessed /
|
|
33
33
|
# defined on subclasses.
|
|
34
|
-
sig { params(child:
|
|
34
|
+
sig { params(child: Dodopayments::Internal::Type::BaseModel).void }
|
|
35
35
|
def inherited(child)
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -282,9 +282,13 @@ module Dodopayments
|
|
|
282
282
|
|
|
283
283
|
# Create a new instance of a model.
|
|
284
284
|
sig do
|
|
285
|
-
params(
|
|
286
|
-
|
|
287
|
-
|
|
285
|
+
params(
|
|
286
|
+
data:
|
|
287
|
+
T.any(
|
|
288
|
+
T::Hash[Symbol, T.anything],
|
|
289
|
+
Dodopayments::Internal::Type::BaseModel
|
|
290
|
+
)
|
|
291
|
+
).returns(T.attached_class)
|
|
288
292
|
end
|
|
289
293
|
def self.new(data = {})
|
|
290
294
|
end
|
|
@@ -528,6 +528,48 @@ module Dodopayments
|
|
|
528
528
|
sig { params(allow_currency_selection: T::Boolean).void }
|
|
529
529
|
attr_writer :allow_currency_selection
|
|
530
530
|
|
|
531
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
532
|
+
attr_reader :allow_customer_editing_city
|
|
533
|
+
|
|
534
|
+
sig { params(allow_customer_editing_city: T::Boolean).void }
|
|
535
|
+
attr_writer :allow_customer_editing_city
|
|
536
|
+
|
|
537
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
538
|
+
attr_reader :allow_customer_editing_country
|
|
539
|
+
|
|
540
|
+
sig { params(allow_customer_editing_country: T::Boolean).void }
|
|
541
|
+
attr_writer :allow_customer_editing_country
|
|
542
|
+
|
|
543
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
544
|
+
attr_reader :allow_customer_editing_email
|
|
545
|
+
|
|
546
|
+
sig { params(allow_customer_editing_email: T::Boolean).void }
|
|
547
|
+
attr_writer :allow_customer_editing_email
|
|
548
|
+
|
|
549
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
550
|
+
attr_reader :allow_customer_editing_name
|
|
551
|
+
|
|
552
|
+
sig { params(allow_customer_editing_name: T::Boolean).void }
|
|
553
|
+
attr_writer :allow_customer_editing_name
|
|
554
|
+
|
|
555
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
556
|
+
attr_reader :allow_customer_editing_state
|
|
557
|
+
|
|
558
|
+
sig { params(allow_customer_editing_state: T::Boolean).void }
|
|
559
|
+
attr_writer :allow_customer_editing_state
|
|
560
|
+
|
|
561
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
562
|
+
attr_reader :allow_customer_editing_street
|
|
563
|
+
|
|
564
|
+
sig { params(allow_customer_editing_street: T::Boolean).void }
|
|
565
|
+
attr_writer :allow_customer_editing_street
|
|
566
|
+
|
|
567
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
568
|
+
attr_reader :allow_customer_editing_zipcode
|
|
569
|
+
|
|
570
|
+
sig { params(allow_customer_editing_zipcode: T::Boolean).void }
|
|
571
|
+
attr_writer :allow_customer_editing_zipcode
|
|
572
|
+
|
|
531
573
|
# If the customer is allowed to apply discount code, set it to true.
|
|
532
574
|
#
|
|
533
575
|
# Default is true
|
|
@@ -568,6 +610,13 @@ module Dodopayments
|
|
|
568
610
|
sig do
|
|
569
611
|
params(
|
|
570
612
|
allow_currency_selection: T::Boolean,
|
|
613
|
+
allow_customer_editing_city: T::Boolean,
|
|
614
|
+
allow_customer_editing_country: T::Boolean,
|
|
615
|
+
allow_customer_editing_email: T::Boolean,
|
|
616
|
+
allow_customer_editing_name: T::Boolean,
|
|
617
|
+
allow_customer_editing_state: T::Boolean,
|
|
618
|
+
allow_customer_editing_street: T::Boolean,
|
|
619
|
+
allow_customer_editing_zipcode: T::Boolean,
|
|
571
620
|
allow_discount_code: T::Boolean,
|
|
572
621
|
allow_phone_number_collection: T::Boolean,
|
|
573
622
|
allow_tax_id: T::Boolean,
|
|
@@ -579,6 +628,13 @@ module Dodopayments
|
|
|
579
628
|
#
|
|
580
629
|
# Default is true
|
|
581
630
|
allow_currency_selection: nil,
|
|
631
|
+
allow_customer_editing_city: nil,
|
|
632
|
+
allow_customer_editing_country: nil,
|
|
633
|
+
allow_customer_editing_email: nil,
|
|
634
|
+
allow_customer_editing_name: nil,
|
|
635
|
+
allow_customer_editing_state: nil,
|
|
636
|
+
allow_customer_editing_street: nil,
|
|
637
|
+
allow_customer_editing_zipcode: nil,
|
|
582
638
|
# If the customer is allowed to apply discount code, set it to true.
|
|
583
639
|
#
|
|
584
640
|
# Default is true
|
|
@@ -603,6 +659,13 @@ module Dodopayments
|
|
|
603
659
|
override.returns(
|
|
604
660
|
{
|
|
605
661
|
allow_currency_selection: T::Boolean,
|
|
662
|
+
allow_customer_editing_city: T::Boolean,
|
|
663
|
+
allow_customer_editing_country: T::Boolean,
|
|
664
|
+
allow_customer_editing_email: T::Boolean,
|
|
665
|
+
allow_customer_editing_name: T::Boolean,
|
|
666
|
+
allow_customer_editing_state: T::Boolean,
|
|
667
|
+
allow_customer_editing_street: T::Boolean,
|
|
668
|
+
allow_customer_editing_zipcode: T::Boolean,
|
|
606
669
|
allow_discount_code: T::Boolean,
|
|
607
670
|
allow_phone_number_collection: T::Boolean,
|
|
608
671
|
allow_tax_id: T::Boolean,
|
|
@@ -23,6 +23,13 @@ module Dodopayments
|
|
|
23
23
|
sig { returns(String) }
|
|
24
24
|
attr_accessor :name
|
|
25
25
|
|
|
26
|
+
# Additional metadata for the customer
|
|
27
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
28
|
+
attr_reader :metadata
|
|
29
|
+
|
|
30
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
31
|
+
attr_writer :metadata
|
|
32
|
+
|
|
26
33
|
sig { returns(T.nilable(String)) }
|
|
27
34
|
attr_accessor :phone_number
|
|
28
35
|
|
|
@@ -33,6 +40,7 @@ module Dodopayments
|
|
|
33
40
|
customer_id: String,
|
|
34
41
|
email: String,
|
|
35
42
|
name: String,
|
|
43
|
+
metadata: T::Hash[Symbol, String],
|
|
36
44
|
phone_number: T.nilable(String)
|
|
37
45
|
).returns(T.attached_class)
|
|
38
46
|
end
|
|
@@ -42,6 +50,8 @@ module Dodopayments
|
|
|
42
50
|
customer_id:,
|
|
43
51
|
email:,
|
|
44
52
|
name:,
|
|
53
|
+
# Additional metadata for the customer
|
|
54
|
+
metadata: nil,
|
|
45
55
|
phone_number: nil
|
|
46
56
|
)
|
|
47
57
|
end
|
|
@@ -54,6 +64,7 @@ module Dodopayments
|
|
|
54
64
|
customer_id: String,
|
|
55
65
|
email: String,
|
|
56
66
|
name: String,
|
|
67
|
+
metadata: T::Hash[Symbol, String],
|
|
57
68
|
phone_number: T.nilable(String)
|
|
58
69
|
}
|
|
59
70
|
)
|
|
@@ -20,6 +20,13 @@ module Dodopayments
|
|
|
20
20
|
sig { returns(String) }
|
|
21
21
|
attr_accessor :name
|
|
22
22
|
|
|
23
|
+
# Additional metadata for the customer
|
|
24
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
25
|
+
attr_reader :metadata
|
|
26
|
+
|
|
27
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
28
|
+
attr_writer :metadata
|
|
29
|
+
|
|
23
30
|
sig { returns(T.nilable(String)) }
|
|
24
31
|
attr_accessor :phone_number
|
|
25
32
|
|
|
@@ -27,11 +34,19 @@ module Dodopayments
|
|
|
27
34
|
params(
|
|
28
35
|
email: String,
|
|
29
36
|
name: String,
|
|
37
|
+
metadata: T::Hash[Symbol, String],
|
|
30
38
|
phone_number: T.nilable(String),
|
|
31
39
|
request_options: Dodopayments::RequestOptions::OrHash
|
|
32
40
|
).returns(T.attached_class)
|
|
33
41
|
end
|
|
34
|
-
def self.new(
|
|
42
|
+
def self.new(
|
|
43
|
+
email:,
|
|
44
|
+
name:,
|
|
45
|
+
# Additional metadata for the customer
|
|
46
|
+
metadata: nil,
|
|
47
|
+
phone_number: nil,
|
|
48
|
+
request_options: {}
|
|
49
|
+
)
|
|
35
50
|
end
|
|
36
51
|
|
|
37
52
|
sig do
|
|
@@ -39,6 +54,7 @@ module Dodopayments
|
|
|
39
54
|
{
|
|
40
55
|
email: String,
|
|
41
56
|
name: String,
|
|
57
|
+
metadata: T::Hash[Symbol, String],
|
|
42
58
|
phone_number: T.nilable(String),
|
|
43
59
|
request_options: Dodopayments::RequestOptions
|
|
44
60
|
}
|
|
@@ -23,6 +23,13 @@ module Dodopayments
|
|
|
23
23
|
sig { returns(String) }
|
|
24
24
|
attr_accessor :name
|
|
25
25
|
|
|
26
|
+
# Additional metadata associated with the customer
|
|
27
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
28
|
+
attr_reader :metadata
|
|
29
|
+
|
|
30
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
31
|
+
attr_writer :metadata
|
|
32
|
+
|
|
26
33
|
# Phone number of the customer
|
|
27
34
|
sig { returns(T.nilable(String)) }
|
|
28
35
|
attr_accessor :phone_number
|
|
@@ -32,6 +39,7 @@ module Dodopayments
|
|
|
32
39
|
customer_id: String,
|
|
33
40
|
email: String,
|
|
34
41
|
name: String,
|
|
42
|
+
metadata: T::Hash[Symbol, String],
|
|
35
43
|
phone_number: T.nilable(String)
|
|
36
44
|
).returns(T.attached_class)
|
|
37
45
|
end
|
|
@@ -42,6 +50,8 @@ module Dodopayments
|
|
|
42
50
|
email:,
|
|
43
51
|
# Full name of the customer
|
|
44
52
|
name:,
|
|
53
|
+
# Additional metadata associated with the customer
|
|
54
|
+
metadata: nil,
|
|
45
55
|
# Phone number of the customer
|
|
46
56
|
phone_number: nil
|
|
47
57
|
)
|
|
@@ -53,6 +63,7 @@ module Dodopayments
|
|
|
53
63
|
customer_id: String,
|
|
54
64
|
email: String,
|
|
55
65
|
name: String,
|
|
66
|
+
metadata: T::Hash[Symbol, String],
|
|
56
67
|
phone_number: T.nilable(String)
|
|
57
68
|
}
|
|
58
69
|
)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class CustomerRetrievePaymentMethodsParams < 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::CustomerRetrievePaymentMethodsParams,
|
|
13
|
+
Dodopayments::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig do
|
|
18
|
+
params(request_options: Dodopayments::RequestOptions::OrHash).returns(
|
|
19
|
+
T.attached_class
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
def self.new(request_options: {})
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
sig do
|
|
26
|
+
override.returns({ request_options: Dodopayments::RequestOptions })
|
|
27
|
+
end
|
|
28
|
+
def to_hash
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|