ultracart_api 4.1.200 → 4.1.202

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.
@@ -24,9 +24,15 @@ module UltracartClient
24
24
  # True for the image an itemimage element with no code renders. Default is per media type, so an item may have one default image and one default PDF at the same time.
25
25
  attr_accessor :default
26
26
 
27
- # Stored with the image and rendered as its alt text. When it is empty the render falls back to the item's own description, so an empty value here is not an empty alt attribute.
27
+ # The merchant's description, stored with the image and rendered as its alt text. When it is empty the render falls back to rekognition_description or to text built from the item's title, depending on the element, so an empty value here is not an empty alt attribute.
28
28
  attr_accessor :description
29
29
 
30
+ # SHA-256 of description (empty when there is none). Send it as current_sha256 when changing the description so a change made since you read it is not overwritten.
31
+ attr_accessor :description_sha256
32
+
33
+ # Where the alt text comes from now. merchant when description is set, rekognition when only rekognition_description is, none otherwise.
34
+ attr_accessor :description_source
35
+
30
36
  # Width x height in pixels, when the storage measured the file.
31
37
  attr_accessor :dimensions
32
38
 
@@ -36,6 +42,12 @@ module UltracartClient
36
42
  # The stored file's name. Empty when the slot is declared and nothing is attached.
37
43
  attr_accessor :filename
38
44
 
45
+ # The stored image's id. Name it to change this image's description when it has no code.
46
+ attr_accessor :merchant_item_multimedia_oid
47
+
48
+ # The machine description image recognition produced for the stored image, if any. It is used only while description is empty, and a description written here or in the admin always takes its place.
49
+ attr_accessor :rekognition_description
50
+
39
51
  # The media type the storage recorded.
40
52
  attr_accessor :type
41
53
 
@@ -71,9 +83,13 @@ module UltracartClient
71
83
  :'declared' => :'declared',
72
84
  :'default' => :'default',
73
85
  :'description' => :'description',
86
+ :'description_sha256' => :'description_sha256',
87
+ :'description_source' => :'description_source',
74
88
  :'dimensions' => :'dimensions',
75
89
  :'exclude_from_gallery' => :'exclude_from_gallery',
76
90
  :'filename' => :'filename',
91
+ :'merchant_item_multimedia_oid' => :'merchant_item_multimedia_oid',
92
+ :'rekognition_description' => :'rekognition_description',
77
93
  :'type' => :'type',
78
94
  :'view_url' => :'view_url'
79
95
  }
@@ -91,9 +107,13 @@ module UltracartClient
91
107
  :'declared' => :'Boolean',
92
108
  :'default' => :'Boolean',
93
109
  :'description' => :'String',
110
+ :'description_sha256' => :'String',
111
+ :'description_source' => :'String',
94
112
  :'dimensions' => :'String',
95
113
  :'exclude_from_gallery' => :'Boolean',
96
114
  :'filename' => :'String',
115
+ :'merchant_item_multimedia_oid' => :'Integer',
116
+ :'rekognition_description' => :'String',
97
117
  :'type' => :'String',
98
118
  :'view_url' => :'String'
99
119
  }
@@ -136,6 +156,14 @@ module UltracartClient
136
156
  self.description = attributes[:'description']
137
157
  end
138
158
 
159
+ if attributes.key?(:'description_sha256')
160
+ self.description_sha256 = attributes[:'description_sha256']
161
+ end
162
+
163
+ if attributes.key?(:'description_source')
164
+ self.description_source = attributes[:'description_source']
165
+ end
166
+
139
167
  if attributes.key?(:'dimensions')
140
168
  self.dimensions = attributes[:'dimensions']
141
169
  end
@@ -148,6 +176,14 @@ module UltracartClient
148
176
  self.filename = attributes[:'filename']
149
177
  end
150
178
 
179
+ if attributes.key?(:'merchant_item_multimedia_oid')
180
+ self.merchant_item_multimedia_oid = attributes[:'merchant_item_multimedia_oid']
181
+ end
182
+
183
+ if attributes.key?(:'rekognition_description')
184
+ self.rekognition_description = attributes[:'rekognition_description']
185
+ end
186
+
151
187
  if attributes.key?(:'type')
152
188
  self.type = attributes[:'type']
153
189
  end
@@ -167,11 +203,23 @@ module UltracartClient
167
203
  # Check to see if the all the properties in the model are valid
168
204
  # @return true if the model is valid
169
205
  def valid?
206
+ description_source_validator = EnumAttributeValidator.new('String', ["merchant", "rekognition", "none"])
207
+ return false unless description_source_validator.valid?(@description_source)
170
208
  type_validator = EnumAttributeValidator.new('String', ["Image", "Video", "PDF", "Text", "Unknown"])
171
209
  return false unless type_validator.valid?(@type)
172
210
  true
173
211
  end
174
212
 
213
+ # Custom attribute writer method checking allowed values (enum).
214
+ # @param [Object] description_source Object to be assigned
215
+ def description_source=(description_source)
216
+ validator = EnumAttributeValidator.new('String', ["merchant", "rekognition", "none"])
217
+ unless validator.valid?(description_source)
218
+ fail ArgumentError, "invalid value for \"description_source\", must be one of #{validator.allowable_values}."
219
+ end
220
+ @description_source = description_source
221
+ end
222
+
175
223
  # Custom attribute writer method checking allowed values (enum).
176
224
  # @param [Object] type Object to be assigned
177
225
  def type=(type)
@@ -191,9 +239,13 @@ module UltracartClient
191
239
  declared == o.declared &&
192
240
  default == o.default &&
193
241
  description == o.description &&
242
+ description_sha256 == o.description_sha256 &&
243
+ description_source == o.description_source &&
194
244
  dimensions == o.dimensions &&
195
245
  exclude_from_gallery == o.exclude_from_gallery &&
196
246
  filename == o.filename &&
247
+ merchant_item_multimedia_oid == o.merchant_item_multimedia_oid &&
248
+ rekognition_description == o.rekognition_description &&
197
249
  type == o.type &&
198
250
  view_url == o.view_url
199
251
  end
@@ -207,7 +259,7 @@ module UltracartClient
207
259
  # Calculates hash code according to all attributes.
208
260
  # @return [Integer] Hash code
209
261
  def hash
210
- [code, declared, default, description, dimensions, exclude_from_gallery, filename, type, view_url].hash
262
+ [code, declared, default, description, description_sha256, description_source, dimensions, exclude_from_gallery, filename, merchant_item_multimedia_oid, rekognition_description, type, view_url].hash
211
263
  end
212
264
 
213
265
  # Builds the object from hash
@@ -0,0 +1,260 @@
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 SfvbItemMultimediaDescriptionRequest
18
+ # The image code, the value an itemimage element's itemImageCode names.
19
+ attr_accessor :code
20
+
21
+ # The description_sha256 you read. When it is sent and the description has changed since, nothing is written and the call fails with a version conflict.
22
+ attr_accessor :current_sha256
23
+
24
+ # The item's default image, which an itemimage element with no code renders.
25
+ attr_accessor :default
26
+
27
+ # The new description, rendered as the image's alt text. An empty string clears it, so the image falls back to the machine description or the element's own fallback. Longer text is cut to 500 characters.
28
+ attr_accessor :description
29
+
30
+ # The stored image's id, as an item read reports it. Name this, or one of code or default.
31
+ attr_accessor :merchant_item_multimedia_oid
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'code' => :'code',
37
+ :'current_sha256' => :'current_sha256',
38
+ :'default' => :'default',
39
+ :'description' => :'description',
40
+ :'merchant_item_multimedia_oid' => :'merchant_item_multimedia_oid'
41
+ }
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'code' => :'String',
53
+ :'current_sha256' => :'String',
54
+ :'default' => :'Boolean',
55
+ :'description' => :'String',
56
+ :'merchant_item_multimedia_oid' => :'Integer'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbItemMultimediaDescriptionRequest` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbItemMultimediaDescriptionRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'code')
82
+ self.code = attributes[:'code']
83
+ end
84
+
85
+ if attributes.key?(:'current_sha256')
86
+ self.current_sha256 = attributes[:'current_sha256']
87
+ end
88
+
89
+ if attributes.key?(:'default')
90
+ self.default = attributes[:'default']
91
+ end
92
+
93
+ if attributes.key?(:'description')
94
+ self.description = attributes[:'description']
95
+ end
96
+
97
+ if attributes.key?(:'merchant_item_multimedia_oid')
98
+ self.merchant_item_multimedia_oid = attributes[:'merchant_item_multimedia_oid']
99
+ end
100
+ end
101
+
102
+ # Show invalid properties with the reasons. Usually used together with valid?
103
+ # @return Array for valid properties with the reasons
104
+ def list_invalid_properties
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ code == o.code &&
121
+ current_sha256 == o.current_sha256 &&
122
+ default == o.default &&
123
+ description == o.description &&
124
+ merchant_item_multimedia_oid == o.merchant_item_multimedia_oid
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [code, current_sha256, default, description, merchant_item_multimedia_oid].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ new.build_from_hash(attributes)
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ attributes = attributes.transform_keys(&:to_sym)
152
+ self.class.openapi_types.each_pair do |key, type|
153
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
+ self.send("#{key}=", nil)
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :Time
176
+ Time.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ # models (e.g. Pet) or oneOf
207
+ klass = UltracartClient.const_get(type)
208
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+ end
@@ -24,7 +24,7 @@ module UltracartClient
24
24
  # What to do next when the job did not produce a theme. The internal cause is not returned; it is recorded against the job id in the server log.
25
25
  attr_accessor :error_message
26
26
 
27
- # When the job stopped. Null until it does.
27
+ # When the job stopped, ISO 8601 UTC. Null until it does.
28
28
  attr_accessor :finished_dts
29
29
 
30
30
  # Job handle. Poll getSfvbThemeJob with this.
@@ -36,13 +36,13 @@ module UltracartClient
36
36
  # What the job is doing right now, for example 'Duplicating locale text'.
37
37
  attr_accessor :progress_description
38
38
 
39
- # When the job started running. Null until it does.
39
+ # When the job started running, ISO 8601 UTC. Null until it does.
40
40
  attr_accessor :started_dts
41
41
 
42
42
  # Raw job status.
43
43
  attr_accessor :status
44
44
 
45
- # When the job was queued.
45
+ # When the job was queued, ISO 8601 UTC.
46
46
  attr_accessor :submitted_dts
47
47
 
48
48
  # True only when the job finished successfully. Check complete first.
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.200'
14
+ VERSION = '4.1.202'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1007,6 +1007,10 @@ require 'ultracart_api/models/sfvb_element'
1007
1007
  require 'ultracart_api/models/sfvb_element_schema_response'
1008
1008
  require 'ultracart_api/models/sfvb_elements_response'
1009
1009
  require 'ultracart_api/models/sfvb_error_detail'
1010
+ require 'ultracart_api/models/sfvb_event'
1011
+ require 'ultracart_api/models/sfvb_events_auth_request'
1012
+ require 'ultracart_api/models/sfvb_events_auth_response'
1013
+ require 'ultracart_api/models/sfvb_events_response'
1010
1014
  require 'ultracart_api/models/sfvb_experiment'
1011
1015
  require 'ultracart_api/models/sfvb_experiment_end_request'
1012
1016
  require 'ultracart_api/models/sfvb_experiment_objective'
@@ -1050,6 +1054,7 @@ require 'ultracart_api/models/sfvb_item_container'
1050
1054
  require 'ultracart_api/models/sfvb_item_containers_response'
1051
1055
  require 'ultracart_api/models/sfvb_item_content_request'
1052
1056
  require 'ultracart_api/models/sfvb_item_multimedia'
1057
+ require 'ultracart_api/models/sfvb_item_multimedia_description_request'
1053
1058
  require 'ultracart_api/models/sfvb_item_multimedia_request'
1054
1059
  require 'ultracart_api/models/sfvb_item_pricing'
1055
1060
  require 'ultracart_api/models/sfvb_item_pricing_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.200
4
+ version: 4.1.202
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-09 00:00:00.000000000 Z
11
+ date: 2026-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -1069,6 +1069,10 @@ files:
1069
1069
  - docs/SfvbElementSchemaResponse.md
1070
1070
  - docs/SfvbElementsResponse.md
1071
1071
  - docs/SfvbErrorDetail.md
1072
+ - docs/SfvbEvent.md
1073
+ - docs/SfvbEventsAuthRequest.md
1074
+ - docs/SfvbEventsAuthResponse.md
1075
+ - docs/SfvbEventsResponse.md
1072
1076
  - docs/SfvbExperiment.md
1073
1077
  - docs/SfvbExperimentEndRequest.md
1074
1078
  - docs/SfvbExperimentObjective.md
@@ -1112,6 +1116,7 @@ files:
1112
1116
  - docs/SfvbItemContainersResponse.md
1113
1117
  - docs/SfvbItemContentRequest.md
1114
1118
  - docs/SfvbItemMultimedia.md
1119
+ - docs/SfvbItemMultimediaDescriptionRequest.md
1115
1120
  - docs/SfvbItemMultimediaRequest.md
1116
1121
  - docs/SfvbItemPricing.md
1117
1122
  - docs/SfvbItemPricingRequest.md
@@ -2373,6 +2378,10 @@ files:
2373
2378
  - lib/ultracart_api/models/sfvb_element_schema_response.rb
2374
2379
  - lib/ultracart_api/models/sfvb_elements_response.rb
2375
2380
  - lib/ultracart_api/models/sfvb_error_detail.rb
2381
+ - lib/ultracart_api/models/sfvb_event.rb
2382
+ - lib/ultracart_api/models/sfvb_events_auth_request.rb
2383
+ - lib/ultracart_api/models/sfvb_events_auth_response.rb
2384
+ - lib/ultracart_api/models/sfvb_events_response.rb
2376
2385
  - lib/ultracart_api/models/sfvb_experiment.rb
2377
2386
  - lib/ultracart_api/models/sfvb_experiment_end_request.rb
2378
2387
  - lib/ultracart_api/models/sfvb_experiment_objective.rb
@@ -2416,6 +2425,7 @@ files:
2416
2425
  - lib/ultracart_api/models/sfvb_item_containers_response.rb
2417
2426
  - lib/ultracart_api/models/sfvb_item_content_request.rb
2418
2427
  - lib/ultracart_api/models/sfvb_item_multimedia.rb
2428
+ - lib/ultracart_api/models/sfvb_item_multimedia_description_request.rb
2419
2429
  - lib/ultracart_api/models/sfvb_item_multimedia_request.rb
2420
2430
  - lib/ultracart_api/models/sfvb_item_pricing.rb
2421
2431
  - lib/ultracart_api/models/sfvb_item_pricing_request.rb