ultracart_api 4.1.183 → 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 +36 -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 +35 -1
@@ -0,0 +1,304 @@
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 SfvbLibraryAiReview
18
+ # What the reviewers found. detail is the category followed by the quoted evidence.
19
+ attr_accessor :findings
20
+
21
+ # Version of the review policy that produced this verdict.
22
+ attr_accessor :prompt_version
23
+
24
+ # When the review ran, ISO 8601.
25
+ attr_accessor :reviewed_dts
26
+
27
+ # The screenshot the review looked at, or absent when there was none.
28
+ attr_accessor :screenshot_sha256
29
+
30
+ # One or two sentences explaining the verdict.
31
+ attr_accessor :summary
32
+
33
+ # approve, block, human or error. block refuses any publish. human or error refuses a public publish and is recorded on a shared one.
34
+ attr_accessor :verdict
35
+
36
+ class EnumAttributeValidator
37
+ attr_reader :datatype
38
+ attr_reader :allowable_values
39
+
40
+ def initialize(datatype, allowable_values)
41
+ @allowable_values = allowable_values.map do |value|
42
+ case datatype.to_s
43
+ when /Integer/i
44
+ value.to_i
45
+ when /Float/i
46
+ value.to_f
47
+ else
48
+ value
49
+ end
50
+ end
51
+ end
52
+
53
+ def valid?(value)
54
+ !value || allowable_values.include?(value)
55
+ end
56
+ end
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+ :'findings' => :'findings',
62
+ :'prompt_version' => :'prompt_version',
63
+ :'reviewed_dts' => :'reviewed_dts',
64
+ :'screenshot_sha256' => :'screenshot_sha256',
65
+ :'summary' => :'summary',
66
+ :'verdict' => :'verdict'
67
+ }
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'findings' => :'Object',
79
+ :'prompt_version' => :'String',
80
+ :'reviewed_dts' => :'String',
81
+ :'screenshot_sha256' => :'String',
82
+ :'summary' => :'String',
83
+ :'verdict' => :'String'
84
+ }
85
+ end
86
+
87
+ # List of attributes with nullable: true
88
+ def self.openapi_nullable
89
+ Set.new([
90
+ ])
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ def initialize(attributes = {})
96
+ if (!attributes.is_a?(Hash))
97
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbLibraryAiReview` initialize method"
98
+ end
99
+
100
+ # check to see if the attribute exists and convert string to symbol for hash key
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if (!self.class.attribute_map.key?(k.to_sym))
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbLibraryAiReview`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:'findings')
109
+ self.findings = attributes[:'findings']
110
+ end
111
+
112
+ if attributes.key?(:'prompt_version')
113
+ self.prompt_version = attributes[:'prompt_version']
114
+ end
115
+
116
+ if attributes.key?(:'reviewed_dts')
117
+ self.reviewed_dts = attributes[:'reviewed_dts']
118
+ end
119
+
120
+ if attributes.key?(:'screenshot_sha256')
121
+ self.screenshot_sha256 = attributes[:'screenshot_sha256']
122
+ end
123
+
124
+ if attributes.key?(:'summary')
125
+ self.summary = attributes[:'summary']
126
+ end
127
+
128
+ if attributes.key?(:'verdict')
129
+ self.verdict = attributes[:'verdict']
130
+ end
131
+ end
132
+
133
+ # Show invalid properties with the reasons. Usually used together with valid?
134
+ # @return Array for valid properties with the reasons
135
+ def list_invalid_properties
136
+ invalid_properties = Array.new
137
+ invalid_properties
138
+ end
139
+
140
+ # Check to see if the all the properties in the model are valid
141
+ # @return true if the model is valid
142
+ def valid?
143
+ verdict_validator = EnumAttributeValidator.new('String', ["approve", "block", "human", "error"])
144
+ return false unless verdict_validator.valid?(@verdict)
145
+ true
146
+ end
147
+
148
+ # Custom attribute writer method checking allowed values (enum).
149
+ # @param [Object] verdict Object to be assigned
150
+ def verdict=(verdict)
151
+ validator = EnumAttributeValidator.new('String', ["approve", "block", "human", "error"])
152
+ unless validator.valid?(verdict)
153
+ fail ArgumentError, "invalid value for \"verdict\", must be one of #{validator.allowable_values}."
154
+ end
155
+ @verdict = verdict
156
+ end
157
+
158
+ # Checks equality by comparing each attribute.
159
+ # @param [Object] Object to be compared
160
+ def ==(o)
161
+ return true if self.equal?(o)
162
+ self.class == o.class &&
163
+ findings == o.findings &&
164
+ prompt_version == o.prompt_version &&
165
+ reviewed_dts == o.reviewed_dts &&
166
+ screenshot_sha256 == o.screenshot_sha256 &&
167
+ summary == o.summary &&
168
+ verdict == o.verdict
169
+ end
170
+
171
+ # @see the `==` method
172
+ # @param [Object] Object to be compared
173
+ def eql?(o)
174
+ self == o
175
+ end
176
+
177
+ # Calculates hash code according to all attributes.
178
+ # @return [Integer] Hash code
179
+ def hash
180
+ [findings, prompt_version, reviewed_dts, screenshot_sha256, summary, verdict].hash
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 self.build_from_hash(attributes)
187
+ new.build_from_hash(attributes)
188
+ end
189
+
190
+ # Builds the object from hash
191
+ # @param [Hash] attributes Model attributes in the form of hash
192
+ # @return [Object] Returns the model itself
193
+ def build_from_hash(attributes)
194
+ return nil unless attributes.is_a?(Hash)
195
+ attributes = attributes.transform_keys(&:to_sym)
196
+ self.class.openapi_types.each_pair do |key, type|
197
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
198
+ self.send("#{key}=", nil)
199
+ elsif type =~ /\AArray<(.*)>/i
200
+ # check to ensure the input is an array given that the attribute
201
+ # is documented as an array but the input is not
202
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
203
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
204
+ end
205
+ elsif !attributes[self.class.attribute_map[key]].nil?
206
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
207
+ end
208
+ end
209
+
210
+ self
211
+ end
212
+
213
+ # Deserializes the data based on type
214
+ # @param string type Data type
215
+ # @param string value Value to be deserialized
216
+ # @return [Object] Deserialized data
217
+ def _deserialize(type, value)
218
+ case type.to_sym
219
+ when :Time
220
+ Time.parse(value)
221
+ when :Date
222
+ Date.parse(value)
223
+ when :String
224
+ value.to_s
225
+ when :Integer
226
+ value.to_i
227
+ when :Float
228
+ value.to_f
229
+ when :Boolean
230
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
231
+ true
232
+ else
233
+ false
234
+ end
235
+ when :Object
236
+ # generic object (usually a Hash), return directly
237
+ value
238
+ when /\AArray<(?<inner_type>.+)>\z/
239
+ inner_type = Regexp.last_match[:inner_type]
240
+ value.map { |v| _deserialize(inner_type, v) }
241
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
242
+ k_type = Regexp.last_match[:k_type]
243
+ v_type = Regexp.last_match[:v_type]
244
+ {}.tap do |hash|
245
+ value.each do |k, v|
246
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
247
+ end
248
+ end
249
+ else # model
250
+ # models (e.g. Pet) or oneOf
251
+ klass = UltracartClient.const_get(type)
252
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
253
+ end
254
+ end
255
+
256
+ # Returns the string representation of the object
257
+ # @return [String] String presentation of the object
258
+ def to_s
259
+ to_hash.to_s
260
+ end
261
+
262
+ # to_body is an alias to to_hash (backward compatibility)
263
+ # @return [Hash] Returns the object in the form of hash
264
+ def to_body
265
+ to_hash
266
+ end
267
+
268
+ # Returns the object in the form of hash
269
+ # @return [Hash] Returns the object in the form of hash
270
+ def to_hash
271
+ hash = {}
272
+ self.class.attribute_map.each_pair do |attr, param|
273
+ value = self.send(attr)
274
+ if value.nil?
275
+ is_nullable = self.class.openapi_nullable.include?(attr)
276
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
277
+ end
278
+
279
+ hash[param] = _to_hash(value)
280
+ end
281
+ hash
282
+ end
283
+
284
+ # Outputs non-array value in the form of hash
285
+ # For object, use to_hash. Otherwise, just return the value
286
+ # @param [Object] value Any valid value
287
+ # @return [Hash] Returns the value in the form of hash
288
+ def _to_hash(value)
289
+ if value.is_a?(Array)
290
+ value.compact.map { |v| _to_hash(v) }
291
+ elsif value.is_a?(Hash)
292
+ {}.tap do |hash|
293
+ value.each { |k, v| hash[k] = _to_hash(v) }
294
+ end
295
+ elsif value.respond_to? :to_hash
296
+ value.to_hash
297
+ else
298
+ value
299
+ end
300
+ end
301
+
302
+ end
303
+
304
+ end
@@ -0,0 +1,259 @@
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 SfvbLibraryContentManifest
18
+ # Images, fonts, stylesheets, scripts or media loaded from an absolute URL. A shared or public entry must use relative paths so it never pulls files from another storefront or site.
19
+ attr_accessor :absolute_asset_urls
20
+
21
+ attr_accessor :ai_review
22
+
23
+ # Content that runs in a shopper's browser or on the server. Script, html, embed, css and velocity elements, script in markup, Velocity, script bearing CSS and unsafe URL schemes. An entry with any of these cannot be made public, and installing it needs an explicit acknowledgement.
24
+ attr_accessor :executable
25
+
26
+ # Card skimming and obfuscation signals. An entry with any is refused outright, whoever owns it.
27
+ attr_accessor :rejected
28
+
29
+ # Strings shaped like credentials, by kind only. An entry with any cannot be shared or made public.
30
+ attr_accessor :secrets
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'absolute_asset_urls' => :'absolute_asset_urls',
36
+ :'ai_review' => :'ai_review',
37
+ :'executable' => :'executable',
38
+ :'rejected' => :'rejected',
39
+ :'secrets' => :'secrets'
40
+ }
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ def self.acceptable_attributes
45
+ attribute_map.values
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.openapi_types
50
+ {
51
+ :'absolute_asset_urls' => :'Object',
52
+ :'ai_review' => :'SfvbLibraryAiReview',
53
+ :'executable' => :'Object',
54
+ :'rejected' => :'Object',
55
+ :'secrets' => :'Object'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbLibraryContentManifest` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbLibraryContentManifest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'absolute_asset_urls')
81
+ self.absolute_asset_urls = attributes[:'absolute_asset_urls']
82
+ end
83
+
84
+ if attributes.key?(:'ai_review')
85
+ self.ai_review = attributes[:'ai_review']
86
+ end
87
+
88
+ if attributes.key?(:'executable')
89
+ self.executable = attributes[:'executable']
90
+ end
91
+
92
+ if attributes.key?(:'rejected')
93
+ self.rejected = attributes[:'rejected']
94
+ end
95
+
96
+ if attributes.key?(:'secrets')
97
+ self.secrets = attributes[:'secrets']
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ invalid_properties = Array.new
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ absolute_asset_urls == o.absolute_asset_urls &&
120
+ ai_review == o.ai_review &&
121
+ executable == o.executable &&
122
+ rejected == o.rejected &&
123
+ secrets == o.secrets
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [absolute_asset_urls, ai_review, executable, rejected, secrets].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ new.build_from_hash(attributes)
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ attributes = attributes.transform_keys(&:to_sym)
151
+ self.class.openapi_types.each_pair do |key, type|
152
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
153
+ self.send("#{key}=", nil)
154
+ elsif type =~ /\AArray<(.*)>/i
155
+ # check to ensure the input is an array given that the attribute
156
+ # is documented as an array but the input is not
157
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
158
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
159
+ end
160
+ elsif !attributes[self.class.attribute_map[key]].nil?
161
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
162
+ end
163
+ end
164
+
165
+ self
166
+ end
167
+
168
+ # Deserializes the data based on type
169
+ # @param string type Data type
170
+ # @param string value Value to be deserialized
171
+ # @return [Object] Deserialized data
172
+ def _deserialize(type, value)
173
+ case type.to_sym
174
+ when :Time
175
+ Time.parse(value)
176
+ when :Date
177
+ Date.parse(value)
178
+ when :String
179
+ value.to_s
180
+ when :Integer
181
+ value.to_i
182
+ when :Float
183
+ value.to_f
184
+ when :Boolean
185
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
+ true
187
+ else
188
+ false
189
+ end
190
+ when :Object
191
+ # generic object (usually a Hash), return directly
192
+ value
193
+ when /\AArray<(?<inner_type>.+)>\z/
194
+ inner_type = Regexp.last_match[:inner_type]
195
+ value.map { |v| _deserialize(inner_type, v) }
196
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
+ k_type = Regexp.last_match[:k_type]
198
+ v_type = Regexp.last_match[:v_type]
199
+ {}.tap do |hash|
200
+ value.each do |k, v|
201
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
+ end
203
+ end
204
+ else # model
205
+ # models (e.g. Pet) or oneOf
206
+ klass = UltracartClient.const_get(type)
207
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ # Outputs non-array value in the form of hash
240
+ # For object, use to_hash. Otherwise, just return the value
241
+ # @param [Object] value Any valid value
242
+ # @return [Hash] Returns the value in the form of hash
243
+ def _to_hash(value)
244
+ if value.is_a?(Array)
245
+ value.compact.map { |v| _to_hash(v) }
246
+ elsif value.is_a?(Hash)
247
+ {}.tap do |hash|
248
+ value.each { |k, v| hash[k] = _to_hash(v) }
249
+ end
250
+ elsif value.respond_to? :to_hash
251
+ value.to_hash
252
+ else
253
+ value
254
+ end
255
+ end
256
+
257
+ end
258
+
259
+ end