ultracart_api 3.1.44 → 3.1.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -5
  3. data/docs/Error.md +1 -0
  4. data/docs/IntegrationLog.md +22 -0
  5. data/docs/IntegrationLogApi.md +121 -0
  6. data/docs/IntegrationLogFile.md +10 -0
  7. data/docs/IntegrationLogLog.md +9 -0
  8. data/docs/IntegrationLogQueryFilterValues.md +16 -0
  9. data/docs/IntegrationLogQueryRequest.md +19 -0
  10. data/docs/IntegrationLogQueryResponse.md +13 -0
  11. data/docs/IntegrationLogResponse.md +12 -0
  12. data/docs/ItemChannelPartnerMapping.md +1 -0
  13. data/docs/LibraryItemAttribute.md +1 -0
  14. data/docs/ScreenRecordingHeatmap.md +12 -0
  15. data/docs/ScreenRecordingHeatmapIndexRequest.md +8 -0
  16. data/docs/ScreenRecordingHeatmapRequest.md +1 -0
  17. data/docs/ScreenRecordingHeatmapUrl.md +1 -0
  18. data/docs/StorefrontApi.md +13 -2
  19. data/lib/ultracart_api.rb +9 -0
  20. data/lib/ultracart_api/api/integration_log_api.rb +161 -0
  21. data/lib/ultracart_api/api/storefront_api.rb +19 -4
  22. data/lib/ultracart_api/models/error.rb +11 -1
  23. data/lib/ultracart_api/models/integration_log.rb +316 -0
  24. data/lib/ultracart_api/models/integration_log_file.rb +202 -0
  25. data/lib/ultracart_api/models/integration_log_log.rb +193 -0
  26. data/lib/ultracart_api/models/integration_log_query_filter_values.rb +274 -0
  27. data/lib/ultracart_api/models/integration_log_query_request.rb +289 -0
  28. data/lib/ultracart_api/models/integration_log_query_response.rb +232 -0
  29. data/lib/ultracart_api/models/integration_log_response.rb +221 -0
  30. data/lib/ultracart_api/models/item_channel_partner_mapping.rb +11 -1
  31. data/lib/ultracart_api/models/library_item_attribute.rb +10 -1
  32. data/lib/ultracart_api/models/screen_recording_heatmap.rb +109 -1
  33. data/lib/ultracart_api/models/screen_recording_heatmap_index_request.rb +184 -0
  34. data/lib/ultracart_api/models/screen_recording_heatmap_request.rb +12 -1
  35. data/lib/ultracart_api/models/screen_recording_heatmap_url.rb +10 -1
  36. data/lib/ultracart_api/version.rb +1 -1
  37. metadata +20 -2
data/lib/ultracart_api.rb CHANGED
@@ -325,6 +325,13 @@ require 'ultracart_api/models/group_response'
325
325
  require 'ultracart_api/models/group_user_membership'
326
326
  require 'ultracart_api/models/groups_response'
327
327
  require 'ultracart_api/models/http_header'
328
+ require 'ultracart_api/models/integration_log'
329
+ require 'ultracart_api/models/integration_log_file'
330
+ require 'ultracart_api/models/integration_log_log'
331
+ require 'ultracart_api/models/integration_log_query_filter_values'
332
+ require 'ultracart_api/models/integration_log_query_request'
333
+ require 'ultracart_api/models/integration_log_query_response'
334
+ require 'ultracart_api/models/integration_log_response'
328
335
  require 'ultracart_api/models/item'
329
336
  require 'ultracart_api/models/item_accounting'
330
337
  require 'ultracart_api/models/item_amember'
@@ -505,6 +512,7 @@ require 'ultracart_api/models/screen_recording_filter_values_event_params'
505
512
  require 'ultracart_api/models/screen_recording_filter_values_page_param'
506
513
  require 'ultracart_api/models/screen_recording_filter_values_page_view'
507
514
  require 'ultracart_api/models/screen_recording_heatmap'
515
+ require 'ultracart_api/models/screen_recording_heatmap_index_request'
508
516
  require 'ultracart_api/models/screen_recording_heatmap_index_response'
509
517
  require 'ultracart_api/models/screen_recording_heatmap_request'
510
518
  require 'ultracart_api/models/screen_recording_heatmap_reset'
@@ -599,6 +607,7 @@ require 'ultracart_api/api/checkout_api'
599
607
  require 'ultracart_api/api/coupon_api'
600
608
  require 'ultracart_api/api/customer_api'
601
609
  require 'ultracart_api/api/fulfillment_api'
610
+ require 'ultracart_api/api/integration_log_api'
602
611
  require 'ultracart_api/api/item_api'
603
612
  require 'ultracart_api/api/oauth_api'
604
613
  require 'ultracart_api/api/order_api'
@@ -0,0 +1,161 @@
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 integration logs
97
+ # Retrieves a set of integration logs from the account based on a query object.
98
+ # @param integration_log_query Integration log query
99
+ # @param [Hash] opts the optional parameters
100
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 500) (default to 100)
101
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
102
+ # @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.
103
+ # @return [IntegrationLogQueryResponse]
104
+ def get_integration_logs_query(integration_log_query, opts = {})
105
+ data, _status_code, _headers = get_integration_logs_query_with_http_info(integration_log_query, opts)
106
+ data
107
+ end
108
+
109
+ # Retrieve integration logs
110
+ # Retrieves a set of integration logs from the account based on a query object.
111
+ # @param integration_log_query Integration log query
112
+ # @param [Hash] opts the optional parameters
113
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 500)
114
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
115
+ # @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.
116
+ # @return [Array<(IntegrationLogQueryResponse, Fixnum, Hash)>] IntegrationLogQueryResponse data, response status code and response headers
117
+ def get_integration_logs_query_with_http_info(integration_log_query, opts = {})
118
+ if @api_client.config.debugging
119
+ @api_client.config.logger.debug 'Calling API: IntegrationLogApi.get_integration_logs_query ...'
120
+ end
121
+ # verify the required parameter 'integration_log_query' is set
122
+ if @api_client.config.client_side_validation && integration_log_query.nil?
123
+ fail ArgumentError, "Missing the required parameter 'integration_log_query' when calling IntegrationLogApi.get_integration_logs_query"
124
+ end
125
+ # resource path
126
+ local_var_path = '/integration_log/query'
127
+
128
+ # query parameters
129
+ query_params = {}
130
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
131
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
132
+ query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
133
+
134
+ # header parameters
135
+ header_params = {}
136
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
137
+ # HTTP header 'Accept' (if needed)
138
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
139
+ # HTTP header 'Content-Type'
140
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
141
+
142
+ # form parameters
143
+ form_params = {}
144
+
145
+ # http body (model)
146
+ post_body = @api_client.object_to_http_body(integration_log_query)
147
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
148
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
149
+ :header_params => header_params,
150
+ :query_params => query_params,
151
+ :form_params => form_params,
152
+ :body => post_body,
153
+ :auth_names => auth_names,
154
+ :return_type => 'IntegrationLogQueryResponse')
155
+ if @api_client.config.debugging
156
+ @api_client.config.logger.debug "API called: IntegrationLogApi#get_integration_logs_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
157
+ end
158
+ return data, status_code, headers
159
+ end
160
+ end
161
+ end
@@ -4562,19 +4562,27 @@ module UltracartClient
4562
4562
  # Get screen recording heatmap index
4563
4563
  # Get screen recording heatmap index
4564
4564
  # @param storefront_oid
4565
+ # @param query Query
4565
4566
  # @param [Hash] opts the optional parameters
4567
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 500) (default to 100)
4568
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
4569
+ # @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.
4566
4570
  # @return [ScreenRecordingHeatmapIndexResponse]
4567
- def get_heatmap_index(storefront_oid, opts = {})
4568
- data, _status_code, _headers = get_heatmap_index_with_http_info(storefront_oid, opts)
4571
+ def get_heatmap_index(storefront_oid, query, opts = {})
4572
+ data, _status_code, _headers = get_heatmap_index_with_http_info(storefront_oid, query, opts)
4569
4573
  data
4570
4574
  end
4571
4575
 
4572
4576
  # Get screen recording heatmap index
4573
4577
  # Get screen recording heatmap index
4574
4578
  # @param storefront_oid
4579
+ # @param query Query
4575
4580
  # @param [Hash] opts the optional parameters
4581
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 500)
4582
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
4583
+ # @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.
4576
4584
  # @return [Array<(ScreenRecordingHeatmapIndexResponse, Fixnum, Hash)>] ScreenRecordingHeatmapIndexResponse data, response status code and response headers
4577
- def get_heatmap_index_with_http_info(storefront_oid, opts = {})
4585
+ def get_heatmap_index_with_http_info(storefront_oid, query, opts = {})
4578
4586
  if @api_client.config.debugging
4579
4587
  @api_client.config.logger.debug 'Calling API: StorefrontApi.get_heatmap_index ...'
4580
4588
  end
@@ -4582,11 +4590,18 @@ module UltracartClient
4582
4590
  if @api_client.config.client_side_validation && storefront_oid.nil?
4583
4591
  fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.get_heatmap_index"
4584
4592
  end
4593
+ # verify the required parameter 'query' is set
4594
+ if @api_client.config.client_side_validation && query.nil?
4595
+ fail ArgumentError, "Missing the required parameter 'query' when calling StorefrontApi.get_heatmap_index"
4596
+ end
4585
4597
  # resource path
4586
4598
  local_var_path = '/storefront/{storefront_oid}/screen_recordings/heatmap/index'.sub('{' + 'storefront_oid' + '}', storefront_oid.to_s)
4587
4599
 
4588
4600
  # query parameters
4589
4601
  query_params = {}
4602
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
4603
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
4604
+ query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
4590
4605
 
4591
4606
  # header parameters
4592
4607
  header_params = {}
@@ -4600,7 +4615,7 @@ module UltracartClient
4600
4615
  form_params = {}
4601
4616
 
4602
4617
  # http body (model)
4603
- post_body = nil
4618
+ post_body = @api_client.object_to_http_body(query)
4604
4619
  auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
4605
4620
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
4606
4621
  :header_params => header_params,
@@ -23,6 +23,9 @@ module UltracartClient
23
23
  # Additional information often a link to additional documentation
24
24
  attr_accessor :more_info
25
25
 
26
+ # Object id that the error is associated with
27
+ attr_accessor :object_id
28
+
26
29
  # An end-user friendly message suitable for display to the customer
27
30
  attr_accessor :user_message
28
31
 
@@ -32,6 +35,7 @@ module UltracartClient
32
35
  :'developer_message' => :'developer_message',
33
36
  :'error_code' => :'error_code',
34
37
  :'more_info' => :'more_info',
38
+ :'object_id' => :'object_id',
35
39
  :'user_message' => :'user_message'
36
40
  }
37
41
  end
@@ -42,6 +46,7 @@ module UltracartClient
42
46
  :'developer_message' => :'String',
43
47
  :'error_code' => :'String',
44
48
  :'more_info' => :'String',
49
+ :'object_id' => :'String',
45
50
  :'user_message' => :'String'
46
51
  }
47
52
  end
@@ -66,6 +71,10 @@ module UltracartClient
66
71
  self.more_info = attributes[:'more_info']
67
72
  end
68
73
 
74
+ if attributes.has_key?(:'object_id')
75
+ self.object_id = attributes[:'object_id']
76
+ end
77
+
69
78
  if attributes.has_key?(:'user_message')
70
79
  self.user_message = attributes[:'user_message']
71
80
  end
@@ -92,6 +101,7 @@ module UltracartClient
92
101
  developer_message == o.developer_message &&
93
102
  error_code == o.error_code &&
94
103
  more_info == o.more_info &&
104
+ object_id == o.object_id &&
95
105
  user_message == o.user_message
96
106
  end
97
107
 
@@ -104,7 +114,7 @@ module UltracartClient
104
114
  # Calculates hash code according to all attributes.
105
115
  # @return [Fixnum] Hash code
106
116
  def hash
107
- [developer_message, error_code, more_info, user_message].hash
117
+ [developer_message, error_code, more_info, object_id, user_message].hash
108
118
  end
109
119
 
110
120
  # Builds the object from hash
@@ -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