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,282 @@
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 SfvbI18nMessage
18
+ # True when the English was changed from the template's text.
19
+ attr_accessor :edited
20
+
21
+ # The English text, the source every other language is translated from.
22
+ attr_accessor :english_text
23
+
24
+ # Send back as If-Match when setting or resetting this message.
25
+ attr_accessor :hash_sha256
26
+
27
+ # True when the message came from an older theme's locale file. It cannot be reset.
28
+ attr_accessor :imported
29
+
30
+ # The message key.
31
+ attr_accessor :key
32
+
33
+ # The theme the message belongs to. Messages are kept per storefront and theme.
34
+ attr_accessor :theme_oid
35
+
36
+ # Each enabled language other than English, with its text and where it comes from.
37
+ attr_accessor :translations
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'edited' => :'edited',
43
+ :'english_text' => :'english_text',
44
+ :'hash_sha256' => :'hash_sha256',
45
+ :'imported' => :'imported',
46
+ :'key' => :'key',
47
+ :'theme_oid' => :'theme_oid',
48
+ :'translations' => :'translations'
49
+ }
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'edited' => :'Boolean',
61
+ :'english_text' => :'String',
62
+ :'hash_sha256' => :'String',
63
+ :'imported' => :'Boolean',
64
+ :'key' => :'String',
65
+ :'theme_oid' => :'Integer',
66
+ :'translations' => :'Array<SfvbI18nTranslation>'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbI18nMessage` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbI18nMessage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'edited')
92
+ self.edited = attributes[:'edited']
93
+ end
94
+
95
+ if attributes.key?(:'english_text')
96
+ self.english_text = attributes[:'english_text']
97
+ end
98
+
99
+ if attributes.key?(:'hash_sha256')
100
+ self.hash_sha256 = attributes[:'hash_sha256']
101
+ end
102
+
103
+ if attributes.key?(:'imported')
104
+ self.imported = attributes[:'imported']
105
+ end
106
+
107
+ if attributes.key?(:'key')
108
+ self.key = attributes[:'key']
109
+ end
110
+
111
+ if attributes.key?(:'theme_oid')
112
+ self.theme_oid = attributes[:'theme_oid']
113
+ end
114
+
115
+ if attributes.key?(:'translations')
116
+ if (value = attributes[:'translations']).is_a?(Array)
117
+ self.translations = value
118
+ end
119
+ end
120
+ end
121
+
122
+ # Show invalid properties with the reasons. Usually used together with valid?
123
+ # @return Array for valid properties with the reasons
124
+ def list_invalid_properties
125
+ invalid_properties = Array.new
126
+ invalid_properties
127
+ end
128
+
129
+ # Check to see if the all the properties in the model are valid
130
+ # @return true if the model is valid
131
+ def valid?
132
+ true
133
+ end
134
+
135
+ # Checks equality by comparing each attribute.
136
+ # @param [Object] Object to be compared
137
+ def ==(o)
138
+ return true if self.equal?(o)
139
+ self.class == o.class &&
140
+ edited == o.edited &&
141
+ english_text == o.english_text &&
142
+ hash_sha256 == o.hash_sha256 &&
143
+ imported == o.imported &&
144
+ key == o.key &&
145
+ theme_oid == o.theme_oid &&
146
+ translations == o.translations
147
+ end
148
+
149
+ # @see the `==` method
150
+ # @param [Object] Object to be compared
151
+ def eql?(o)
152
+ self == o
153
+ end
154
+
155
+ # Calculates hash code according to all attributes.
156
+ # @return [Integer] Hash code
157
+ def hash
158
+ [edited, english_text, hash_sha256, imported, key, theme_oid, translations].hash
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def self.build_from_hash(attributes)
165
+ new.build_from_hash(attributes)
166
+ end
167
+
168
+ # Builds the object from hash
169
+ # @param [Hash] attributes Model attributes in the form of hash
170
+ # @return [Object] Returns the model itself
171
+ def build_from_hash(attributes)
172
+ return nil unless attributes.is_a?(Hash)
173
+ attributes = attributes.transform_keys(&:to_sym)
174
+ self.class.openapi_types.each_pair do |key, type|
175
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
176
+ self.send("#{key}=", nil)
177
+ elsif type =~ /\AArray<(.*)>/i
178
+ # check to ensure the input is an array given that the attribute
179
+ # is documented as an array but the input is not
180
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
181
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
182
+ end
183
+ elsif !attributes[self.class.attribute_map[key]].nil?
184
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
185
+ end
186
+ end
187
+
188
+ self
189
+ end
190
+
191
+ # Deserializes the data based on type
192
+ # @param string type Data type
193
+ # @param string value Value to be deserialized
194
+ # @return [Object] Deserialized data
195
+ def _deserialize(type, value)
196
+ case type.to_sym
197
+ when :Time
198
+ Time.parse(value)
199
+ when :Date
200
+ Date.parse(value)
201
+ when :String
202
+ value.to_s
203
+ when :Integer
204
+ value.to_i
205
+ when :Float
206
+ value.to_f
207
+ when :Boolean
208
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
209
+ true
210
+ else
211
+ false
212
+ end
213
+ when :Object
214
+ # generic object (usually a Hash), return directly
215
+ value
216
+ when /\AArray<(?<inner_type>.+)>\z/
217
+ inner_type = Regexp.last_match[:inner_type]
218
+ value.map { |v| _deserialize(inner_type, v) }
219
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
220
+ k_type = Regexp.last_match[:k_type]
221
+ v_type = Regexp.last_match[:v_type]
222
+ {}.tap do |hash|
223
+ value.each do |k, v|
224
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
225
+ end
226
+ end
227
+ else # model
228
+ # models (e.g. Pet) or oneOf
229
+ klass = UltracartClient.const_get(type)
230
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
231
+ end
232
+ end
233
+
234
+ # Returns the string representation of the object
235
+ # @return [String] String presentation of the object
236
+ def to_s
237
+ to_hash.to_s
238
+ end
239
+
240
+ # to_body is an alias to to_hash (backward compatibility)
241
+ # @return [Hash] Returns the object in the form of hash
242
+ def to_body
243
+ to_hash
244
+ end
245
+
246
+ # Returns the object in the form of hash
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_hash
249
+ hash = {}
250
+ self.class.attribute_map.each_pair do |attr, param|
251
+ value = self.send(attr)
252
+ if value.nil?
253
+ is_nullable = self.class.openapi_nullable.include?(attr)
254
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
255
+ end
256
+
257
+ hash[param] = _to_hash(value)
258
+ end
259
+ hash
260
+ end
261
+
262
+ # Outputs non-array value in the form of hash
263
+ # For object, use to_hash. Otherwise, just return the value
264
+ # @param [Object] value Any valid value
265
+ # @return [Hash] Returns the value in the form of hash
266
+ def _to_hash(value)
267
+ if value.is_a?(Array)
268
+ value.compact.map { |v| _to_hash(v) }
269
+ elsif value.is_a?(Hash)
270
+ {}.tap do |hash|
271
+ value.each { |k, v| hash[k] = _to_hash(v) }
272
+ end
273
+ elsif value.respond_to? :to_hash
274
+ value.to_hash
275
+ else
276
+ value
277
+ end
278
+ end
279
+
280
+ end
281
+
282
+ end
@@ -0,0 +1,230 @@
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 SfvbI18nMessageValue
18
+ # The language code. ENG changes the English source, which clears its machine translations.
19
+ attr_accessor :language
20
+
21
+ # The new text. Empty text is refused; reset the message instead.
22
+ attr_accessor :text
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'language' => :'language',
28
+ :'text' => :'text'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'language' => :'String',
41
+ :'text' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbI18nMessageValue` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbI18nMessageValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'language')
67
+ self.language = attributes[:'language']
68
+ end
69
+
70
+ if attributes.key?(:'text')
71
+ self.text = attributes[:'text']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ language == o.language &&
94
+ text == o.text
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [language, text].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ self.class.openapi_types.each_pair do |key, type|
123
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
+ self.send("#{key}=", nil)
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :Time
146
+ Time.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :Boolean
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ # models (e.g. Pet) or oneOf
177
+ klass = UltracartClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+
230
+ end