ultracart_api 4.1.198 → 4.1.199

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.
@@ -0,0 +1,230 @@
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 SfvbRedirectDeleteRow
18
+ # The hash_sha256 you read. Optional on a dry run, which reports the current one. Required to delete.
19
+ attr_accessor :hash_sha256
20
+
21
+ # The rule.
22
+ attr_accessor :redirect_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'hash_sha256' => :'hash_sha256',
28
+ :'redirect_id' => :'redirect_id'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'hash_sha256' => :'String',
41
+ :'redirect_id' => :'Integer'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbRedirectDeleteRow` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbRedirectDeleteRow`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'hash_sha256')
67
+ self.hash_sha256 = attributes[:'hash_sha256']
68
+ end
69
+
70
+ if attributes.key?(:'redirect_id')
71
+ self.redirect_id = attributes[:'redirect_id']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ hash_sha256 == o.hash_sha256 &&
94
+ redirect_id == o.redirect_id
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [hash_sha256, redirect_id].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ self.class.openapi_types.each_pair do |key, type|
123
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
+ self.send("#{key}=", nil)
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :Time
146
+ Time.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :Boolean
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ # models (e.g. Pet) or oneOf
177
+ klass = UltracartClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+
230
+ end
@@ -0,0 +1,324 @@
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 SfvbRedirectDeleteRowResult
18
+ # The rule's current hash. Absent when not_found.
19
+ attr_accessor :hash_sha256
20
+
21
+ # The rule's note.
22
+ attr_accessor :note
23
+
24
+ # The rule.
25
+ attr_accessor :redirect_id
26
+
27
+ # deletable, stale (the rule changed since its hash was read), not_found, or deleted after an apply.
28
+ attr_accessor :result
29
+
30
+ # The rule's source, for a backup.
31
+ attr_accessor :source
32
+
33
+ # The rule's status (301, 302 or rewrite).
34
+ attr_accessor :status
35
+
36
+ # The rule's target, for a backup.
37
+ attr_accessor :target
38
+
39
+ # exact or pattern.
40
+ attr_accessor :type
41
+
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'hash_sha256' => :'hash_sha256',
68
+ :'note' => :'note',
69
+ :'redirect_id' => :'redirect_id',
70
+ :'result' => :'result',
71
+ :'source' => :'source',
72
+ :'status' => :'status',
73
+ :'target' => :'target',
74
+ :'type' => :'type'
75
+ }
76
+ end
77
+
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ attribute_map.values
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'hash_sha256' => :'String',
87
+ :'note' => :'String',
88
+ :'redirect_id' => :'Integer',
89
+ :'result' => :'String',
90
+ :'source' => :'String',
91
+ :'status' => :'String',
92
+ :'target' => :'String',
93
+ :'type' => :'String'
94
+ }
95
+ end
96
+
97
+ # List of attributes with nullable: true
98
+ def self.openapi_nullable
99
+ Set.new([
100
+ ])
101
+ end
102
+
103
+ # Initializes the object
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ def initialize(attributes = {})
106
+ if (!attributes.is_a?(Hash))
107
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbRedirectDeleteRowResult` initialize method"
108
+ end
109
+
110
+ # check to see if the attribute exists and convert string to symbol for hash key
111
+ attributes = attributes.each_with_object({}) { |(k, v), h|
112
+ if (!self.class.attribute_map.key?(k.to_sym))
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbRedirectDeleteRowResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
114
+ end
115
+ h[k.to_sym] = v
116
+ }
117
+
118
+ if attributes.key?(:'hash_sha256')
119
+ self.hash_sha256 = attributes[:'hash_sha256']
120
+ end
121
+
122
+ if attributes.key?(:'note')
123
+ self.note = attributes[:'note']
124
+ end
125
+
126
+ if attributes.key?(:'redirect_id')
127
+ self.redirect_id = attributes[:'redirect_id']
128
+ end
129
+
130
+ if attributes.key?(:'result')
131
+ self.result = attributes[:'result']
132
+ end
133
+
134
+ if attributes.key?(:'source')
135
+ self.source = attributes[:'source']
136
+ end
137
+
138
+ if attributes.key?(:'status')
139
+ self.status = attributes[:'status']
140
+ end
141
+
142
+ if attributes.key?(:'target')
143
+ self.target = attributes[:'target']
144
+ end
145
+
146
+ if attributes.key?(:'type')
147
+ self.type = attributes[:'type']
148
+ end
149
+ end
150
+
151
+ # Show invalid properties with the reasons. Usually used together with valid?
152
+ # @return Array for valid properties with the reasons
153
+ def list_invalid_properties
154
+ invalid_properties = Array.new
155
+ invalid_properties
156
+ end
157
+
158
+ # Check to see if the all the properties in the model are valid
159
+ # @return true if the model is valid
160
+ def valid?
161
+ result_validator = EnumAttributeValidator.new('String', ["deletable", "stale", "not_found", "deleted"])
162
+ return false unless result_validator.valid?(@result)
163
+ true
164
+ end
165
+
166
+ # Custom attribute writer method checking allowed values (enum).
167
+ # @param [Object] result Object to be assigned
168
+ def result=(result)
169
+ validator = EnumAttributeValidator.new('String', ["deletable", "stale", "not_found", "deleted"])
170
+ unless validator.valid?(result)
171
+ fail ArgumentError, "invalid value for \"result\", must be one of #{validator.allowable_values}."
172
+ end
173
+ @result = result
174
+ end
175
+
176
+ # Checks equality by comparing each attribute.
177
+ # @param [Object] Object to be compared
178
+ def ==(o)
179
+ return true if self.equal?(o)
180
+ self.class == o.class &&
181
+ hash_sha256 == o.hash_sha256 &&
182
+ note == o.note &&
183
+ redirect_id == o.redirect_id &&
184
+ result == o.result &&
185
+ source == o.source &&
186
+ status == o.status &&
187
+ target == o.target &&
188
+ type == o.type
189
+ end
190
+
191
+ # @see the `==` method
192
+ # @param [Object] Object to be compared
193
+ def eql?(o)
194
+ self == o
195
+ end
196
+
197
+ # Calculates hash code according to all attributes.
198
+ # @return [Integer] Hash code
199
+ def hash
200
+ [hash_sha256, note, redirect_id, result, source, status, target, type].hash
201
+ end
202
+
203
+ # Builds the object from hash
204
+ # @param [Hash] attributes Model attributes in the form of hash
205
+ # @return [Object] Returns the model itself
206
+ def self.build_from_hash(attributes)
207
+ new.build_from_hash(attributes)
208
+ end
209
+
210
+ # Builds the object from hash
211
+ # @param [Hash] attributes Model attributes in the form of hash
212
+ # @return [Object] Returns the model itself
213
+ def build_from_hash(attributes)
214
+ return nil unless attributes.is_a?(Hash)
215
+ attributes = attributes.transform_keys(&:to_sym)
216
+ self.class.openapi_types.each_pair do |key, type|
217
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
218
+ self.send("#{key}=", nil)
219
+ elsif type =~ /\AArray<(.*)>/i
220
+ # check to ensure the input is an array given that the attribute
221
+ # is documented as an array but the input is not
222
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
223
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
224
+ end
225
+ elsif !attributes[self.class.attribute_map[key]].nil?
226
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
227
+ end
228
+ end
229
+
230
+ self
231
+ end
232
+
233
+ # Deserializes the data based on type
234
+ # @param string type Data type
235
+ # @param string value Value to be deserialized
236
+ # @return [Object] Deserialized data
237
+ def _deserialize(type, value)
238
+ case type.to_sym
239
+ when :Time
240
+ Time.parse(value)
241
+ when :Date
242
+ Date.parse(value)
243
+ when :String
244
+ value.to_s
245
+ when :Integer
246
+ value.to_i
247
+ when :Float
248
+ value.to_f
249
+ when :Boolean
250
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
251
+ true
252
+ else
253
+ false
254
+ end
255
+ when :Object
256
+ # generic object (usually a Hash), return directly
257
+ value
258
+ when /\AArray<(?<inner_type>.+)>\z/
259
+ inner_type = Regexp.last_match[:inner_type]
260
+ value.map { |v| _deserialize(inner_type, v) }
261
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
262
+ k_type = Regexp.last_match[:k_type]
263
+ v_type = Regexp.last_match[:v_type]
264
+ {}.tap do |hash|
265
+ value.each do |k, v|
266
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
267
+ end
268
+ end
269
+ else # model
270
+ # models (e.g. Pet) or oneOf
271
+ klass = UltracartClient.const_get(type)
272
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
273
+ end
274
+ end
275
+
276
+ # Returns the string representation of the object
277
+ # @return [String] String presentation of the object
278
+ def to_s
279
+ to_hash.to_s
280
+ end
281
+
282
+ # to_body is an alias to to_hash (backward compatibility)
283
+ # @return [Hash] Returns the object in the form of hash
284
+ def to_body
285
+ to_hash
286
+ end
287
+
288
+ # Returns the object in the form of hash
289
+ # @return [Hash] Returns the object in the form of hash
290
+ def to_hash
291
+ hash = {}
292
+ self.class.attribute_map.each_pair do |attr, param|
293
+ value = self.send(attr)
294
+ if value.nil?
295
+ is_nullable = self.class.openapi_nullable.include?(attr)
296
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
297
+ end
298
+
299
+ hash[param] = _to_hash(value)
300
+ end
301
+ hash
302
+ end
303
+
304
+ # Outputs non-array value in the form of hash
305
+ # For object, use to_hash. Otherwise, just return the value
306
+ # @param [Object] value Any valid value
307
+ # @return [Hash] Returns the value in the form of hash
308
+ def _to_hash(value)
309
+ if value.is_a?(Array)
310
+ value.compact.map { |v| _to_hash(v) }
311
+ elsif value.is_a?(Hash)
312
+ {}.tap do |hash|
313
+ value.each { |k, v| hash[k] = _to_hash(v) }
314
+ end
315
+ elsif value.respond_to? :to_hash
316
+ value.to_hash
317
+ else
318
+ value
319
+ end
320
+ end
321
+
322
+ end
323
+
324
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.198'
14
+ VERSION = '4.1.199'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -987,6 +987,8 @@ require 'ultracart_api/models/self_config'
987
987
  require 'ultracart_api/models/sfvb_approval'
988
988
  require 'ultracart_api/models/sfvb_approval_create_request'
989
989
  require 'ultracart_api/models/sfvb_approval_params'
990
+ require 'ultracart_api/models/sfvb_approval_review'
991
+ require 'ultracart_api/models/sfvb_approval_review_finding'
990
992
  require 'ultracart_api/models/sfvb_approvals_response'
991
993
  require 'ultracart_api/models/sfvb_blog_post'
992
994
  require 'ultracart_api/models/sfvb_blog_post_detail'
@@ -1121,6 +1123,10 @@ require 'ultracart_api/models/sfvb_recording_settings_request'
1121
1123
  require 'ultracart_api/models/sfvb_recording_settings_response'
1122
1124
  require 'ultracart_api/models/sfvb_redirect'
1123
1125
  require 'ultracart_api/models/sfvb_redirect_check_response'
1126
+ require 'ultracart_api/models/sfvb_redirect_delete_request'
1127
+ require 'ultracart_api/models/sfvb_redirect_delete_response'
1128
+ require 'ultracart_api/models/sfvb_redirect_delete_row'
1129
+ require 'ultracart_api/models/sfvb_redirect_delete_row_result'
1124
1130
  require 'ultracart_api/models/sfvb_redirect_import_request'
1125
1131
  require 'ultracart_api/models/sfvb_redirect_import_response'
1126
1132
  require 'ultracart_api/models/sfvb_redirect_import_row'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.198
4
+ version: 4.1.199
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -1049,6 +1049,8 @@ files:
1049
1049
  - docs/SfvbApproval.md
1050
1050
  - docs/SfvbApprovalCreateRequest.md
1051
1051
  - docs/SfvbApprovalParams.md
1052
+ - docs/SfvbApprovalReview.md
1053
+ - docs/SfvbApprovalReviewFinding.md
1052
1054
  - docs/SfvbApprovalsResponse.md
1053
1055
  - docs/SfvbBlogPost.md
1054
1056
  - docs/SfvbBlogPostDetail.md
@@ -1183,6 +1185,10 @@ files:
1183
1185
  - docs/SfvbRecordingSettingsResponse.md
1184
1186
  - docs/SfvbRedirect.md
1185
1187
  - docs/SfvbRedirectCheckResponse.md
1188
+ - docs/SfvbRedirectDeleteRequest.md
1189
+ - docs/SfvbRedirectDeleteResponse.md
1190
+ - docs/SfvbRedirectDeleteRow.md
1191
+ - docs/SfvbRedirectDeleteRowResult.md
1186
1192
  - docs/SfvbRedirectImportRequest.md
1187
1193
  - docs/SfvbRedirectImportResponse.md
1188
1194
  - docs/SfvbRedirectImportRow.md
@@ -2337,6 +2343,8 @@ files:
2337
2343
  - lib/ultracart_api/models/sfvb_approval.rb
2338
2344
  - lib/ultracart_api/models/sfvb_approval_create_request.rb
2339
2345
  - lib/ultracart_api/models/sfvb_approval_params.rb
2346
+ - lib/ultracart_api/models/sfvb_approval_review.rb
2347
+ - lib/ultracart_api/models/sfvb_approval_review_finding.rb
2340
2348
  - lib/ultracart_api/models/sfvb_approvals_response.rb
2341
2349
  - lib/ultracart_api/models/sfvb_blog_post.rb
2342
2350
  - lib/ultracart_api/models/sfvb_blog_post_detail.rb
@@ -2471,6 +2479,10 @@ files:
2471
2479
  - lib/ultracart_api/models/sfvb_recording_settings_response.rb
2472
2480
  - lib/ultracart_api/models/sfvb_redirect.rb
2473
2481
  - lib/ultracart_api/models/sfvb_redirect_check_response.rb
2482
+ - lib/ultracart_api/models/sfvb_redirect_delete_request.rb
2483
+ - lib/ultracart_api/models/sfvb_redirect_delete_response.rb
2484
+ - lib/ultracart_api/models/sfvb_redirect_delete_row.rb
2485
+ - lib/ultracart_api/models/sfvb_redirect_delete_row_result.rb
2474
2486
  - lib/ultracart_api/models/sfvb_redirect_import_request.rb
2475
2487
  - lib/ultracart_api/models/sfvb_redirect_import_response.rb
2476
2488
  - lib/ultracart_api/models/sfvb_redirect_import_row.rb