dodopayments 1.68.0 → 1.70.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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/dodopayments/models/checkout_session_request.rb +10 -1
  5. data/lib/dodopayments/models/checkout_session_response.rb +8 -8
  6. data/lib/dodopayments/models/payment_create_params.rb +11 -1
  7. data/lib/dodopayments/models/products/short_link_create_params.rb +35 -0
  8. data/lib/dodopayments/models/products/short_link_create_response.rb +27 -0
  9. data/lib/dodopayments/models/products/short_link_list_params.rb +40 -0
  10. data/lib/dodopayments/models/products/short_link_list_response.rb +43 -0
  11. data/lib/dodopayments/models/subscription_create_params.rb +11 -1
  12. data/lib/dodopayments/resources/checkout_sessions.rb +3 -1
  13. data/lib/dodopayments/resources/payments.rb +3 -1
  14. data/lib/dodopayments/resources/products/short_links.rb +73 -0
  15. data/lib/dodopayments/resources/products.rb +4 -0
  16. data/lib/dodopayments/resources/subscriptions.rb +3 -1
  17. data/lib/dodopayments/version.rb +1 -1
  18. data/lib/dodopayments.rb +5 -0
  19. data/rbi/dodopayments/models/checkout_session_request.rbi +10 -0
  20. data/rbi/dodopayments/models/checkout_session_response.rbi +13 -9
  21. data/rbi/dodopayments/models/payment_create_params.rbi +12 -0
  22. data/rbi/dodopayments/models/products/short_link_create_params.rbi +56 -0
  23. data/rbi/dodopayments/models/products/short_link_create_response.rbi +40 -0
  24. data/rbi/dodopayments/models/products/short_link_list_params.rbi +73 -0
  25. data/rbi/dodopayments/models/products/short_link_list_response.rbi +66 -0
  26. data/rbi/dodopayments/models/subscription_create_params.rbi +12 -0
  27. data/rbi/dodopayments/resources/checkout_sessions.rbi +4 -0
  28. data/rbi/dodopayments/resources/payments.rbi +5 -0
  29. data/rbi/dodopayments/resources/products/short_links.rbi +59 -0
  30. data/rbi/dodopayments/resources/products.rbi +3 -0
  31. data/rbi/dodopayments/resources/subscriptions.rbi +5 -0
  32. data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
  33. data/sig/dodopayments/models/checkout_session_response.rbs +5 -5
  34. data/sig/dodopayments/models/payment_create_params.rbs +5 -0
  35. data/sig/dodopayments/models/products/short_link_create_params.rbs +30 -0
  36. data/sig/dodopayments/models/products/short_link_create_response.rbs +17 -0
  37. data/sig/dodopayments/models/products/short_link_list_params.rbs +40 -0
  38. data/sig/dodopayments/models/products/short_link_list_response.rbs +37 -0
  39. data/sig/dodopayments/models/subscription_create_params.rbs +5 -0
  40. data/sig/dodopayments/resources/checkout_sessions.rbs +1 -0
  41. data/sig/dodopayments/resources/payments.rbs +1 -0
  42. data/sig/dodopayments/resources/products/short_links.rbs +23 -0
  43. data/sig/dodopayments/resources/products.rbs +2 -0
  44. data/sig/dodopayments/resources/subscriptions.rbs +1 -0
  45. metadata +17 -2
@@ -0,0 +1,56 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ class ShortLinkCreateParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Dodopayments::Products::ShortLinkCreateParams,
14
+ Dodopayments::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Slug for the short link.
19
+ sig { returns(String) }
20
+ attr_accessor :slug
21
+
22
+ # Static Checkout URL parameters to apply to the resulting short URL.
23
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
24
+ attr_accessor :static_checkout_params
25
+
26
+ sig do
27
+ params(
28
+ slug: String,
29
+ static_checkout_params: T.nilable(T::Hash[Symbol, String]),
30
+ request_options: Dodopayments::RequestOptions::OrHash
31
+ ).returns(T.attached_class)
32
+ end
33
+ def self.new(
34
+ # Slug for the short link.
35
+ slug:,
36
+ # Static Checkout URL parameters to apply to the resulting short URL.
37
+ static_checkout_params: nil,
38
+ request_options: {}
39
+ )
40
+ end
41
+
42
+ sig do
43
+ override.returns(
44
+ {
45
+ slug: String,
46
+ static_checkout_params: T.nilable(T::Hash[Symbol, String]),
47
+ request_options: Dodopayments::RequestOptions
48
+ }
49
+ )
50
+ end
51
+ def to_hash
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,40 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ class ShortLinkCreateResponse < Dodopayments::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Dodopayments::Models::Products::ShortLinkCreateResponse,
11
+ Dodopayments::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Full URL.
16
+ sig { returns(String) }
17
+ attr_accessor :full_url
18
+
19
+ # Short URL.
20
+ sig { returns(String) }
21
+ attr_accessor :short_url
22
+
23
+ sig do
24
+ params(full_url: String, short_url: String).returns(T.attached_class)
25
+ end
26
+ def self.new(
27
+ # Full URL.
28
+ full_url:,
29
+ # Short URL.
30
+ short_url:
31
+ )
32
+ end
33
+
34
+ sig { override.returns({ full_url: String, short_url: String }) }
35
+ def to_hash
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,73 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ class ShortLinkListParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Dodopayments::Products::ShortLinkListParams,
14
+ Dodopayments::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Page number default is 0
19
+ sig { returns(T.nilable(Integer)) }
20
+ attr_reader :page_number
21
+
22
+ sig { params(page_number: Integer).void }
23
+ attr_writer :page_number
24
+
25
+ # Page size default is 10 max is 100
26
+ sig { returns(T.nilable(Integer)) }
27
+ attr_reader :page_size
28
+
29
+ sig { params(page_size: Integer).void }
30
+ attr_writer :page_size
31
+
32
+ # Filter by product ID
33
+ sig { returns(T.nilable(String)) }
34
+ attr_reader :product_id
35
+
36
+ sig { params(product_id: String).void }
37
+ attr_writer :product_id
38
+
39
+ sig do
40
+ params(
41
+ page_number: Integer,
42
+ page_size: Integer,
43
+ product_id: String,
44
+ request_options: Dodopayments::RequestOptions::OrHash
45
+ ).returns(T.attached_class)
46
+ end
47
+ def self.new(
48
+ # Page number default is 0
49
+ page_number: nil,
50
+ # Page size default is 10 max is 100
51
+ page_size: nil,
52
+ # Filter by product ID
53
+ product_id: nil,
54
+ request_options: {}
55
+ )
56
+ end
57
+
58
+ sig do
59
+ override.returns(
60
+ {
61
+ page_number: Integer,
62
+ page_size: Integer,
63
+ product_id: String,
64
+ request_options: Dodopayments::RequestOptions
65
+ }
66
+ )
67
+ end
68
+ def to_hash
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,66 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ class ShortLinkListResponse < Dodopayments::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Dodopayments::Models::Products::ShortLinkListResponse,
11
+ Dodopayments::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # When the short url was created
16
+ sig { returns(Time) }
17
+ attr_accessor :created_at
18
+
19
+ # Full URL the short url redirects to
20
+ sig { returns(String) }
21
+ attr_accessor :full_url
22
+
23
+ # Product ID associated with the short link
24
+ sig { returns(String) }
25
+ attr_accessor :product_id
26
+
27
+ # Short URL
28
+ sig { returns(String) }
29
+ attr_accessor :short_url
30
+
31
+ sig do
32
+ params(
33
+ created_at: Time,
34
+ full_url: String,
35
+ product_id: String,
36
+ short_url: String
37
+ ).returns(T.attached_class)
38
+ end
39
+ def self.new(
40
+ # When the short url was created
41
+ created_at:,
42
+ # Full URL the short url redirects to
43
+ full_url:,
44
+ # Product ID associated with the short link
45
+ product_id:,
46
+ # Short URL
47
+ short_url:
48
+ )
49
+ end
50
+
51
+ sig do
52
+ override.returns(
53
+ {
54
+ created_at: Time,
55
+ full_url: String,
56
+ product_id: String,
57
+ short_url: String
58
+ }
59
+ )
60
+ end
61
+ def to_hash
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -91,6 +91,12 @@ module Dodopayments
91
91
  sig { returns(T.nilable(T::Boolean)) }
92
92
  attr_accessor :payment_link
93
93
 
94
+ # Optional payment method ID to use for this subscription. If provided,
95
+ # customer_id must also be provided (via AttachExistingCustomer). The payment
96
+ # method will be validated for eligibility with the subscription's currency.
97
+ sig { returns(T.nilable(String)) }
98
+ attr_accessor :payment_method_id
99
+
94
100
  # If true, redirects the customer immediately after payment completion False by
95
101
  # default
96
102
  sig { returns(T.nilable(T::Boolean)) }
@@ -145,6 +151,7 @@ module Dodopayments
145
151
  one_time_product_cart:
146
152
  T.nilable(T::Array[Dodopayments::OneTimeProductCartItem::OrHash]),
147
153
  payment_link: T.nilable(T::Boolean),
154
+ payment_method_id: T.nilable(String),
148
155
  redirect_immediately: T::Boolean,
149
156
  return_url: T.nilable(String),
150
157
  short_link: T.nilable(T::Boolean),
@@ -187,6 +194,10 @@ module Dodopayments
187
194
  one_time_product_cart: nil,
188
195
  # If true, generates a payment link. Defaults to false if not specified.
189
196
  payment_link: nil,
197
+ # Optional payment method ID to use for this subscription. If provided,
198
+ # customer_id must also be provided (via AttachExistingCustomer). The payment
199
+ # method will be validated for eligibility with the subscription's currency.
200
+ payment_method_id: nil,
190
201
  # If true, redirects the customer immediately after payment completion False by
191
202
  # default
192
203
  redirect_immediately: nil,
@@ -228,6 +239,7 @@ module Dodopayments
228
239
  one_time_product_cart:
229
240
  T.nilable(T::Array[Dodopayments::OneTimeProductCartItem]),
230
241
  payment_link: T.nilable(T::Boolean),
242
+ payment_method_id: T.nilable(String),
231
243
  redirect_immediately: T::Boolean,
232
244
  return_url: T.nilable(String),
233
245
  short_link: T.nilable(T::Boolean),
@@ -30,6 +30,7 @@ module Dodopayments
30
30
  force_3ds: T.nilable(T::Boolean),
31
31
  metadata: T.nilable(T::Hash[Symbol, String]),
32
32
  minimal_address: T::Boolean,
33
+ payment_method_id: T.nilable(String),
33
34
  return_url: T.nilable(String),
34
35
  short_link: T::Boolean,
35
36
  show_saved_payment_methods: T::Boolean,
@@ -70,6 +71,9 @@ module Dodopayments
70
71
  # If true, only zipcode is required when confirm is true; other address fields
71
72
  # remain optional
72
73
  minimal_address: nil,
74
+ # Optional payment method ID to use for this checkout session. Only allowed when
75
+ # `confirm` is true. If provided, existing customer id must also be provided.
76
+ payment_method_id: nil,
73
77
  # The url to redirect after payment failure or success.
74
78
  return_url: nil,
75
79
  # If true, returns a shortened checkout URL. Defaults to false if not specified.
@@ -19,6 +19,7 @@ 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
+ payment_method_id: T.nilable(String),
22
23
  redirect_immediately: T::Boolean,
23
24
  return_url: T.nilable(String),
24
25
  short_link: T.nilable(T::Boolean),
@@ -53,6 +54,10 @@ module Dodopayments
53
54
  metadata: nil,
54
55
  # Whether to generate a payment link. Defaults to false if not specified.
55
56
  payment_link: nil,
57
+ # Optional payment method ID to use for this payment. If provided, customer_id
58
+ # must also be provided. The payment method will be validated for eligibility with
59
+ # the payment's currency.
60
+ payment_method_id: nil,
56
61
  # If true, redirects the customer immediately after payment completion False by
57
62
  # default
58
63
  redirect_immediately: nil,
@@ -0,0 +1,59 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Resources
5
+ class Products
6
+ class ShortLinks
7
+ # Gives a Short Checkout URL with custom slug for a product. Uses a Static
8
+ # Checkout URL under the hood.
9
+ sig do
10
+ params(
11
+ id: String,
12
+ slug: String,
13
+ static_checkout_params: T.nilable(T::Hash[Symbol, String]),
14
+ request_options: Dodopayments::RequestOptions::OrHash
15
+ ).returns(Dodopayments::Models::Products::ShortLinkCreateResponse)
16
+ end
17
+ def create(
18
+ # Product Id
19
+ id,
20
+ # Slug for the short link.
21
+ slug:,
22
+ # Static Checkout URL parameters to apply to the resulting short URL.
23
+ static_checkout_params: nil,
24
+ request_options: {}
25
+ )
26
+ end
27
+
28
+ # Lists all short links created by the business.
29
+ sig do
30
+ params(
31
+ page_number: Integer,
32
+ page_size: Integer,
33
+ product_id: String,
34
+ request_options: Dodopayments::RequestOptions::OrHash
35
+ ).returns(
36
+ Dodopayments::Internal::DefaultPageNumberPagination[
37
+ Dodopayments::Models::Products::ShortLinkListResponse
38
+ ]
39
+ )
40
+ end
41
+ def list(
42
+ # Page number default is 0
43
+ page_number: nil,
44
+ # Page size default is 10 max is 100
45
+ page_size: nil,
46
+ # Filter by product ID
47
+ product_id: nil,
48
+ request_options: {}
49
+ )
50
+ end
51
+
52
+ # @api private
53
+ sig { params(client: Dodopayments::Client).returns(T.attached_class) }
54
+ def self.new(client:)
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -6,6 +6,9 @@ module Dodopayments
6
6
  sig { returns(Dodopayments::Resources::Products::Images) }
7
7
  attr_reader :images
8
8
 
9
+ sig { returns(Dodopayments::Resources::Products::ShortLinks) }
10
+ attr_reader :short_links
11
+
9
12
  sig do
10
13
  params(
11
14
  name: String,
@@ -24,6 +24,7 @@ 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
+ payment_method_id: T.nilable(String),
27
28
  redirect_immediately: T::Boolean,
28
29
  return_url: T.nilable(String),
29
30
  short_link: T.nilable(T::Boolean),
@@ -66,6 +67,10 @@ module Dodopayments
66
67
  one_time_product_cart: nil,
67
68
  # If true, generates a payment link. Defaults to false if not specified.
68
69
  payment_link: nil,
70
+ # Optional payment method ID to use for this subscription. If provided,
71
+ # customer_id must also be provided (via AttachExistingCustomer). The payment
72
+ # method will be validated for eligibility with the subscription's currency.
73
+ payment_method_id: nil,
69
74
  # If true, redirects the customer immediately after payment completion False by
70
75
  # default
71
76
  redirect_immediately: nil,
@@ -14,6 +14,7 @@ module Dodopayments
14
14
  :force_3ds => bool?,
15
15
  metadata: ::Hash[Symbol, String]?,
16
16
  minimal_address: bool,
17
+ payment_method_id: String?,
17
18
  return_url: String?,
18
19
  short_link: bool,
19
20
  show_saved_payment_methods: bool,
@@ -57,6 +58,8 @@ module Dodopayments
57
58
 
58
59
  def minimal_address=: (bool) -> bool
59
60
 
61
+ attr_accessor payment_method_id: String?
62
+
60
63
  attr_accessor return_url: String?
61
64
 
62
65
  attr_reader short_link: bool?
@@ -82,6 +85,7 @@ module Dodopayments
82
85
  ?force_3ds: bool?,
83
86
  ?metadata: ::Hash[Symbol, String]?,
84
87
  ?minimal_address: bool,
88
+ ?payment_method_id: String?,
85
89
  ?return_url: String?,
86
90
  ?short_link: bool,
87
91
  ?show_saved_payment_methods: bool,
@@ -101,6 +105,7 @@ module Dodopayments
101
105
  :force_3ds => bool?,
102
106
  metadata: ::Hash[Symbol, String]?,
103
107
  minimal_address: bool,
108
+ payment_method_id: String?,
104
109
  return_url: String?,
105
110
  short_link: bool,
106
111
  show_saved_payment_methods: bool,
@@ -1,16 +1,16 @@
1
1
  module Dodopayments
2
2
  module Models
3
3
  type checkout_session_response =
4
- { checkout_url: String, session_id: String }
4
+ { session_id: String, checkout_url: String? }
5
5
 
6
6
  class CheckoutSessionResponse < Dodopayments::Internal::Type::BaseModel
7
- attr_accessor checkout_url: String
8
-
9
7
  attr_accessor session_id: String
10
8
 
11
- def initialize: (checkout_url: String, session_id: String) -> void
9
+ attr_accessor checkout_url: String?
10
+
11
+ def initialize: (session_id: String, ?checkout_url: String?) -> void
12
12
 
13
- def to_hash: -> { checkout_url: String, session_id: String }
13
+ def to_hash: -> { session_id: String, checkout_url: String? }
14
14
  end
15
15
  end
16
16
  end
@@ -11,6 +11,7 @@ module Dodopayments
11
11
  :force_3ds => bool?,
12
12
  metadata: ::Hash[Symbol, String],
13
13
  payment_link: bool?,
14
+ payment_method_id: String?,
14
15
  redirect_immediately: bool,
15
16
  return_url: String?,
16
17
  short_link: bool?,
@@ -43,6 +44,8 @@ module Dodopayments
43
44
 
44
45
  attr_accessor payment_link: bool?
45
46
 
47
+ attr_accessor payment_method_id: String?
48
+
46
49
  attr_reader redirect_immediately: bool?
47
50
 
48
51
  def redirect_immediately=: (bool) -> bool
@@ -67,6 +70,7 @@ module Dodopayments
67
70
  ?force_3ds: bool?,
68
71
  ?metadata: ::Hash[Symbol, String],
69
72
  ?payment_link: bool?,
73
+ ?payment_method_id: String?,
70
74
  ?redirect_immediately: bool,
71
75
  ?return_url: String?,
72
76
  ?short_link: bool?,
@@ -85,6 +89,7 @@ module Dodopayments
85
89
  :force_3ds => bool?,
86
90
  metadata: ::Hash[Symbol, String],
87
91
  payment_link: bool?,
92
+ payment_method_id: String?,
88
93
  redirect_immediately: bool,
89
94
  return_url: String?,
90
95
  short_link: bool?,
@@ -0,0 +1,30 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type short_link_create_params =
5
+ { slug: String, static_checkout_params: ::Hash[Symbol, String]? }
6
+ & Dodopayments::Internal::Type::request_parameters
7
+
8
+ class ShortLinkCreateParams < Dodopayments::Internal::Type::BaseModel
9
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
10
+ include Dodopayments::Internal::Type::RequestParameters
11
+
12
+ attr_accessor slug: String
13
+
14
+ attr_accessor static_checkout_params: ::Hash[Symbol, String]?
15
+
16
+ def initialize: (
17
+ slug: String,
18
+ ?static_checkout_params: ::Hash[Symbol, String]?,
19
+ ?request_options: Dodopayments::request_opts
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ slug: String,
24
+ static_checkout_params: ::Hash[Symbol, String]?,
25
+ request_options: Dodopayments::RequestOptions
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,17 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type short_link_create_response = { full_url: String, short_url: String }
5
+
6
+ class ShortLinkCreateResponse < Dodopayments::Internal::Type::BaseModel
7
+ attr_accessor full_url: String
8
+
9
+ attr_accessor short_url: String
10
+
11
+ def initialize: (full_url: String, short_url: String) -> void
12
+
13
+ def to_hash: -> { full_url: String, short_url: String }
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,40 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type short_link_list_params =
5
+ { page_number: Integer, page_size: Integer, product_id: String }
6
+ & Dodopayments::Internal::Type::request_parameters
7
+
8
+ class ShortLinkListParams < Dodopayments::Internal::Type::BaseModel
9
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
10
+ include Dodopayments::Internal::Type::RequestParameters
11
+
12
+ attr_reader page_number: Integer?
13
+
14
+ def page_number=: (Integer) -> Integer
15
+
16
+ attr_reader page_size: Integer?
17
+
18
+ def page_size=: (Integer) -> Integer
19
+
20
+ attr_reader product_id: String?
21
+
22
+ def product_id=: (String) -> String
23
+
24
+ def initialize: (
25
+ ?page_number: Integer,
26
+ ?page_size: Integer,
27
+ ?product_id: String,
28
+ ?request_options: Dodopayments::request_opts
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ page_number: Integer,
33
+ page_size: Integer,
34
+ product_id: String,
35
+ request_options: Dodopayments::RequestOptions
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,37 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type short_link_list_response =
5
+ {
6
+ created_at: Time,
7
+ full_url: String,
8
+ product_id: String,
9
+ short_url: String
10
+ }
11
+
12
+ class ShortLinkListResponse < Dodopayments::Internal::Type::BaseModel
13
+ attr_accessor created_at: Time
14
+
15
+ attr_accessor full_url: String
16
+
17
+ attr_accessor product_id: String
18
+
19
+ attr_accessor short_url: String
20
+
21
+ def initialize: (
22
+ created_at: Time,
23
+ full_url: String,
24
+ product_id: String,
25
+ short_url: String
26
+ ) -> void
27
+
28
+ def to_hash: -> {
29
+ created_at: Time,
30
+ full_url: String,
31
+ product_id: String,
32
+ short_url: String
33
+ }
34
+ end
35
+ end
36
+ end
37
+ end
@@ -15,6 +15,7 @@ module Dodopayments
15
15
  on_demand: Dodopayments::OnDemandSubscription?,
16
16
  one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
17
17
  payment_link: bool?,
18
+ payment_method_id: String?,
18
19
  redirect_immediately: bool,
19
20
  return_url: String?,
20
21
  short_link: bool?,
@@ -56,6 +57,8 @@ module Dodopayments
56
57
 
57
58
  attr_accessor payment_link: bool?
58
59
 
60
+ attr_accessor payment_method_id: String?
61
+
59
62
  attr_reader redirect_immediately: bool?
60
63
 
61
64
  def redirect_immediately=: (bool) -> bool
@@ -86,6 +89,7 @@ module Dodopayments
86
89
  ?on_demand: Dodopayments::OnDemandSubscription?,
87
90
  ?one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
88
91
  ?payment_link: bool?,
92
+ ?payment_method_id: String?,
89
93
  ?redirect_immediately: bool,
90
94
  ?return_url: String?,
91
95
  ?short_link: bool?,
@@ -109,6 +113,7 @@ module Dodopayments
109
113
  on_demand: Dodopayments::OnDemandSubscription?,
110
114
  one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
111
115
  payment_link: bool?,
116
+ payment_method_id: String?,
112
117
  redirect_immediately: bool,
113
118
  return_url: String?,
114
119
  short_link: bool?,
@@ -14,6 +14,7 @@ module Dodopayments
14
14
  ?force_3ds: bool?,
15
15
  ?metadata: ::Hash[Symbol, String]?,
16
16
  ?minimal_address: bool,
17
+ ?payment_method_id: String?,
17
18
  ?return_url: String?,
18
19
  ?short_link: bool,
19
20
  ?show_saved_payment_methods: bool,
@@ -11,6 +11,7 @@ module Dodopayments
11
11
  ?force_3ds: bool?,
12
12
  ?metadata: ::Hash[Symbol, String],
13
13
  ?payment_link: bool?,
14
+ ?payment_method_id: String?,
14
15
  ?redirect_immediately: bool,
15
16
  ?return_url: String?,
16
17
  ?short_link: bool?,