ultracart_api 3.1.45 → 3.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +201 -201
  3. data/README.md +26 -7
  4. data/docs/CustomerApi.md +92 -92
  5. data/docs/Error.md +1 -0
  6. data/docs/IntegrationLog.md +22 -0
  7. data/docs/IntegrationLogApi.md +178 -0
  8. data/docs/IntegrationLogFile.md +11 -0
  9. data/docs/IntegrationLogLog.md +9 -0
  10. data/docs/IntegrationLogQueryFilterValues.md +16 -0
  11. data/docs/IntegrationLogQueryRequest.md +19 -0
  12. data/docs/IntegrationLogQueryResponse.md +13 -0
  13. data/docs/IntegrationLogResponse.md +12 -0
  14. data/docs/ItemChannelPartnerMapping.md +1 -0
  15. data/docs/ScreenRecordingHeatmap.md +12 -0
  16. data/docs/ScreenRecordingHeatmapIndexRequest.md +8 -0
  17. data/docs/ScreenRecordingHeatmapRequest.md +1 -0
  18. data/docs/ScreenRecordingHeatmapUrl.md +1 -0
  19. data/docs/StorefrontApi.md +65 -54
  20. data/lib/ultracart_api.rb +9 -0
  21. data/lib/ultracart_api/api/customer_api.rb +98 -98
  22. data/lib/ultracart_api/api/integration_log_api.rb +228 -0
  23. data/lib/ultracart_api/api/storefront_api.rb +71 -56
  24. data/lib/ultracart_api/models/error.rb +11 -1
  25. data/lib/ultracart_api/models/integration_log.rb +316 -0
  26. data/lib/ultracart_api/models/integration_log_file.rb +211 -0
  27. data/lib/ultracart_api/models/integration_log_log.rb +193 -0
  28. data/lib/ultracart_api/models/integration_log_query_filter_values.rb +274 -0
  29. data/lib/ultracart_api/models/integration_log_query_request.rb +289 -0
  30. data/lib/ultracart_api/models/integration_log_query_response.rb +232 -0
  31. data/lib/ultracart_api/models/integration_log_response.rb +221 -0
  32. data/lib/ultracart_api/models/item_channel_partner_mapping.rb +11 -1
  33. data/lib/ultracart_api/models/screen_recording_heatmap.rb +109 -1
  34. data/lib/ultracart_api/models/screen_recording_heatmap_index_request.rb +184 -0
  35. data/lib/ultracart_api/models/screen_recording_heatmap_request.rb +12 -1
  36. data/lib/ultracart_api/models/screen_recording_heatmap_url.rb +10 -1
  37. data/lib/ultracart_api/version.rb +1 -1
  38. metadata +20 -2
@@ -0,0 +1,316 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class IntegrationLog
17
+ attr_accessor :action
18
+
19
+ attr_accessor :direction
20
+
21
+ attr_accessor :email
22
+
23
+ attr_accessor :files
24
+
25
+ attr_accessor :integration_log_oid
26
+
27
+ attr_accessor :item_id
28
+
29
+ attr_accessor :item_ipn_oid
30
+
31
+ attr_accessor :log_dts
32
+
33
+ attr_accessor :log_type
34
+
35
+ attr_accessor :logger_id
36
+
37
+ attr_accessor :logs
38
+
39
+ attr_accessor :order_ids
40
+
41
+ attr_accessor :pk
42
+
43
+ attr_accessor :sk
44
+
45
+ attr_accessor :status
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'action' => :'action',
51
+ :'direction' => :'direction',
52
+ :'email' => :'email',
53
+ :'files' => :'files',
54
+ :'integration_log_oid' => :'integration_log_oid',
55
+ :'item_id' => :'item_id',
56
+ :'item_ipn_oid' => :'item_ipn_oid',
57
+ :'log_dts' => :'log_dts',
58
+ :'log_type' => :'log_type',
59
+ :'logger_id' => :'logger_id',
60
+ :'logs' => :'logs',
61
+ :'order_ids' => :'order_ids',
62
+ :'pk' => :'pk',
63
+ :'sk' => :'sk',
64
+ :'status' => :'status'
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.swagger_types
70
+ {
71
+ :'action' => :'String',
72
+ :'direction' => :'String',
73
+ :'email' => :'String',
74
+ :'files' => :'Array<IntegrationLogFile>',
75
+ :'integration_log_oid' => :'Integer',
76
+ :'item_id' => :'String',
77
+ :'item_ipn_oid' => :'Integer',
78
+ :'log_dts' => :'String',
79
+ :'log_type' => :'String',
80
+ :'logger_id' => :'String',
81
+ :'logs' => :'Array<IntegrationLogLog>',
82
+ :'order_ids' => :'Array<String>',
83
+ :'pk' => :'String',
84
+ :'sk' => :'String',
85
+ :'status' => :'String'
86
+ }
87
+ end
88
+
89
+ # Initializes the object
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ def initialize(attributes = {})
92
+ return unless attributes.is_a?(Hash)
93
+
94
+ # convert string to symbol for hash key
95
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
96
+
97
+ if attributes.has_key?(:'action')
98
+ self.action = attributes[:'action']
99
+ end
100
+
101
+ if attributes.has_key?(:'direction')
102
+ self.direction = attributes[:'direction']
103
+ end
104
+
105
+ if attributes.has_key?(:'email')
106
+ self.email = attributes[:'email']
107
+ end
108
+
109
+ if attributes.has_key?(:'files')
110
+ if (value = attributes[:'files']).is_a?(Array)
111
+ self.files = value
112
+ end
113
+ end
114
+
115
+ if attributes.has_key?(:'integration_log_oid')
116
+ self.integration_log_oid = attributes[:'integration_log_oid']
117
+ end
118
+
119
+ if attributes.has_key?(:'item_id')
120
+ self.item_id = attributes[:'item_id']
121
+ end
122
+
123
+ if attributes.has_key?(:'item_ipn_oid')
124
+ self.item_ipn_oid = attributes[:'item_ipn_oid']
125
+ end
126
+
127
+ if attributes.has_key?(:'log_dts')
128
+ self.log_dts = attributes[:'log_dts']
129
+ end
130
+
131
+ if attributes.has_key?(:'log_type')
132
+ self.log_type = attributes[:'log_type']
133
+ end
134
+
135
+ if attributes.has_key?(:'logger_id')
136
+ self.logger_id = attributes[:'logger_id']
137
+ end
138
+
139
+ if attributes.has_key?(:'logs')
140
+ if (value = attributes[:'logs']).is_a?(Array)
141
+ self.logs = value
142
+ end
143
+ end
144
+
145
+ if attributes.has_key?(:'order_ids')
146
+ if (value = attributes[:'order_ids']).is_a?(Array)
147
+ self.order_ids = value
148
+ end
149
+ end
150
+
151
+ if attributes.has_key?(:'pk')
152
+ self.pk = attributes[:'pk']
153
+ end
154
+
155
+ if attributes.has_key?(:'sk')
156
+ self.sk = attributes[:'sk']
157
+ end
158
+
159
+ if attributes.has_key?(:'status')
160
+ self.status = attributes[:'status']
161
+ end
162
+ end
163
+
164
+ # Show invalid properties with the reasons. Usually used together with valid?
165
+ # @return Array for valid properties with the reasons
166
+ def list_invalid_properties
167
+ invalid_properties = Array.new
168
+ invalid_properties
169
+ end
170
+
171
+ # Check to see if the all the properties in the model are valid
172
+ # @return true if the model is valid
173
+ def valid?
174
+ true
175
+ end
176
+
177
+ # Checks equality by comparing each attribute.
178
+ # @param [Object] Object to be compared
179
+ def ==(o)
180
+ return true if self.equal?(o)
181
+ self.class == o.class &&
182
+ action == o.action &&
183
+ direction == o.direction &&
184
+ email == o.email &&
185
+ files == o.files &&
186
+ integration_log_oid == o.integration_log_oid &&
187
+ item_id == o.item_id &&
188
+ item_ipn_oid == o.item_ipn_oid &&
189
+ log_dts == o.log_dts &&
190
+ log_type == o.log_type &&
191
+ logger_id == o.logger_id &&
192
+ logs == o.logs &&
193
+ order_ids == o.order_ids &&
194
+ pk == o.pk &&
195
+ sk == o.sk &&
196
+ status == o.status
197
+ end
198
+
199
+ # @see the `==` method
200
+ # @param [Object] Object to be compared
201
+ def eql?(o)
202
+ self == o
203
+ end
204
+
205
+ # Calculates hash code according to all attributes.
206
+ # @return [Fixnum] Hash code
207
+ def hash
208
+ [action, direction, email, files, integration_log_oid, item_id, item_ipn_oid, log_dts, log_type, logger_id, logs, order_ids, pk, sk, status].hash
209
+ end
210
+
211
+ # Builds the object from hash
212
+ # @param [Hash] attributes Model attributes in the form of hash
213
+ # @return [Object] Returns the model itself
214
+ def build_from_hash(attributes)
215
+ return nil unless attributes.is_a?(Hash)
216
+ self.class.swagger_types.each_pair do |key, type|
217
+ if 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 # or else data not found in attributes(hash), not an issue as the data can be optional
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 :DateTime
238
+ DateTime.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
+ temp_model = UltracartClient.const_get(type).new
269
+ temp_model.build_from_hash(value)
270
+ end
271
+ end
272
+
273
+ # Returns the string representation of the object
274
+ # @return [String] String presentation of the object
275
+ def to_s
276
+ to_hash.to_s
277
+ end
278
+
279
+ # to_body is an alias to to_hash (backward compatibility)
280
+ # @return [Hash] Returns the object in the form of hash
281
+ def to_body
282
+ to_hash
283
+ end
284
+
285
+ # Returns the object in the form of hash
286
+ # @return [Hash] Returns the object in the form of hash
287
+ def to_hash
288
+ hash = {}
289
+ self.class.attribute_map.each_pair do |attr, param|
290
+ value = self.send(attr)
291
+ next if value.nil?
292
+ hash[param] = _to_hash(value)
293
+ end
294
+ hash
295
+ end
296
+
297
+ # Outputs non-array value in the form of hash
298
+ # For object, use to_hash. Otherwise, just return the value
299
+ # @param [Object] value Any valid value
300
+ # @return [Hash] Returns the value in the form of hash
301
+ def _to_hash(value)
302
+ if value.is_a?(Array)
303
+ value.compact.map { |v| _to_hash(v) }
304
+ elsif value.is_a?(Hash)
305
+ {}.tap do |hash|
306
+ value.each { |k, v| hash[k] = _to_hash(v) }
307
+ end
308
+ elsif value.respond_to? :to_hash
309
+ value.to_hash
310
+ else
311
+ value
312
+ end
313
+ end
314
+
315
+ end
316
+ end
@@ -0,0 +1,211 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class IntegrationLogFile
17
+ attr_accessor :mime_type
18
+
19
+ attr_accessor :name
20
+
21
+ attr_accessor :size
22
+
23
+ attr_accessor :uuid
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'mime_type' => :'mime_type',
29
+ :'name' => :'name',
30
+ :'size' => :'size',
31
+ :'uuid' => :'uuid'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'mime_type' => :'String',
39
+ :'name' => :'String',
40
+ :'size' => :'Integer',
41
+ :'uuid' => :'String'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
+
53
+ if attributes.has_key?(:'mime_type')
54
+ self.mime_type = attributes[:'mime_type']
55
+ end
56
+
57
+ if attributes.has_key?(:'name')
58
+ self.name = attributes[:'name']
59
+ end
60
+
61
+ if attributes.has_key?(:'size')
62
+ self.size = attributes[:'size']
63
+ end
64
+
65
+ if attributes.has_key?(:'uuid')
66
+ self.uuid = attributes[:'uuid']
67
+ end
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properties with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = Array.new
74
+ invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ mime_type == o.mime_type &&
89
+ name == o.name &&
90
+ size == o.size &&
91
+ uuid == o.uuid
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Fixnum] Hash code
102
+ def hash
103
+ [mime_type, name, size, uuid].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.swagger_types.each_pair do |key, type|
112
+ if type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
116
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !attributes[self.class.attribute_map[key]].nil?
119
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ end
122
+
123
+ self
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def _deserialize(type, value)
131
+ case type.to_sym
132
+ when :DateTime
133
+ DateTime.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :BOOLEAN
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ temp_model = UltracartClient.const_get(type).new
164
+ temp_model.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ next if value.nil?
187
+ hash[param] = _to_hash(value)
188
+ end
189
+ hash
190
+ end
191
+
192
+ # Outputs non-array value in the form of hash
193
+ # For object, use to_hash. Otherwise, just return the value
194
+ # @param [Object] value Any valid value
195
+ # @return [Hash] Returns the value in the form of hash
196
+ def _to_hash(value)
197
+ if value.is_a?(Array)
198
+ value.compact.map { |v| _to_hash(v) }
199
+ elsif value.is_a?(Hash)
200
+ {}.tap do |hash|
201
+ value.each { |k, v| hash[k] = _to_hash(v) }
202
+ end
203
+ elsif value.respond_to? :to_hash
204
+ value.to_hash
205
+ else
206
+ value
207
+ end
208
+ end
209
+
210
+ end
211
+ end