ultracart_api 4.1.191 → 4.1.193

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 (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +34 -2
  3. data/docs/SfvbApi.md +782 -2
  4. data/docs/SfvbNotFoundEntry.md +38 -0
  5. data/docs/SfvbNotFoundEntryResponse.md +20 -0
  6. data/docs/SfvbNotFoundHit.md +24 -0
  7. data/docs/SfvbNotFoundPage.md +28 -0
  8. data/docs/SfvbNotFoundResponse.md +20 -0
  9. data/docs/SfvbRedirect.md +42 -0
  10. data/docs/SfvbRedirectCheckResponse.md +26 -0
  11. data/docs/SfvbRedirectImportRequest.md +20 -0
  12. data/docs/SfvbRedirectImportResponse.md +32 -0
  13. data/docs/SfvbRedirectImportRow.md +22 -0
  14. data/docs/SfvbRedirectImportRowResult.md +26 -0
  15. data/docs/SfvbRedirectRequest.md +26 -0
  16. data/docs/SfvbRedirectResolveResponse.md +28 -0
  17. data/docs/SfvbRedirectResolveStep.md +22 -0
  18. data/docs/SfvbRedirectResponse.md +20 -0
  19. data/docs/SfvbRedirectsResponse.md +22 -0
  20. data/docs/SfvbRenderRequest.md +1 -1
  21. data/docs/SfvbRenderResponse.md +2 -0
  22. data/lib/ultracart_api/api/sfvb_api.rb +1132 -98
  23. data/lib/ultracart_api/models/sfvb_not_found_entry.rb +322 -0
  24. data/lib/ultracart_api/models/sfvb_not_found_entry_response.rb +231 -0
  25. data/lib/ultracart_api/models/sfvb_not_found_hit.rb +250 -0
  26. data/lib/ultracart_api/models/sfvb_not_found_page.rb +270 -0
  27. data/lib/ultracart_api/models/sfvb_not_found_response.rb +232 -0
  28. data/lib/ultracart_api/models/sfvb_redirect.rb +340 -0
  29. data/lib/ultracart_api/models/sfvb_redirect_check_response.rb +264 -0
  30. data/lib/ultracart_api/models/sfvb_redirect_import_request.rb +232 -0
  31. data/lib/ultracart_api/models/sfvb_redirect_import_response.rb +292 -0
  32. data/lib/ultracart_api/models/sfvb_redirect_import_row.rb +240 -0
  33. data/lib/ultracart_api/models/sfvb_redirect_import_row_result.rb +264 -0
  34. data/lib/ultracart_api/models/sfvb_redirect_request.rb +260 -0
  35. data/lib/ultracart_api/models/sfvb_redirect_resolve_response.rb +272 -0
  36. data/lib/ultracart_api/models/sfvb_redirect_resolve_step.rb +240 -0
  37. data/lib/ultracart_api/models/sfvb_redirect_response.rb +231 -0
  38. data/lib/ultracart_api/models/sfvb_redirects_response.rb +242 -0
  39. data/lib/ultracart_api/models/sfvb_render_request.rb +1 -1
  40. data/lib/ultracart_api/models/sfvb_render_response.rb +11 -1
  41. data/lib/ultracart_api/version.rb +1 -1
  42. data/lib/ultracart_api.rb +16 -0
  43. metadata +33 -1
@@ -0,0 +1,322 @@
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 SfvbNotFoundEntry
18
+ # Bot hits since bot counting began on this entry. Empty when not yet counted.
19
+ attr_accessor :bot_hits
20
+
21
+ # bot_hits divided by counted_hits, 0 to 1. Empty when not yet counted.
22
+ attr_accessor :bot_share
23
+
24
+ # Hits since bot counting began, the base for bot_share.
25
+ attr_accessor :counted_hits
26
+
27
+ # First hit, ISO 8601.
28
+ attr_accessor :first_seen_dts
29
+
30
+ # Every recorded hit, bots included.
31
+ attr_accessor :hits
32
+
33
+ # True when the entry is ignored and no longer counts.
34
+ attr_accessor :ignored
35
+
36
+ # Latest hit, ISO 8601.
37
+ attr_accessor :last_seen_dts
38
+
39
+ # The entry's id.
40
+ attr_accessor :not_found_id
41
+
42
+ # The path, without its query string. Token-like segments show as {token} unless asked for.
43
+ attr_accessor :path
44
+
45
+ # Where a redirect rule now sends this path, when one does.
46
+ attr_accessor :redirected_to
47
+
48
+ # Hosts of the pages that linked to it.
49
+ attr_accessor :referrer_hosts
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'bot_hits' => :'bot_hits',
55
+ :'bot_share' => :'bot_share',
56
+ :'counted_hits' => :'counted_hits',
57
+ :'first_seen_dts' => :'first_seen_dts',
58
+ :'hits' => :'hits',
59
+ :'ignored' => :'ignored',
60
+ :'last_seen_dts' => :'last_seen_dts',
61
+ :'not_found_id' => :'not_found_id',
62
+ :'path' => :'path',
63
+ :'redirected_to' => :'redirected_to',
64
+ :'referrer_hosts' => :'referrer_hosts'
65
+ }
66
+ end
67
+
68
+ # Returns all the JSON keys this model knows about
69
+ def self.acceptable_attributes
70
+ attribute_map.values
71
+ end
72
+
73
+ # Attribute type mapping.
74
+ def self.openapi_types
75
+ {
76
+ :'bot_hits' => :'Integer',
77
+ :'bot_share' => :'Object',
78
+ :'counted_hits' => :'Integer',
79
+ :'first_seen_dts' => :'String',
80
+ :'hits' => :'Integer',
81
+ :'ignored' => :'Boolean',
82
+ :'last_seen_dts' => :'String',
83
+ :'not_found_id' => :'String',
84
+ :'path' => :'String',
85
+ :'redirected_to' => :'String',
86
+ :'referrer_hosts' => :'Array<String>'
87
+ }
88
+ end
89
+
90
+ # List of attributes with nullable: true
91
+ def self.openapi_nullable
92
+ Set.new([
93
+ ])
94
+ end
95
+
96
+ # Initializes the object
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ def initialize(attributes = {})
99
+ if (!attributes.is_a?(Hash))
100
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbNotFoundEntry` initialize method"
101
+ end
102
+
103
+ # check to see if the attribute exists and convert string to symbol for hash key
104
+ attributes = attributes.each_with_object({}) { |(k, v), h|
105
+ if (!self.class.attribute_map.key?(k.to_sym))
106
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbNotFoundEntry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
107
+ end
108
+ h[k.to_sym] = v
109
+ }
110
+
111
+ if attributes.key?(:'bot_hits')
112
+ self.bot_hits = attributes[:'bot_hits']
113
+ end
114
+
115
+ if attributes.key?(:'bot_share')
116
+ self.bot_share = attributes[:'bot_share']
117
+ end
118
+
119
+ if attributes.key?(:'counted_hits')
120
+ self.counted_hits = attributes[:'counted_hits']
121
+ end
122
+
123
+ if attributes.key?(:'first_seen_dts')
124
+ self.first_seen_dts = attributes[:'first_seen_dts']
125
+ end
126
+
127
+ if attributes.key?(:'hits')
128
+ self.hits = attributes[:'hits']
129
+ end
130
+
131
+ if attributes.key?(:'ignored')
132
+ self.ignored = attributes[:'ignored']
133
+ end
134
+
135
+ if attributes.key?(:'last_seen_dts')
136
+ self.last_seen_dts = attributes[:'last_seen_dts']
137
+ end
138
+
139
+ if attributes.key?(:'not_found_id')
140
+ self.not_found_id = attributes[:'not_found_id']
141
+ end
142
+
143
+ if attributes.key?(:'path')
144
+ self.path = attributes[:'path']
145
+ end
146
+
147
+ if attributes.key?(:'redirected_to')
148
+ self.redirected_to = attributes[:'redirected_to']
149
+ end
150
+
151
+ if attributes.key?(:'referrer_hosts')
152
+ if (value = attributes[:'referrer_hosts']).is_a?(Array)
153
+ self.referrer_hosts = value
154
+ end
155
+ end
156
+ end
157
+
158
+ # Show invalid properties with the reasons. Usually used together with valid?
159
+ # @return Array for valid properties with the reasons
160
+ def list_invalid_properties
161
+ invalid_properties = Array.new
162
+ invalid_properties
163
+ end
164
+
165
+ # Check to see if the all the properties in the model are valid
166
+ # @return true if the model is valid
167
+ def valid?
168
+ true
169
+ end
170
+
171
+ # Checks equality by comparing each attribute.
172
+ # @param [Object] Object to be compared
173
+ def ==(o)
174
+ return true if self.equal?(o)
175
+ self.class == o.class &&
176
+ bot_hits == o.bot_hits &&
177
+ bot_share == o.bot_share &&
178
+ counted_hits == o.counted_hits &&
179
+ first_seen_dts == o.first_seen_dts &&
180
+ hits == o.hits &&
181
+ ignored == o.ignored &&
182
+ last_seen_dts == o.last_seen_dts &&
183
+ not_found_id == o.not_found_id &&
184
+ path == o.path &&
185
+ redirected_to == o.redirected_to &&
186
+ referrer_hosts == o.referrer_hosts
187
+ end
188
+
189
+ # @see the `==` method
190
+ # @param [Object] Object to be compared
191
+ def eql?(o)
192
+ self == o
193
+ end
194
+
195
+ # Calculates hash code according to all attributes.
196
+ # @return [Integer] Hash code
197
+ def hash
198
+ [bot_hits, bot_share, counted_hits, first_seen_dts, hits, ignored, last_seen_dts, not_found_id, path, redirected_to, referrer_hosts].hash
199
+ end
200
+
201
+ # Builds the object from hash
202
+ # @param [Hash] attributes Model attributes in the form of hash
203
+ # @return [Object] Returns the model itself
204
+ def self.build_from_hash(attributes)
205
+ new.build_from_hash(attributes)
206
+ end
207
+
208
+ # Builds the object from hash
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ # @return [Object] Returns the model itself
211
+ def build_from_hash(attributes)
212
+ return nil unless attributes.is_a?(Hash)
213
+ attributes = attributes.transform_keys(&:to_sym)
214
+ self.class.openapi_types.each_pair do |key, type|
215
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
216
+ self.send("#{key}=", nil)
217
+ elsif type =~ /\AArray<(.*)>/i
218
+ # check to ensure the input is an array given that the attribute
219
+ # is documented as an array but the input is not
220
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
221
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
222
+ end
223
+ elsif !attributes[self.class.attribute_map[key]].nil?
224
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
225
+ end
226
+ end
227
+
228
+ self
229
+ end
230
+
231
+ # Deserializes the data based on type
232
+ # @param string type Data type
233
+ # @param string value Value to be deserialized
234
+ # @return [Object] Deserialized data
235
+ def _deserialize(type, value)
236
+ case type.to_sym
237
+ when :Time
238
+ Time.parse(value)
239
+ when :Date
240
+ Date.parse(value)
241
+ when :String
242
+ value.to_s
243
+ when :Integer
244
+ value.to_i
245
+ when :Float
246
+ value.to_f
247
+ when :Boolean
248
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
249
+ true
250
+ else
251
+ false
252
+ end
253
+ when :Object
254
+ # generic object (usually a Hash), return directly
255
+ value
256
+ when /\AArray<(?<inner_type>.+)>\z/
257
+ inner_type = Regexp.last_match[:inner_type]
258
+ value.map { |v| _deserialize(inner_type, v) }
259
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
260
+ k_type = Regexp.last_match[:k_type]
261
+ v_type = Regexp.last_match[:v_type]
262
+ {}.tap do |hash|
263
+ value.each do |k, v|
264
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
265
+ end
266
+ end
267
+ else # model
268
+ # models (e.g. Pet) or oneOf
269
+ klass = UltracartClient.const_get(type)
270
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
271
+ end
272
+ end
273
+
274
+ # Returns the string representation of the object
275
+ # @return [String] String presentation of the object
276
+ def to_s
277
+ to_hash.to_s
278
+ end
279
+
280
+ # to_body is an alias to to_hash (backward compatibility)
281
+ # @return [Hash] Returns the object in the form of hash
282
+ def to_body
283
+ to_hash
284
+ end
285
+
286
+ # Returns the object in the form of hash
287
+ # @return [Hash] Returns the object in the form of hash
288
+ def to_hash
289
+ hash = {}
290
+ self.class.attribute_map.each_pair do |attr, param|
291
+ value = self.send(attr)
292
+ if value.nil?
293
+ is_nullable = self.class.openapi_nullable.include?(attr)
294
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
295
+ end
296
+
297
+ hash[param] = _to_hash(value)
298
+ end
299
+ hash
300
+ end
301
+
302
+ # Outputs non-array value in the form of hash
303
+ # For object, use to_hash. Otherwise, just return the value
304
+ # @param [Object] value Any valid value
305
+ # @return [Hash] Returns the value in the form of hash
306
+ def _to_hash(value)
307
+ if value.is_a?(Array)
308
+ value.compact.map { |v| _to_hash(v) }
309
+ elsif value.is_a?(Hash)
310
+ {}.tap do |hash|
311
+ value.each { |k, v| hash[k] = _to_hash(v) }
312
+ end
313
+ elsif value.respond_to? :to_hash
314
+ value.to_hash
315
+ else
316
+ value
317
+ end
318
+ end
319
+
320
+ end
321
+
322
+ end
@@ -0,0 +1,231 @@
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 SfvbNotFoundEntryResponse
18
+ attr_accessor :entry
19
+
20
+ # The most recent hits, up to 100.
21
+ attr_accessor :hits
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'entry' => :'entry',
27
+ :'hits' => :'hits'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.openapi_types
38
+ {
39
+ :'entry' => :'SfvbNotFoundEntry',
40
+ :'hits' => :'Array<SfvbNotFoundHit>'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbNotFoundEntryResponse` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h|
59
+ if (!self.class.attribute_map.key?(k.to_sym))
60
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbNotFoundEntryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ end
62
+ h[k.to_sym] = v
63
+ }
64
+
65
+ if attributes.key?(:'entry')
66
+ self.entry = attributes[:'entry']
67
+ end
68
+
69
+ if attributes.key?(:'hits')
70
+ if (value = attributes[:'hits']).is_a?(Array)
71
+ self.hits = value
72
+ end
73
+ end
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properties with the reasons
78
+ def list_invalid_properties
79
+ invalid_properties = Array.new
80
+ invalid_properties
81
+ end
82
+
83
+ # Check to see if the all the properties in the model are valid
84
+ # @return true if the model is valid
85
+ def valid?
86
+ true
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ entry == o.entry &&
95
+ hits == o.hits
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Integer] Hash code
106
+ def hash
107
+ [entry, hits].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def self.build_from_hash(attributes)
114
+ new.build_from_hash(attributes)
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ attributes = attributes.transform_keys(&:to_sym)
123
+ self.class.openapi_types.each_pair do |key, type|
124
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
125
+ self.send("#{key}=", nil)
126
+ elsif type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
130
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
131
+ end
132
+ elsif !attributes[self.class.attribute_map[key]].nil?
133
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
134
+ end
135
+ end
136
+
137
+ self
138
+ end
139
+
140
+ # Deserializes the data based on type
141
+ # @param string type Data type
142
+ # @param string value Value to be deserialized
143
+ # @return [Object] Deserialized data
144
+ def _deserialize(type, value)
145
+ case type.to_sym
146
+ when :Time
147
+ Time.parse(value)
148
+ when :Date
149
+ Date.parse(value)
150
+ when :String
151
+ value.to_s
152
+ when :Integer
153
+ value.to_i
154
+ when :Float
155
+ value.to_f
156
+ when :Boolean
157
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
+ true
159
+ else
160
+ false
161
+ end
162
+ when :Object
163
+ # generic object (usually a Hash), return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else # model
177
+ # models (e.g. Pet) or oneOf
178
+ klass = UltracartClient.const_get(type)
179
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ if value.nil?
202
+ is_nullable = self.class.openapi_nullable.include?(attr)
203
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
204
+ end
205
+
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ # Outputs non-array value in the form of hash
212
+ # For object, use to_hash. Otherwise, just return the value
213
+ # @param [Object] value Any valid value
214
+ # @return [Hash] Returns the value in the form of hash
215
+ def _to_hash(value)
216
+ if value.is_a?(Array)
217
+ value.compact.map { |v| _to_hash(v) }
218
+ elsif value.is_a?(Hash)
219
+ {}.tap do |hash|
220
+ value.each { |k, v| hash[k] = _to_hash(v) }
221
+ end
222
+ elsif value.respond_to? :to_hash
223
+ value.to_hash
224
+ else
225
+ value
226
+ end
227
+ end
228
+
229
+ end
230
+
231
+ end