dodopayments 1.66.0 → 1.66.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: '0941dd898c79a72b7f81f3d3f5aa8527a390fc143e7e724491f47cadbb166bdb'
4
- data.tar.gz: 8dd29cb14f5a2bf600175bcc087cb81d2ba777f02fae0bc87454f1080e486a3b
3
+ metadata.gz: 972a3614fedb42869f13add8d65c94c5d9ab86ddf846ab3a731b3e0aba2fb8ee
4
+ data.tar.gz: db9d83611c7efd7d69ac9b65b2b835163c04254a40c79410aab014a9d5077e86
5
5
  SHA512:
6
- metadata.gz: d0eed93cc1ac1e28912bb8c9b0050db1984b87de08c39fda3231858663f7dabb46b74d9765a42deee8f2835e09662ba6221f7cf986b1a5b9b1ff222166d7fa4f
7
- data.tar.gz: c3a221873724e7bd198d94675eaeda38538a30d6fdc9a987adb469ed8c056e3491c9cfdffb6ff3ca26a2a41f1200c7534d0df76c7e26f3f92b939edc212755e0
6
+ metadata.gz: a549157df59ceab775aeb937d7f2255d82236032ab5def65f3f6ac8c869326d2e95cbaff72d8a4b2e0e03d60a575b3607be83b17d3c1b43d1131ec8093bcb8d6
7
+ data.tar.gz: 816652a5e782d96450eb2bef110f9ae61f4b3883e6e7090cb7fc8a899efd93f648b59c80f03e883fb284984024145920ab5b3c74824b798a1e3698dbcf60d62e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.66.1 (2025-12-12)
4
+
5
+ Full Changelog: [v1.66.0...v1.66.1](https://github.com/dodopayments/dodopayments-ruby/compare/v1.66.0...v1.66.1)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([33e1723](https://github.com/dodopayments/dodopayments-ruby/commit/33e1723674596d62368d8aafbfcdcf4fb994de56))
10
+
3
11
  ## 1.66.0 (2025-12-08)
4
12
 
5
13
  Full Changelog: [v1.61.7...v1.66.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.61.7...v1.66.0)
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.66.0"
20
+ gem "dodopayments", "~> 1.66.1"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -80,6 +80,15 @@ module Dodopayments
80
80
  # @return [Dodopayments::Models::OnDemandSubscription, nil]
81
81
  optional :on_demand, -> { Dodopayments::OnDemandSubscription }, nil?: true
82
82
 
83
+ # @!attribute one_time_product_cart
84
+ # List of one time products that will be bundled with the first payment for this
85
+ # subscription
86
+ #
87
+ # @return [Array<Dodopayments::Models::OneTimeProductCartItem>, nil]
88
+ optional :one_time_product_cart,
89
+ -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::OneTimeProductCartItem] },
90
+ nil?: true
91
+
83
92
  # @!attribute payment_link
84
93
  # If true, generates a payment link. Defaults to false if not specified.
85
94
  #
@@ -112,7 +121,7 @@ module Dodopayments
112
121
  # @return [Integer, nil]
113
122
  optional :trial_period_days, Integer, nil?: true
114
123
 
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: {})
124
+ # @!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, one_time_product_cart: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
116
125
  # Some parameter documentations has been truncated, see
117
126
  # {Dodopayments::Models::SubscriptionCreateParams} for more details.
118
127
  #
@@ -138,6 +147,8 @@ module Dodopayments
138
147
  #
139
148
  # @param on_demand [Dodopayments::Models::OnDemandSubscription, nil]
140
149
  #
150
+ # @param one_time_product_cart [Array<Dodopayments::Models::OneTimeProductCartItem>, nil] List of one time products that will be bundled with the first payment for this s
151
+ #
141
152
  # @param payment_link [Boolean, nil] If true, generates a payment link.
142
153
  #
143
154
  # @param return_url [String, nil] Optional URL to redirect after successful subscription creation
@@ -60,13 +60,21 @@ module Dodopayments
60
60
  # @return [Time, nil]
61
61
  optional :expires_on, Time, nil?: true
62
62
 
63
+ # @!attribute one_time_product_cart
64
+ # One time products associated with the purchase of subscription
65
+ #
66
+ # @return [Array<Dodopayments::Models::SubscriptionCreateResponse::OneTimeProductCart>, nil]
67
+ optional :one_time_product_cart,
68
+ -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::SubscriptionCreateResponse::OneTimeProductCart] },
69
+ nil?: true
70
+
63
71
  # @!attribute payment_link
64
72
  # URL to checkout page
65
73
  #
66
74
  # @return [String, nil]
67
75
  optional :payment_link, String, nil?: true
68
76
 
69
- # @!method initialize(addons:, customer:, metadata:, payment_id:, recurring_pre_tax_amount:, subscription_id:, client_secret: nil, discount_id: nil, expires_on: nil, payment_link: nil)
77
+ # @!method initialize(addons:, customer:, metadata:, payment_id:, recurring_pre_tax_amount:, subscription_id:, client_secret: nil, discount_id: nil, expires_on: nil, one_time_product_cart: nil, payment_link: nil)
70
78
  # Some parameter documentations has been truncated, see
71
79
  # {Dodopayments::Models::SubscriptionCreateResponse} for more details.
72
80
  #
@@ -88,7 +96,25 @@ module Dodopayments
88
96
  #
89
97
  # @param expires_on [Time, nil] Expiry timestamp of the payment link
90
98
  #
99
+ # @param one_time_product_cart [Array<Dodopayments::Models::SubscriptionCreateResponse::OneTimeProductCart>, nil] One time products associated with the purchase of subscription
100
+ #
91
101
  # @param payment_link [String, nil] URL to checkout page
102
+
103
+ class OneTimeProductCart < Dodopayments::Internal::Type::BaseModel
104
+ # @!attribute product_id
105
+ #
106
+ # @return [String]
107
+ required :product_id, String
108
+
109
+ # @!attribute quantity
110
+ #
111
+ # @return [Integer]
112
+ required :quantity, Integer
113
+
114
+ # @!method initialize(product_id:, quantity:)
115
+ # @param product_id [String]
116
+ # @param quantity [Integer]
117
+ end
92
118
  end
93
119
  end
94
120
  end
@@ -25,7 +25,7 @@ module Dodopayments
25
25
  class ImmediateCharge < Dodopayments::Internal::Type::BaseModel
26
26
  # @!attribute line_items
27
27
  #
28
- # @return [Array<Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2>]
28
+ # @return [Array<Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter>]
29
29
  required :line_items,
30
30
  -> { Dodopayments::Internal::Type::ArrayOf[union: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem] }
31
31
 
@@ -36,19 +36,19 @@ module Dodopayments
36
36
  -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary }
37
37
 
38
38
  # @!method initialize(line_items:, summary:)
39
- # @param line_items [Array<Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2>]
39
+ # @param line_items [Array<Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter>]
40
40
  # @param summary [Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary]
41
41
 
42
42
  module LineItem
43
43
  extend Dodopayments::Internal::Type::Union
44
44
 
45
- variant -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0 }
45
+ variant -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription }
46
46
 
47
- variant -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1 }
47
+ variant -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon }
48
48
 
49
- variant -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2 }
49
+ variant -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter }
50
50
 
51
- class UnionMember0 < Dodopayments::Internal::Type::BaseModel
51
+ class Subscription < Dodopayments::Internal::Type::BaseModel
52
52
  # @!attribute id
53
53
  #
54
54
  # @return [String]
@@ -81,9 +81,9 @@ module Dodopayments
81
81
 
82
82
  # @!attribute type
83
83
  #
84
- # @return [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type]
84
+ # @return [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type]
85
85
  required :type,
86
- enum: -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type }
86
+ enum: -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type }
87
87
 
88
88
  # @!attribute unit_price
89
89
  #
@@ -117,14 +117,14 @@ module Dodopayments
117
117
  # @param proration_factor [Float]
118
118
  # @param quantity [Integer]
119
119
  # @param tax_inclusive [Boolean]
120
- # @param type [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type]
120
+ # @param type [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type]
121
121
  # @param unit_price [Integer]
122
122
  # @param description [String, nil]
123
123
  # @param name [String, nil]
124
124
  # @param tax [Integer, nil]
125
125
  # @param tax_rate [Float, nil]
126
126
 
127
- # @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0#type
127
+ # @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription#type
128
128
  module Type
129
129
  extend Dodopayments::Internal::Type::Enum
130
130
 
@@ -135,7 +135,7 @@ module Dodopayments
135
135
  end
136
136
  end
137
137
 
138
- class UnionMember1 < Dodopayments::Internal::Type::BaseModel
138
+ class Addon < Dodopayments::Internal::Type::BaseModel
139
139
  # @!attribute id
140
140
  #
141
141
  # @return [String]
@@ -180,9 +180,9 @@ module Dodopayments
180
180
 
181
181
  # @!attribute type
182
182
  #
183
- # @return [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type]
183
+ # @return [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type]
184
184
  required :type,
185
- enum: -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type }
185
+ enum: -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type }
186
186
 
187
187
  # @!attribute unit_price
188
188
  #
@@ -201,7 +201,7 @@ module Dodopayments
201
201
 
202
202
  # @!method initialize(id:, currency:, name:, proration_factor:, quantity:, tax_category:, tax_inclusive:, tax_rate:, type:, unit_price:, description: nil, tax: nil)
203
203
  # Some parameter documentations has been truncated, see
204
- # {Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1}
204
+ # {Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon}
205
205
  # for more details.
206
206
  #
207
207
  # @param id [String]
@@ -220,7 +220,7 @@ module Dodopayments
220
220
  #
221
221
  # @param tax_rate [Float]
222
222
  #
223
- # @param type [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type]
223
+ # @param type [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type]
224
224
  #
225
225
  # @param unit_price [Integer]
226
226
  #
@@ -228,7 +228,7 @@ module Dodopayments
228
228
  #
229
229
  # @param tax [Integer, nil]
230
230
 
231
- # @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1#type
231
+ # @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon#type
232
232
  module Type
233
233
  extend Dodopayments::Internal::Type::Enum
234
234
 
@@ -239,7 +239,7 @@ module Dodopayments
239
239
  end
240
240
  end
241
241
 
242
- class UnionMember2 < Dodopayments::Internal::Type::BaseModel
242
+ class Meter < Dodopayments::Internal::Type::BaseModel
243
243
  # @!attribute id
244
244
  #
245
245
  # @return [String]
@@ -287,9 +287,9 @@ module Dodopayments
287
287
 
288
288
  # @!attribute type
289
289
  #
290
- # @return [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type]
290
+ # @return [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type]
291
291
  required :type,
292
- enum: -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type }
292
+ enum: -> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type }
293
293
 
294
294
  # @!attribute units_consumed
295
295
  #
@@ -316,12 +316,12 @@ module Dodopayments
316
316
  # @param subtotal [Integer]
317
317
  # @param tax_inclusive [Boolean]
318
318
  # @param tax_rate [Float]
319
- # @param type [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type]
319
+ # @param type [Symbol, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type]
320
320
  # @param units_consumed [String]
321
321
  # @param description [String, nil]
322
322
  # @param tax [Integer, nil]
323
323
 
324
- # @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2#type
324
+ # @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter#type
325
325
  module Type
326
326
  extend Dodopayments::Internal::Type::Enum
327
327
 
@@ -333,7 +333,7 @@ module Dodopayments
333
333
  end
334
334
 
335
335
  # @!method self.variants
336
- # @return [Array(Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2)]
336
+ # @return [Array(Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter)]
337
337
  end
338
338
 
339
339
  # @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge#summary
@@ -3,6 +3,8 @@
3
3
  module Dodopayments
4
4
  module Resources
5
5
  class Payments
6
+ # @deprecated
7
+ #
6
8
  # Some parameter documentations has been truncated, see
7
9
  # {Dodopayments::Models::PaymentCreateParams} for more details.
8
10
  #
@@ -3,10 +3,12 @@
3
3
  module Dodopayments
4
4
  module Resources
5
5
  class Subscriptions
6
+ # @deprecated
7
+ #
6
8
  # Some parameter documentations has been truncated, see
7
9
  # {Dodopayments::Models::SubscriptionCreateParams} for more details.
8
10
  #
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: {})
11
+ # @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, one_time_product_cart: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
10
12
  #
11
13
  # @param billing [Dodopayments::Models::BillingAddress] Billing address information for the subscription
12
14
  #
@@ -30,6 +32,8 @@ module Dodopayments
30
32
  #
31
33
  # @param on_demand [Dodopayments::Models::OnDemandSubscription, nil]
32
34
  #
35
+ # @param one_time_product_cart [Array<Dodopayments::Models::OneTimeProductCartItem>, nil] List of one time products that will be bundled with the first payment for this s
36
+ #
33
37
  # @param payment_link [Boolean, nil] If true, generates a payment link.
34
38
  #
35
39
  # @param return_url [String, nil] Optional URL to redirect after successful subscription creation
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dodopayments
4
- VERSION = "1.66.0"
4
+ VERSION = "1.66.1"
5
5
  end
@@ -82,6 +82,11 @@ module Dodopayments
82
82
  end
83
83
  attr_writer :on_demand
84
84
 
85
+ # List of one time products that will be bundled with the first payment for this
86
+ # subscription
87
+ sig { returns(T.nilable(T::Array[Dodopayments::OneTimeProductCartItem])) }
88
+ attr_accessor :one_time_product_cart
89
+
85
90
  # If true, generates a payment link. Defaults to false if not specified.
86
91
  sig { returns(T.nilable(T::Boolean)) }
87
92
  attr_accessor :payment_link
@@ -125,6 +130,8 @@ module Dodopayments
125
130
  force_3ds: T.nilable(T::Boolean),
126
131
  metadata: T::Hash[Symbol, String],
127
132
  on_demand: T.nilable(Dodopayments::OnDemandSubscription::OrHash),
133
+ one_time_product_cart:
134
+ T.nilable(T::Array[Dodopayments::OneTimeProductCartItem::OrHash]),
128
135
  payment_link: T.nilable(T::Boolean),
129
136
  return_url: T.nilable(String),
130
137
  show_saved_payment_methods: T::Boolean,
@@ -161,6 +168,9 @@ module Dodopayments
161
168
  # Additional metadata for the subscription Defaults to empty if not specified
162
169
  metadata: nil,
163
170
  on_demand: nil,
171
+ # List of one time products that will be bundled with the first payment for this
172
+ # subscription
173
+ one_time_product_cart: nil,
164
174
  # If true, generates a payment link. Defaults to false if not specified.
165
175
  payment_link: nil,
166
176
  # Optional URL to redirect after successful subscription creation
@@ -196,6 +206,8 @@ module Dodopayments
196
206
  force_3ds: T.nilable(T::Boolean),
197
207
  metadata: T::Hash[Symbol, String],
198
208
  on_demand: T.nilable(Dodopayments::OnDemandSubscription),
209
+ one_time_product_cart:
210
+ T.nilable(T::Array[Dodopayments::OneTimeProductCartItem]),
199
211
  payment_link: T.nilable(T::Boolean),
200
212
  return_url: T.nilable(String),
201
213
  show_saved_payment_methods: T::Boolean,
@@ -54,6 +54,18 @@ module Dodopayments
54
54
  sig { returns(T.nilable(Time)) }
55
55
  attr_accessor :expires_on
56
56
 
57
+ # One time products associated with the purchase of subscription
58
+ sig do
59
+ returns(
60
+ T.nilable(
61
+ T::Array[
62
+ Dodopayments::Models::SubscriptionCreateResponse::OneTimeProductCart
63
+ ]
64
+ )
65
+ )
66
+ end
67
+ attr_accessor :one_time_product_cart
68
+
57
69
  # URL to checkout page
58
70
  sig { returns(T.nilable(String)) }
59
71
  attr_accessor :payment_link
@@ -69,6 +81,12 @@ module Dodopayments
69
81
  client_secret: T.nilable(String),
70
82
  discount_id: T.nilable(String),
71
83
  expires_on: T.nilable(Time),
84
+ one_time_product_cart:
85
+ T.nilable(
86
+ T::Array[
87
+ Dodopayments::Models::SubscriptionCreateResponse::OneTimeProductCart::OrHash
88
+ ]
89
+ ),
72
90
  payment_link: T.nilable(String)
73
91
  ).returns(T.attached_class)
74
92
  end
@@ -93,6 +111,8 @@ module Dodopayments
93
111
  discount_id: nil,
94
112
  # Expiry timestamp of the payment link
95
113
  expires_on: nil,
114
+ # One time products associated with the purchase of subscription
115
+ one_time_product_cart: nil,
96
116
  # URL to checkout page
97
117
  payment_link: nil
98
118
  )
@@ -110,12 +130,46 @@ module Dodopayments
110
130
  client_secret: T.nilable(String),
111
131
  discount_id: T.nilable(String),
112
132
  expires_on: T.nilable(Time),
133
+ one_time_product_cart:
134
+ T.nilable(
135
+ T::Array[
136
+ Dodopayments::Models::SubscriptionCreateResponse::OneTimeProductCart
137
+ ]
138
+ ),
113
139
  payment_link: T.nilable(String)
114
140
  }
115
141
  )
116
142
  end
117
143
  def to_hash
118
144
  end
145
+
146
+ class OneTimeProductCart < Dodopayments::Internal::Type::BaseModel
147
+ OrHash =
148
+ T.type_alias do
149
+ T.any(
150
+ Dodopayments::Models::SubscriptionCreateResponse::OneTimeProductCart,
151
+ Dodopayments::Internal::AnyHash
152
+ )
153
+ end
154
+
155
+ sig { returns(String) }
156
+ attr_accessor :product_id
157
+
158
+ sig { returns(Integer) }
159
+ attr_accessor :quantity
160
+
161
+ sig do
162
+ params(product_id: String, quantity: Integer).returns(
163
+ T.attached_class
164
+ )
165
+ end
166
+ def self.new(product_id:, quantity:)
167
+ end
168
+
169
+ sig { override.returns({ product_id: String, quantity: Integer }) }
170
+ def to_hash
171
+ end
172
+ end
119
173
  end
120
174
  end
121
175
  end
@@ -97,9 +97,9 @@ module Dodopayments
97
97
  line_items:
98
98
  T::Array[
99
99
  T.any(
100
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::OrHash,
101
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::OrHash,
102
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::OrHash
100
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::OrHash,
101
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::OrHash,
102
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::OrHash
103
103
  )
104
104
  ],
105
105
  summary:
@@ -130,17 +130,17 @@ module Dodopayments
130
130
  Variants =
131
131
  T.type_alias do
132
132
  T.any(
133
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0,
134
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1,
135
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2
133
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription,
134
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon,
135
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter
136
136
  )
137
137
  end
138
138
 
139
- class UnionMember0 < Dodopayments::Internal::Type::BaseModel
139
+ class Subscription < Dodopayments::Internal::Type::BaseModel
140
140
  OrHash =
141
141
  T.type_alias do
142
142
  T.any(
143
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0,
143
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription,
144
144
  Dodopayments::Internal::AnyHash
145
145
  )
146
146
  end
@@ -165,7 +165,7 @@ module Dodopayments
165
165
 
166
166
  sig do
167
167
  returns(
168
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type::TaggedSymbol
168
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type::TaggedSymbol
169
169
  )
170
170
  end
171
171
  attr_accessor :type
@@ -194,7 +194,7 @@ module Dodopayments
194
194
  quantity: Integer,
195
195
  tax_inclusive: T::Boolean,
196
196
  type:
197
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type::OrSymbol,
197
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type::OrSymbol,
198
198
  unit_price: Integer,
199
199
  description: T.nilable(String),
200
200
  name: T.nilable(String),
@@ -228,7 +228,7 @@ module Dodopayments
228
228
  quantity: Integer,
229
229
  tax_inclusive: T::Boolean,
230
230
  type:
231
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type::TaggedSymbol,
231
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type::TaggedSymbol,
232
232
  unit_price: Integer,
233
233
  description: T.nilable(String),
234
234
  name: T.nilable(String),
@@ -247,7 +247,7 @@ module Dodopayments
247
247
  T.type_alias do
248
248
  T.all(
249
249
  Symbol,
250
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type
250
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type
251
251
  )
252
252
  end
253
253
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -255,13 +255,13 @@ module Dodopayments
255
255
  SUBSCRIPTION =
256
256
  T.let(
257
257
  :subscription,
258
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type::TaggedSymbol
258
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type::TaggedSymbol
259
259
  )
260
260
 
261
261
  sig do
262
262
  override.returns(
263
263
  T::Array[
264
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::Type::TaggedSymbol
264
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::Type::TaggedSymbol
265
265
  ]
266
266
  )
267
267
  end
@@ -270,11 +270,11 @@ module Dodopayments
270
270
  end
271
271
  end
272
272
 
273
- class UnionMember1 < Dodopayments::Internal::Type::BaseModel
273
+ class Addon < Dodopayments::Internal::Type::BaseModel
274
274
  OrHash =
275
275
  T.type_alias do
276
276
  T.any(
277
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1,
277
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon,
278
278
  Dodopayments::Internal::AnyHash
279
279
  )
280
280
  end
@@ -307,7 +307,7 @@ module Dodopayments
307
307
 
308
308
  sig do
309
309
  returns(
310
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type::TaggedSymbol
310
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type::TaggedSymbol
311
311
  )
312
312
  end
313
313
  attr_accessor :type
@@ -332,7 +332,7 @@ module Dodopayments
332
332
  tax_inclusive: T::Boolean,
333
333
  tax_rate: Float,
334
334
  type:
335
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type::OrSymbol,
335
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type::OrSymbol,
336
336
  unit_price: Integer,
337
337
  description: T.nilable(String),
338
338
  tax: T.nilable(Integer)
@@ -368,7 +368,7 @@ module Dodopayments
368
368
  tax_inclusive: T::Boolean,
369
369
  tax_rate: Float,
370
370
  type:
371
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type::TaggedSymbol,
371
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type::TaggedSymbol,
372
372
  unit_price: Integer,
373
373
  description: T.nilable(String),
374
374
  tax: T.nilable(Integer)
@@ -385,7 +385,7 @@ module Dodopayments
385
385
  T.type_alias do
386
386
  T.all(
387
387
  Symbol,
388
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type
388
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type
389
389
  )
390
390
  end
391
391
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -393,13 +393,13 @@ module Dodopayments
393
393
  ADDON =
394
394
  T.let(
395
395
  :addon,
396
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type::TaggedSymbol
396
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type::TaggedSymbol
397
397
  )
398
398
 
399
399
  sig do
400
400
  override.returns(
401
401
  T::Array[
402
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::Type::TaggedSymbol
402
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::Type::TaggedSymbol
403
403
  ]
404
404
  )
405
405
  end
@@ -408,11 +408,11 @@ module Dodopayments
408
408
  end
409
409
  end
410
410
 
411
- class UnionMember2 < Dodopayments::Internal::Type::BaseModel
411
+ class Meter < Dodopayments::Internal::Type::BaseModel
412
412
  OrHash =
413
413
  T.type_alias do
414
414
  T.any(
415
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2,
415
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter,
416
416
  Dodopayments::Internal::AnyHash
417
417
  )
418
418
  end
@@ -446,7 +446,7 @@ module Dodopayments
446
446
 
447
447
  sig do
448
448
  returns(
449
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type::TaggedSymbol
449
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type::TaggedSymbol
450
450
  )
451
451
  end
452
452
  attr_accessor :type
@@ -472,7 +472,7 @@ module Dodopayments
472
472
  tax_inclusive: T::Boolean,
473
473
  tax_rate: Float,
474
474
  type:
475
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type::OrSymbol,
475
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type::OrSymbol,
476
476
  units_consumed: String,
477
477
  description: T.nilable(String),
478
478
  tax: T.nilable(Integer)
@@ -508,7 +508,7 @@ module Dodopayments
508
508
  tax_inclusive: T::Boolean,
509
509
  tax_rate: Float,
510
510
  type:
511
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type::TaggedSymbol,
511
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type::TaggedSymbol,
512
512
  units_consumed: String,
513
513
  description: T.nilable(String),
514
514
  tax: T.nilable(Integer)
@@ -525,7 +525,7 @@ module Dodopayments
525
525
  T.type_alias do
526
526
  T.all(
527
527
  Symbol,
528
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type
528
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type
529
529
  )
530
530
  end
531
531
  OrSymbol = T.type_alias { T.any(Symbol, String) }
@@ -533,13 +533,13 @@ module Dodopayments
533
533
  METER =
534
534
  T.let(
535
535
  :meter,
536
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type::TaggedSymbol
536
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type::TaggedSymbol
537
537
  )
538
538
 
539
539
  sig do
540
540
  override.returns(
541
541
  T::Array[
542
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::Type::TaggedSymbol
542
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::Type::TaggedSymbol
543
543
  ]
544
544
  )
545
545
  end
@@ -21,6 +21,8 @@ module Dodopayments
21
21
  force_3ds: T.nilable(T::Boolean),
22
22
  metadata: T::Hash[Symbol, String],
23
23
  on_demand: T.nilable(Dodopayments::OnDemandSubscription::OrHash),
24
+ one_time_product_cart:
25
+ T.nilable(T::Array[Dodopayments::OneTimeProductCartItem::OrHash]),
24
26
  payment_link: T.nilable(T::Boolean),
25
27
  return_url: T.nilable(String),
26
28
  show_saved_payment_methods: T::Boolean,
@@ -57,6 +59,9 @@ module Dodopayments
57
59
  # Additional metadata for the subscription Defaults to empty if not specified
58
60
  metadata: nil,
59
61
  on_demand: nil,
62
+ # List of one time products that will be bundled with the first payment for this
63
+ # subscription
64
+ one_time_product_cart: nil,
60
65
  # If true, generates a payment link. Defaults to false if not specified.
61
66
  payment_link: nil,
62
67
  # Optional URL to redirect after successful subscription creation
@@ -13,6 +13,7 @@ module Dodopayments
13
13
  :force_3ds => bool?,
14
14
  metadata: ::Hash[Symbol, String],
15
15
  on_demand: Dodopayments::OnDemandSubscription?,
16
+ one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
16
17
  payment_link: bool?,
17
18
  return_url: String?,
18
19
  show_saved_payment_methods: bool,
@@ -49,6 +50,8 @@ module Dodopayments
49
50
 
50
51
  attr_accessor on_demand: Dodopayments::OnDemandSubscription?
51
52
 
53
+ attr_accessor one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?
54
+
52
55
  attr_accessor payment_link: bool?
53
56
 
54
57
  attr_accessor return_url: String?
@@ -73,6 +76,7 @@ module Dodopayments
73
76
  ?force_3ds: bool?,
74
77
  ?metadata: ::Hash[Symbol, String],
75
78
  ?on_demand: Dodopayments::OnDemandSubscription?,
79
+ ?one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
76
80
  ?payment_link: bool?,
77
81
  ?return_url: String?,
78
82
  ?show_saved_payment_methods: bool,
@@ -93,6 +97,7 @@ module Dodopayments
93
97
  :force_3ds => bool?,
94
98
  metadata: ::Hash[Symbol, String],
95
99
  on_demand: Dodopayments::OnDemandSubscription?,
100
+ one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
96
101
  payment_link: bool?,
97
102
  return_url: String?,
98
103
  show_saved_payment_methods: bool,
@@ -11,6 +11,7 @@ module Dodopayments
11
11
  client_secret: String?,
12
12
  discount_id: String?,
13
13
  expires_on: Time?,
14
+ one_time_product_cart: ::Array[Dodopayments::Models::SubscriptionCreateResponse::OneTimeProductCart]?,
14
15
  payment_link: String?
15
16
  }
16
17
 
@@ -33,6 +34,8 @@ module Dodopayments
33
34
 
34
35
  attr_accessor expires_on: Time?
35
36
 
37
+ attr_accessor one_time_product_cart: ::Array[Dodopayments::Models::SubscriptionCreateResponse::OneTimeProductCart]?
38
+
36
39
  attr_accessor payment_link: String?
37
40
 
38
41
  def initialize: (
@@ -45,6 +48,7 @@ module Dodopayments
45
48
  ?client_secret: String?,
46
49
  ?discount_id: String?,
47
50
  ?expires_on: Time?,
51
+ ?one_time_product_cart: ::Array[Dodopayments::Models::SubscriptionCreateResponse::OneTimeProductCart]?,
48
52
  ?payment_link: String?
49
53
  ) -> void
50
54
 
@@ -58,8 +62,21 @@ module Dodopayments
58
62
  client_secret: String?,
59
63
  discount_id: String?,
60
64
  expires_on: Time?,
65
+ one_time_product_cart: ::Array[Dodopayments::Models::SubscriptionCreateResponse::OneTimeProductCart]?,
61
66
  payment_link: String?
62
67
  }
68
+
69
+ type one_time_product_cart = { product_id: String, quantity: Integer }
70
+
71
+ class OneTimeProductCart < Dodopayments::Internal::Type::BaseModel
72
+ attr_accessor product_id: String
73
+
74
+ attr_accessor quantity: Integer
75
+
76
+ def initialize: (product_id: String, quantity: Integer) -> void
77
+
78
+ def to_hash: -> { product_id: String, quantity: Integer }
79
+ end
63
80
  end
64
81
  end
65
82
  end
@@ -43,14 +43,14 @@ module Dodopayments
43
43
  }
44
44
 
45
45
  type line_item =
46
- Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0
47
- | Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1
48
- | Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2
46
+ Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription
47
+ | Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon
48
+ | Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter
49
49
 
50
50
  module LineItem
51
51
  extend Dodopayments::Internal::Type::Union
52
52
 
53
- type union_member0 =
53
+ type subscription =
54
54
  {
55
55
  id: String,
56
56
  currency: Dodopayments::Models::currency,
@@ -58,7 +58,7 @@ module Dodopayments
58
58
  proration_factor: Float,
59
59
  quantity: Integer,
60
60
  tax_inclusive: bool,
61
- type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::type_,
61
+ type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::type_,
62
62
  unit_price: Integer,
63
63
  description: String?,
64
64
  name: String?,
@@ -66,7 +66,7 @@ module Dodopayments
66
66
  tax_rate: Float?
67
67
  }
68
68
 
69
- class UnionMember0 < Dodopayments::Internal::Type::BaseModel
69
+ class Subscription < Dodopayments::Internal::Type::BaseModel
70
70
  attr_accessor id: String
71
71
 
72
72
  attr_accessor currency: Dodopayments::Models::currency
@@ -79,7 +79,7 @@ module Dodopayments
79
79
 
80
80
  attr_accessor tax_inclusive: bool
81
81
 
82
- attr_accessor type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::type_
82
+ attr_accessor type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::type_
83
83
 
84
84
  attr_accessor unit_price: Integer
85
85
 
@@ -98,7 +98,7 @@ module Dodopayments
98
98
  proration_factor: Float,
99
99
  quantity: Integer,
100
100
  tax_inclusive: bool,
101
- type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::type_,
101
+ type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::type_,
102
102
  unit_price: Integer,
103
103
  ?description: String?,
104
104
  ?name: String?,
@@ -113,7 +113,7 @@ module Dodopayments
113
113
  proration_factor: Float,
114
114
  quantity: Integer,
115
115
  tax_inclusive: bool,
116
- type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::type_,
116
+ type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::type_,
117
117
  unit_price: Integer,
118
118
  description: String?,
119
119
  name: String?,
@@ -128,11 +128,11 @@ module Dodopayments
128
128
 
129
129
  SUBSCRIPTION: :subscription
130
130
 
131
- def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember0::type_]
131
+ def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription::type_]
132
132
  end
133
133
  end
134
134
 
135
- type union_member1 =
135
+ type addon =
136
136
  {
137
137
  id: String,
138
138
  currency: Dodopayments::Models::currency,
@@ -142,13 +142,13 @@ module Dodopayments
142
142
  tax_category: Dodopayments::Models::tax_category,
143
143
  tax_inclusive: bool,
144
144
  tax_rate: Float,
145
- type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::type_,
145
+ type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::type_,
146
146
  unit_price: Integer,
147
147
  description: String?,
148
148
  tax: Integer?
149
149
  }
150
150
 
151
- class UnionMember1 < Dodopayments::Internal::Type::BaseModel
151
+ class Addon < Dodopayments::Internal::Type::BaseModel
152
152
  attr_accessor id: String
153
153
 
154
154
  attr_accessor currency: Dodopayments::Models::currency
@@ -165,7 +165,7 @@ module Dodopayments
165
165
 
166
166
  attr_accessor tax_rate: Float
167
167
 
168
- attr_accessor type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::type_
168
+ attr_accessor type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::type_
169
169
 
170
170
  attr_accessor unit_price: Integer
171
171
 
@@ -182,7 +182,7 @@ module Dodopayments
182
182
  tax_category: Dodopayments::Models::tax_category,
183
183
  tax_inclusive: bool,
184
184
  tax_rate: Float,
185
- type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::type_,
185
+ type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::type_,
186
186
  unit_price: Integer,
187
187
  ?description: String?,
188
188
  ?tax: Integer?
@@ -197,7 +197,7 @@ module Dodopayments
197
197
  tax_category: Dodopayments::Models::tax_category,
198
198
  tax_inclusive: bool,
199
199
  tax_rate: Float,
200
- type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::type_,
200
+ type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::type_,
201
201
  unit_price: Integer,
202
202
  description: String?,
203
203
  tax: Integer?
@@ -210,11 +210,11 @@ module Dodopayments
210
210
 
211
211
  ADDON: :addon
212
212
 
213
- def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember1::type_]
213
+ def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon::type_]
214
214
  end
215
215
  end
216
216
 
217
- type union_member2 =
217
+ type meter =
218
218
  {
219
219
  id: String,
220
220
  chargeable_units: String,
@@ -225,13 +225,13 @@ module Dodopayments
225
225
  subtotal: Integer,
226
226
  tax_inclusive: bool,
227
227
  tax_rate: Float,
228
- type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::type_,
228
+ type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::type_,
229
229
  units_consumed: String,
230
230
  description: String?,
231
231
  tax: Integer?
232
232
  }
233
233
 
234
- class UnionMember2 < Dodopayments::Internal::Type::BaseModel
234
+ class Meter < Dodopayments::Internal::Type::BaseModel
235
235
  attr_accessor id: String
236
236
 
237
237
  attr_accessor chargeable_units: String
@@ -250,7 +250,7 @@ module Dodopayments
250
250
 
251
251
  attr_accessor tax_rate: Float
252
252
 
253
- attr_accessor type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::type_
253
+ attr_accessor type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::type_
254
254
 
255
255
  attr_accessor units_consumed: String
256
256
 
@@ -268,7 +268,7 @@ module Dodopayments
268
268
  subtotal: Integer,
269
269
  tax_inclusive: bool,
270
270
  tax_rate: Float,
271
- type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::type_,
271
+ type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::type_,
272
272
  units_consumed: String,
273
273
  ?description: String?,
274
274
  ?tax: Integer?
@@ -284,7 +284,7 @@ module Dodopayments
284
284
  subtotal: Integer,
285
285
  tax_inclusive: bool,
286
286
  tax_rate: Float,
287
- type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::type_,
287
+ type: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::type_,
288
288
  units_consumed: String,
289
289
  description: String?,
290
290
  tax: Integer?
@@ -297,7 +297,7 @@ module Dodopayments
297
297
 
298
298
  METER: :meter
299
299
 
300
- def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::UnionMember2::type_]
300
+ def self?.values: -> ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter::type_]
301
301
  end
302
302
  end
303
303
 
@@ -13,6 +13,7 @@ module Dodopayments
13
13
  ?force_3ds: bool?,
14
14
  ?metadata: ::Hash[Symbol, String],
15
15
  ?on_demand: Dodopayments::OnDemandSubscription?,
16
+ ?one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
16
17
  ?payment_link: bool?,
17
18
  ?return_url: String?,
18
19
  ?show_saved_payment_methods: 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: 1.66.0
4
+ version: 1.66.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: 2025-12-08 00:00:00.000000000 Z
11
+ date: 2025-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool