ultracart_api 4.1.241 → 4.1.242

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.
@@ -0,0 +1,344 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class SfvbThemeUpgradeCheckResponse
18
+ # Newer versions this account may upgrade to, oldest first. Pass one as upgrade_to_version on duplicateSfvbTheme.
19
+ attr_accessor :available_versions
20
+
21
+ # True when duplicateSfvbTheme with upgrade_to_version set to to_version will be accepted. When false, reason says why.
22
+ attr_accessor :can_duplicate_and_upgrade
23
+
24
+ # What changed in each version after the theme's current one, up to to_version.
25
+ attr_accessor :change_log
26
+
27
+ # The theme's files that were edited after the theme was installed or last upgraded. Only these can merge, conflict or be overwritten - every other file is simply replaced with the new version's.
28
+ attr_accessor :customized_files
29
+
30
+ # Files in this theme that still have unresolved conflicts from an earlier upgrade. While any exist the theme can't be upgraded again, and the predicted lists above are empty.
31
+ attr_accessor :existing_merge_conflicts
32
+
33
+ # Customized files the upgrade would merge with the new version cleanly. Worth reviewing after the upgrade, but nothing to resolve.
34
+ attr_accessor :files_merged
35
+
36
+ # Customized files that can't be merged (not a text type that merges) and are replaced by the new version's, losing the edits. Copy anything you need from them first.
37
+ attr_accessor :files_overwritten
38
+
39
+ # Customized files whose edits collide with the new version. The upgrade writes them with conflict marker lines and flags them, and the theme can't be activated until each is resolved.
40
+ attr_accessor :files_with_merge_conflicts
41
+
42
+ # The theme's current version.
43
+ attr_accessor :from_version
44
+
45
+ # Why can_duplicate_and_upgrade is false. Null when it is true.
46
+ attr_accessor :reason
47
+
48
+ # The theme that was checked.
49
+ attr_accessor :theme_oid
50
+
51
+ # The version the check was run against. Null when no upgrade is available.
52
+ attr_accessor :to_version
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'available_versions' => :'available_versions',
58
+ :'can_duplicate_and_upgrade' => :'can_duplicate_and_upgrade',
59
+ :'change_log' => :'change_log',
60
+ :'customized_files' => :'customized_files',
61
+ :'existing_merge_conflicts' => :'existing_merge_conflicts',
62
+ :'files_merged' => :'files_merged',
63
+ :'files_overwritten' => :'files_overwritten',
64
+ :'files_with_merge_conflicts' => :'files_with_merge_conflicts',
65
+ :'from_version' => :'from_version',
66
+ :'reason' => :'reason',
67
+ :'theme_oid' => :'theme_oid',
68
+ :'to_version' => :'to_version'
69
+ }
70
+ end
71
+
72
+ # Returns all the JSON keys this model knows about
73
+ def self.acceptable_attributes
74
+ attribute_map.values
75
+ end
76
+
77
+ # Attribute type mapping.
78
+ def self.openapi_types
79
+ {
80
+ :'available_versions' => :'Array<String>',
81
+ :'can_duplicate_and_upgrade' => :'Boolean',
82
+ :'change_log' => :'Array<SfvbThemeChangeLogEntry>',
83
+ :'customized_files' => :'Array<String>',
84
+ :'existing_merge_conflicts' => :'Array<String>',
85
+ :'files_merged' => :'Array<String>',
86
+ :'files_overwritten' => :'Array<String>',
87
+ :'files_with_merge_conflicts' => :'Array<String>',
88
+ :'from_version' => :'String',
89
+ :'reason' => :'String',
90
+ :'theme_oid' => :'Integer',
91
+ :'to_version' => :'String'
92
+ }
93
+ end
94
+
95
+ # List of attributes with nullable: true
96
+ def self.openapi_nullable
97
+ Set.new([
98
+ ])
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbThemeUpgradeCheckResponse` initialize method"
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!self.class.attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbThemeUpgradeCheckResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'available_versions')
117
+ if (value = attributes[:'available_versions']).is_a?(Array)
118
+ self.available_versions = value
119
+ end
120
+ end
121
+
122
+ if attributes.key?(:'can_duplicate_and_upgrade')
123
+ self.can_duplicate_and_upgrade = attributes[:'can_duplicate_and_upgrade']
124
+ end
125
+
126
+ if attributes.key?(:'change_log')
127
+ if (value = attributes[:'change_log']).is_a?(Array)
128
+ self.change_log = value
129
+ end
130
+ end
131
+
132
+ if attributes.key?(:'customized_files')
133
+ if (value = attributes[:'customized_files']).is_a?(Array)
134
+ self.customized_files = value
135
+ end
136
+ end
137
+
138
+ if attributes.key?(:'existing_merge_conflicts')
139
+ if (value = attributes[:'existing_merge_conflicts']).is_a?(Array)
140
+ self.existing_merge_conflicts = value
141
+ end
142
+ end
143
+
144
+ if attributes.key?(:'files_merged')
145
+ if (value = attributes[:'files_merged']).is_a?(Array)
146
+ self.files_merged = value
147
+ end
148
+ end
149
+
150
+ if attributes.key?(:'files_overwritten')
151
+ if (value = attributes[:'files_overwritten']).is_a?(Array)
152
+ self.files_overwritten = value
153
+ end
154
+ end
155
+
156
+ if attributes.key?(:'files_with_merge_conflicts')
157
+ if (value = attributes[:'files_with_merge_conflicts']).is_a?(Array)
158
+ self.files_with_merge_conflicts = value
159
+ end
160
+ end
161
+
162
+ if attributes.key?(:'from_version')
163
+ self.from_version = attributes[:'from_version']
164
+ end
165
+
166
+ if attributes.key?(:'reason')
167
+ self.reason = attributes[:'reason']
168
+ end
169
+
170
+ if attributes.key?(:'theme_oid')
171
+ self.theme_oid = attributes[:'theme_oid']
172
+ end
173
+
174
+ if attributes.key?(:'to_version')
175
+ self.to_version = attributes[:'to_version']
176
+ end
177
+ end
178
+
179
+ # Show invalid properties with the reasons. Usually used together with valid?
180
+ # @return Array for valid properties with the reasons
181
+ def list_invalid_properties
182
+ invalid_properties = Array.new
183
+ invalid_properties
184
+ end
185
+
186
+ # Check to see if the all the properties in the model are valid
187
+ # @return true if the model is valid
188
+ def valid?
189
+ true
190
+ end
191
+
192
+ # Checks equality by comparing each attribute.
193
+ # @param [Object] Object to be compared
194
+ def ==(o)
195
+ return true if self.equal?(o)
196
+ self.class == o.class &&
197
+ available_versions == o.available_versions &&
198
+ can_duplicate_and_upgrade == o.can_duplicate_and_upgrade &&
199
+ change_log == o.change_log &&
200
+ customized_files == o.customized_files &&
201
+ existing_merge_conflicts == o.existing_merge_conflicts &&
202
+ files_merged == o.files_merged &&
203
+ files_overwritten == o.files_overwritten &&
204
+ files_with_merge_conflicts == o.files_with_merge_conflicts &&
205
+ from_version == o.from_version &&
206
+ reason == o.reason &&
207
+ theme_oid == o.theme_oid &&
208
+ to_version == o.to_version
209
+ end
210
+
211
+ # @see the `==` method
212
+ # @param [Object] Object to be compared
213
+ def eql?(o)
214
+ self == o
215
+ end
216
+
217
+ # Calculates hash code according to all attributes.
218
+ # @return [Integer] Hash code
219
+ def hash
220
+ [available_versions, can_duplicate_and_upgrade, change_log, customized_files, existing_merge_conflicts, files_merged, files_overwritten, files_with_merge_conflicts, from_version, reason, theme_oid, to_version].hash
221
+ end
222
+
223
+ # Builds the object from hash
224
+ # @param [Hash] attributes Model attributes in the form of hash
225
+ # @return [Object] Returns the model itself
226
+ def self.build_from_hash(attributes)
227
+ new.build_from_hash(attributes)
228
+ end
229
+
230
+ # Builds the object from hash
231
+ # @param [Hash] attributes Model attributes in the form of hash
232
+ # @return [Object] Returns the model itself
233
+ def build_from_hash(attributes)
234
+ return nil unless attributes.is_a?(Hash)
235
+ attributes = attributes.transform_keys(&:to_sym)
236
+ self.class.openapi_types.each_pair do |key, type|
237
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
238
+ self.send("#{key}=", nil)
239
+ elsif type =~ /\AArray<(.*)>/i
240
+ # check to ensure the input is an array given that the attribute
241
+ # is documented as an array but the input is not
242
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
243
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
244
+ end
245
+ elsif !attributes[self.class.attribute_map[key]].nil?
246
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
247
+ end
248
+ end
249
+
250
+ self
251
+ end
252
+
253
+ # Deserializes the data based on type
254
+ # @param string type Data type
255
+ # @param string value Value to be deserialized
256
+ # @return [Object] Deserialized data
257
+ def _deserialize(type, value)
258
+ case type.to_sym
259
+ when :Time
260
+ Time.parse(value)
261
+ when :Date
262
+ Date.parse(value)
263
+ when :String
264
+ value.to_s
265
+ when :Integer
266
+ value.to_i
267
+ when :Float
268
+ value.to_f
269
+ when :Boolean
270
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
271
+ true
272
+ else
273
+ false
274
+ end
275
+ when :Object
276
+ # generic object (usually a Hash), return directly
277
+ value
278
+ when /\AArray<(?<inner_type>.+)>\z/
279
+ inner_type = Regexp.last_match[:inner_type]
280
+ value.map { |v| _deserialize(inner_type, v) }
281
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
282
+ k_type = Regexp.last_match[:k_type]
283
+ v_type = Regexp.last_match[:v_type]
284
+ {}.tap do |hash|
285
+ value.each do |k, v|
286
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
287
+ end
288
+ end
289
+ else # model
290
+ # models (e.g. Pet) or oneOf
291
+ klass = UltracartClient.const_get(type)
292
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
293
+ end
294
+ end
295
+
296
+ # Returns the string representation of the object
297
+ # @return [String] String presentation of the object
298
+ def to_s
299
+ to_hash.to_s
300
+ end
301
+
302
+ # to_body is an alias to to_hash (backward compatibility)
303
+ # @return [Hash] Returns the object in the form of hash
304
+ def to_body
305
+ to_hash
306
+ end
307
+
308
+ # Returns the object in the form of hash
309
+ # @return [Hash] Returns the object in the form of hash
310
+ def to_hash
311
+ hash = {}
312
+ self.class.attribute_map.each_pair do |attr, param|
313
+ value = self.send(attr)
314
+ if value.nil?
315
+ is_nullable = self.class.openapi_nullable.include?(attr)
316
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
317
+ end
318
+
319
+ hash[param] = _to_hash(value)
320
+ end
321
+ hash
322
+ end
323
+
324
+ # Outputs non-array value in the form of hash
325
+ # For object, use to_hash. Otherwise, just return the value
326
+ # @param [Object] value Any valid value
327
+ # @return [Hash] Returns the value in the form of hash
328
+ def _to_hash(value)
329
+ if value.is_a?(Array)
330
+ value.compact.map { |v| _to_hash(v) }
331
+ elsif value.is_a?(Hash)
332
+ {}.tap do |hash|
333
+ value.each { |k, v| hash[k] = _to_hash(v) }
334
+ end
335
+ elsif value.respond_to? :to_hash
336
+ value.to_hash
337
+ else
338
+ value
339
+ end
340
+ end
341
+
342
+ end
343
+
344
+ end
@@ -18,6 +18,12 @@ module UltracartClient
18
18
  # Oid of the active theme, repeated here so a caller does not have to scan the list.
19
19
  attr_accessor :active_theme_oid
20
20
 
21
+ # How many themes the storefront holds now. When it equals theme_limit, delete an inactive theme in the admin before duplicating.
22
+ attr_accessor :theme_count
23
+
24
+ # Most themes a storefront can hold, active and inactive together. A duplicate or install at the limit is refused with sfvb.theme_limit_reached.
25
+ attr_accessor :theme_limit
26
+
21
27
  # Themes belonging to the storefront. Exactly one is flagged active.
22
28
  attr_accessor :themes
23
29
 
@@ -25,6 +31,8 @@ module UltracartClient
25
31
  def self.attribute_map
26
32
  {
27
33
  :'active_theme_oid' => :'active_theme_oid',
34
+ :'theme_count' => :'theme_count',
35
+ :'theme_limit' => :'theme_limit',
28
36
  :'themes' => :'themes'
29
37
  }
30
38
  end
@@ -38,6 +46,8 @@ module UltracartClient
38
46
  def self.openapi_types
39
47
  {
40
48
  :'active_theme_oid' => :'Integer',
49
+ :'theme_count' => :'Integer',
50
+ :'theme_limit' => :'Integer',
41
51
  :'themes' => :'Array<SfvbTheme>'
42
52
  }
43
53
  end
@@ -67,6 +77,14 @@ module UltracartClient
67
77
  self.active_theme_oid = attributes[:'active_theme_oid']
68
78
  end
69
79
 
80
+ if attributes.key?(:'theme_count')
81
+ self.theme_count = attributes[:'theme_count']
82
+ end
83
+
84
+ if attributes.key?(:'theme_limit')
85
+ self.theme_limit = attributes[:'theme_limit']
86
+ end
87
+
70
88
  if attributes.key?(:'themes')
71
89
  if (value = attributes[:'themes']).is_a?(Array)
72
90
  self.themes = value
@@ -93,6 +111,8 @@ module UltracartClient
93
111
  return true if self.equal?(o)
94
112
  self.class == o.class &&
95
113
  active_theme_oid == o.active_theme_oid &&
114
+ theme_count == o.theme_count &&
115
+ theme_limit == o.theme_limit &&
96
116
  themes == o.themes
97
117
  end
98
118
 
@@ -105,7 +125,7 @@ module UltracartClient
105
125
  # Calculates hash code according to all attributes.
106
126
  # @return [Integer] Hash code
107
127
  def hash
108
- [active_theme_oid, themes].hash
128
+ [active_theme_oid, theme_count, theme_limit, themes].hash
109
129
  end
110
130
 
111
131
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.241'
14
+ VERSION = '4.1.242'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1328,10 +1328,12 @@ require 'ultracart_api/models/sfvb_theme_attribute'
1328
1328
  require 'ultracart_api/models/sfvb_theme_attribute_update'
1329
1329
  require 'ultracart_api/models/sfvb_theme_attribute_update_request'
1330
1330
  require 'ultracart_api/models/sfvb_theme_attributes_response'
1331
+ require 'ultracart_api/models/sfvb_theme_change_log_entry'
1331
1332
  require 'ultracart_api/models/sfvb_theme_duplicate_request'
1332
1333
  require 'ultracart_api/models/sfvb_theme_font'
1333
1334
  require 'ultracart_api/models/sfvb_theme_font_family'
1334
1335
  require 'ultracart_api/models/sfvb_theme_job_response'
1336
+ require 'ultracart_api/models/sfvb_theme_upgrade_check_response'
1335
1337
  require 'ultracart_api/models/sfvb_themes_response'
1336
1338
  require 'ultracart_api/models/sfvb_tracking_advanced'
1337
1339
  require 'ultracart_api/models/sfvb_tracking_advanced_request'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.241
4
+ version: 4.1.242
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-11-10 00:00:00.000000000 Z
11
+ date: 2026-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -1390,10 +1390,12 @@ files:
1390
1390
  - docs/SfvbThemeAttributeUpdate.md
1391
1391
  - docs/SfvbThemeAttributeUpdateRequest.md
1392
1392
  - docs/SfvbThemeAttributesResponse.md
1393
+ - docs/SfvbThemeChangeLogEntry.md
1393
1394
  - docs/SfvbThemeDuplicateRequest.md
1394
1395
  - docs/SfvbThemeFont.md
1395
1396
  - docs/SfvbThemeFontFamily.md
1396
1397
  - docs/SfvbThemeJobResponse.md
1398
+ - docs/SfvbThemeUpgradeCheckResponse.md
1397
1399
  - docs/SfvbThemesResponse.md
1398
1400
  - docs/SfvbTrackingAdvanced.md
1399
1401
  - docs/SfvbTrackingAdvancedRequest.md
@@ -2890,10 +2892,12 @@ files:
2890
2892
  - lib/ultracart_api/models/sfvb_theme_attribute_update.rb
2891
2893
  - lib/ultracart_api/models/sfvb_theme_attribute_update_request.rb
2892
2894
  - lib/ultracart_api/models/sfvb_theme_attributes_response.rb
2895
+ - lib/ultracart_api/models/sfvb_theme_change_log_entry.rb
2893
2896
  - lib/ultracart_api/models/sfvb_theme_duplicate_request.rb
2894
2897
  - lib/ultracart_api/models/sfvb_theme_font.rb
2895
2898
  - lib/ultracart_api/models/sfvb_theme_font_family.rb
2896
2899
  - lib/ultracart_api/models/sfvb_theme_job_response.rb
2900
+ - lib/ultracart_api/models/sfvb_theme_upgrade_check_response.rb
2897
2901
  - lib/ultracart_api/models/sfvb_themes_response.rb
2898
2902
  - lib/ultracart_api/models/sfvb_tracking_advanced.rb
2899
2903
  - lib/ultracart_api/models/sfvb_tracking_advanced_request.rb