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