ultracart_api 4.1.185 → 4.1.190

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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -2
  3. data/docs/SfvbApi.md +621 -0
  4. data/docs/SfvbI18nGlossary.md +24 -0
  5. data/docs/SfvbI18nGlossaryRequest.md +18 -0
  6. data/docs/SfvbI18nLanguage.md +30 -0
  7. data/docs/SfvbI18nLanguageEnableRequest.md +18 -0
  8. data/docs/SfvbI18nLanguagesResponse.md +32 -0
  9. data/docs/SfvbI18nMachineTranslationsResponse.md +28 -0
  10. data/docs/SfvbI18nMessage.md +30 -0
  11. data/docs/SfvbI18nMessageValue.md +20 -0
  12. data/docs/SfvbI18nMessageWriteRequest.md +18 -0
  13. data/docs/SfvbI18nMessagesResponse.md +28 -0
  14. data/docs/SfvbI18nResetResponse.md +22 -0
  15. data/docs/SfvbI18nTranslation.md +22 -0
  16. data/docs/SfvbLibraryAiReview.md +1 -1
  17. data/docs/SfvbLibraryContentManifest.md +4 -4
  18. data/docs/SfvbLibraryManifestFinding.md +22 -0
  19. data/docs/SfvbLibraryParameter.md +2 -2
  20. data/docs/SfvbLibraryTaxonomyCatalog.md +1 -1
  21. data/docs/SfvbLibraryTaxonomyDimension.md +22 -0
  22. data/docs/SfvbLibraryTaxonomyTag.md +20 -0
  23. data/lib/ultracart_api/api/sfvb_api.rb +860 -17
  24. data/lib/ultracart_api/models/sfvb_i18n_glossary.rb +250 -0
  25. data/lib/ultracart_api/models/sfvb_i18n_glossary_request.rb +220 -0
  26. data/lib/ultracart_api/models/sfvb_i18n_language.rb +282 -0
  27. data/lib/ultracart_api/models/sfvb_i18n_language_enable_request.rb +220 -0
  28. data/lib/ultracart_api/models/sfvb_i18n_languages_response.rb +292 -0
  29. data/lib/ultracart_api/models/sfvb_i18n_machine_translations_response.rb +272 -0
  30. data/lib/ultracart_api/models/sfvb_i18n_message.rb +282 -0
  31. data/lib/ultracart_api/models/sfvb_i18n_message_value.rb +230 -0
  32. data/lib/ultracart_api/models/sfvb_i18n_message_write_request.rb +222 -0
  33. data/lib/ultracart_api/models/sfvb_i18n_messages_response.rb +272 -0
  34. data/lib/ultracart_api/models/sfvb_i18n_reset_response.rb +240 -0
  35. data/lib/ultracart_api/models/sfvb_i18n_translation.rb +240 -0
  36. data/lib/ultracart_api/models/sfvb_library_ai_review.rb +4 -2
  37. data/lib/ultracart_api/models/sfvb_library_content_manifest.rb +16 -8
  38. data/lib/ultracart_api/models/sfvb_library_manifest_finding.rb +240 -0
  39. data/lib/ultracart_api/models/sfvb_library_parameter.rb +7 -7
  40. data/lib/ultracart_api/models/sfvb_library_taxonomy_catalog.rb +4 -2
  41. data/lib/ultracart_api/models/sfvb_library_taxonomy_dimension.rb +276 -0
  42. data/lib/ultracart_api/models/sfvb_library_taxonomy_tag.rb +230 -0
  43. data/lib/ultracart_api/version.rb +1 -1
  44. data/lib/ultracart_api.rb +15 -0
  45. metadata +32 -2
@@ -0,0 +1,240 @@
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 SfvbI18nResetResponse
18
+ # The message key.
19
+ attr_accessor :key
20
+
21
+ # What happens next.
22
+ attr_accessor :note
23
+
24
+ # The theme the message belongs to.
25
+ attr_accessor :theme_oid
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'key' => :'key',
31
+ :'note' => :'note',
32
+ :'theme_oid' => :'theme_oid'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'key' => :'String',
45
+ :'note' => :'String',
46
+ :'theme_oid' => :'Integer'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbI18nResetResponse` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbI18nResetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'key')
72
+ self.key = attributes[:'key']
73
+ end
74
+
75
+ if attributes.key?(:'note')
76
+ self.note = attributes[:'note']
77
+ end
78
+
79
+ if attributes.key?(:'theme_oid')
80
+ self.theme_oid = attributes[:'theme_oid']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ key == o.key &&
103
+ note == o.note &&
104
+ theme_oid == o.theme_oid
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [key, note, theme_oid].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = UltracartClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -0,0 +1,240 @@
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 SfvbI18nTranslation
18
+ # The three-letter language code.
19
+ attr_accessor :language
20
+
21
+ # hand for a translation someone wrote, machine for a machine translation, pending when one is queued, none when nothing exists yet (it is made the first time the text renders in that language).
22
+ attr_accessor :source
23
+
24
+ # The text a shopper sees in that language. Absent when source is none or pending.
25
+ attr_accessor :text
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'language' => :'language',
31
+ :'source' => :'source',
32
+ :'text' => :'text'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'language' => :'String',
45
+ :'source' => :'String',
46
+ :'text' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbI18nTranslation` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbI18nTranslation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'language')
72
+ self.language = attributes[:'language']
73
+ end
74
+
75
+ if attributes.key?(:'source')
76
+ self.source = attributes[:'source']
77
+ end
78
+
79
+ if attributes.key?(:'text')
80
+ self.text = attributes[:'text']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ language == o.language &&
103
+ source == o.source &&
104
+ text == o.text
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [language, source, text].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = UltracartClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -75,7 +75,7 @@ module UltracartClient
75
75
  # Attribute type mapping.
76
76
  def self.openapi_types
77
77
  {
78
- :'findings' => :'Object',
78
+ :'findings' => :'Array<SfvbLibraryManifestFinding>',
79
79
  :'prompt_version' => :'String',
80
80
  :'reviewed_dts' => :'String',
81
81
  :'screenshot_sha256' => :'String',
@@ -106,7 +106,9 @@ module UltracartClient
106
106
  }
107
107
 
108
108
  if attributes.key?(:'findings')
109
- self.findings = attributes[:'findings']
109
+ if (value = attributes[:'findings']).is_a?(Array)
110
+ self.findings = value
111
+ end
110
112
  end
111
113
 
112
114
  if attributes.key?(:'prompt_version')
@@ -48,11 +48,11 @@ module UltracartClient
48
48
  # Attribute type mapping.
49
49
  def self.openapi_types
50
50
  {
51
- :'absolute_asset_urls' => :'Object',
51
+ :'absolute_asset_urls' => :'Array<SfvbLibraryManifestFinding>',
52
52
  :'ai_review' => :'SfvbLibraryAiReview',
53
- :'executable' => :'Object',
54
- :'rejected' => :'Object',
55
- :'secrets' => :'Object'
53
+ :'executable' => :'Array<SfvbLibraryManifestFinding>',
54
+ :'rejected' => :'Array<SfvbLibraryManifestFinding>',
55
+ :'secrets' => :'Array<SfvbLibraryManifestFinding>'
56
56
  }
57
57
  end
58
58
 
@@ -78,7 +78,9 @@ module UltracartClient
78
78
  }
79
79
 
80
80
  if attributes.key?(:'absolute_asset_urls')
81
- self.absolute_asset_urls = attributes[:'absolute_asset_urls']
81
+ if (value = attributes[:'absolute_asset_urls']).is_a?(Array)
82
+ self.absolute_asset_urls = value
83
+ end
82
84
  end
83
85
 
84
86
  if attributes.key?(:'ai_review')
@@ -86,15 +88,21 @@ module UltracartClient
86
88
  end
87
89
 
88
90
  if attributes.key?(:'executable')
89
- self.executable = attributes[:'executable']
91
+ if (value = attributes[:'executable']).is_a?(Array)
92
+ self.executable = value
93
+ end
90
94
  end
91
95
 
92
96
  if attributes.key?(:'rejected')
93
- self.rejected = attributes[:'rejected']
97
+ if (value = attributes[:'rejected']).is_a?(Array)
98
+ self.rejected = value
99
+ end
94
100
  end
95
101
 
96
102
  if attributes.key?(:'secrets')
97
- self.secrets = attributes[:'secrets']
103
+ if (value = attributes[:'secrets']).is_a?(Array)
104
+ self.secrets = value
105
+ end
98
106
  end
99
107
  end
100
108