ultracart_api 4.1.182 → 4.1.184

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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -2
  3. data/docs/AutoOrderApi.md +28 -1
  4. data/docs/OrderApi.md +107 -3
  5. data/docs/SfvbApi.md +941 -50
  6. data/docs/SfvbLibraryAiReview.md +28 -0
  7. data/docs/SfvbLibraryContentManifest.md +26 -0
  8. data/docs/SfvbLibraryDeleteResult.md +20 -0
  9. data/docs/SfvbLibraryEntry.md +28 -0
  10. data/docs/SfvbLibraryEntryRequest.md +30 -0
  11. data/docs/SfvbLibraryFacet.md +2 -2
  12. data/docs/SfvbLibraryHistoryEntry.md +24 -0
  13. data/docs/SfvbLibraryInstallConflict.md +22 -0
  14. data/docs/SfvbLibraryInstallReceipt.md +32 -0
  15. data/docs/SfvbLibraryInstallRecord.md +32 -0
  16. data/docs/SfvbLibraryInstallRequest.md +22 -0
  17. data/docs/SfvbLibraryParameter.md +26 -0
  18. data/docs/SfvbLibraryPublishRequest.md +20 -0
  19. data/docs/SfvbLibraryScreenshotRequest.md +22 -0
  20. data/docs/SfvbLibraryShareRequest.md +18 -0
  21. data/docs/SfvbLibraryShareTarget.md +20 -0
  22. data/docs/SfvbLibraryTaxonomy.md +24 -0
  23. data/docs/SfvbLibraryTaxonomyCatalog.md +18 -0
  24. data/docs/SfvbLibraryUnshareResult.md +22 -0
  25. data/docs/SfvbWhoamiResponse.md +2 -0
  26. data/lib/ultracart_api/api/sfvb_api.rb +1334 -118
  27. data/lib/ultracart_api/models/sfvb_library_ai_review.rb +304 -0
  28. data/lib/ultracart_api/models/sfvb_library_content_manifest.rb +259 -0
  29. data/lib/ultracart_api/models/sfvb_library_delete_result.rb +264 -0
  30. data/lib/ultracart_api/models/sfvb_library_entry.rb +177 -1
  31. data/lib/ultracart_api/models/sfvb_library_entry_request.rb +280 -0
  32. data/lib/ultracart_api/models/sfvb_library_facet.rb +2 -2
  33. data/lib/ultracart_api/models/sfvb_library_history_entry.rb +250 -0
  34. data/lib/ultracart_api/models/sfvb_library_install_conflict.rb +240 -0
  35. data/lib/ultracart_api/models/sfvb_library_install_receipt.rb +297 -0
  36. data/lib/ultracart_api/models/sfvb_library_install_record.rb +290 -0
  37. data/lib/ultracart_api/models/sfvb_library_install_request.rb +274 -0
  38. data/lib/ultracart_api/models/sfvb_library_parameter.rb +260 -0
  39. data/lib/ultracart_api/models/sfvb_library_publish_request.rb +264 -0
  40. data/lib/ultracart_api/models/sfvb_library_screenshot_request.rb +274 -0
  41. data/lib/ultracart_api/models/sfvb_library_share_request.rb +220 -0
  42. data/lib/ultracart_api/models/sfvb_library_share_target.rb +230 -0
  43. data/lib/ultracart_api/models/sfvb_library_taxonomy.rb +258 -0
  44. data/lib/ultracart_api/models/sfvb_library_taxonomy_catalog.rb +220 -0
  45. data/lib/ultracart_api/models/sfvb_library_unshare_result.rb +242 -0
  46. data/lib/ultracart_api/models/sfvb_whoami_response.rb +11 -1
  47. data/lib/ultracart_api/version.rb +1 -1
  48. data/lib/ultracart_api.rb +17 -0
  49. metadata +36 -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 SfvbLibraryInstallConflict
18
+ # Hash of the file already at that path.
19
+ attr_accessor :existing_sha256
20
+
21
+ # The storefront path.
22
+ attr_accessor :path
23
+
24
+ # Hash of the file the entry would install.
25
+ attr_accessor :snapshot_sha256
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'existing_sha256' => :'existing_sha256',
31
+ :'path' => :'path',
32
+ :'snapshot_sha256' => :'snapshot_sha256'
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
+ :'existing_sha256' => :'String',
45
+ :'path' => :'String',
46
+ :'snapshot_sha256' => :'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::SfvbLibraryInstallConflict` 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::SfvbLibraryInstallConflict`. 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?(:'existing_sha256')
72
+ self.existing_sha256 = attributes[:'existing_sha256']
73
+ end
74
+
75
+ if attributes.key?(:'path')
76
+ self.path = attributes[:'path']
77
+ end
78
+
79
+ if attributes.key?(:'snapshot_sha256')
80
+ self.snapshot_sha256 = attributes[:'snapshot_sha256']
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
+ existing_sha256 == o.existing_sha256 &&
103
+ path == o.path &&
104
+ snapshot_sha256 == o.snapshot_sha256
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
+ [existing_sha256, path, snapshot_sha256].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,297 @@
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 SfvbLibraryInstallReceipt
18
+ # The fragment, with its file paths rewritten to where they were installed. Ready to place.
19
+ attr_accessor :cjson
20
+
21
+ # Paths that already held a different file. With on_conflict fail these refuse the install.
22
+ attr_accessor :conflicts
23
+
24
+ attr_accessor :content_manifest
25
+
26
+ # Paths not written, because an identical or chosen existing file was kept, or the file could not be fetched.
27
+ attr_accessor :files_skipped
28
+
29
+ # Storefront paths this install wrote.
30
+ attr_accessor :files_written
31
+
32
+ # The entry.
33
+ attr_accessor :library_oid
34
+
35
+ # The revision installed.
36
+ attr_accessor :revision_number
37
+
38
+ # Required parameters with no default. Replace them in the cjson before placing it.
39
+ attr_accessor :unresolved_parameters
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'cjson' => :'cjson',
45
+ :'conflicts' => :'conflicts',
46
+ :'content_manifest' => :'content_manifest',
47
+ :'files_skipped' => :'files_skipped',
48
+ :'files_written' => :'files_written',
49
+ :'library_oid' => :'library_oid',
50
+ :'revision_number' => :'revision_number',
51
+ :'unresolved_parameters' => :'unresolved_parameters'
52
+ }
53
+ end
54
+
55
+ # Returns all the JSON keys this model knows about
56
+ def self.acceptable_attributes
57
+ attribute_map.values
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.openapi_types
62
+ {
63
+ :'cjson' => :'String',
64
+ :'conflicts' => :'Array<SfvbLibraryInstallConflict>',
65
+ :'content_manifest' => :'SfvbLibraryContentManifest',
66
+ :'files_skipped' => :'Array<String>',
67
+ :'files_written' => :'Array<String>',
68
+ :'library_oid' => :'Integer',
69
+ :'revision_number' => :'Integer',
70
+ :'unresolved_parameters' => :'Array<String>'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbLibraryInstallReceipt` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ attributes = attributes.each_with_object({}) { |(k, v), h|
89
+ if (!self.class.attribute_map.key?(k.to_sym))
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbLibraryInstallReceipt`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
91
+ end
92
+ h[k.to_sym] = v
93
+ }
94
+
95
+ if attributes.key?(:'cjson')
96
+ self.cjson = attributes[:'cjson']
97
+ end
98
+
99
+ if attributes.key?(:'conflicts')
100
+ if (value = attributes[:'conflicts']).is_a?(Array)
101
+ self.conflicts = value
102
+ end
103
+ end
104
+
105
+ if attributes.key?(:'content_manifest')
106
+ self.content_manifest = attributes[:'content_manifest']
107
+ end
108
+
109
+ if attributes.key?(:'files_skipped')
110
+ if (value = attributes[:'files_skipped']).is_a?(Array)
111
+ self.files_skipped = value
112
+ end
113
+ end
114
+
115
+ if attributes.key?(:'files_written')
116
+ if (value = attributes[:'files_written']).is_a?(Array)
117
+ self.files_written = value
118
+ end
119
+ end
120
+
121
+ if attributes.key?(:'library_oid')
122
+ self.library_oid = attributes[:'library_oid']
123
+ end
124
+
125
+ if attributes.key?(:'revision_number')
126
+ self.revision_number = attributes[:'revision_number']
127
+ end
128
+
129
+ if attributes.key?(:'unresolved_parameters')
130
+ if (value = attributes[:'unresolved_parameters']).is_a?(Array)
131
+ self.unresolved_parameters = value
132
+ end
133
+ end
134
+ end
135
+
136
+ # Show invalid properties with the reasons. Usually used together with valid?
137
+ # @return Array for valid properties with the reasons
138
+ def list_invalid_properties
139
+ invalid_properties = Array.new
140
+ invalid_properties
141
+ end
142
+
143
+ # Check to see if the all the properties in the model are valid
144
+ # @return true if the model is valid
145
+ def valid?
146
+ true
147
+ end
148
+
149
+ # Checks equality by comparing each attribute.
150
+ # @param [Object] Object to be compared
151
+ def ==(o)
152
+ return true if self.equal?(o)
153
+ self.class == o.class &&
154
+ cjson == o.cjson &&
155
+ conflicts == o.conflicts &&
156
+ content_manifest == o.content_manifest &&
157
+ files_skipped == o.files_skipped &&
158
+ files_written == o.files_written &&
159
+ library_oid == o.library_oid &&
160
+ revision_number == o.revision_number &&
161
+ unresolved_parameters == o.unresolved_parameters
162
+ end
163
+
164
+ # @see the `==` method
165
+ # @param [Object] Object to be compared
166
+ def eql?(o)
167
+ self == o
168
+ end
169
+
170
+ # Calculates hash code according to all attributes.
171
+ # @return [Integer] Hash code
172
+ def hash
173
+ [cjson, conflicts, content_manifest, files_skipped, files_written, library_oid, revision_number, unresolved_parameters].hash
174
+ end
175
+
176
+ # Builds the object from hash
177
+ # @param [Hash] attributes Model attributes in the form of hash
178
+ # @return [Object] Returns the model itself
179
+ def self.build_from_hash(attributes)
180
+ new.build_from_hash(attributes)
181
+ end
182
+
183
+ # Builds the object from hash
184
+ # @param [Hash] attributes Model attributes in the form of hash
185
+ # @return [Object] Returns the model itself
186
+ def build_from_hash(attributes)
187
+ return nil unless attributes.is_a?(Hash)
188
+ attributes = attributes.transform_keys(&:to_sym)
189
+ self.class.openapi_types.each_pair do |key, type|
190
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
191
+ self.send("#{key}=", nil)
192
+ elsif type =~ /\AArray<(.*)>/i
193
+ # check to ensure the input is an array given that the attribute
194
+ # is documented as an array but the input is not
195
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
196
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
197
+ end
198
+ elsif !attributes[self.class.attribute_map[key]].nil?
199
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
200
+ end
201
+ end
202
+
203
+ self
204
+ end
205
+
206
+ # Deserializes the data based on type
207
+ # @param string type Data type
208
+ # @param string value Value to be deserialized
209
+ # @return [Object] Deserialized data
210
+ def _deserialize(type, value)
211
+ case type.to_sym
212
+ when :Time
213
+ Time.parse(value)
214
+ when :Date
215
+ Date.parse(value)
216
+ when :String
217
+ value.to_s
218
+ when :Integer
219
+ value.to_i
220
+ when :Float
221
+ value.to_f
222
+ when :Boolean
223
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
224
+ true
225
+ else
226
+ false
227
+ end
228
+ when :Object
229
+ # generic object (usually a Hash), return directly
230
+ value
231
+ when /\AArray<(?<inner_type>.+)>\z/
232
+ inner_type = Regexp.last_match[:inner_type]
233
+ value.map { |v| _deserialize(inner_type, v) }
234
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
235
+ k_type = Regexp.last_match[:k_type]
236
+ v_type = Regexp.last_match[:v_type]
237
+ {}.tap do |hash|
238
+ value.each do |k, v|
239
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
240
+ end
241
+ end
242
+ else # model
243
+ # models (e.g. Pet) or oneOf
244
+ klass = UltracartClient.const_get(type)
245
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
246
+ end
247
+ end
248
+
249
+ # Returns the string representation of the object
250
+ # @return [String] String presentation of the object
251
+ def to_s
252
+ to_hash.to_s
253
+ end
254
+
255
+ # to_body is an alias to to_hash (backward compatibility)
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_body
258
+ to_hash
259
+ end
260
+
261
+ # Returns the object in the form of hash
262
+ # @return [Hash] Returns the object in the form of hash
263
+ def to_hash
264
+ hash = {}
265
+ self.class.attribute_map.each_pair do |attr, param|
266
+ value = self.send(attr)
267
+ if value.nil?
268
+ is_nullable = self.class.openapi_nullable.include?(attr)
269
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
270
+ end
271
+
272
+ hash[param] = _to_hash(value)
273
+ end
274
+ hash
275
+ end
276
+
277
+ # Outputs non-array value in the form of hash
278
+ # For object, use to_hash. Otherwise, just return the value
279
+ # @param [Object] value Any valid value
280
+ # @return [Hash] Returns the value in the form of hash
281
+ def _to_hash(value)
282
+ if value.is_a?(Array)
283
+ value.compact.map { |v| _to_hash(v) }
284
+ elsif value.is_a?(Hash)
285
+ {}.tap do |hash|
286
+ value.each { |k, v| hash[k] = _to_hash(v) }
287
+ end
288
+ elsif value.respond_to? :to_hash
289
+ value.to_hash
290
+ else
291
+ value
292
+ end
293
+ end
294
+
295
+ end
296
+
297
+ end