ultracart_api 4.1.238 → 4.1.240

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -2
  3. data/docs/SfvbApi.md +337 -0
  4. data/docs/SfvbApprovalCreateRequest.md +4 -0
  5. data/docs/SfvbItemChildCreateRequest.md +26 -0
  6. data/docs/SfvbItemChildCreateResponse.md +36 -0
  7. data/docs/SfvbItemDefaultPageRequest.md +20 -0
  8. data/docs/SfvbItemDefaultPageResponse.md +36 -0
  9. data/docs/SfvbItemDefaultPageResult.md +40 -0
  10. data/docs/SfvbItemDefaultPageRow.md +28 -0
  11. data/docs/SfvbItemPageAssignment.md +28 -0
  12. data/docs/SfvbItemPages.md +28 -0
  13. data/docs/SfvbItemVariationAxis.md +22 -0
  14. data/docs/SfvbItemVariationChange.md +40 -0
  15. data/docs/SfvbItemVariationChangeResult.md +24 -0
  16. data/docs/SfvbItemVariationChild.md +22 -0
  17. data/docs/SfvbItemVariationCombination.md +24 -0
  18. data/docs/SfvbItemVariationOption.md +22 -0
  19. data/docs/SfvbItemVariationValue.md +20 -0
  20. data/docs/SfvbItemVariations.md +30 -0
  21. data/docs/SfvbItemVariationsRequest.md +20 -0
  22. data/docs/SfvbItemVariationsResponse.md +38 -0
  23. data/docs/SfvbTrackingProviderSecrets.md +2 -0
  24. data/lib/ultracart_api/api/sfvb_api.rb +459 -0
  25. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +24 -3
  26. data/lib/ultracart_api/models/sfvb_item_child_create_request.rb +260 -0
  27. data/lib/ultracart_api/models/sfvb_item_child_create_response.rb +309 -0
  28. data/lib/ultracart_api/models/sfvb_item_default_page_request.rb +232 -0
  29. data/lib/ultracart_api/models/sfvb_item_default_page_response.rb +312 -0
  30. data/lib/ultracart_api/models/sfvb_item_default_page_result.rb +330 -0
  31. data/lib/ultracart_api/models/sfvb_item_default_page_row.rb +270 -0
  32. data/lib/ultracart_api/models/sfvb_item_page_assignment.rb +270 -0
  33. data/lib/ultracart_api/models/sfvb_item_pages.rb +274 -0
  34. data/lib/ultracart_api/models/sfvb_item_variation_axis.rb +242 -0
  35. data/lib/ultracart_api/models/sfvb_item_variation_change.rb +334 -0
  36. data/lib/ultracart_api/models/sfvb_item_variation_change_result.rb +250 -0
  37. data/lib/ultracart_api/models/sfvb_item_variation_child.rb +240 -0
  38. data/lib/ultracart_api/models/sfvb_item_variation_combination.rb +251 -0
  39. data/lib/ultracart_api/models/sfvb_item_variation_option.rb +240 -0
  40. data/lib/ultracart_api/models/sfvb_item_variation_value.rb +230 -0
  41. data/lib/ultracart_api/models/sfvb_item_variations.rb +284 -0
  42. data/lib/ultracart_api/models/sfvb_item_variations_request.rb +232 -0
  43. data/lib/ultracart_api/models/sfvb_item_variations_response.rb +328 -0
  44. data/lib/ultracart_api/models/sfvb_tracking_provider_secrets.rb +11 -1
  45. data/lib/ultracart_api/version.rb +1 -1
  46. data/lib/ultracart_api.rb +18 -0
  47. metadata +37 -1
@@ -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 SfvbItemChildCreateRequest
18
+ # The new item's description. Defaults to the parent's.
19
+ attr_accessor :description
20
+
21
+ # True to check without creating.
22
+ attr_accessor :dry_run
23
+
24
+ # The new item's id - letters, digits, dot, underscore and dash, at most 20.
25
+ attr_accessor :merchant_item_id
26
+
27
+ # The parent item's id. Send this or parent_merchant_item_oid.
28
+ attr_accessor :parent_merchant_item_id
29
+
30
+ # The parent item's oid. Send this or parent_merchant_item_id.
31
+ attr_accessor :parent_merchant_item_oid
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'description' => :'description',
37
+ :'dry_run' => :'dry_run',
38
+ :'merchant_item_id' => :'merchant_item_id',
39
+ :'parent_merchant_item_id' => :'parent_merchant_item_id',
40
+ :'parent_merchant_item_oid' => :'parent_merchant_item_oid'
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
+ :'description' => :'String',
53
+ :'dry_run' => :'Boolean',
54
+ :'merchant_item_id' => :'String',
55
+ :'parent_merchant_item_id' => :'String',
56
+ :'parent_merchant_item_oid' => :'Integer'
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::SfvbItemChildCreateRequest` 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::SfvbItemChildCreateRequest`. 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?(:'description')
82
+ self.description = attributes[:'description']
83
+ end
84
+
85
+ if attributes.key?(:'dry_run')
86
+ self.dry_run = attributes[:'dry_run']
87
+ end
88
+
89
+ if attributes.key?(:'merchant_item_id')
90
+ self.merchant_item_id = attributes[:'merchant_item_id']
91
+ end
92
+
93
+ if attributes.key?(:'parent_merchant_item_id')
94
+ self.parent_merchant_item_id = attributes[:'parent_merchant_item_id']
95
+ end
96
+
97
+ if attributes.key?(:'parent_merchant_item_oid')
98
+ self.parent_merchant_item_oid = attributes[:'parent_merchant_item_oid']
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
+ description == o.description &&
121
+ dry_run == o.dry_run &&
122
+ merchant_item_id == o.merchant_item_id &&
123
+ parent_merchant_item_id == o.parent_merchant_item_id &&
124
+ parent_merchant_item_oid == o.parent_merchant_item_oid
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
+ [description, dry_run, merchant_item_id, parent_merchant_item_id, parent_merchant_item_oid].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
@@ -0,0 +1,309 @@
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 SfvbItemChildCreateResponse
18
+ # The cost copied from the parent.
19
+ attr_accessor :copied_cost
20
+
21
+ # Length, width and height copied from the parent.
22
+ attr_accessor :copied_dimensions
23
+
24
+ # The parent's item folder the new item is filed in, 0 for the top.
25
+ attr_accessor :copied_folder_id
26
+
27
+ # The weight copied from the parent.
28
+ attr_accessor :copied_weight
29
+
30
+ # The new item's description.
31
+ attr_accessor :description
32
+
33
+ # True when nothing was created.
34
+ attr_accessor :dry_run
35
+
36
+ # The new item's id.
37
+ attr_accessor :merchant_item_id
38
+
39
+ # The new item's oid. Absent on a dry run.
40
+ attr_accessor :merchant_item_oid
41
+
42
+ # What to do next.
43
+ attr_accessor :_next
44
+
45
+ attr_accessor :parent
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'copied_cost' => :'copied_cost',
51
+ :'copied_dimensions' => :'copied_dimensions',
52
+ :'copied_folder_id' => :'copied_folder_id',
53
+ :'copied_weight' => :'copied_weight',
54
+ :'description' => :'description',
55
+ :'dry_run' => :'dry_run',
56
+ :'merchant_item_id' => :'merchant_item_id',
57
+ :'merchant_item_oid' => :'merchant_item_oid',
58
+ :'_next' => :'next',
59
+ :'parent' => :'parent'
60
+ }
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'copied_cost' => :'String',
72
+ :'copied_dimensions' => :'String',
73
+ :'copied_folder_id' => :'Integer',
74
+ :'copied_weight' => :'String',
75
+ :'description' => :'String',
76
+ :'dry_run' => :'Boolean',
77
+ :'merchant_item_id' => :'String',
78
+ :'merchant_item_oid' => :'Integer',
79
+ :'_next' => :'String',
80
+ :'parent' => :'SfvbItemVariationChild'
81
+ }
82
+ end
83
+
84
+ # List of attributes with nullable: true
85
+ def self.openapi_nullable
86
+ Set.new([
87
+ ])
88
+ end
89
+
90
+ # Initializes the object
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ def initialize(attributes = {})
93
+ if (!attributes.is_a?(Hash))
94
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbItemChildCreateResponse` initialize method"
95
+ end
96
+
97
+ # check to see if the attribute exists and convert string to symbol for hash key
98
+ attributes = attributes.each_with_object({}) { |(k, v), h|
99
+ if (!self.class.attribute_map.key?(k.to_sym))
100
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbItemChildCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
101
+ end
102
+ h[k.to_sym] = v
103
+ }
104
+
105
+ if attributes.key?(:'copied_cost')
106
+ self.copied_cost = attributes[:'copied_cost']
107
+ end
108
+
109
+ if attributes.key?(:'copied_dimensions')
110
+ self.copied_dimensions = attributes[:'copied_dimensions']
111
+ end
112
+
113
+ if attributes.key?(:'copied_folder_id')
114
+ self.copied_folder_id = attributes[:'copied_folder_id']
115
+ end
116
+
117
+ if attributes.key?(:'copied_weight')
118
+ self.copied_weight = attributes[:'copied_weight']
119
+ end
120
+
121
+ if attributes.key?(:'description')
122
+ self.description = attributes[:'description']
123
+ end
124
+
125
+ if attributes.key?(:'dry_run')
126
+ self.dry_run = attributes[:'dry_run']
127
+ end
128
+
129
+ if attributes.key?(:'merchant_item_id')
130
+ self.merchant_item_id = attributes[:'merchant_item_id']
131
+ end
132
+
133
+ if attributes.key?(:'merchant_item_oid')
134
+ self.merchant_item_oid = attributes[:'merchant_item_oid']
135
+ end
136
+
137
+ if attributes.key?(:'_next')
138
+ self._next = attributes[:'_next']
139
+ end
140
+
141
+ if attributes.key?(:'parent')
142
+ self.parent = attributes[:'parent']
143
+ end
144
+ end
145
+
146
+ # Show invalid properties with the reasons. Usually used together with valid?
147
+ # @return Array for valid properties with the reasons
148
+ def list_invalid_properties
149
+ invalid_properties = Array.new
150
+ invalid_properties
151
+ end
152
+
153
+ # Check to see if the all the properties in the model are valid
154
+ # @return true if the model is valid
155
+ def valid?
156
+ true
157
+ end
158
+
159
+ # Checks equality by comparing each attribute.
160
+ # @param [Object] Object to be compared
161
+ def ==(o)
162
+ return true if self.equal?(o)
163
+ self.class == o.class &&
164
+ copied_cost == o.copied_cost &&
165
+ copied_dimensions == o.copied_dimensions &&
166
+ copied_folder_id == o.copied_folder_id &&
167
+ copied_weight == o.copied_weight &&
168
+ description == o.description &&
169
+ dry_run == o.dry_run &&
170
+ merchant_item_id == o.merchant_item_id &&
171
+ merchant_item_oid == o.merchant_item_oid &&
172
+ _next == o._next &&
173
+ parent == o.parent
174
+ end
175
+
176
+ # @see the `==` method
177
+ # @param [Object] Object to be compared
178
+ def eql?(o)
179
+ self == o
180
+ end
181
+
182
+ # Calculates hash code according to all attributes.
183
+ # @return [Integer] Hash code
184
+ def hash
185
+ [copied_cost, copied_dimensions, copied_folder_id, copied_weight, description, dry_run, merchant_item_id, merchant_item_oid, _next, parent].hash
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def self.build_from_hash(attributes)
192
+ new.build_from_hash(attributes)
193
+ end
194
+
195
+ # Builds the object from hash
196
+ # @param [Hash] attributes Model attributes in the form of hash
197
+ # @return [Object] Returns the model itself
198
+ def build_from_hash(attributes)
199
+ return nil unless attributes.is_a?(Hash)
200
+ attributes = attributes.transform_keys(&:to_sym)
201
+ self.class.openapi_types.each_pair do |key, type|
202
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
203
+ self.send("#{key}=", nil)
204
+ elsif type =~ /\AArray<(.*)>/i
205
+ # check to ensure the input is an array given that the attribute
206
+ # is documented as an array but the input is not
207
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
208
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
209
+ end
210
+ elsif !attributes[self.class.attribute_map[key]].nil?
211
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
212
+ end
213
+ end
214
+
215
+ self
216
+ end
217
+
218
+ # Deserializes the data based on type
219
+ # @param string type Data type
220
+ # @param string value Value to be deserialized
221
+ # @return [Object] Deserialized data
222
+ def _deserialize(type, value)
223
+ case type.to_sym
224
+ when :Time
225
+ Time.parse(value)
226
+ when :Date
227
+ Date.parse(value)
228
+ when :String
229
+ value.to_s
230
+ when :Integer
231
+ value.to_i
232
+ when :Float
233
+ value.to_f
234
+ when :Boolean
235
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
236
+ true
237
+ else
238
+ false
239
+ end
240
+ when :Object
241
+ # generic object (usually a Hash), return directly
242
+ value
243
+ when /\AArray<(?<inner_type>.+)>\z/
244
+ inner_type = Regexp.last_match[:inner_type]
245
+ value.map { |v| _deserialize(inner_type, v) }
246
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
247
+ k_type = Regexp.last_match[:k_type]
248
+ v_type = Regexp.last_match[:v_type]
249
+ {}.tap do |hash|
250
+ value.each do |k, v|
251
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
252
+ end
253
+ end
254
+ else # model
255
+ # models (e.g. Pet) or oneOf
256
+ klass = UltracartClient.const_get(type)
257
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
258
+ end
259
+ end
260
+
261
+ # Returns the string representation of the object
262
+ # @return [String] String presentation of the object
263
+ def to_s
264
+ to_hash.to_s
265
+ end
266
+
267
+ # to_body is an alias to to_hash (backward compatibility)
268
+ # @return [Hash] Returns the object in the form of hash
269
+ def to_body
270
+ to_hash
271
+ end
272
+
273
+ # Returns the object in the form of hash
274
+ # @return [Hash] Returns the object in the form of hash
275
+ def to_hash
276
+ hash = {}
277
+ self.class.attribute_map.each_pair do |attr, param|
278
+ value = self.send(attr)
279
+ if value.nil?
280
+ is_nullable = self.class.openapi_nullable.include?(attr)
281
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
282
+ end
283
+
284
+ hash[param] = _to_hash(value)
285
+ end
286
+ hash
287
+ end
288
+
289
+ # Outputs non-array value in the form of hash
290
+ # For object, use to_hash. Otherwise, just return the value
291
+ # @param [Object] value Any valid value
292
+ # @return [Hash] Returns the value in the form of hash
293
+ def _to_hash(value)
294
+ if value.is_a?(Array)
295
+ value.compact.map { |v| _to_hash(v) }
296
+ elsif value.is_a?(Hash)
297
+ {}.tap do |hash|
298
+ value.each { |k, v| hash[k] = _to_hash(v) }
299
+ end
300
+ elsif value.respond_to? :to_hash
301
+ value.to_hash
302
+ else
303
+ value
304
+ end
305
+ end
306
+
307
+ end
308
+
309
+ end