dodopayments 2.24.0 → 2.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54faa371ee06087dd998ac36184e28534d52955c484830b985ef33041c1be2ef
4
- data.tar.gz: a3033cc80faf66427ae2dbbd42f326580702550236eeac8f672b12e85de156fd
3
+ metadata.gz: 6044c5e4d1ea9b8f78276bedf6e3218cb525ae8163a52089a05261e227cfd4c6
4
+ data.tar.gz: db3411ebc0c7020505e250983d0d7eb65061c6f84341aca6230101142ccce20a
5
5
  SHA512:
6
- metadata.gz: 51fcd5e514a4b8042240d297815f2857357d42344a60a9b157a6226f93dc5850d421fc560386ced09ec4b351fe0ea4daa685dc7d91dbc8a781bbd1471fcd75c8
7
- data.tar.gz: f55ccbebdd5c52348a75c2ff069352e5eef4b46e7898cd8401b166ffa7881ef4b387a71fa6f13902ece22d5f4dda4b20e39dfd05787ec2f4c912b7d58e8bb6ad
6
+ metadata.gz: b98146146080c8330a6990c0109609b568bf3f8b5181f995d65a89a5417eb841dc09294c50f3cfaabb1c4be743a725d44eacd8f072bb82949178d4d6e94df18d
7
+ data.tar.gz: 13bbf24a4ed0f809f279588f79f3f422c2c18cdb7bb28717164e5f088c42ffe032da03178c164a73f4179671a83bd7c10a379bfaddb402a03dd89453d16583a4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.25.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.24.0...v2.25.0) (2026-08-17)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** add brand archive endpoint ([ccc5fc9](https://github.com/dodopayments/dodopayments-ruby/commit/ccc5fc9c61410ac28010e98cc241ab8eb471cb72))
9
+ * **api:** add brand archive endpoint ([90fc52d](https://github.com/dodopayments/dodopayments-ruby/commit/90fc52df5e05849e2dfdd5b307ea2ff34edb050e))
10
+
3
11
  ## [2.24.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.23.0...v2.24.0) (2026-08-13)
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.24.0"
26
+ gem "dodopayments", "~> 2.25.0"
27
27
  ```
28
28
 
29
29
  <!-- x-release-please-end -->
@@ -34,6 +34,12 @@ module Dodopayments
34
34
  # @return [Symbol, Dodopayments::Models::Brand::VerificationStatus]
35
35
  required :verification_status, enum: -> { Dodopayments::Brand::VerificationStatus }
36
36
 
37
+ # @!attribute archived_at
38
+ # Time the brand was archived. Null for an active brand.
39
+ #
40
+ # @return [Time, nil]
41
+ optional :archived_at, Time, nil?: true
42
+
37
43
  # @!attribute description
38
44
  #
39
45
  # @return [String, nil]
@@ -65,7 +71,7 @@ module Dodopayments
65
71
  # @return [String, nil]
66
72
  optional :url, String, nil?: true
67
73
 
68
- # @!method initialize(brand_id:, business_id:, enabled:, statement_descriptor:, verification_enabled:, verification_status:, description: nil, image: nil, name: nil, reason_for_hold: nil, support_email: nil, url: nil)
74
+ # @!method initialize(brand_id:, business_id:, enabled:, statement_descriptor:, verification_enabled:, verification_status:, archived_at: nil, description: nil, image: nil, name: nil, reason_for_hold: nil, support_email: nil, url: nil)
69
75
  # @param brand_id [String]
70
76
  #
71
77
  # @param business_id [String]
@@ -78,6 +84,8 @@ module Dodopayments
78
84
  #
79
85
  # @param verification_status [Symbol, Dodopayments::Models::Brand::VerificationStatus]
80
86
  #
87
+ # @param archived_at [Time, nil] Time the brand was archived. Null for an active brand.
88
+ #
81
89
  # @param description [String, nil]
82
90
  #
83
91
  # @param image [String, nil]
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ # @see Dodopayments::Resources::Brands#archive
6
+ class BrandArchiveParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ # @!attribute id
11
+ #
12
+ # @return [String]
13
+ required :id, String
14
+
15
+ # @!attribute move_products_to
16
+ # Brand that takes over the products and the live subscriptions of the brand you
17
+ # archive. It must be a brand of the same business, and it must not be archived.
18
+ # The primary brand (its brand id is the business id) is a valid target. Omit this
19
+ # field only when the brand holds no products and no live subscriptions.
20
+ #
21
+ # @return [String, nil]
22
+ optional :move_products_to, String, nil?: true
23
+
24
+ # @!method initialize(id:, move_products_to: nil, request_options: {})
25
+ # Some parameter documentations has been truncated, see
26
+ # {Dodopayments::Models::BrandArchiveParams} for more details.
27
+ #
28
+ # @param id [String]
29
+ #
30
+ # @param move_products_to [String, nil] Brand that takes over the products and the live subscriptions of the
31
+ #
32
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ # @see Dodopayments::Resources::Brands#archive
6
+ class BrandArchiveResponse < Dodopayments::Internal::Type::BaseModel
7
+ # @!attribute archived_at
8
+ # Time the brand was archived.
9
+ #
10
+ # @return [Time]
11
+ required :archived_at, Time
12
+
13
+ # @!attribute brand_id
14
+ # The archived brand.
15
+ #
16
+ # @return [String]
17
+ required :brand_id, String
18
+
19
+ # @!attribute collections_moved
20
+ # Count of product collections moved to the target brand.
21
+ #
22
+ # @return [Integer]
23
+ required :collections_moved, Integer
24
+
25
+ # @!attribute products_moved
26
+ # Count of products moved to the target brand.
27
+ #
28
+ # @return [Integer]
29
+ required :products_moved, Integer
30
+
31
+ # @!attribute subscriptions_moved
32
+ # Count of live subscriptions moved to the target brand.
33
+ #
34
+ # @return [Integer]
35
+ required :subscriptions_moved, Integer
36
+
37
+ # @!attribute moved_to_brand_id
38
+ # Brand that received the moved records. Null when no target was given.
39
+ #
40
+ # @return [String, nil]
41
+ optional :moved_to_brand_id, String, nil?: true
42
+
43
+ # @!method initialize(archived_at:, brand_id:, collections_moved:, products_moved:, subscriptions_moved:, moved_to_brand_id: nil)
44
+ # @param archived_at [Time] Time the brand was archived.
45
+ #
46
+ # @param brand_id [String] The archived brand.
47
+ #
48
+ # @param collections_moved [Integer] Count of product collections moved to the target brand.
49
+ #
50
+ # @param products_moved [Integer] Count of products moved to the target brand.
51
+ #
52
+ # @param subscriptions_moved [Integer] Count of live subscriptions moved to the target brand.
53
+ #
54
+ # @param moved_to_brand_id [String, nil] Brand that received the moved records. Null when no target was given.
55
+ end
56
+ end
57
+ end
@@ -7,7 +7,15 @@ module Dodopayments
7
7
  extend Dodopayments::Internal::Type::RequestParameters::Converter
8
8
  include Dodopayments::Internal::Type::RequestParameters
9
9
 
10
- # @!method initialize(request_options: {})
10
+ # @!attribute include_archived
11
+ # Set to true to also list archived brands. Default false.
12
+ #
13
+ # @return [Boolean, nil]
14
+ optional :include_archived, Dodopayments::Internal::Type::Boolean
15
+
16
+ # @!method initialize(include_archived: nil, request_options: {})
17
+ # @param include_archived [Boolean] Set to true to also list archived brands. Default false.
18
+ #
11
19
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
12
20
  end
13
21
  end
@@ -122,7 +122,17 @@ module Dodopayments
122
122
  # @return [Boolean, nil]
123
123
  optional :require_phone_number, Dodopayments::Internal::Type::Boolean
124
124
 
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)
125
+ # @!attribute single_page
126
+ # If true, the session uses the single-page checkout flow: the page initializes
127
+ # the payment at load time and confirms it in place, with no separate payment
128
+ # page.
129
+ #
130
+ # Default is false
131
+ #
132
+ # @return [Boolean, nil]
133
+ optional :single_page, Dodopayments::Internal::Type::Boolean
134
+
135
+ # @!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, single_page: nil)
126
136
  # Some parameter documentations has been truncated, see
127
137
  # {Dodopayments::Models::CheckoutSessionFlags} for more details.
128
138
  #
@@ -159,6 +169,8 @@ module Dodopayments
159
169
  # @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
160
170
  #
161
171
  # @param require_phone_number [Boolean] If true, the customer must provide a phone number to complete checkout.
172
+ #
173
+ # @param single_page [Boolean] If true, the session uses the single-page checkout flow: the page
162
174
  end
163
175
  end
164
176
  end
@@ -75,6 +75,8 @@ module Dodopayments
75
75
 
76
76
  Brand = Dodopayments::Models::Brand
77
77
 
78
+ BrandArchiveParams = Dodopayments::Models::BrandArchiveParams
79
+
78
80
  BrandCreateParams = Dodopayments::Models::BrandCreateParams
79
81
 
80
82
  BrandListParams = Dodopayments::Models::BrandListParams
@@ -78,7 +78,9 @@ module Dodopayments
78
78
  )
79
79
  end
80
80
 
81
- # @overload list(request_options: {})
81
+ # @overload list(include_archived: nil, request_options: {})
82
+ #
83
+ # @param include_archived [Boolean] Set to true to also list archived brands. Default false.
82
84
  #
83
85
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
84
86
  #
@@ -86,11 +88,42 @@ module Dodopayments
86
88
  #
87
89
  # @see Dodopayments::Models::BrandListParams
88
90
  def list(params = {})
91
+ parsed, options = Dodopayments::BrandListParams.dump_request(params)
92
+ query = Dodopayments::Internal::Util.encode_query_params(parsed)
89
93
  @client.request(
90
94
  method: :get,
91
95
  path: "brands",
96
+ query: query,
92
97
  model: Dodopayments::Models::BrandListResponse,
93
- options: params[:request_options]
98
+ options: options
99
+ )
100
+ end
101
+
102
+ # Some parameter documentations has been truncated, see
103
+ # {Dodopayments::Models::BrandArchiveParams} for more details.
104
+ #
105
+ # Archive a brand. Its products, live subscriptions, and product collections move
106
+ # to the `move_products_to` brand. Archive is permanent.
107
+ #
108
+ # @overload archive(id, move_products_to: nil, request_options: {})
109
+ #
110
+ # @param id [String] Brand Id
111
+ #
112
+ # @param move_products_to [String, nil] Brand that takes over the products and the live subscriptions of the
113
+ #
114
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
115
+ #
116
+ # @return [Dodopayments::Models::BrandArchiveResponse]
117
+ #
118
+ # @see Dodopayments::Models::BrandArchiveParams
119
+ def archive(id, params = {})
120
+ parsed, options = Dodopayments::BrandArchiveParams.dump_request(params)
121
+ @client.request(
122
+ method: :post,
123
+ path: ["brands/%1$s/archive", id],
124
+ body: parsed,
125
+ model: Dodopayments::Models::BrandArchiveResponse,
126
+ options: options
94
127
  )
95
128
  end
96
129
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dodopayments
4
- VERSION = "2.24.0"
4
+ VERSION = "2.25.0"
5
5
  end
data/lib/dodopayments.rb CHANGED
@@ -84,6 +84,8 @@ require_relative "dodopayments/models/balance_ledger_entry"
84
84
  require_relative "dodopayments/models/balance_retrieve_ledger_params"
85
85
  require_relative "dodopayments/models/billing_address"
86
86
  require_relative "dodopayments/models/brand"
87
+ require_relative "dodopayments/models/brand_archive_params"
88
+ require_relative "dodopayments/models/brand_archive_response"
87
89
  require_relative "dodopayments/models/brand_create_params"
88
90
  require_relative "dodopayments/models/brand_list_params"
89
91
  require_relative "dodopayments/models/brand_list_response"
@@ -26,6 +26,10 @@ module Dodopayments
26
26
  sig { returns(Dodopayments::Brand::VerificationStatus::TaggedSymbol) }
27
27
  attr_accessor :verification_status
28
28
 
29
+ # Time the brand was archived. Null for an active brand.
30
+ sig { returns(T.nilable(Time)) }
31
+ attr_accessor :archived_at
32
+
29
33
  sig { returns(T.nilable(String)) }
30
34
  attr_accessor :description
31
35
 
@@ -54,6 +58,7 @@ module Dodopayments
54
58
  verification_enabled: T::Boolean,
55
59
  verification_status:
56
60
  Dodopayments::Brand::VerificationStatus::OrSymbol,
61
+ archived_at: T.nilable(Time),
57
62
  description: T.nilable(String),
58
63
  image: T.nilable(String),
59
64
  name: T.nilable(String),
@@ -69,6 +74,8 @@ module Dodopayments
69
74
  statement_descriptor:,
70
75
  verification_enabled:,
71
76
  verification_status:,
77
+ # Time the brand was archived. Null for an active brand.
78
+ archived_at: nil,
72
79
  description: nil,
73
80
  image: nil,
74
81
  name: nil,
@@ -89,6 +96,7 @@ module Dodopayments
89
96
  verification_enabled: T::Boolean,
90
97
  verification_status:
91
98
  Dodopayments::Brand::VerificationStatus::TaggedSymbol,
99
+ archived_at: T.nilable(Time),
92
100
  description: T.nilable(String),
93
101
  image: T.nilable(String),
94
102
  name: T.nilable(String),
@@ -0,0 +1,58 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ class BrandArchiveParams < Dodopayments::Internal::Type::BaseModel
6
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
7
+ include Dodopayments::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Dodopayments::BrandArchiveParams,
13
+ Dodopayments::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(String) }
18
+ attr_accessor :id
19
+
20
+ # Brand that takes over the products and the live subscriptions of the brand you
21
+ # archive. It must be a brand of the same business, and it must not be archived.
22
+ # The primary brand (its brand id is the business id) is a valid target. Omit this
23
+ # field only when the brand holds no products and no live subscriptions.
24
+ sig { returns(T.nilable(String)) }
25
+ attr_accessor :move_products_to
26
+
27
+ sig do
28
+ params(
29
+ id: String,
30
+ move_products_to: T.nilable(String),
31
+ request_options: Dodopayments::RequestOptions::OrHash
32
+ ).returns(T.attached_class)
33
+ end
34
+ def self.new(
35
+ id:,
36
+ # Brand that takes over the products and the live subscriptions of the brand you
37
+ # archive. It must be a brand of the same business, and it must not be archived.
38
+ # The primary brand (its brand id is the business id) is a valid target. Omit this
39
+ # field only when the brand holds no products and no live subscriptions.
40
+ move_products_to: nil,
41
+ request_options: {}
42
+ )
43
+ end
44
+
45
+ sig do
46
+ override.returns(
47
+ {
48
+ id: String,
49
+ move_products_to: T.nilable(String),
50
+ request_options: Dodopayments::RequestOptions
51
+ }
52
+ )
53
+ end
54
+ def to_hash
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,80 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ class BrandArchiveResponse < Dodopayments::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Dodopayments::Models::BrandArchiveResponse,
10
+ Dodopayments::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # Time the brand was archived.
15
+ sig { returns(Time) }
16
+ attr_accessor :archived_at
17
+
18
+ # The archived brand.
19
+ sig { returns(String) }
20
+ attr_accessor :brand_id
21
+
22
+ # Count of product collections moved to the target brand.
23
+ sig { returns(Integer) }
24
+ attr_accessor :collections_moved
25
+
26
+ # Count of products moved to the target brand.
27
+ sig { returns(Integer) }
28
+ attr_accessor :products_moved
29
+
30
+ # Count of live subscriptions moved to the target brand.
31
+ sig { returns(Integer) }
32
+ attr_accessor :subscriptions_moved
33
+
34
+ # Brand that received the moved records. Null when no target was given.
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :moved_to_brand_id
37
+
38
+ sig do
39
+ params(
40
+ archived_at: Time,
41
+ brand_id: String,
42
+ collections_moved: Integer,
43
+ products_moved: Integer,
44
+ subscriptions_moved: Integer,
45
+ moved_to_brand_id: T.nilable(String)
46
+ ).returns(T.attached_class)
47
+ end
48
+ def self.new(
49
+ # Time the brand was archived.
50
+ archived_at:,
51
+ # The archived brand.
52
+ brand_id:,
53
+ # Count of product collections moved to the target brand.
54
+ collections_moved:,
55
+ # Count of products moved to the target brand.
56
+ products_moved:,
57
+ # Count of live subscriptions moved to the target brand.
58
+ subscriptions_moved:,
59
+ # Brand that received the moved records. Null when no target was given.
60
+ moved_to_brand_id: nil
61
+ )
62
+ end
63
+
64
+ sig do
65
+ override.returns(
66
+ {
67
+ archived_at: Time,
68
+ brand_id: String,
69
+ collections_moved: Integer,
70
+ products_moved: Integer,
71
+ subscriptions_moved: Integer,
72
+ moved_to_brand_id: T.nilable(String)
73
+ }
74
+ )
75
+ end
76
+ def to_hash
77
+ end
78
+ end
79
+ end
80
+ end
@@ -11,16 +11,33 @@ module Dodopayments
11
11
  T.any(Dodopayments::BrandListParams, Dodopayments::Internal::AnyHash)
12
12
  end
13
13
 
14
+ # Set to true to also list archived brands. Default false.
15
+ sig { returns(T.nilable(T::Boolean)) }
16
+ attr_reader :include_archived
17
+
18
+ sig { params(include_archived: T::Boolean).void }
19
+ attr_writer :include_archived
20
+
14
21
  sig do
15
- params(request_options: Dodopayments::RequestOptions::OrHash).returns(
16
- T.attached_class
17
- )
22
+ params(
23
+ include_archived: T::Boolean,
24
+ request_options: Dodopayments::RequestOptions::OrHash
25
+ ).returns(T.attached_class)
18
26
  end
19
- def self.new(request_options: {})
27
+ def self.new(
28
+ # Set to true to also list archived brands. Default false.
29
+ include_archived: nil,
30
+ request_options: {}
31
+ )
20
32
  end
21
33
 
22
34
  sig do
23
- override.returns({ request_options: Dodopayments::RequestOptions })
35
+ override.returns(
36
+ {
37
+ include_archived: T::Boolean,
38
+ request_options: Dodopayments::RequestOptions
39
+ }
40
+ )
24
41
  end
25
42
  def to_hash
26
43
  end
@@ -147,6 +147,17 @@ module Dodopayments
147
147
  sig { params(require_phone_number: T::Boolean).void }
148
148
  attr_writer :require_phone_number
149
149
 
150
+ # If true, the session uses the single-page checkout flow: the page initializes
151
+ # the payment at load time and confirms it in place, with no separate payment
152
+ # page.
153
+ #
154
+ # Default is false
155
+ sig { returns(T.nilable(T::Boolean)) }
156
+ attr_reader :single_page
157
+
158
+ sig { params(single_page: T::Boolean).void }
159
+ attr_writer :single_page
160
+
150
161
  sig do
151
162
  params(
152
163
  allow_currency_selection: T::Boolean,
@@ -165,7 +176,8 @@ module Dodopayments
165
176
  allow_tax_id: T::Boolean,
166
177
  always_create_new_customer: T::Boolean,
167
178
  redirect_immediately: T::Boolean,
168
- require_phone_number: T::Boolean
179
+ require_phone_number: T::Boolean,
180
+ single_page: T::Boolean
169
181
  ).returns(T.attached_class)
170
182
  end
171
183
  def self.new(
@@ -219,7 +231,13 @@ module Dodopayments
219
231
  # `allow_phone_number_collection` to also be true.
220
232
  #
221
233
  # Default is false
222
- require_phone_number: nil
234
+ require_phone_number: nil,
235
+ # If true, the session uses the single-page checkout flow: the page initializes
236
+ # the payment at load time and confirms it in place, with no separate payment
237
+ # page.
238
+ #
239
+ # Default is false
240
+ single_page: nil
223
241
  )
224
242
  end
225
243
 
@@ -242,7 +260,8 @@ module Dodopayments
242
260
  allow_tax_id: T::Boolean,
243
261
  always_create_new_customer: T::Boolean,
244
262
  redirect_immediately: T::Boolean,
245
- require_phone_number: T::Boolean
263
+ require_phone_number: T::Boolean,
264
+ single_page: T::Boolean
246
265
  }
247
266
  )
248
267
  end
@@ -40,6 +40,8 @@ module Dodopayments
40
40
 
41
41
  Brand = Dodopayments::Models::Brand
42
42
 
43
+ BrandArchiveParams = Dodopayments::Models::BrandArchiveParams
44
+
43
45
  BrandCreateParams = Dodopayments::Models::BrandCreateParams
44
46
 
45
47
  BrandListParams = Dodopayments::Models::BrandListParams
@@ -64,11 +64,37 @@ module Dodopayments
64
64
  end
65
65
 
66
66
  sig do
67
- params(request_options: Dodopayments::RequestOptions::OrHash).returns(
68
- Dodopayments::Models::BrandListResponse
69
- )
67
+ params(
68
+ include_archived: T::Boolean,
69
+ request_options: Dodopayments::RequestOptions::OrHash
70
+ ).returns(Dodopayments::Models::BrandListResponse)
71
+ end
72
+ def list(
73
+ # Set to true to also list archived brands. Default false.
74
+ include_archived: nil,
75
+ request_options: {}
76
+ )
70
77
  end
71
- def list(request_options: {})
78
+
79
+ # Archive a brand. Its products, live subscriptions, and product collections move
80
+ # to the `move_products_to` brand. Archive is permanent.
81
+ sig do
82
+ params(
83
+ id: String,
84
+ move_products_to: T.nilable(String),
85
+ request_options: Dodopayments::RequestOptions::OrHash
86
+ ).returns(Dodopayments::Models::BrandArchiveResponse)
87
+ end
88
+ def archive(
89
+ # Brand Id
90
+ id,
91
+ # Brand that takes over the products and the live subscriptions of the brand you
92
+ # archive. It must be a brand of the same business, and it must not be archived.
93
+ # The primary brand (its brand id is the business id) is a valid target. Omit this
94
+ # field only when the brand holds no products and no live subscriptions.
95
+ move_products_to: nil,
96
+ request_options: {}
97
+ )
72
98
  end
73
99
 
74
100
  sig do
@@ -8,6 +8,7 @@ module Dodopayments
8
8
  statement_descriptor: String,
9
9
  verification_enabled: bool,
10
10
  verification_status: Dodopayments::Models::Brand::verification_status,
11
+ archived_at: Time?,
11
12
  description: String?,
12
13
  image: String?,
13
14
  name: String?,
@@ -29,6 +30,8 @@ module Dodopayments
29
30
 
30
31
  attr_accessor verification_status: Dodopayments::Models::Brand::verification_status
31
32
 
33
+ attr_accessor archived_at: Time?
34
+
32
35
  attr_accessor description: String?
33
36
 
34
37
  attr_accessor image: String?
@@ -48,6 +51,7 @@ module Dodopayments
48
51
  statement_descriptor: String,
49
52
  verification_enabled: bool,
50
53
  verification_status: Dodopayments::Models::Brand::verification_status,
54
+ ?archived_at: Time?,
51
55
  ?description: String?,
52
56
  ?image: String?,
53
57
  ?name: String?,
@@ -63,6 +67,7 @@ module Dodopayments
63
67
  statement_descriptor: String,
64
68
  verification_enabled: bool,
65
69
  verification_status: Dodopayments::Models::Brand::verification_status,
70
+ archived_at: Time?,
66
71
  description: String?,
67
72
  image: String?,
68
73
  name: String?,
@@ -0,0 +1,28 @@
1
+ module Dodopayments
2
+ module Models
3
+ type brand_archive_params =
4
+ { id: String, move_products_to: String? }
5
+ & Dodopayments::Internal::Type::request_parameters
6
+
7
+ class BrandArchiveParams < Dodopayments::Internal::Type::BaseModel
8
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
+ include Dodopayments::Internal::Type::RequestParameters
10
+
11
+ attr_accessor id: String
12
+
13
+ attr_accessor move_products_to: String?
14
+
15
+ def initialize: (
16
+ id: String,
17
+ ?move_products_to: String?,
18
+ ?request_options: Dodopayments::request_opts
19
+ ) -> void
20
+
21
+ def to_hash: -> {
22
+ id: String,
23
+ move_products_to: String?,
24
+ request_options: Dodopayments::RequestOptions
25
+ }
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,45 @@
1
+ module Dodopayments
2
+ module Models
3
+ type brand_archive_response =
4
+ {
5
+ archived_at: Time,
6
+ brand_id: String,
7
+ collections_moved: Integer,
8
+ products_moved: Integer,
9
+ subscriptions_moved: Integer,
10
+ moved_to_brand_id: String?
11
+ }
12
+
13
+ class BrandArchiveResponse < Dodopayments::Internal::Type::BaseModel
14
+ attr_accessor archived_at: Time
15
+
16
+ attr_accessor brand_id: String
17
+
18
+ attr_accessor collections_moved: Integer
19
+
20
+ attr_accessor products_moved: Integer
21
+
22
+ attr_accessor subscriptions_moved: Integer
23
+
24
+ attr_accessor moved_to_brand_id: String?
25
+
26
+ def initialize: (
27
+ archived_at: Time,
28
+ brand_id: String,
29
+ collections_moved: Integer,
30
+ products_moved: Integer,
31
+ subscriptions_moved: Integer,
32
+ ?moved_to_brand_id: String?
33
+ ) -> void
34
+
35
+ def to_hash: -> {
36
+ archived_at: Time,
37
+ brand_id: String,
38
+ collections_moved: Integer,
39
+ products_moved: Integer,
40
+ subscriptions_moved: Integer,
41
+ moved_to_brand_id: String?
42
+ }
43
+ end
44
+ end
45
+ end
@@ -1,15 +1,26 @@
1
1
  module Dodopayments
2
2
  module Models
3
3
  type brand_list_params =
4
- { } & Dodopayments::Internal::Type::request_parameters
4
+ { include_archived: bool }
5
+ & Dodopayments::Internal::Type::request_parameters
5
6
 
6
7
  class BrandListParams < Dodopayments::Internal::Type::BaseModel
7
8
  extend Dodopayments::Internal::Type::RequestParameters::Converter
8
9
  include Dodopayments::Internal::Type::RequestParameters
9
10
 
10
- def initialize: (?request_options: Dodopayments::request_opts) -> void
11
+ attr_reader include_archived: bool?
11
12
 
12
- def to_hash: -> { request_options: Dodopayments::RequestOptions }
13
+ def include_archived=: (bool) -> bool
14
+
15
+ def initialize: (
16
+ ?include_archived: bool,
17
+ ?request_options: Dodopayments::request_opts
18
+ ) -> void
19
+
20
+ def to_hash: -> {
21
+ include_archived: bool,
22
+ request_options: Dodopayments::RequestOptions
23
+ }
13
24
  end
14
25
  end
15
26
  end
@@ -18,7 +18,8 @@ module Dodopayments
18
18
  allow_tax_id: bool,
19
19
  always_create_new_customer: bool,
20
20
  redirect_immediately: bool,
21
- require_phone_number: bool
21
+ require_phone_number: bool,
22
+ single_page: bool
22
23
  }
23
24
 
24
25
  class CheckoutSessionFlags < Dodopayments::Internal::Type::BaseModel
@@ -90,6 +91,10 @@ module Dodopayments
90
91
 
91
92
  def require_phone_number=: (bool) -> bool
92
93
 
94
+ attr_reader single_page: bool?
95
+
96
+ def single_page=: (bool) -> bool
97
+
93
98
  def initialize: (
94
99
  ?allow_currency_selection: bool,
95
100
  ?allow_customer_editing_business_name: bool,
@@ -107,7 +112,8 @@ module Dodopayments
107
112
  ?allow_tax_id: bool,
108
113
  ?always_create_new_customer: bool,
109
114
  ?redirect_immediately: bool,
110
- ?require_phone_number: bool
115
+ ?require_phone_number: bool,
116
+ ?single_page: bool
111
117
  ) -> void
112
118
 
113
119
  def to_hash: -> {
@@ -127,7 +133,8 @@ module Dodopayments
127
133
  allow_tax_id: bool,
128
134
  always_create_new_customer: bool,
129
135
  redirect_immediately: bool,
130
- require_phone_number: bool
136
+ require_phone_number: bool,
137
+ single_page: bool
131
138
  }
132
139
  end
133
140
  end
@@ -35,6 +35,8 @@ module Dodopayments
35
35
 
36
36
  class Brand = Dodopayments::Models::Brand
37
37
 
38
+ class BrandArchiveParams = Dodopayments::Models::BrandArchiveParams
39
+
38
40
  class BrandCreateParams = Dodopayments::Models::BrandCreateParams
39
41
 
40
42
  class BrandListParams = Dodopayments::Models::BrandListParams
@@ -27,9 +27,16 @@ module Dodopayments
27
27
  ) -> Dodopayments::Brand
28
28
 
29
29
  def list: (
30
+ ?include_archived: bool,
30
31
  ?request_options: Dodopayments::request_opts
31
32
  ) -> Dodopayments::Models::BrandListResponse
32
33
 
34
+ def archive: (
35
+ String id,
36
+ ?move_products_to: String?,
37
+ ?request_options: Dodopayments::request_opts
38
+ ) -> Dodopayments::Models::BrandArchiveResponse
39
+
33
40
  def update_images: (
34
41
  String id,
35
42
  ?request_options: Dodopayments::request_opts
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.24.0
4
+ version: 2.25.0
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-08-13 00:00:00.000000000 Z
11
+ date: 2026-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -104,6 +104,8 @@ files:
104
104
  - lib/dodopayments/models/balance_retrieve_ledger_params.rb
105
105
  - lib/dodopayments/models/billing_address.rb
106
106
  - lib/dodopayments/models/brand.rb
107
+ - lib/dodopayments/models/brand_archive_params.rb
108
+ - lib/dodopayments/models/brand_archive_response.rb
107
109
  - lib/dodopayments/models/brand_create_params.rb
108
110
  - lib/dodopayments/models/brand_list_params.rb
109
111
  - lib/dodopayments/models/brand_list_response.rb
@@ -497,6 +499,8 @@ files:
497
499
  - rbi/dodopayments/models/balance_retrieve_ledger_params.rbi
498
500
  - rbi/dodopayments/models/billing_address.rbi
499
501
  - rbi/dodopayments/models/brand.rbi
502
+ - rbi/dodopayments/models/brand_archive_params.rbi
503
+ - rbi/dodopayments/models/brand_archive_response.rbi
500
504
  - rbi/dodopayments/models/brand_create_params.rbi
501
505
  - rbi/dodopayments/models/brand_list_params.rbi
502
506
  - rbi/dodopayments/models/brand_list_response.rbi
@@ -889,6 +893,8 @@ files:
889
893
  - sig/dodopayments/models/balance_retrieve_ledger_params.rbs
890
894
  - sig/dodopayments/models/billing_address.rbs
891
895
  - sig/dodopayments/models/brand.rbs
896
+ - sig/dodopayments/models/brand_archive_params.rbs
897
+ - sig/dodopayments/models/brand_archive_response.rbs
892
898
  - sig/dodopayments/models/brand_create_params.rbs
893
899
  - sig/dodopayments/models/brand_list_params.rbs
894
900
  - sig/dodopayments/models/brand_list_response.rbs