ultracart_api 4.1.227 → 4.1.229

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 (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -2
  3. data/docs/SfvbApi.md +445 -0
  4. data/docs/SfvbApprovalCreateRequest.md +2 -0
  5. data/docs/SfvbBlogPostDetail.md +2 -0
  6. data/docs/SfvbBlogPostRequest.md +2 -0
  7. data/docs/SfvbNotFoundEntry.md +2 -0
  8. data/docs/SfvbNotFoundSummary.md +28 -0
  9. data/docs/SfvbRedirectImportRow.md +2 -0
  10. data/docs/SfvbRedirectRequest.md +2 -0
  11. data/docs/SfvbRedirectResolveBatchRequest.md +18 -0
  12. data/docs/SfvbRedirectResolveBatchResponse.md +24 -0
  13. data/docs/SfvbSiteSeo.md +40 -0
  14. data/docs/SfvbSiteSeoChange.md +26 -0
  15. data/docs/SfvbSiteSeoRequest.md +24 -0
  16. data/docs/SfvbStepCounts.md +34 -0
  17. data/docs/SfvbStepDispatchLog.md +22 -0
  18. data/docs/SfvbStepDispatchLogsResponse.md +32 -0
  19. data/lib/ultracart_api/api/sfvb_api.rb +583 -0
  20. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +12 -3
  21. data/lib/ultracart_api/models/sfvb_blog_post_detail.rb +11 -1
  22. data/lib/ultracart_api/models/sfvb_blog_post_request.rb +11 -1
  23. data/lib/ultracart_api/models/sfvb_not_found_entry.rb +11 -1
  24. data/lib/ultracart_api/models/sfvb_not_found_summary.rb +280 -0
  25. data/lib/ultracart_api/models/sfvb_redirect_import_row.rb +11 -1
  26. data/lib/ultracart_api/models/sfvb_redirect_request.rb +11 -1
  27. data/lib/ultracart_api/models/sfvb_redirect_resolve_batch_request.rb +222 -0
  28. data/lib/ultracart_api/models/sfvb_redirect_resolve_batch_response.rb +252 -0
  29. data/lib/ultracart_api/models/sfvb_site_seo.rb +334 -0
  30. data/lib/ultracart_api/models/sfvb_site_seo_change.rb +260 -0
  31. data/lib/ultracart_api/models/sfvb_site_seo_request.rb +250 -0
  32. data/lib/ultracart_api/models/sfvb_step_counts.rb +300 -0
  33. data/lib/ultracart_api/models/sfvb_step_dispatch_log.rb +240 -0
  34. data/lib/ultracart_api/models/sfvb_step_dispatch_logs_response.rb +293 -0
  35. data/lib/ultracart_api/version.rb +1 -1
  36. data/lib/ultracart_api.rb +9 -0
  37. metadata +19 -1
@@ -0,0 +1,334 @@
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 SfvbSiteSeo
18
+ # On a change, true when it needs an approved site_seo.change request.
19
+ attr_accessor :approval_needed
20
+
21
+ # True when pages output canonical links.
22
+ attr_accessor :canonical
23
+
24
+ # On a change, true when anything was saved, or would be on a dry run.
25
+ attr_accessor :changed
26
+
27
+ # On a change, each switch it changed, or would change on a dry run.
28
+ attr_accessor :changes
29
+
30
+ # The default meta description, the storefrontSEODescription site attribute.
31
+ attr_accessor :description
32
+
33
+ # True when nothing was saved because the request was a dry run.
34
+ attr_accessor :dry_run
35
+
36
+ # The hash of the three switches. Send it as If-Match on a change.
37
+ attr_accessor :hash_sha256
38
+
39
+ # The default meta keywords, the storefrontSEOKeywords site attribute.
40
+ attr_accessor :keywords
41
+
42
+ # What a person should know about these settings.
43
+ attr_accessor :notes
44
+
45
+ # True when every page tells search engines not to index it. For a development store only.
46
+ attr_accessor :prevent_indexing
47
+
48
+ # True when pages output Schema.org structured data.
49
+ attr_accessor :schema_org
50
+
51
+ # The storefront.
52
+ attr_accessor :storefront_oid
53
+
54
+ # Attribute mapping from ruby-style variable name to JSON key.
55
+ def self.attribute_map
56
+ {
57
+ :'approval_needed' => :'approval_needed',
58
+ :'canonical' => :'canonical',
59
+ :'changed' => :'changed',
60
+ :'changes' => :'changes',
61
+ :'description' => :'description',
62
+ :'dry_run' => :'dry_run',
63
+ :'hash_sha256' => :'hash_sha256',
64
+ :'keywords' => :'keywords',
65
+ :'notes' => :'notes',
66
+ :'prevent_indexing' => :'prevent_indexing',
67
+ :'schema_org' => :'schema_org',
68
+ :'storefront_oid' => :'storefront_oid'
69
+ }
70
+ end
71
+
72
+ # Returns all the JSON keys this model knows about
73
+ def self.acceptable_attributes
74
+ attribute_map.values
75
+ end
76
+
77
+ # Attribute type mapping.
78
+ def self.openapi_types
79
+ {
80
+ :'approval_needed' => :'Boolean',
81
+ :'canonical' => :'Boolean',
82
+ :'changed' => :'Boolean',
83
+ :'changes' => :'Array<SfvbSiteSeoChange>',
84
+ :'description' => :'String',
85
+ :'dry_run' => :'Boolean',
86
+ :'hash_sha256' => :'String',
87
+ :'keywords' => :'String',
88
+ :'notes' => :'Array<String>',
89
+ :'prevent_indexing' => :'Boolean',
90
+ :'schema_org' => :'Boolean',
91
+ :'storefront_oid' => :'Integer'
92
+ }
93
+ end
94
+
95
+ # List of attributes with nullable: true
96
+ def self.openapi_nullable
97
+ Set.new([
98
+ ])
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbSiteSeo` initialize method"
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!self.class.attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbSiteSeo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'approval_needed')
117
+ self.approval_needed = attributes[:'approval_needed']
118
+ end
119
+
120
+ if attributes.key?(:'canonical')
121
+ self.canonical = attributes[:'canonical']
122
+ end
123
+
124
+ if attributes.key?(:'changed')
125
+ self.changed = attributes[:'changed']
126
+ end
127
+
128
+ if attributes.key?(:'changes')
129
+ if (value = attributes[:'changes']).is_a?(Array)
130
+ self.changes = value
131
+ end
132
+ end
133
+
134
+ if attributes.key?(:'description')
135
+ self.description = attributes[:'description']
136
+ end
137
+
138
+ if attributes.key?(:'dry_run')
139
+ self.dry_run = attributes[:'dry_run']
140
+ end
141
+
142
+ if attributes.key?(:'hash_sha256')
143
+ self.hash_sha256 = attributes[:'hash_sha256']
144
+ end
145
+
146
+ if attributes.key?(:'keywords')
147
+ self.keywords = attributes[:'keywords']
148
+ end
149
+
150
+ if attributes.key?(:'notes')
151
+ if (value = attributes[:'notes']).is_a?(Array)
152
+ self.notes = value
153
+ end
154
+ end
155
+
156
+ if attributes.key?(:'prevent_indexing')
157
+ self.prevent_indexing = attributes[:'prevent_indexing']
158
+ end
159
+
160
+ if attributes.key?(:'schema_org')
161
+ self.schema_org = attributes[:'schema_org']
162
+ end
163
+
164
+ if attributes.key?(:'storefront_oid')
165
+ self.storefront_oid = attributes[:'storefront_oid']
166
+ end
167
+ end
168
+
169
+ # Show invalid properties with the reasons. Usually used together with valid?
170
+ # @return Array for valid properties with the reasons
171
+ def list_invalid_properties
172
+ invalid_properties = Array.new
173
+ invalid_properties
174
+ end
175
+
176
+ # Check to see if the all the properties in the model are valid
177
+ # @return true if the model is valid
178
+ def valid?
179
+ true
180
+ end
181
+
182
+ # Checks equality by comparing each attribute.
183
+ # @param [Object] Object to be compared
184
+ def ==(o)
185
+ return true if self.equal?(o)
186
+ self.class == o.class &&
187
+ approval_needed == o.approval_needed &&
188
+ canonical == o.canonical &&
189
+ changed == o.changed &&
190
+ changes == o.changes &&
191
+ description == o.description &&
192
+ dry_run == o.dry_run &&
193
+ hash_sha256 == o.hash_sha256 &&
194
+ keywords == o.keywords &&
195
+ notes == o.notes &&
196
+ prevent_indexing == o.prevent_indexing &&
197
+ schema_org == o.schema_org &&
198
+ storefront_oid == o.storefront_oid
199
+ end
200
+
201
+ # @see the `==` method
202
+ # @param [Object] Object to be compared
203
+ def eql?(o)
204
+ self == o
205
+ end
206
+
207
+ # Calculates hash code according to all attributes.
208
+ # @return [Integer] Hash code
209
+ def hash
210
+ [approval_needed, canonical, changed, changes, description, dry_run, hash_sha256, keywords, notes, prevent_indexing, schema_org, storefront_oid].hash
211
+ end
212
+
213
+ # Builds the object from hash
214
+ # @param [Hash] attributes Model attributes in the form of hash
215
+ # @return [Object] Returns the model itself
216
+ def self.build_from_hash(attributes)
217
+ new.build_from_hash(attributes)
218
+ end
219
+
220
+ # Builds the object from hash
221
+ # @param [Hash] attributes Model attributes in the form of hash
222
+ # @return [Object] Returns the model itself
223
+ def build_from_hash(attributes)
224
+ return nil unless attributes.is_a?(Hash)
225
+ attributes = attributes.transform_keys(&:to_sym)
226
+ self.class.openapi_types.each_pair do |key, type|
227
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
228
+ self.send("#{key}=", nil)
229
+ elsif type =~ /\AArray<(.*)>/i
230
+ # check to ensure the input is an array given that the attribute
231
+ # is documented as an array but the input is not
232
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
233
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
234
+ end
235
+ elsif !attributes[self.class.attribute_map[key]].nil?
236
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
237
+ end
238
+ end
239
+
240
+ self
241
+ end
242
+
243
+ # Deserializes the data based on type
244
+ # @param string type Data type
245
+ # @param string value Value to be deserialized
246
+ # @return [Object] Deserialized data
247
+ def _deserialize(type, value)
248
+ case type.to_sym
249
+ when :Time
250
+ Time.parse(value)
251
+ when :Date
252
+ Date.parse(value)
253
+ when :String
254
+ value.to_s
255
+ when :Integer
256
+ value.to_i
257
+ when :Float
258
+ value.to_f
259
+ when :Boolean
260
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
261
+ true
262
+ else
263
+ false
264
+ end
265
+ when :Object
266
+ # generic object (usually a Hash), return directly
267
+ value
268
+ when /\AArray<(?<inner_type>.+)>\z/
269
+ inner_type = Regexp.last_match[:inner_type]
270
+ value.map { |v| _deserialize(inner_type, v) }
271
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
272
+ k_type = Regexp.last_match[:k_type]
273
+ v_type = Regexp.last_match[:v_type]
274
+ {}.tap do |hash|
275
+ value.each do |k, v|
276
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
277
+ end
278
+ end
279
+ else # model
280
+ # models (e.g. Pet) or oneOf
281
+ klass = UltracartClient.const_get(type)
282
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
283
+ end
284
+ end
285
+
286
+ # Returns the string representation of the object
287
+ # @return [String] String presentation of the object
288
+ def to_s
289
+ to_hash.to_s
290
+ end
291
+
292
+ # to_body is an alias to to_hash (backward compatibility)
293
+ # @return [Hash] Returns the object in the form of hash
294
+ def to_body
295
+ to_hash
296
+ end
297
+
298
+ # Returns the object in the form of hash
299
+ # @return [Hash] Returns the object in the form of hash
300
+ def to_hash
301
+ hash = {}
302
+ self.class.attribute_map.each_pair do |attr, param|
303
+ value = self.send(attr)
304
+ if value.nil?
305
+ is_nullable = self.class.openapi_nullable.include?(attr)
306
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
307
+ end
308
+
309
+ hash[param] = _to_hash(value)
310
+ end
311
+ hash
312
+ end
313
+
314
+ # Outputs non-array value in the form of hash
315
+ # For object, use to_hash. Otherwise, just return the value
316
+ # @param [Object] value Any valid value
317
+ # @return [Hash] Returns the value in the form of hash
318
+ def _to_hash(value)
319
+ if value.is_a?(Array)
320
+ value.compact.map { |v| _to_hash(v) }
321
+ elsif value.is_a?(Hash)
322
+ {}.tap do |hash|
323
+ value.each { |k, v| hash[k] = _to_hash(v) }
324
+ end
325
+ elsif value.respond_to? :to_hash
326
+ value.to_hash
327
+ else
328
+ value
329
+ end
330
+ end
331
+
332
+ end
333
+
334
+ end
@@ -0,0 +1,260 @@
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 SfvbSiteSeoChange
18
+ # True when this change needs an approved site_seo.change request.
19
+ attr_accessor :approval_needed
20
+
21
+ # True when the approval asks for an authenticator code even inside an open approval session.
22
+ attr_accessor :fresh_code
23
+
24
+ # The value before.
25
+ attr_accessor :from
26
+
27
+ # canonical, schema_org or prevent_indexing.
28
+ attr_accessor :setting
29
+
30
+ # The value after.
31
+ attr_accessor :to
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'approval_needed' => :'approval_needed',
37
+ :'fresh_code' => :'fresh_code',
38
+ :'from' => :'from',
39
+ :'setting' => :'setting',
40
+ :'to' => :'to'
41
+ }
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'approval_needed' => :'Boolean',
53
+ :'fresh_code' => :'Boolean',
54
+ :'from' => :'Boolean',
55
+ :'setting' => :'String',
56
+ :'to' => :'Boolean'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbSiteSeoChange` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbSiteSeoChange`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'approval_needed')
82
+ self.approval_needed = attributes[:'approval_needed']
83
+ end
84
+
85
+ if attributes.key?(:'fresh_code')
86
+ self.fresh_code = attributes[:'fresh_code']
87
+ end
88
+
89
+ if attributes.key?(:'from')
90
+ self.from = attributes[:'from']
91
+ end
92
+
93
+ if attributes.key?(:'setting')
94
+ self.setting = attributes[:'setting']
95
+ end
96
+
97
+ if attributes.key?(:'to')
98
+ self.to = attributes[:'to']
99
+ end
100
+ end
101
+
102
+ # Show invalid properties with the reasons. Usually used together with valid?
103
+ # @return Array for valid properties with the reasons
104
+ def list_invalid_properties
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ approval_needed == o.approval_needed &&
121
+ fresh_code == o.fresh_code &&
122
+ from == o.from &&
123
+ setting == o.setting &&
124
+ to == o.to
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [approval_needed, fresh_code, from, setting, to].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ new.build_from_hash(attributes)
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ attributes = attributes.transform_keys(&:to_sym)
152
+ self.class.openapi_types.each_pair do |key, type|
153
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
+ self.send("#{key}=", nil)
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :Time
176
+ Time.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ # models (e.g. Pet) or oneOf
207
+ klass = UltracartClient.const_get(type)
208
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+ end