dodopayments 2.18.0 → 2.18.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de3e90e0a4cd35644cd9c8ef51c44c19ba4f9af2f0bbded7530ed6a95b082f60
4
- data.tar.gz: 731dedea649eb1136b5b7c1b02b7ea1f42cbbcb619d606a90f9150b5dad2b4b9
3
+ metadata.gz: 53e205dc9f7e8ee7ebdaeb422170dbc186e5a6f7e06d1c3cfb535351c9aded9b
4
+ data.tar.gz: 889f3b95deae7e7e27703e2792a42c7eacca334b62f077aaea57882b5d26efc8
5
5
  SHA512:
6
- metadata.gz: 6ce146d98b0c8613c4a02177dc943c15444914e56d7ba545f6ee96becc372d67150f0b513d43254fe5b834ff1b3008b9998c9b4ced5295e06afea36925fbc9b8
7
- data.tar.gz: 3530fa58411532a1f9afe760b06b11bce5f9d60c75b06d1b9be49572a758358663040a1cd24a70914ef3883760b75c47c98f4101aadfbb0bd0f414c1f64ecf16
6
+ metadata.gz: 9921852a50435bbccfead823afd4b085c8872a4c1b52fec15f7956a9dfe216faea6d93ad7f054dcf24339d062f2fad55f91cb4464f13470782c47288fa011187
7
+ data.tar.gz: 7376387a8df94f986e4e8a0fdcef6df3ce6f0b4b5048e30cddb4758e3414aaecdb538765bcae277086a143fdff466a37740cc42925792816add2c23f6f201f8f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.18.1](https://github.com/dodopayments/dodopayments-ruby/compare/v2.18.0...v2.18.1) (2026-06-27)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **api:** add allow_editing_addons checkout flag and refine schema descriptions ([bb29016](https://github.com/dodopayments/dodopayments-ruby/commit/bb29016fe5ae1b7d8cfca80131645f699f99f928))
9
+ * **api:** add allow_editing_addons checkout flag and refine schema descriptions ([c8bca49](https://github.com/dodopayments/dodopayments-ruby/commit/c8bca49c58066c378d071a2a353e24986d6c6134))
10
+
3
11
  ## [2.18.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.17.1...v2.18.0) (2026-06-23)
4
12
 
5
13
 
data/README.md CHANGED
@@ -23,7 +23,7 @@ To use this gem, install via Bundler by adding the following to your application
23
23
  <!-- x-release-please-start-version -->
24
24
 
25
25
  ```ruby
26
- gem "dodopayments", "~> 2.18.0"
26
+ gem "dodopayments", "~> 2.18.1"
27
27
  ```
28
28
 
29
29
  <!-- x-release-please-end -->
@@ -9,13 +9,15 @@ module Dodopayments
9
9
  required :addon_id, String
10
10
 
11
11
  # @!attribute quantity
12
+ # Number of units of this addon.
12
13
  #
13
14
  # @return [Integer]
14
15
  required :quantity, Integer
15
16
 
16
17
  # @!method initialize(addon_id:, quantity:)
17
18
  # @param addon_id [String]
18
- # @param quantity [Integer]
19
+ #
20
+ # @param quantity [Integer] Number of units of this addon.
19
21
  end
20
22
  end
21
23
  end
@@ -71,6 +71,15 @@ module Dodopayments
71
71
  # @return [Boolean, nil]
72
72
  optional :allow_discount_code, Dodopayments::Internal::Type::Boolean
73
73
 
74
+ # @!attribute allow_editing_addons
75
+ # If true, the customer can add or remove addons on a subscription product during
76
+ # checkout.
77
+ #
78
+ # Default is false
79
+ #
80
+ # @return [Boolean, nil]
81
+ optional :allow_editing_addons, Dodopayments::Internal::Type::Boolean
82
+
74
83
  # @!attribute allow_phone_number_collection
75
84
  # If phone number is collected from customer, set it to rue
76
85
  #
@@ -113,7 +122,7 @@ module Dodopayments
113
122
  # @return [Boolean, nil]
114
123
  optional :require_phone_number, Dodopayments::Internal::Type::Boolean
115
124
 
116
- # @!method initialize(allow_currency_selection: nil, allow_customer_editing_business_name: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_tax_id: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil, require_phone_number: nil)
125
+ # @!method initialize(allow_currency_selection: nil, allow_customer_editing_business_name: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_tax_id: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_editing_addons: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil, require_phone_number: nil)
117
126
  # Some parameter documentations has been truncated, see
118
127
  # {Dodopayments::Models::CheckoutSessionFlags} for more details.
119
128
  #
@@ -139,6 +148,8 @@ module Dodopayments
139
148
  #
140
149
  # @param allow_discount_code [Boolean] If the customer is allowed to apply discount code, set it to true.
141
150
  #
151
+ # @param allow_editing_addons [Boolean] If true, the customer can add or remove addons on a subscription product
152
+ #
142
153
  # @param allow_phone_number_collection [Boolean] If phone number is collected from customer, set it to rue
143
154
  #
144
155
  # @param allow_tax_id [Boolean] If the customer is allowed to add tax id, set it to true
@@ -97,6 +97,7 @@ module Dodopayments
97
97
  optional :rollover_timeframe_count, Integer, nil?: true
98
98
 
99
99
  # @!attribute rollover_timeframe_interval
100
+ # Unit of a duration count (e.g. license-key validity period).
100
101
  #
101
102
  # @return [Symbol, Dodopayments::Models::TimeInterval, nil]
102
103
  optional :rollover_timeframe_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
@@ -138,7 +139,7 @@ module Dodopayments
138
139
  #
139
140
  # @param rollover_timeframe_count [Integer, nil]
140
141
  #
141
- # @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil]
142
+ # @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Unit of a duration count (e.g. license-key validity period).
142
143
  end
143
144
  end
144
145
  end
@@ -95,6 +95,7 @@ module Dodopayments
95
95
  optional :rollover_timeframe_count, Integer, nil?: true
96
96
 
97
97
  # @!attribute rollover_timeframe_interval
98
+ # Unit of a duration count (e.g. license-key validity period).
98
99
  #
99
100
  # @return [Symbol, Dodopayments::Models::TimeInterval, nil]
100
101
  optional :rollover_timeframe_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
@@ -137,7 +138,7 @@ module Dodopayments
137
138
  #
138
139
  # @param rollover_timeframe_count [Integer, nil]
139
140
  #
140
- # @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil]
141
+ # @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Unit of a duration count (e.g. license-key validity period).
141
142
  end
142
143
  end
143
144
  end
@@ -9,13 +9,15 @@ module Dodopayments
9
9
  required :count, Integer
10
10
 
11
11
  # @!attribute interval
12
+ # Unit of a duration count (e.g. license-key validity period).
12
13
  #
13
14
  # @return [Symbol, Dodopayments::Models::TimeInterval]
14
15
  required :interval, enum: -> { Dodopayments::TimeInterval }
15
16
 
16
17
  # @!method initialize(count:, interval:)
17
18
  # @param count [Integer]
18
- # @param interval [Symbol, Dodopayments::Models::TimeInterval]
19
+ #
20
+ # @param interval [Symbol, Dodopayments::Models::TimeInterval] Unit of a duration count (e.g. license-key validity period).
19
21
  end
20
22
  end
21
23
  end
@@ -41,7 +41,7 @@ module Dodopayments
41
41
  required :customer, -> { Dodopayments::CustomerLimitedDetails }
42
42
 
43
43
  # @!attribute digital_products_delivered
44
- # brand id this payment belongs to
44
+ # Whether the digital products purchased in this payment have been delivered.
45
45
  #
46
46
  # @return [Boolean]
47
47
  required :digital_products_delivered, Dodopayments::Internal::Type::Boolean
@@ -276,7 +276,7 @@ module Dodopayments
276
276
  #
277
277
  # @param customer [Dodopayments::Models::CustomerLimitedDetails] Details about the customer who made the payment
278
278
  #
279
- # @param digital_products_delivered [Boolean] brand id this payment belongs to
279
+ # @param digital_products_delivered [Boolean] Whether the digital products purchased in this payment have been delivered.
280
280
  #
281
281
  # @param disputes [Array<Dodopayments::Models::Dispute>] List of disputes associated with this payment
282
282
  #
@@ -189,22 +189,33 @@ module Dodopayments
189
189
  optional :rollover_timeframe_count, Integer, nil?: true
190
190
 
191
191
  # @!attribute rollover_timeframe_interval
192
+ # Unit of a duration count (e.g. license-key validity period).
192
193
  #
193
194
  # @return [Symbol, Dodopayments::Models::TimeInterval, nil]
194
195
  optional :rollover_timeframe_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
195
196
 
196
197
  # @!method initialize(credit_entitlement_id:, credits_amount: nil, expires_after_days: nil, low_balance_threshold_percent: nil, max_rollover_count: nil, overage_enabled: nil, overage_limit: nil, rollover_enabled: nil, rollover_percentage: nil, rollover_timeframe_count: nil, rollover_timeframe_interval: nil)
197
198
  # @param credit_entitlement_id [String]
199
+ #
198
200
  # @param credits_amount [String, nil]
201
+ #
199
202
  # @param expires_after_days [Integer, nil]
203
+ #
200
204
  # @param low_balance_threshold_percent [Integer, nil]
205
+ #
201
206
  # @param max_rollover_count [Integer, nil]
207
+ #
202
208
  # @param overage_enabled [Boolean, nil]
209
+ #
203
210
  # @param overage_limit [String, nil]
211
+ #
204
212
  # @param rollover_enabled [Boolean, nil]
213
+ #
205
214
  # @param rollover_percentage [Integer, nil]
215
+ #
206
216
  # @param rollover_timeframe_count [Integer, nil]
207
- # @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil]
217
+ #
218
+ # @param rollover_timeframe_interval [Symbol, Dodopayments::Models::TimeInterval, nil] Unit of a duration count (e.g. license-key validity period).
208
219
  end
209
220
 
210
221
  class DisableOnDemand < Dodopayments::Internal::Type::BaseModel
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Dodopayments
4
4
  module Models
5
+ # Unit of a duration count (e.g. license-key validity period).
5
6
  module TimeInterval
6
7
  extend Dodopayments::Internal::Type::Enum
7
8
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dodopayments
4
- VERSION = "2.18.0"
4
+ VERSION = "2.18.1"
5
5
  end
@@ -11,13 +11,18 @@ module Dodopayments
11
11
  sig { returns(String) }
12
12
  attr_accessor :addon_id
13
13
 
14
+ # Number of units of this addon.
14
15
  sig { returns(Integer) }
15
16
  attr_accessor :quantity
16
17
 
17
18
  sig do
18
19
  params(addon_id: String, quantity: Integer).returns(T.attached_class)
19
20
  end
20
- def self.new(addon_id:, quantity:)
21
+ def self.new(
22
+ addon_id:,
23
+ # Number of units of this addon.
24
+ quantity:
25
+ )
21
26
  end
22
27
 
23
28
  sig { override.returns({ addon_id: String, quantity: Integer }) }
@@ -90,6 +90,16 @@ module Dodopayments
90
90
  sig { params(allow_discount_code: T::Boolean).void }
91
91
  attr_writer :allow_discount_code
92
92
 
93
+ # If true, the customer can add or remove addons on a subscription product during
94
+ # checkout.
95
+ #
96
+ # Default is false
97
+ sig { returns(T.nilable(T::Boolean)) }
98
+ attr_reader :allow_editing_addons
99
+
100
+ sig { params(allow_editing_addons: T::Boolean).void }
101
+ attr_writer :allow_editing_addons
102
+
93
103
  # If phone number is collected from customer, set it to rue
94
104
  #
95
105
  # Default is true
@@ -150,6 +160,7 @@ module Dodopayments
150
160
  allow_customer_editing_tax_id: T::Boolean,
151
161
  allow_customer_editing_zipcode: T::Boolean,
152
162
  allow_discount_code: T::Boolean,
163
+ allow_editing_addons: T::Boolean,
153
164
  allow_phone_number_collection: T::Boolean,
154
165
  allow_tax_id: T::Boolean,
155
166
  always_create_new_customer: T::Boolean,
@@ -182,6 +193,11 @@ module Dodopayments
182
193
  #
183
194
  # Default is true
184
195
  allow_discount_code: nil,
196
+ # If true, the customer can add or remove addons on a subscription product during
197
+ # checkout.
198
+ #
199
+ # Default is false
200
+ allow_editing_addons: nil,
185
201
  # If phone number is collected from customer, set it to rue
186
202
  #
187
203
  # Default is true
@@ -221,6 +237,7 @@ module Dodopayments
221
237
  allow_customer_editing_tax_id: T::Boolean,
222
238
  allow_customer_editing_zipcode: T::Boolean,
223
239
  allow_discount_code: T::Boolean,
240
+ allow_editing_addons: T::Boolean,
224
241
  allow_phone_number_collection: T::Boolean,
225
242
  allow_tax_id: T::Boolean,
226
243
  always_create_new_customer: T::Boolean,
@@ -67,6 +67,7 @@ module Dodopayments
67
67
  sig { returns(T.nilable(Integer)) }
68
68
  attr_accessor :rollover_timeframe_count
69
69
 
70
+ # Unit of a duration count (e.g. license-key validity period).
70
71
  sig { returns(T.nilable(Dodopayments::TimeInterval::TaggedSymbol)) }
71
72
  attr_accessor :rollover_timeframe_interval
72
73
 
@@ -115,6 +116,7 @@ module Dodopayments
115
116
  price_per_unit: nil,
116
117
  rollover_percentage: nil,
117
118
  rollover_timeframe_count: nil,
119
+ # Unit of a duration count (e.g. license-key validity period).
118
120
  rollover_timeframe_interval: nil
119
121
  )
120
122
  end
@@ -70,6 +70,7 @@ module Dodopayments
70
70
  sig { returns(T.nilable(Integer)) }
71
71
  attr_accessor :rollover_timeframe_count
72
72
 
73
+ # Unit of a duration count (e.g. license-key validity period).
73
74
  sig { returns(T.nilable(Dodopayments::TimeInterval::TaggedSymbol)) }
74
75
  attr_accessor :rollover_timeframe_interval
75
76
 
@@ -124,6 +125,7 @@ module Dodopayments
124
125
  overage_limit: nil,
125
126
  rollover_percentage: nil,
126
127
  rollover_timeframe_count: nil,
128
+ # Unit of a duration count (e.g. license-key validity period).
127
129
  rollover_timeframe_interval: nil
128
130
  )
129
131
  end
@@ -14,6 +14,7 @@ module Dodopayments
14
14
  sig { returns(Integer) }
15
15
  attr_accessor :count
16
16
 
17
+ # Unit of a duration count (e.g. license-key validity period).
17
18
  sig { returns(Dodopayments::TimeInterval::OrSymbol) }
18
19
  attr_accessor :interval
19
20
 
@@ -23,7 +24,11 @@ module Dodopayments
23
24
  interval: Dodopayments::TimeInterval::OrSymbol
24
25
  ).returns(T.attached_class)
25
26
  end
26
- def self.new(count:, interval:)
27
+ def self.new(
28
+ count:,
29
+ # Unit of a duration count (e.g. license-key validity period).
30
+ interval:
31
+ )
27
32
  end
28
33
 
29
34
  sig do
@@ -40,7 +40,7 @@ module Dodopayments
40
40
  end
41
41
  attr_writer :customer
42
42
 
43
- # brand id this payment belongs to
43
+ # Whether the digital products purchased in this payment have been delivered.
44
44
  sig { returns(T::Boolean) }
45
45
  attr_accessor :digital_products_delivered
46
46
 
@@ -246,7 +246,7 @@ module Dodopayments
246
246
  currency:,
247
247
  # Details about the customer who made the payment
248
248
  customer:,
249
- # brand id this payment belongs to
249
+ # Whether the digital products purchased in this payment have been delivered.
250
250
  digital_products_delivered:,
251
251
  # List of disputes associated with this payment
252
252
  disputes:,
@@ -275,6 +275,7 @@ module Dodopayments
275
275
  sig { returns(T.nilable(Integer)) }
276
276
  attr_accessor :rollover_timeframe_count
277
277
 
278
+ # Unit of a duration count (e.g. license-key validity period).
278
279
  sig { returns(T.nilable(Dodopayments::TimeInterval::OrSymbol)) }
279
280
  attr_accessor :rollover_timeframe_interval
280
281
 
@@ -305,6 +306,7 @@ module Dodopayments
305
306
  rollover_enabled: nil,
306
307
  rollover_percentage: nil,
307
308
  rollover_timeframe_count: nil,
309
+ # Unit of a duration count (e.g. license-key validity period).
308
310
  rollover_timeframe_interval: nil
309
311
  )
310
312
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Dodopayments
4
4
  module Models
5
+ # Unit of a duration count (e.g. license-key validity period).
5
6
  module TimeInterval
6
7
  extend Dodopayments::Internal::Type::Enum
7
8
 
@@ -13,6 +13,7 @@ module Dodopayments
13
13
  allow_customer_editing_tax_id: bool,
14
14
  allow_customer_editing_zipcode: bool,
15
15
  allow_discount_code: bool,
16
+ allow_editing_addons: bool,
16
17
  allow_phone_number_collection: bool,
17
18
  allow_tax_id: bool,
18
19
  always_create_new_customer: bool,
@@ -65,6 +66,10 @@ module Dodopayments
65
66
 
66
67
  def allow_discount_code=: (bool) -> bool
67
68
 
69
+ attr_reader allow_editing_addons: bool?
70
+
71
+ def allow_editing_addons=: (bool) -> bool
72
+
68
73
  attr_reader allow_phone_number_collection: bool?
69
74
 
70
75
  def allow_phone_number_collection=: (bool) -> bool
@@ -97,6 +102,7 @@ module Dodopayments
97
102
  ?allow_customer_editing_tax_id: bool,
98
103
  ?allow_customer_editing_zipcode: bool,
99
104
  ?allow_discount_code: bool,
105
+ ?allow_editing_addons: bool,
100
106
  ?allow_phone_number_collection: bool,
101
107
  ?allow_tax_id: bool,
102
108
  ?always_create_new_customer: bool,
@@ -116,6 +122,7 @@ module Dodopayments
116
122
  allow_customer_editing_tax_id: bool,
117
123
  allow_customer_editing_zipcode: bool,
118
124
  allow_discount_code: bool,
125
+ allow_editing_addons: bool,
119
126
  allow_phone_number_collection: bool,
120
127
  allow_tax_id: bool,
121
128
  always_create_new_customer: bool,
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: 2.18.0
4
+ version: 2.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dodo Payments
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-23 00:00:00.000000000 Z
11
+ date: 2026-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi