ultracart_api 3.1.47 → 3.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +201 -201
  3. data/README.md +25 -7
  4. data/docs/AutoOrderQuery.md +3 -1
  5. data/docs/CustomerApi.md +92 -92
  6. data/docs/IntegrationLog.md +25 -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 +17 -0
  11. data/docs/IntegrationLogQueryRequest.md +20 -0
  12. data/docs/IntegrationLogQueryResponse.md +13 -0
  13. data/docs/IntegrationLogResponse.md +12 -0
  14. data/docs/ScreenRecordingHeatmap.md +12 -0
  15. data/docs/ScreenRecordingHeatmapRequest.md +1 -0
  16. data/docs/StorefrontApi.md +52 -52
  17. data/lib/ultracart_api.rb +8 -0
  18. data/lib/ultracart_api/api/customer_api.rb +98 -98
  19. data/lib/ultracart_api/api/integration_log_api.rb +228 -0
  20. data/lib/ultracart_api/api/storefront_api.rb +52 -52
  21. data/lib/ultracart_api/models/auto_order_query.rb +22 -2
  22. data/lib/ultracart_api/models/integration_log.rb +343 -0
  23. data/lib/ultracart_api/models/integration_log_file.rb +211 -0
  24. data/lib/ultracart_api/models/integration_log_log.rb +193 -0
  25. data/lib/ultracart_api/models/integration_log_query_filter_values.rb +285 -0
  26. data/lib/ultracart_api/models/integration_log_query_request.rb +298 -0
  27. data/lib/ultracart_api/models/integration_log_query_response.rb +232 -0
  28. data/lib/ultracart_api/models/integration_log_response.rb +221 -0
  29. data/lib/ultracart_api/models/screen_recording_heatmap.rb +109 -1
  30. data/lib/ultracart_api/models/screen_recording_heatmap_request.rb +12 -1
  31. data/lib/ultracart_api/version.rb +1 -1
  32. metadata +18 -2
@@ -0,0 +1,228 @@
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 'uri'
14
+
15
+ module UltracartClient
16
+ class IntegrationLogApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
24
+ api_config = Configuration.new
25
+ api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
26
+ api_config.api_version = '2017-03-01'
27
+ api_config.verify_ssl = verify_ssl
28
+
29
+ api_client = ApiClient.new(api_config)
30
+ api_client.config.debugging = debugging
31
+
32
+ UltracartClient::IntegrationLogApi.new(api_client)
33
+ end
34
+
35
+ # Retrieve an integration log
36
+ # Retrieve an integration logs from the account based identifiers
37
+ # @param pk
38
+ # @param sk
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [IntegrationLogResponse]
41
+ def get_integration_log(pk, sk, opts = {})
42
+ data, _status_code, _headers = get_integration_log_with_http_info(pk, sk, opts)
43
+ data
44
+ end
45
+
46
+ # Retrieve an integration log
47
+ # Retrieve an integration logs from the account based identifiers
48
+ # @param pk
49
+ # @param sk
50
+ # @param [Hash] opts the optional parameters
51
+ # @return [Array<(IntegrationLogResponse, Fixnum, Hash)>] IntegrationLogResponse data, response status code and response headers
52
+ def get_integration_log_with_http_info(pk, sk, opts = {})
53
+ if @api_client.config.debugging
54
+ @api_client.config.logger.debug 'Calling API: IntegrationLogApi.get_integration_log ...'
55
+ end
56
+ # verify the required parameter 'pk' is set
57
+ if @api_client.config.client_side_validation && pk.nil?
58
+ fail ArgumentError, "Missing the required parameter 'pk' when calling IntegrationLogApi.get_integration_log"
59
+ end
60
+ # verify the required parameter 'sk' is set
61
+ if @api_client.config.client_side_validation && sk.nil?
62
+ fail ArgumentError, "Missing the required parameter 'sk' when calling IntegrationLogApi.get_integration_log"
63
+ end
64
+ # resource path
65
+ local_var_path = '/integration_log/query/{pk}/{sk}'.sub('{' + 'pk' + '}', pk.to_s).sub('{' + 'sk' + '}', sk.to_s)
66
+
67
+ # query parameters
68
+ query_params = {}
69
+
70
+ # header parameters
71
+ header_params = {}
72
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
73
+ # HTTP header 'Accept' (if needed)
74
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
75
+ # HTTP header 'Content-Type'
76
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
77
+
78
+ # form parameters
79
+ form_params = {}
80
+
81
+ # http body (model)
82
+ post_body = nil
83
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
84
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
85
+ :header_params => header_params,
86
+ :query_params => query_params,
87
+ :form_params => form_params,
88
+ :body => post_body,
89
+ :auth_names => auth_names,
90
+ :return_type => 'IntegrationLogResponse')
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "API called: IntegrationLogApi#get_integration_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ end
94
+ return data, status_code, headers
95
+ end
96
+ # Retrieve an integration log file
97
+ # Retrieve an integration log file from the account based identifiers
98
+ # @param pk
99
+ # @param sk
100
+ # @param uuid
101
+ # @param [Hash] opts the optional parameters
102
+ # @return [File]
103
+ def get_integration_log_file(pk, sk, uuid, opts = {})
104
+ data, _status_code, _headers = get_integration_log_file_with_http_info(pk, sk, uuid, opts)
105
+ data
106
+ end
107
+
108
+ # Retrieve an integration log file
109
+ # Retrieve an integration log file from the account based identifiers
110
+ # @param pk
111
+ # @param sk
112
+ # @param uuid
113
+ # @param [Hash] opts the optional parameters
114
+ # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers
115
+ def get_integration_log_file_with_http_info(pk, sk, uuid, opts = {})
116
+ if @api_client.config.debugging
117
+ @api_client.config.logger.debug 'Calling API: IntegrationLogApi.get_integration_log_file ...'
118
+ end
119
+ # verify the required parameter 'pk' is set
120
+ if @api_client.config.client_side_validation && pk.nil?
121
+ fail ArgumentError, "Missing the required parameter 'pk' when calling IntegrationLogApi.get_integration_log_file"
122
+ end
123
+ # verify the required parameter 'sk' is set
124
+ if @api_client.config.client_side_validation && sk.nil?
125
+ fail ArgumentError, "Missing the required parameter 'sk' when calling IntegrationLogApi.get_integration_log_file"
126
+ end
127
+ # verify the required parameter 'uuid' is set
128
+ if @api_client.config.client_side_validation && uuid.nil?
129
+ fail ArgumentError, "Missing the required parameter 'uuid' when calling IntegrationLogApi.get_integration_log_file"
130
+ end
131
+ # resource path
132
+ local_var_path = '/integration_log/query/{pk}/{sk}/{uuid}'.sub('{' + 'pk' + '}', pk.to_s).sub('{' + 'sk' + '}', sk.to_s).sub('{' + 'uuid' + '}', uuid.to_s)
133
+
134
+ # query parameters
135
+ query_params = {}
136
+
137
+ # header parameters
138
+ header_params = {}
139
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
140
+ # HTTP header 'Accept' (if needed)
141
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
142
+ # HTTP header 'Content-Type'
143
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
144
+
145
+ # form parameters
146
+ form_params = {}
147
+
148
+ # http body (model)
149
+ post_body = nil
150
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
151
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
152
+ :header_params => header_params,
153
+ :query_params => query_params,
154
+ :form_params => form_params,
155
+ :body => post_body,
156
+ :auth_names => auth_names,
157
+ :return_type => 'File')
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug "API called: IntegrationLogApi#get_integration_log_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
160
+ end
161
+ return data, status_code, headers
162
+ end
163
+ # Retrieve integration logs
164
+ # Retrieves a set of integration logs from the account based on a query object.
165
+ # @param integration_log_query Integration log query
166
+ # @param [Hash] opts the optional parameters
167
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 500) (default to 100)
168
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
169
+ # @option opts [String] :_sort The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
170
+ # @return [IntegrationLogQueryResponse]
171
+ def get_integration_logs_query(integration_log_query, opts = {})
172
+ data, _status_code, _headers = get_integration_logs_query_with_http_info(integration_log_query, opts)
173
+ data
174
+ end
175
+
176
+ # Retrieve integration logs
177
+ # Retrieves a set of integration logs from the account based on a query object.
178
+ # @param integration_log_query Integration log query
179
+ # @param [Hash] opts the optional parameters
180
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 500)
181
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
182
+ # @option opts [String] :_sort The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
183
+ # @return [Array<(IntegrationLogQueryResponse, Fixnum, Hash)>] IntegrationLogQueryResponse data, response status code and response headers
184
+ def get_integration_logs_query_with_http_info(integration_log_query, opts = {})
185
+ if @api_client.config.debugging
186
+ @api_client.config.logger.debug 'Calling API: IntegrationLogApi.get_integration_logs_query ...'
187
+ end
188
+ # verify the required parameter 'integration_log_query' is set
189
+ if @api_client.config.client_side_validation && integration_log_query.nil?
190
+ fail ArgumentError, "Missing the required parameter 'integration_log_query' when calling IntegrationLogApi.get_integration_logs_query"
191
+ end
192
+ # resource path
193
+ local_var_path = '/integration_log/query'
194
+
195
+ # query parameters
196
+ query_params = {}
197
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
198
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
199
+ query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
200
+
201
+ # header parameters
202
+ header_params = {}
203
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
204
+ # HTTP header 'Accept' (if needed)
205
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
206
+ # HTTP header 'Content-Type'
207
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
208
+
209
+ # form parameters
210
+ form_params = {}
211
+
212
+ # http body (model)
213
+ post_body = @api_client.object_to_http_body(integration_log_query)
214
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
215
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
216
+ :header_params => header_params,
217
+ :query_params => query_params,
218
+ :form_params => form_params,
219
+ :body => post_body,
220
+ :auth_names => auth_names,
221
+ :return_type => 'IntegrationLogQueryResponse')
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug "API called: IntegrationLogApi#get_integration_logs_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
224
+ end
225
+ return data, status_code, headers
226
+ end
227
+ end
228
+ end
@@ -4904,58 +4904,6 @@ module UltracartClient
4904
4904
  end
4905
4905
  return data, status_code, headers
4906
4906
  end
4907
- # Retrieve pricing tiers
4908
- # Retrieves the pricing tiers
4909
- # @param [Hash] opts the optional parameters
4910
- # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
4911
- # @return [PricingTiersResponse]
4912
- def get_pricing_tiers(opts = {})
4913
- data, _status_code, _headers = get_pricing_tiers_with_http_info(opts)
4914
- data
4915
- end
4916
-
4917
- # Retrieve pricing tiers
4918
- # Retrieves the pricing tiers
4919
- # @param [Hash] opts the optional parameters
4920
- # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
4921
- # @return [Array<(PricingTiersResponse, Fixnum, Hash)>] PricingTiersResponse data, response status code and response headers
4922
- def get_pricing_tiers_with_http_info(opts = {})
4923
- if @api_client.config.debugging
4924
- @api_client.config.logger.debug 'Calling API: StorefrontApi.get_pricing_tiers ...'
4925
- end
4926
- # resource path
4927
- local_var_path = '/storefront/pricing_tiers'
4928
-
4929
- # query parameters
4930
- query_params = {}
4931
- query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
4932
-
4933
- # header parameters
4934
- header_params = {}
4935
- header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4936
- # HTTP header 'Accept' (if needed)
4937
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4938
- # HTTP header 'Content-Type'
4939
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
4940
-
4941
- # form parameters
4942
- form_params = {}
4943
-
4944
- # http body (model)
4945
- post_body = nil
4946
- auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
4947
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
4948
- :header_params => header_params,
4949
- :query_params => query_params,
4950
- :form_params => form_params,
4951
- :body => post_body,
4952
- :auth_names => auth_names,
4953
- :return_type => 'PricingTiersResponse')
4954
- if @api_client.config.debugging
4955
- @api_client.config.logger.debug "API called: StorefrontApi#get_pricing_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4956
- end
4957
- return data, status_code, headers
4958
- end
4959
4907
  # Get screen recording
4960
4908
  # Get screen recording
4961
4909
  # @param storefront_oid
@@ -5444,6 +5392,58 @@ module UltracartClient
5444
5392
  end
5445
5393
  return data, status_code, headers
5446
5394
  end
5395
+ # Retrieve pricing tiers
5396
+ # Retrieves the pricing tiers
5397
+ # @param [Hash] opts the optional parameters
5398
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
5399
+ # @return [PricingTiersResponse]
5400
+ def get_store_front_pricing_tiers(opts = {})
5401
+ data, _status_code, _headers = get_store_front_pricing_tiers_with_http_info(opts)
5402
+ data
5403
+ end
5404
+
5405
+ # Retrieve pricing tiers
5406
+ # Retrieves the pricing tiers
5407
+ # @param [Hash] opts the optional parameters
5408
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
5409
+ # @return [Array<(PricingTiersResponse, Fixnum, Hash)>] PricingTiersResponse data, response status code and response headers
5410
+ def get_store_front_pricing_tiers_with_http_info(opts = {})
5411
+ if @api_client.config.debugging
5412
+ @api_client.config.logger.debug 'Calling API: StorefrontApi.get_store_front_pricing_tiers ...'
5413
+ end
5414
+ # resource path
5415
+ local_var_path = '/storefront/pricing_tiers'
5416
+
5417
+ # query parameters
5418
+ query_params = {}
5419
+ query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
5420
+
5421
+ # header parameters
5422
+ header_params = {}
5423
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
5424
+ # HTTP header 'Accept' (if needed)
5425
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
5426
+ # HTTP header 'Content-Type'
5427
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
5428
+
5429
+ # form parameters
5430
+ form_params = {}
5431
+
5432
+ # http body (model)
5433
+ post_body = nil
5434
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
5435
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
5436
+ :header_params => header_params,
5437
+ :query_params => query_params,
5438
+ :form_params => form_params,
5439
+ :body => post_body,
5440
+ :auth_names => auth_names,
5441
+ :return_type => 'PricingTiersResponse')
5442
+ if @api_client.config.debugging
5443
+ @api_client.config.logger.debug "API called: StorefrontApi#get_store_front_pricing_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5444
+ end
5445
+ return data, status_code, headers
5446
+ end
5447
5447
  # Get thumbnail parameters
5448
5448
  # @param thumbnail_parameters Thumbnail Parameters
5449
5449
  # @param [Hash] opts the optional parameters
@@ -38,18 +38,24 @@ module UltracartClient
38
38
  # First name
39
39
  attr_accessor :first_name
40
40
 
41
- # Item ID
41
+ # Item ID. Deprecated query field. This incorrectly meant the original order contained this item id.
42
42
  attr_accessor :item_id
43
43
 
44
44
  # Last name
45
45
  attr_accessor :last_name
46
46
 
47
+ # Next Item ID that is supposed to ship. This is calculated based upon the schedule associated with the original item id.
48
+ attr_accessor :next_item_id
49
+
47
50
  # Next shipment date begin
48
51
  attr_accessor :next_shipment_date_begin
49
52
 
50
53
  # Next shipment date end
51
54
  attr_accessor :next_shipment_date_end
52
55
 
56
+ # Original Item ID purchased on auto order.
57
+ attr_accessor :original_item_id
58
+
53
59
  # Original order date begin
54
60
  attr_accessor :original_order_date_begin
55
61
 
@@ -84,8 +90,10 @@ module UltracartClient
84
90
  :'first_name' => :'first_name',
85
91
  :'item_id' => :'item_id',
86
92
  :'last_name' => :'last_name',
93
+ :'next_item_id' => :'next_item_id',
87
94
  :'next_shipment_date_begin' => :'next_shipment_date_begin',
88
95
  :'next_shipment_date_end' => :'next_shipment_date_end',
96
+ :'original_item_id' => :'original_item_id',
89
97
  :'original_order_date_begin' => :'original_order_date_begin',
90
98
  :'original_order_date_end' => :'original_order_date_end',
91
99
  :'original_order_id' => :'original_order_id',
@@ -109,8 +117,10 @@ module UltracartClient
109
117
  :'first_name' => :'String',
110
118
  :'item_id' => :'String',
111
119
  :'last_name' => :'String',
120
+ :'next_item_id' => :'String',
112
121
  :'next_shipment_date_begin' => :'String',
113
122
  :'next_shipment_date_end' => :'String',
123
+ :'original_item_id' => :'String',
114
124
  :'original_order_date_begin' => :'String',
115
125
  :'original_order_date_end' => :'String',
116
126
  :'original_order_id' => :'String',
@@ -169,6 +179,10 @@ module UltracartClient
169
179
  self.last_name = attributes[:'last_name']
170
180
  end
171
181
 
182
+ if attributes.has_key?(:'next_item_id')
183
+ self.next_item_id = attributes[:'next_item_id']
184
+ end
185
+
172
186
  if attributes.has_key?(:'next_shipment_date_begin')
173
187
  self.next_shipment_date_begin = attributes[:'next_shipment_date_begin']
174
188
  end
@@ -177,6 +191,10 @@ module UltracartClient
177
191
  self.next_shipment_date_end = attributes[:'next_shipment_date_end']
178
192
  end
179
193
 
194
+ if attributes.has_key?(:'original_item_id')
195
+ self.original_item_id = attributes[:'original_item_id']
196
+ end
197
+
180
198
  if attributes.has_key?(:'original_order_date_begin')
181
199
  self.original_order_date_begin = attributes[:'original_order_date_begin']
182
200
  end
@@ -294,8 +312,10 @@ module UltracartClient
294
312
  first_name == o.first_name &&
295
313
  item_id == o.item_id &&
296
314
  last_name == o.last_name &&
315
+ next_item_id == o.next_item_id &&
297
316
  next_shipment_date_begin == o.next_shipment_date_begin &&
298
317
  next_shipment_date_end == o.next_shipment_date_end &&
318
+ original_item_id == o.original_item_id &&
299
319
  original_order_date_begin == o.original_order_date_begin &&
300
320
  original_order_date_end == o.original_order_date_end &&
301
321
  original_order_id == o.original_order_id &&
@@ -314,7 +334,7 @@ module UltracartClient
314
334
  # Calculates hash code according to all attributes.
315
335
  # @return [Fixnum] Hash code
316
336
  def hash
317
- [auto_order_code, card_type, city, company, country_code, customer_profile_oid, email, first_name, item_id, last_name, next_shipment_date_begin, next_shipment_date_end, original_order_date_begin, original_order_date_end, original_order_id, phone, postal_code, state, status].hash
337
+ [auto_order_code, card_type, city, company, country_code, customer_profile_oid, email, first_name, item_id, last_name, next_item_id, next_shipment_date_begin, next_shipment_date_end, original_item_id, original_order_date_begin, original_order_date_end, original_order_id, phone, postal_code, state, status].hash
318
338
  end
319
339
 
320
340
  # Builds the object from hash
@@ -0,0 +1,343 @@
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 :logger_name
38
+
39
+ attr_accessor :logs
40
+
41
+ attr_accessor :omit_log_map
42
+
43
+ attr_accessor :order_ids
44
+
45
+ attr_accessor :pk
46
+
47
+ attr_accessor :sk
48
+
49
+ attr_accessor :status
50
+
51
+ attr_accessor :status_code
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ {
56
+ :'action' => :'action',
57
+ :'direction' => :'direction',
58
+ :'email' => :'email',
59
+ :'files' => :'files',
60
+ :'integration_log_oid' => :'integration_log_oid',
61
+ :'item_id' => :'item_id',
62
+ :'item_ipn_oid' => :'item_ipn_oid',
63
+ :'log_dts' => :'log_dts',
64
+ :'log_type' => :'log_type',
65
+ :'logger_id' => :'logger_id',
66
+ :'logger_name' => :'logger_name',
67
+ :'logs' => :'logs',
68
+ :'omit_log_map' => :'omit_log_map',
69
+ :'order_ids' => :'order_ids',
70
+ :'pk' => :'pk',
71
+ :'sk' => :'sk',
72
+ :'status' => :'status',
73
+ :'status_code' => :'status_code'
74
+ }
75
+ end
76
+
77
+ # Attribute type mapping.
78
+ def self.swagger_types
79
+ {
80
+ :'action' => :'String',
81
+ :'direction' => :'String',
82
+ :'email' => :'String',
83
+ :'files' => :'Array<IntegrationLogFile>',
84
+ :'integration_log_oid' => :'Integer',
85
+ :'item_id' => :'String',
86
+ :'item_ipn_oid' => :'Integer',
87
+ :'log_dts' => :'String',
88
+ :'log_type' => :'String',
89
+ :'logger_id' => :'String',
90
+ :'logger_name' => :'String',
91
+ :'logs' => :'Array<IntegrationLogLog>',
92
+ :'omit_log_map' => :'BOOLEAN',
93
+ :'order_ids' => :'Array<String>',
94
+ :'pk' => :'String',
95
+ :'sk' => :'String',
96
+ :'status' => :'String',
97
+ :'status_code' => :'Integer'
98
+ }
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ return unless attributes.is_a?(Hash)
105
+
106
+ # convert string to symbol for hash key
107
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
108
+
109
+ if attributes.has_key?(:'action')
110
+ self.action = attributes[:'action']
111
+ end
112
+
113
+ if attributes.has_key?(:'direction')
114
+ self.direction = attributes[:'direction']
115
+ end
116
+
117
+ if attributes.has_key?(:'email')
118
+ self.email = attributes[:'email']
119
+ end
120
+
121
+ if attributes.has_key?(:'files')
122
+ if (value = attributes[:'files']).is_a?(Array)
123
+ self.files = value
124
+ end
125
+ end
126
+
127
+ if attributes.has_key?(:'integration_log_oid')
128
+ self.integration_log_oid = attributes[:'integration_log_oid']
129
+ end
130
+
131
+ if attributes.has_key?(:'item_id')
132
+ self.item_id = attributes[:'item_id']
133
+ end
134
+
135
+ if attributes.has_key?(:'item_ipn_oid')
136
+ self.item_ipn_oid = attributes[:'item_ipn_oid']
137
+ end
138
+
139
+ if attributes.has_key?(:'log_dts')
140
+ self.log_dts = attributes[:'log_dts']
141
+ end
142
+
143
+ if attributes.has_key?(:'log_type')
144
+ self.log_type = attributes[:'log_type']
145
+ end
146
+
147
+ if attributes.has_key?(:'logger_id')
148
+ self.logger_id = attributes[:'logger_id']
149
+ end
150
+
151
+ if attributes.has_key?(:'logger_name')
152
+ self.logger_name = attributes[:'logger_name']
153
+ end
154
+
155
+ if attributes.has_key?(:'logs')
156
+ if (value = attributes[:'logs']).is_a?(Array)
157
+ self.logs = value
158
+ end
159
+ end
160
+
161
+ if attributes.has_key?(:'omit_log_map')
162
+ self.omit_log_map = attributes[:'omit_log_map']
163
+ end
164
+
165
+ if attributes.has_key?(:'order_ids')
166
+ if (value = attributes[:'order_ids']).is_a?(Array)
167
+ self.order_ids = value
168
+ end
169
+ end
170
+
171
+ if attributes.has_key?(:'pk')
172
+ self.pk = attributes[:'pk']
173
+ end
174
+
175
+ if attributes.has_key?(:'sk')
176
+ self.sk = attributes[:'sk']
177
+ end
178
+
179
+ if attributes.has_key?(:'status')
180
+ self.status = attributes[:'status']
181
+ end
182
+
183
+ if attributes.has_key?(:'status_code')
184
+ self.status_code = attributes[:'status_code']
185
+ end
186
+ end
187
+
188
+ # Show invalid properties with the reasons. Usually used together with valid?
189
+ # @return Array for valid properties with the reasons
190
+ def list_invalid_properties
191
+ invalid_properties = Array.new
192
+ invalid_properties
193
+ end
194
+
195
+ # Check to see if the all the properties in the model are valid
196
+ # @return true if the model is valid
197
+ def valid?
198
+ true
199
+ end
200
+
201
+ # Checks equality by comparing each attribute.
202
+ # @param [Object] Object to be compared
203
+ def ==(o)
204
+ return true if self.equal?(o)
205
+ self.class == o.class &&
206
+ action == o.action &&
207
+ direction == o.direction &&
208
+ email == o.email &&
209
+ files == o.files &&
210
+ integration_log_oid == o.integration_log_oid &&
211
+ item_id == o.item_id &&
212
+ item_ipn_oid == o.item_ipn_oid &&
213
+ log_dts == o.log_dts &&
214
+ log_type == o.log_type &&
215
+ logger_id == o.logger_id &&
216
+ logger_name == o.logger_name &&
217
+ logs == o.logs &&
218
+ omit_log_map == o.omit_log_map &&
219
+ order_ids == o.order_ids &&
220
+ pk == o.pk &&
221
+ sk == o.sk &&
222
+ status == o.status &&
223
+ status_code == o.status_code
224
+ end
225
+
226
+ # @see the `==` method
227
+ # @param [Object] Object to be compared
228
+ def eql?(o)
229
+ self == o
230
+ end
231
+
232
+ # Calculates hash code according to all attributes.
233
+ # @return [Fixnum] Hash code
234
+ def hash
235
+ [action, direction, email, files, integration_log_oid, item_id, item_ipn_oid, log_dts, log_type, logger_id, logger_name, logs, omit_log_map, order_ids, pk, sk, status, status_code].hash
236
+ end
237
+
238
+ # Builds the object from hash
239
+ # @param [Hash] attributes Model attributes in the form of hash
240
+ # @return [Object] Returns the model itself
241
+ def build_from_hash(attributes)
242
+ return nil unless attributes.is_a?(Hash)
243
+ self.class.swagger_types.each_pair do |key, type|
244
+ if type =~ /\AArray<(.*)>/i
245
+ # check to ensure the input is an array given that the attribute
246
+ # is documented as an array but the input is not
247
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
248
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
249
+ end
250
+ elsif !attributes[self.class.attribute_map[key]].nil?
251
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
252
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
253
+ end
254
+
255
+ self
256
+ end
257
+
258
+ # Deserializes the data based on type
259
+ # @param string type Data type
260
+ # @param string value Value to be deserialized
261
+ # @return [Object] Deserialized data
262
+ def _deserialize(type, value)
263
+ case type.to_sym
264
+ when :DateTime
265
+ DateTime.parse(value)
266
+ when :Date
267
+ Date.parse(value)
268
+ when :String
269
+ value.to_s
270
+ when :Integer
271
+ value.to_i
272
+ when :Float
273
+ value.to_f
274
+ when :BOOLEAN
275
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
276
+ true
277
+ else
278
+ false
279
+ end
280
+ when :Object
281
+ # generic object (usually a Hash), return directly
282
+ value
283
+ when /\AArray<(?<inner_type>.+)>\z/
284
+ inner_type = Regexp.last_match[:inner_type]
285
+ value.map { |v| _deserialize(inner_type, v) }
286
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
287
+ k_type = Regexp.last_match[:k_type]
288
+ v_type = Regexp.last_match[:v_type]
289
+ {}.tap do |hash|
290
+ value.each do |k, v|
291
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
292
+ end
293
+ end
294
+ else # model
295
+ temp_model = UltracartClient.const_get(type).new
296
+ temp_model.build_from_hash(value)
297
+ end
298
+ end
299
+
300
+ # Returns the string representation of the object
301
+ # @return [String] String presentation of the object
302
+ def to_s
303
+ to_hash.to_s
304
+ end
305
+
306
+ # to_body is an alias to to_hash (backward compatibility)
307
+ # @return [Hash] Returns the object in the form of hash
308
+ def to_body
309
+ to_hash
310
+ end
311
+
312
+ # Returns the object in the form of hash
313
+ # @return [Hash] Returns the object in the form of hash
314
+ def to_hash
315
+ hash = {}
316
+ self.class.attribute_map.each_pair do |attr, param|
317
+ value = self.send(attr)
318
+ next if value.nil?
319
+ hash[param] = _to_hash(value)
320
+ end
321
+ hash
322
+ end
323
+
324
+ # Outputs non-array value in the form of hash
325
+ # For object, use to_hash. Otherwise, just return the value
326
+ # @param [Object] value Any valid value
327
+ # @return [Hash] Returns the value in the form of hash
328
+ def _to_hash(value)
329
+ if value.is_a?(Array)
330
+ value.compact.map { |v| _to_hash(v) }
331
+ elsif value.is_a?(Hash)
332
+ {}.tap do |hash|
333
+ value.each { |k, v| hash[k] = _to_hash(v) }
334
+ end
335
+ elsif value.respond_to? :to_hash
336
+ value.to_hash
337
+ else
338
+ value
339
+ end
340
+ end
341
+
342
+ end
343
+ end