dodopayments 1.53.4 → 1.54.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 +40 -0
  3. data/README.md +1 -1
  4. data/lib/dodopayments/file_part.rb +10 -7
  5. data/lib/dodopayments/internal/transport/pooled_net_requester.rb +7 -10
  6. data/lib/dodopayments/internal/type/file_input.rb +7 -4
  7. data/lib/dodopayments/internal/util.rb +7 -6
  8. data/lib/dodopayments/models/checkout_session_request.rb +18 -2
  9. data/lib/dodopayments/models/customer_limited_details.rb +9 -1
  10. data/lib/dodopayments/models/payment_create_params.rb +9 -1
  11. data/lib/dodopayments/models/payout_list_params.rb +17 -1
  12. data/lib/dodopayments/models/payout_list_response.rb +6 -0
  13. data/lib/dodopayments/models/subscription.rb +9 -1
  14. data/lib/dodopayments/models/subscription_create_params.rb +9 -1
  15. data/lib/dodopayments/models/subscription_list_response.rb +9 -1
  16. data/lib/dodopayments/resources/checkout_sessions.rb +3 -1
  17. data/lib/dodopayments/resources/payments.rb +3 -1
  18. data/lib/dodopayments/resources/payouts.rb +5 -1
  19. data/lib/dodopayments/resources/subscriptions.rb +3 -1
  20. data/lib/dodopayments/version.rb +1 -1
  21. data/rbi/dodopayments/file_part.rbi +1 -1
  22. data/rbi/dodopayments/models/checkout_session_request.rbi +16 -0
  23. data/rbi/dodopayments/models/customer_limited_details.rbi +21 -5
  24. data/rbi/dodopayments/models/payment_create_params.rbi +8 -0
  25. data/rbi/dodopayments/models/payout_list_params.rbi +22 -0
  26. data/rbi/dodopayments/models/subscription.rbi +11 -3
  27. data/rbi/dodopayments/models/subscription_create_params.rbi +8 -0
  28. data/rbi/dodopayments/models/subscription_list_response.rbi +11 -3
  29. data/rbi/dodopayments/resources/checkout_sessions.rbi +3 -0
  30. data/rbi/dodopayments/resources/payments.rbi +3 -0
  31. data/rbi/dodopayments/resources/payouts.rbi +6 -0
  32. data/rbi/dodopayments/resources/subscriptions.rbi +3 -0
  33. data/sig/dodopayments/file_part.rbs +1 -1
  34. data/sig/dodopayments/models/checkout_session_request.rbs +10 -0
  35. data/sig/dodopayments/models/customer_limited_details.rbs +20 -3
  36. data/sig/dodopayments/models/payment_create_params.rbs +5 -0
  37. data/sig/dodopayments/models/payout_list_params.rbs +18 -1
  38. data/sig/dodopayments/models/subscription.rbs +8 -3
  39. data/sig/dodopayments/models/subscription_create_params.rbs +5 -0
  40. data/sig/dodopayments/models/subscription_list_response.rbs +8 -3
  41. data/sig/dodopayments/resources/checkout_sessions.rbs +1 -0
  42. data/sig/dodopayments/resources/payments.rbs +1 -0
  43. data/sig/dodopayments/resources/payouts.rbs +2 -0
  44. data/sig/dodopayments/resources/subscriptions.rbs +1 -0
  45. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5bbabecefa340663efbe0095949582e8248939ee5a74d41cb7a15d3f14daf2f3
4
- data.tar.gz: 9bd2ba1cb5e385288c97a5a98067a6323c616334ed6f3fedbaeb4de6ce2b6c22
3
+ metadata.gz: 632ee24b75862fb42d76c1f2eb5d8a5acf117210188d9ce7f95a0a02b7c55424
4
+ data.tar.gz: 39ff2d906db19493491c65906463eb8c181ad0c09cc07740fbd531e4c81d7010
5
5
  SHA512:
6
- metadata.gz: 4da1e34189f02858a1581291f218c6d89f5d8d043b0f72dfc15405d85838c78d86fa67595dd5e7f35e281fde5346eb666e43885e20d9a676b5a14f76e9045650
7
- data.tar.gz: 3ff7123a5765039c24a5cd57144757d9e4f52d7b0a39c7b7cb7dc31f095934d103756d5a1974e5b856bc14e5fd48287614b40edafee04c14b89cc536cf057c8c
6
+ metadata.gz: 699acbcea634f1bb3cc3a132ebacc51cb1b9e8fe415df6d13f12ffd35f32c9a5d181d8dcf3eeebc78de33661d61bd3f461d3c49d96b4d006f831b5c50e7b22d5
7
+ data.tar.gz: 3345a6f54e2618138d74713806b28cd215d0187ae2fbce4e78e0f32b82a6ed679d7c44c57218b90ccea338dcf5149b2e966a3861de65450b0054a14e307bbaff
data/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.54.0 (2025-10-16)
4
+
5
+ Full Changelog: [v1.53.5...v1.54.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.53.5...v1.54.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** updated openapi spec to v1.55.0 ([4bb71ad](https://github.com/dodopayments/dodopayments-ruby/commit/4bb71ad9b3cebdec22722b969684c4dd266035c9))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * absolutely qualified uris should always override the default ([0a9a011](https://github.com/dodopayments/dodopayments-ruby/commit/0a9a011c532bfba6f37d29ebab9fb08589941c6b))
15
+ * should not reuse buffers for `IO.copy_stream` interop ([780663d](https://github.com/dodopayments/dodopayments-ruby/commit/780663d4dad0150f25766d54af480058f31bd57e))
16
+
17
+
18
+ ### Chores
19
+
20
+ * ignore linter error for tests having large collections ([28e86ee](https://github.com/dodopayments/dodopayments-ruby/commit/28e86ee01088492878c56d50a3a57d8bf9001aa3))
21
+
22
+ ## 1.53.5 (2025-10-01)
23
+
24
+ Full Changelog: [v1.53.4...v1.53.5](https://github.com/dodopayments/dodopayments-ruby/compare/v1.53.4...v1.53.5)
25
+
26
+ ### Bug Fixes
27
+
28
+ * always send `filename=...` for multipart requests where a file is expected ([2521920](https://github.com/dodopayments/dodopayments-ruby/commit/25219203e67ac52d02c0464ddbe2a1edfa584b55))
29
+ * coroutine leaks from connection pool ([105ced3](https://github.com/dodopayments/dodopayments-ruby/commit/105ced3287dc953a6bb13cc6442ab74f5b72d852))
30
+ * shorten multipart boundary sep to less than RFC specificed max length ([66ffab7](https://github.com/dodopayments/dodopayments-ruby/commit/66ffab71b6a77267df14a90fd5bde12d22ad4bee))
31
+
32
+
33
+ ### Performance Improvements
34
+
35
+ * faster code formatting ([5e92807](https://github.com/dodopayments/dodopayments-ruby/commit/5e9280755725f1420ca9e0d87ca7fa3965db4331))
36
+
37
+
38
+ ### Chores
39
+
40
+ * allow fast-format to use bsd sed as well ([5addb87](https://github.com/dodopayments/dodopayments-ruby/commit/5addb871c35167235fd876217b802fcb21897ae2))
41
+ * **internal:** codegen related update ([66cddcb](https://github.com/dodopayments/dodopayments-ruby/commit/66cddcbfa5be3de026313de045736ec56ecb4c27))
42
+
3
43
  ## 1.53.4 (2025-09-24)
4
44
 
5
45
  Full Changelog: [v1.53.3...v1.53.4](https://github.com/dodopayments/dodopayments-ruby/compare/v1.53.3...v1.53.4)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "dodopayments", "~> 1.53.4"
20
+ gem "dodopayments", "~> 1.54.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -38,18 +38,21 @@ module Dodopayments
38
38
  def to_yaml(*a) = read.to_yaml(*a)
39
39
 
40
40
  # @param content [Pathname, StringIO, IO, String]
41
- # @param filename [String, nil]
41
+ # @param filename [Pathname, String, nil]
42
42
  # @param content_type [String, nil]
43
43
  def initialize(content, filename: nil, content_type: nil)
44
- @content = content
44
+ @content_type = content_type
45
45
  @filename =
46
- case content
47
- in Pathname
48
- filename.nil? ? content.basename.to_path : ::File.basename(filename)
46
+ case [filename, (@content = content)]
47
+ in [String | Pathname, _]
48
+ ::File.basename(filename)
49
+ in [nil, Pathname]
50
+ content.basename.to_path
51
+ in [nil, IO]
52
+ content.to_path
49
53
  else
50
- filename.nil? ? nil : ::File.basename(filename)
54
+ filename
51
55
  end
52
- @content_type = content_type
53
56
  end
54
57
  end
55
58
  end
@@ -134,9 +134,9 @@ module Dodopayments
134
134
 
135
135
  # rubocop:disable Metrics/BlockLength
136
136
  enum = Enumerator.new do |y|
137
- with_pool(url, deadline: deadline) do |conn|
138
- next if finished
137
+ next if finished
139
138
 
139
+ with_pool(url, deadline: deadline) do |conn|
140
140
  req, closing = self.class.build_request(request) do
141
141
  self.class.calibrate_socket_timeout(conn, deadline)
142
142
  end
@@ -149,7 +149,7 @@ module Dodopayments
149
149
 
150
150
  self.class.calibrate_socket_timeout(conn, deadline)
151
151
  conn.request(req) do |rsp|
152
- y << [conn, req, rsp]
152
+ y << [req, rsp]
153
153
  break if finished
154
154
 
155
155
  rsp.read_body do |bytes|
@@ -160,6 +160,8 @@ module Dodopayments
160
160
  end
161
161
  eof = true
162
162
  end
163
+ ensure
164
+ conn.finish if !eof && conn&.started?
163
165
  end
164
166
  rescue Timeout::Error
165
167
  raise Dodopayments::Errors::APITimeoutError.new(url: url, request: req)
@@ -168,16 +170,11 @@ module Dodopayments
168
170
  end
169
171
  # rubocop:enable Metrics/BlockLength
170
172
 
171
- conn, _, response = enum.next
173
+ _, response = enum.next
172
174
  body = Dodopayments::Internal::Util.fused_enum(enum, external: true) do
173
175
  finished = true
174
- tap do
175
- enum.next
176
- rescue StopIteration
177
- nil
178
- end
176
+ loop { enum.next }
179
177
  ensure
180
- conn.finish if !eof && conn&.started?
181
178
  closing&.call
182
179
  end
183
180
  [Integer(response.code), response, body]
@@ -82,17 +82,20 @@ module Dodopayments
82
82
  #
83
83
  # @return [Pathname, StringIO, IO, String, Object]
84
84
  def dump(value, state:)
85
- # rubocop:disable Lint/DuplicateBranch
86
85
  case value
86
+ in StringIO | String
87
+ # https://datatracker.ietf.org/doc/html/rfc7578#section-4.2
88
+ # while not required, a filename is recommended, and in practice many servers do expect this
89
+ Dodopayments::FilePart.new(value, filename: "upload")
87
90
  in IO
88
91
  state[:can_retry] = false
92
+ value.to_path.nil? ? Dodopayments::FilePart.new(value, filename: "upload") : value
89
93
  in Dodopayments::FilePart if value.content.is_a?(IO)
90
94
  state[:can_retry] = false
95
+ value
91
96
  else
97
+ value
92
98
  end
93
- # rubocop:enable Lint/DuplicateBranch
94
-
95
- value
96
99
  end
97
100
 
98
101
  # @api private
@@ -346,8 +346,9 @@ module Dodopayments
346
346
  base_path, base_query = lhs.fetch_values(:path, :query)
347
347
  slashed = base_path.end_with?("/") ? base_path : "#{base_path}/"
348
348
 
349
- parsed_path, parsed_query = parse_uri(rhs.fetch(:path)).fetch_values(:path, :query)
350
- override = URI::Generic.build(**rhs.slice(:scheme, :host, :port), path: parsed_path)
349
+ merged = {**parse_uri(rhs.fetch(:path)), **rhs.except(:path, :query)}
350
+ parsed_path, parsed_query = merged.fetch_values(:path, :query)
351
+ override = URI::Generic.build(**merged.slice(:scheme, :host, :port), path: parsed_path)
351
352
 
352
353
  joined = URI.join(URI::Generic.build(lhs.except(:path, :query)), slashed, override)
353
354
  query = deep_merge(
@@ -473,10 +474,9 @@ module Dodopayments
473
474
  # @return [Enumerable<String>]
474
475
  def writable_enum(&blk)
475
476
  Enumerator.new do |y|
476
- buf = String.new
477
477
  y.define_singleton_method(:write) do
478
- self << buf.replace(_1)
479
- buf.bytesize
478
+ self << _1.dup
479
+ _1.bytesize
480
480
  end
481
481
 
482
482
  blk.call(y)
@@ -566,7 +566,8 @@ module Dodopayments
566
566
  #
567
567
  # @return [Array(String, Enumerable<String>)]
568
568
  private def encode_multipart_streaming(body)
569
- boundary = SecureRandom.urlsafe_base64(60)
569
+ # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
570
+ boundary = SecureRandom.urlsafe_base64(46)
570
571
 
571
572
  closing = []
572
573
  strio = writable_enum do |y|
@@ -63,6 +63,12 @@ module Dodopayments
63
63
  # @return [Dodopayments::Models::CheckoutSessionRequest::FeatureFlags, nil]
64
64
  optional :feature_flags, -> { Dodopayments::CheckoutSessionRequest::FeatureFlags }
65
65
 
66
+ # @!attribute force_3ds
67
+ # Override merchant default 3DS behaviour for this session
68
+ #
69
+ # @return [Boolean, nil]
70
+ optional :force_3ds, Dodopayments::Internal::Type::Boolean, nil?: true
71
+
66
72
  # @!attribute metadata
67
73
  # Additional metadata associated with the payment. Defaults to empty if not
68
74
  # provided.
@@ -87,7 +93,7 @@ module Dodopayments
87
93
  # @return [Dodopayments::Models::CheckoutSessionRequest::SubscriptionData, nil]
88
94
  optional :subscription_data, -> { Dodopayments::CheckoutSessionRequest::SubscriptionData }, nil?: true
89
95
 
90
- # @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, metadata: nil, return_url: nil, show_saved_payment_methods: nil, subscription_data: nil)
96
+ # @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, return_url: nil, show_saved_payment_methods: nil, subscription_data: nil)
91
97
  # Some parameter documentations has been truncated, see
92
98
  # {Dodopayments::Models::CheckoutSessionRequest} for more details.
93
99
  #
@@ -109,6 +115,8 @@ module Dodopayments
109
115
  #
110
116
  # @param feature_flags [Dodopayments::Models::CheckoutSessionRequest::FeatureFlags]
111
117
  #
118
+ # @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this session
119
+ #
112
120
  # @param metadata [Hash{Symbol=>String}, nil] Additional metadata associated with the payment. Defaults to empty if not provid
113
121
  #
114
122
  # @param return_url [String, nil] The url to redirect after payment failure or success.
@@ -208,6 +216,12 @@ module Dodopayments
208
216
 
209
217
  # @see Dodopayments::Models::CheckoutSessionRequest#customization
210
218
  class Customization < Dodopayments::Internal::Type::BaseModel
219
+ # @!attribute force_language
220
+ # Force the checkout interface to render in a specific language (e.g. `en`, `es`)
221
+ #
222
+ # @return [String, nil]
223
+ optional :force_language, String, nil?: true
224
+
211
225
  # @!attribute show_on_demand_tag
212
226
  # Show on demand tag
213
227
  #
@@ -232,12 +246,14 @@ module Dodopayments
232
246
  # @return [Symbol, Dodopayments::Models::CheckoutSessionRequest::Customization::Theme, nil]
233
247
  optional :theme, enum: -> { Dodopayments::CheckoutSessionRequest::Customization::Theme }
234
248
 
235
- # @!method initialize(show_on_demand_tag: nil, show_order_details: nil, theme: nil)
249
+ # @!method initialize(force_language: nil, show_on_demand_tag: nil, show_order_details: nil, theme: nil)
236
250
  # Some parameter documentations has been truncated, see
237
251
  # {Dodopayments::Models::CheckoutSessionRequest::Customization} for more details.
238
252
  #
239
253
  # Customization for the checkout session page
240
254
  #
255
+ # @param force_language [String, nil] Force the checkout interface to render in a specific language (e.g. `en`, `es`)
256
+ #
241
257
  # @param show_on_demand_tag [Boolean] Show on demand tag
242
258
  #
243
259
  # @param show_order_details [Boolean] Show order details by default
@@ -21,12 +21,20 @@ module Dodopayments
21
21
  # @return [String]
22
22
  required :name, String
23
23
 
24
- # @!method initialize(customer_id:, email:, name:)
24
+ # @!attribute phone_number
25
+ # Phone number of the customer
26
+ #
27
+ # @return [String, nil]
28
+ optional :phone_number, String, nil?: true
29
+
30
+ # @!method initialize(customer_id:, email:, name:, phone_number: nil)
25
31
  # @param customer_id [String] Unique identifier for the customer
26
32
  #
27
33
  # @param email [String] Email address of the customer
28
34
  #
29
35
  # @param name [String] Full name of the customer
36
+ #
37
+ # @param phone_number [String, nil] Phone number of the customer
30
38
  end
31
39
  end
32
40
  end
@@ -51,6 +51,12 @@ module Dodopayments
51
51
  # @return [String, nil]
52
52
  optional :discount_code, String, nil?: true
53
53
 
54
+ # @!attribute force_3ds
55
+ # Override merchant default 3DS behaviour for this payment
56
+ #
57
+ # @return [Boolean, nil]
58
+ optional :force_3ds, Dodopayments::Internal::Type::Boolean, nil?: true
59
+
54
60
  # @!attribute metadata
55
61
  # Additional metadata associated with the payment. Defaults to empty if not
56
62
  # provided.
@@ -84,7 +90,7 @@ module Dodopayments
84
90
  # @return [String, nil]
85
91
  optional :tax_id, String, nil?: true
86
92
 
87
- # @!method initialize(billing:, customer:, product_cart:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, metadata: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
93
+ # @!method initialize(billing:, customer:, product_cart:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
88
94
  # Some parameter documentations has been truncated, see
89
95
  # {Dodopayments::Models::PaymentCreateParams} for more details.
90
96
  #
@@ -100,6 +106,8 @@ module Dodopayments
100
106
  #
101
107
  # @param discount_code [String, nil] Discount Code to apply to the transaction
102
108
  #
109
+ # @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this payment
110
+ #
103
111
  # @param metadata [Hash{Symbol=>String}] Additional metadata associated with the payment.
104
112
  #
105
113
  # @param payment_link [Boolean, nil] Whether to generate a payment link. Defaults to false if not specified.
@@ -7,6 +7,18 @@ module Dodopayments
7
7
  extend Dodopayments::Internal::Type::RequestParameters::Converter
8
8
  include Dodopayments::Internal::Type::RequestParameters
9
9
 
10
+ # @!attribute created_at_gte
11
+ # Get payouts created after this time (inclusive)
12
+ #
13
+ # @return [Time, nil]
14
+ optional :created_at_gte, Time
15
+
16
+ # @!attribute created_at_lte
17
+ # Get payouts created before this time (inclusive)
18
+ #
19
+ # @return [Time, nil]
20
+ optional :created_at_lte, Time
21
+
10
22
  # @!attribute page_number
11
23
  # Page number default is 0
12
24
  #
@@ -19,7 +31,11 @@ module Dodopayments
19
31
  # @return [Integer, nil]
20
32
  optional :page_size, Integer
21
33
 
22
- # @!method initialize(page_number: nil, page_size: nil, request_options: {})
34
+ # @!method initialize(created_at_gte: nil, created_at_lte: nil, page_number: nil, page_size: nil, request_options: {})
35
+ # @param created_at_gte [Time] Get payouts created after this time (inclusive)
36
+ #
37
+ # @param created_at_lte [Time] Get payouts created before this time (inclusive)
38
+ #
23
39
  # @param page_number [Integer] Page number default is 0
24
40
  #
25
41
  # @param page_size [Integer] Page size default is 10 max is 100
@@ -17,6 +17,8 @@ module Dodopayments
17
17
  required :business_id, String
18
18
 
19
19
  # @!attribute chargebacks
20
+ # @deprecated
21
+ #
20
22
  # The total value of chargebacks associated with the payout.
21
23
  #
22
24
  # @return [Integer]
@@ -53,6 +55,8 @@ module Dodopayments
53
55
  required :payout_id, String
54
56
 
55
57
  # @!attribute refunds
58
+ # @deprecated
59
+ #
56
60
  # The total value of refunds associated with the payout.
57
61
  #
58
62
  # @return [Integer]
@@ -65,6 +69,8 @@ module Dodopayments
65
69
  required :status, enum: -> { Dodopayments::Models::PayoutListResponse::Status }
66
70
 
67
71
  # @!attribute tax
72
+ # @deprecated
73
+ #
68
74
  # The tax applied to the payout.
69
75
  #
70
76
  # @return [Integer]
@@ -162,7 +162,13 @@ module Dodopayments
162
162
  # @return [Time, nil]
163
163
  optional :expires_at, Time, nil?: true
164
164
 
165
- # @!method initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, meters:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, discount_cycles_remaining: nil, discount_id: nil, expires_at: nil)
165
+ # @!attribute tax_id
166
+ # Tax identifier provided for this subscription (if applicable)
167
+ #
168
+ # @return [String, nil]
169
+ optional :tax_id, String, nil?: true
170
+
171
+ # @!method initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, meters:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, discount_cycles_remaining: nil, discount_id: nil, expires_at: nil, tax_id: nil)
166
172
  # Some parameter documentations has been truncated, see
167
173
  # {Dodopayments::Models::Subscription} for more details.
168
174
  #
@@ -219,6 +225,8 @@ module Dodopayments
219
225
  # @param discount_id [String, nil] The discount id if discount is applied
220
226
  #
221
227
  # @param expires_at [Time, nil] Timestamp when the subscription will expire
228
+ #
229
+ # @param tax_id [String, nil] Tax identifier provided for this subscription (if applicable)
222
230
 
223
231
  class Meter < Dodopayments::Internal::Type::BaseModel
224
232
  # @!attribute currency
@@ -63,6 +63,12 @@ module Dodopayments
63
63
  # @return [String, nil]
64
64
  optional :discount_code, String, nil?: true
65
65
 
66
+ # @!attribute force_3ds
67
+ # Override merchant default 3DS behaviour for this subscription
68
+ #
69
+ # @return [Boolean, nil]
70
+ optional :force_3ds, Dodopayments::Internal::Type::Boolean, nil?: true
71
+
66
72
  # @!attribute metadata
67
73
  # Additional metadata for the subscription Defaults to empty if not specified
68
74
  #
@@ -106,7 +112,7 @@ module Dodopayments
106
112
  # @return [Integer, nil]
107
113
  optional :trial_period_days, Integer, nil?: true
108
114
 
109
- # @!method initialize(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, metadata: nil, on_demand: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
115
+ # @!method initialize(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, on_demand: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
110
116
  # Some parameter documentations has been truncated, see
111
117
  # {Dodopayments::Models::SubscriptionCreateParams} for more details.
112
118
  #
@@ -126,6 +132,8 @@ module Dodopayments
126
132
  #
127
133
  # @param discount_code [String, nil] Discount Code to apply to the subscription
128
134
  #
135
+ # @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this subscription
136
+ #
129
137
  # @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
130
138
  #
131
139
  # @param on_demand [Dodopayments::Models::OnDemandSubscription, nil]
@@ -144,7 +144,13 @@ module Dodopayments
144
144
  # @return [String, nil]
145
145
  optional :discount_id, String, nil?: true
146
146
 
147
- # @!method initialize(billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, discount_cycles_remaining: nil, discount_id: nil)
147
+ # @!attribute tax_id
148
+ # Tax identifier provided for this subscription (if applicable)
149
+ #
150
+ # @return [String, nil]
151
+ optional :tax_id, String, nil?: true
152
+
153
+ # @!method initialize(billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, discount_cycles_remaining: nil, discount_id: nil, tax_id: nil)
148
154
  # Some parameter documentations has been truncated, see
149
155
  # {Dodopayments::Models::SubscriptionListResponse} for more details.
150
156
  #
@@ -195,6 +201,8 @@ module Dodopayments
195
201
  # @param discount_cycles_remaining [Integer, nil] Number of remaining discount cycles if discount is applied
196
202
  #
197
203
  # @param discount_id [String, nil] The discount id if discount is applied
204
+ #
205
+ # @param tax_id [String, nil] Tax identifier provided for this subscription (if applicable)
198
206
  end
199
207
  end
200
208
  end
@@ -6,7 +6,7 @@ module Dodopayments
6
6
  # Some parameter documentations has been truncated, see
7
7
  # {Dodopayments::Models::CheckoutSessionCreateParams} for more details.
8
8
  #
9
- # @overload create(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, metadata: nil, return_url: nil, show_saved_payment_methods: nil, subscription_data: nil, request_options: {})
9
+ # @overload create(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, confirm: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, return_url: nil, show_saved_payment_methods: nil, subscription_data: nil, request_options: {})
10
10
  #
11
11
  # @param product_cart [Array<Dodopayments::Models::CheckoutSessionRequest::ProductCart>]
12
12
  #
@@ -26,6 +26,8 @@ module Dodopayments
26
26
  #
27
27
  # @param feature_flags [Dodopayments::Models::CheckoutSessionRequest::FeatureFlags]
28
28
  #
29
+ # @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this session
30
+ #
29
31
  # @param metadata [Hash{Symbol=>String}, nil] Additional metadata associated with the payment. Defaults to empty if not provid
30
32
  #
31
33
  # @param return_url [String, nil] The url to redirect after payment failure or success.
@@ -6,7 +6,7 @@ module Dodopayments
6
6
  # Some parameter documentations has been truncated, see
7
7
  # {Dodopayments::Models::PaymentCreateParams} for more details.
8
8
  #
9
- # @overload create(billing:, customer:, product_cart:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, metadata: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
9
+ # @overload create(billing:, customer:, product_cart:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
10
10
  #
11
11
  # @param billing [Dodopayments::Models::BillingAddress] Billing address details for the payment
12
12
  #
@@ -20,6 +20,8 @@ module Dodopayments
20
20
  #
21
21
  # @param discount_code [String, nil] Discount Code to apply to the transaction
22
22
  #
23
+ # @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this payment
24
+ #
23
25
  # @param metadata [Hash{Symbol=>String}] Additional metadata associated with the payment.
24
26
  #
25
27
  # @param payment_link [Boolean, nil] Whether to generate a payment link. Defaults to false if not specified.
@@ -3,7 +3,11 @@
3
3
  module Dodopayments
4
4
  module Resources
5
5
  class Payouts
6
- # @overload list(page_number: nil, page_size: nil, request_options: {})
6
+ # @overload list(created_at_gte: nil, created_at_lte: nil, page_number: nil, page_size: nil, request_options: {})
7
+ #
8
+ # @param created_at_gte [Time] Get payouts created after this time (inclusive)
9
+ #
10
+ # @param created_at_lte [Time] Get payouts created before this time (inclusive)
7
11
  #
8
12
  # @param page_number [Integer] Page number default is 0
9
13
  #
@@ -6,7 +6,7 @@ module Dodopayments
6
6
  # Some parameter documentations has been truncated, see
7
7
  # {Dodopayments::Models::SubscriptionCreateParams} for more details.
8
8
  #
9
- # @overload create(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, metadata: nil, on_demand: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
9
+ # @overload create(billing:, customer:, product_id:, quantity:, addons: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, force_3ds: nil, metadata: nil, on_demand: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
10
10
  #
11
11
  # @param billing [Dodopayments::Models::BillingAddress] Billing address information for the subscription
12
12
  #
@@ -24,6 +24,8 @@ module Dodopayments
24
24
  #
25
25
  # @param discount_code [String, nil] Discount Code to apply to the subscription
26
26
  #
27
+ # @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this subscription
28
+ #
27
29
  # @param metadata [Hash{Symbol=>String}] Additional metadata for the subscription
28
30
  #
29
31
  # @param on_demand [Dodopayments::Models::OnDemandSubscription, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dodopayments
4
- VERSION = "1.53.4"
4
+ VERSION = "1.54.0"
5
5
  end
@@ -27,7 +27,7 @@ module Dodopayments
27
27
  sig do
28
28
  params(
29
29
  content: T.any(Pathname, StringIO, IO, String),
30
- filename: T.nilable(String),
30
+ filename: T.nilable(T.any(Pathname, String)),
31
31
  content_type: T.nilable(String)
32
32
  ).returns(T.attached_class)
33
33
  end
@@ -98,6 +98,10 @@ module Dodopayments
98
98
  end
99
99
  attr_writer :feature_flags
100
100
 
101
+ # Override merchant default 3DS behaviour for this session
102
+ sig { returns(T.nilable(T::Boolean)) }
103
+ attr_accessor :force_3ds
104
+
101
105
  # Additional metadata associated with the payment. Defaults to empty if not
102
106
  # provided.
103
107
  sig { returns(T.nilable(T::Hash[Symbol, String])) }
@@ -155,6 +159,7 @@ module Dodopayments
155
159
  discount_code: T.nilable(String),
156
160
  feature_flags:
157
161
  Dodopayments::CheckoutSessionRequest::FeatureFlags::OrHash,
162
+ force_3ds: T.nilable(T::Boolean),
158
163
  metadata: T.nilable(T::Hash[Symbol, String]),
159
164
  return_url: T.nilable(String),
160
165
  show_saved_payment_methods: T::Boolean,
@@ -186,6 +191,8 @@ module Dodopayments
186
191
  customization: nil,
187
192
  discount_code: nil,
188
193
  feature_flags: nil,
194
+ # Override merchant default 3DS behaviour for this session
195
+ force_3ds: nil,
189
196
  # Additional metadata associated with the payment. Defaults to empty if not
190
197
  # provided.
191
198
  metadata: nil,
@@ -218,6 +225,7 @@ module Dodopayments
218
225
  customization: Dodopayments::CheckoutSessionRequest::Customization,
219
226
  discount_code: T.nilable(String),
220
227
  feature_flags: Dodopayments::CheckoutSessionRequest::FeatureFlags,
228
+ force_3ds: T.nilable(T::Boolean),
221
229
  metadata: T.nilable(T::Hash[Symbol, String]),
222
230
  return_url: T.nilable(String),
223
231
  show_saved_payment_methods: T::Boolean,
@@ -375,6 +383,10 @@ module Dodopayments
375
383
  )
376
384
  end
377
385
 
386
+ # Force the checkout interface to render in a specific language (e.g. `en`, `es`)
387
+ sig { returns(T.nilable(String)) }
388
+ attr_accessor :force_language
389
+
378
390
  # Show on demand tag
379
391
  #
380
392
  # Default is true
@@ -416,6 +428,7 @@ module Dodopayments
416
428
  # Customization for the checkout session page
417
429
  sig do
418
430
  params(
431
+ force_language: T.nilable(String),
419
432
  show_on_demand_tag: T::Boolean,
420
433
  show_order_details: T::Boolean,
421
434
  theme:
@@ -423,6 +436,8 @@ module Dodopayments
423
436
  ).returns(T.attached_class)
424
437
  end
425
438
  def self.new(
439
+ # Force the checkout interface to render in a specific language (e.g. `en`, `es`)
440
+ force_language: nil,
426
441
  # Show on demand tag
427
442
  #
428
443
  # Default is true
@@ -441,6 +456,7 @@ module Dodopayments
441
456
  sig do
442
457
  override.returns(
443
458
  {
459
+ force_language: T.nilable(String),
444
460
  show_on_demand_tag: T::Boolean,
445
461
  show_order_details: T::Boolean,
446
462
  theme: