purecloudplatformclientv2 44.0.0 → 45.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/docs/ADFS.md +1 -1
  4. data/docs/AnalyticsEvaluation.md +1 -1
  5. data/docs/AnalyticsSurvey.md +2 -1
  6. data/docs/ArchitectApi.md +52 -127
  7. data/docs/ContactListDivisionView.md +20 -0
  8. data/docs/ContactListDivisionViewListing.md +22 -0
  9. data/docs/ContactListNotification.md +1 -0
  10. data/docs/ConversationQuery.md +1 -1
  11. data/docs/CreateOutboundMessagingConversationRequest.md +1 -1
  12. data/docs/CreateWorkPlan.md +2 -0
  13. data/docs/CustomerInteractionCenter.md +1 -1
  14. data/docs/DataExportNotificationNotification.md +1 -0
  15. data/docs/DncListNotification.md +1 -0
  16. data/docs/DncListNotificationUriReference.md +14 -0
  17. data/docs/GSuite.md +1 -1
  18. data/docs/HelpLink.md +15 -0
  19. data/docs/IdentityNow.md +1 -1
  20. data/docs/IntegrationType.md +8 -0
  21. data/docs/IntradayDataUpdateNotification.md +2 -2
  22. data/docs/Okta.md +1 -1
  23. data/docs/OneLogin.md +1 -1
  24. data/docs/OutboundApi.md +152 -0
  25. data/docs/PingIdentity.md +1 -1
  26. data/docs/QualityApi.md +66 -0
  27. data/docs/ReportingExportJobResponse.md +1 -0
  28. data/docs/RoutingApi.md +74 -0
  29. data/docs/Salesforce.md +1 -1
  30. data/docs/UserScheduleAdherenceUpdateNotification.md +2 -2
  31. data/docs/WfmAgentScheduleUpdateNotificationNotification.md +18 -0
  32. data/docs/WfmAgentScheduleUpdateNotificationNotificationActivities.md +18 -0
  33. data/docs/WfmAgentScheduleUpdateNotificationNotificationFullDayTimeOffMarkers.md +19 -0
  34. data/docs/WfmAgentScheduleUpdateNotificationNotificationShifts.md +15 -0
  35. data/docs/WfmAgentScheduleUpdateNotificationNotificationUpdates.md +14 -0
  36. data/docs/WfmAgentScheduleUpdateNotificationNotificationUserReference.md +13 -0
  37. data/docs/WfmAgentScheduleUpdateNotificationNotificationWfmAgentScheduleUpdate.md +14 -0
  38. data/docs/WfmAgentScheduleUpdateNotificationNotificationWfmFullDayTimeOffMarker.md +19 -0
  39. data/docs/WfmAgentScheduleUpdateNotificationNotificationWfmScheduleActivity.md +18 -0
  40. data/docs/WfmAgentScheduleUpdateNotificationNotificationWfmScheduleShift.md +15 -0
  41. data/docs/WfmScheduleNotificationNotification.md +1 -0
  42. data/docs/WorkPlan.md +2 -0
  43. data/docs/WorkPlanListItemResponse.md +16 -5
  44. data/docs/WorkforceManagementApi.md +2 -2
  45. data/lib/purecloudplatformclientv2.rb +14 -3
  46. data/lib/purecloudplatformclientv2/api/outbound_api.rb +230 -0
  47. data/lib/purecloudplatformclientv2/api/quality_api.rb +66 -0
  48. data/lib/purecloudplatformclientv2/api/routing_api.rb +100 -0
  49. data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +3 -7
  50. data/lib/purecloudplatformclientv2/api_client.rb +1 -1
  51. data/lib/purecloudplatformclientv2/models/adfs.rb +12 -12
  52. data/lib/purecloudplatformclientv2/models/aggregate_metric_data.rb +2 -2
  53. data/lib/purecloudplatformclientv2/models/analytics_evaluation.rb +2 -2
  54. data/lib/purecloudplatformclientv2/models/analytics_query_predicate.rb +4 -4
  55. data/lib/purecloudplatformclientv2/models/analytics_survey.rb +34 -8
  56. data/lib/purecloudplatformclientv2/models/contact_list_division_view.rb +397 -0
  57. data/lib/purecloudplatformclientv2/models/contact_list_division_view_listing.rb +428 -0
  58. data/lib/purecloudplatformclientv2/models/contact_list_notification.rb +26 -1
  59. data/lib/purecloudplatformclientv2/models/conversation_query.rb +1 -1
  60. data/lib/purecloudplatformclientv2/models/create_outbound_messaging_conversation_request.rb +1 -1
  61. data/lib/purecloudplatformclientv2/models/create_work_plan.rb +53 -1
  62. data/lib/purecloudplatformclientv2/models/customer_interaction_center.rb +12 -12
  63. data/lib/purecloudplatformclientv2/models/data_export_notification_notification.rb +31 -6
  64. data/lib/purecloudplatformclientv2/models/dnc_list_notification.rb +26 -1
  65. data/lib/purecloudplatformclientv2/models/dnc_list_notification_uri_reference.rb +226 -0
  66. data/lib/purecloudplatformclientv2/models/document_audit.rb +2 -2
  67. data/lib/purecloudplatformclientv2/models/g_suite.rb +12 -12
  68. data/lib/purecloudplatformclientv2/models/{intraday_data_update_notification_date_time.rb → help_link.rb} +24 -45
  69. data/lib/purecloudplatformclientv2/models/identity_now.rb +12 -12
  70. data/lib/purecloudplatformclientv2/models/integration_type.rb +211 -1
  71. data/lib/purecloudplatformclientv2/models/intraday_data_update_notification.rb +2 -2
  72. data/lib/purecloudplatformclientv2/models/message_data.rb +2 -2
  73. data/lib/purecloudplatformclientv2/models/message_details.rb +2 -2
  74. data/lib/purecloudplatformclientv2/models/okta.rb +12 -12
  75. data/lib/purecloudplatformclientv2/models/one_login.rb +12 -12
  76. data/lib/purecloudplatformclientv2/models/ping_identity.rb +12 -12
  77. data/lib/purecloudplatformclientv2/models/reporting_export_job_response.rb +34 -3
  78. data/lib/purecloudplatformclientv2/models/salesforce.rb +12 -12
  79. data/lib/purecloudplatformclientv2/models/user_schedule_adherence_update_notification.rb +2 -2
  80. data/lib/purecloudplatformclientv2/models/wfm_agent_schedule_update_notification_notification.rb +332 -0
  81. data/lib/purecloudplatformclientv2/models/wfm_agent_schedule_update_notification_notification_activities.rb +326 -0
  82. data/lib/purecloudplatformclientv2/models/wfm_agent_schedule_update_notification_notification_full_day_time_off_markers.rb +351 -0
  83. data/lib/purecloudplatformclientv2/models/{intraday_data_update_notification_start_date.rb → wfm_agent_schedule_update_notification_notification_shifts.rb} +22 -45
  84. data/lib/purecloudplatformclientv2/models/wfm_agent_schedule_update_notification_notification_updates.rb +242 -0
  85. data/lib/purecloudplatformclientv2/models/wfm_agent_schedule_update_notification_notification_user_reference.rb +201 -0
  86. data/lib/purecloudplatformclientv2/models/wfm_agent_schedule_update_notification_notification_wfm_agent_schedule_update.rb +242 -0
  87. data/lib/purecloudplatformclientv2/models/wfm_agent_schedule_update_notification_notification_wfm_full_day_time_off_marker.rb +351 -0
  88. data/lib/purecloudplatformclientv2/models/wfm_agent_schedule_update_notification_notification_wfm_schedule_activity.rb +326 -0
  89. data/lib/purecloudplatformclientv2/models/{user_schedule_adherence_update_notification_date_time.rb → wfm_agent_schedule_update_notification_notification_wfm_schedule_shift.rb} +22 -45
  90. data/lib/purecloudplatformclientv2/models/wfm_schedule_notification_notification.rb +28 -3
  91. data/lib/purecloudplatformclientv2/models/work_plan.rb +53 -1
  92. data/lib/purecloudplatformclientv2/models/work_plan_list_item_response.rb +313 -18
  93. data/lib/purecloudplatformclientv2/version.rb +1 -1
  94. metadata +30 -8
  95. data/docs/IntradayDataUpdateNotificationDateTime.md +0 -16
  96. data/docs/IntradayDataUpdateNotificationStartDate.md +0 -16
  97. data/docs/UserScheduleAdherenceUpdateNotificationDateTime.md +0 -16
@@ -0,0 +1,397 @@
1
+ =begin
2
+ PureCloud Platform API
3
+
4
+ With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
5
+
6
+ OpenAPI spec version: v2
7
+ Contact: DeveloperEvangelists@genesys.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ License: ININ
11
+ http://www.inin.com
12
+
13
+ Terms of Service: https://developer.mypurecloud.com/tos
14
+
15
+ =end
16
+
17
+ require 'date'
18
+
19
+ module PureCloud
20
+ class ContactListDivisionView
21
+ # The globally unique identifier for the object.
22
+ attr_accessor :id
23
+
24
+ attr_accessor :name
25
+
26
+ # The division to which this entity belongs.
27
+ attr_accessor :division
28
+
29
+ # The names of the contact data columns.
30
+ attr_accessor :column_names
31
+
32
+ # Indicates which columns are phone numbers.
33
+ attr_accessor :phone_columns
34
+
35
+ # The status of the import process.
36
+ attr_accessor :import_status
37
+
38
+ # The number of contacts in the ContactList.
39
+ attr_accessor :size
40
+
41
+ # The URI for this object
42
+ attr_accessor :self_uri
43
+
44
+ # Attribute mapping from ruby-style variable name to JSON key.
45
+ def self.attribute_map
46
+ {
47
+
48
+ :'id' => :'id',
49
+
50
+ :'name' => :'name',
51
+
52
+ :'division' => :'division',
53
+
54
+ :'column_names' => :'columnNames',
55
+
56
+ :'phone_columns' => :'phoneColumns',
57
+
58
+ :'import_status' => :'importStatus',
59
+
60
+ :'size' => :'size',
61
+
62
+ :'self_uri' => :'selfUri'
63
+
64
+ }
65
+ end
66
+
67
+ # Attribute type mapping.
68
+ def self.swagger_types
69
+ {
70
+
71
+ :'id' => :'String',
72
+
73
+ :'name' => :'String',
74
+
75
+ :'division' => :'Division',
76
+
77
+ :'column_names' => :'Array<String>',
78
+
79
+ :'phone_columns' => :'Array<ContactPhoneNumberColumn>',
80
+
81
+ :'import_status' => :'ImportStatus',
82
+
83
+ :'size' => :'Integer',
84
+
85
+ :'self_uri' => :'String'
86
+
87
+ }
88
+ end
89
+
90
+ # Initializes the object
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ def initialize(attributes = {})
93
+ return unless attributes.is_a?(Hash)
94
+
95
+ # convert string to symbol for hash key
96
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
97
+
98
+
99
+ if attributes.has_key?(:'id')
100
+
101
+
102
+ self.id = attributes[:'id']
103
+
104
+
105
+ end
106
+
107
+
108
+ if attributes.has_key?(:'name')
109
+
110
+
111
+ self.name = attributes[:'name']
112
+
113
+
114
+ end
115
+
116
+
117
+ if attributes.has_key?(:'division')
118
+
119
+
120
+ self.division = attributes[:'division']
121
+
122
+
123
+ end
124
+
125
+
126
+ if attributes.has_key?(:'columnNames')
127
+
128
+ if (value = attributes[:'columnNames']).is_a?(Array)
129
+ self.column_names = value
130
+ end
131
+
132
+
133
+
134
+ end
135
+
136
+
137
+ if attributes.has_key?(:'phoneColumns')
138
+
139
+ if (value = attributes[:'phoneColumns']).is_a?(Array)
140
+ self.phone_columns = value
141
+ end
142
+
143
+
144
+
145
+ end
146
+
147
+
148
+ if attributes.has_key?(:'importStatus')
149
+
150
+
151
+ self.import_status = attributes[:'importStatus']
152
+
153
+
154
+ end
155
+
156
+
157
+ if attributes.has_key?(:'size')
158
+
159
+
160
+ self.size = attributes[:'size']
161
+
162
+
163
+ end
164
+
165
+
166
+ if attributes.has_key?(:'selfUri')
167
+
168
+
169
+ self.self_uri = attributes[:'selfUri']
170
+
171
+
172
+ end
173
+
174
+
175
+ end
176
+
177
+ # Show invalid properties with the reasons. Usually used together with valid?
178
+ # @return Array for valid properies with the reasons
179
+ def list_invalid_properties
180
+ invalid_properties = Array.new
181
+
182
+
183
+ return invalid_properties
184
+ end
185
+
186
+ # Check to see if the all the properties in the model are valid
187
+ # @return true if the model is valid
188
+ def valid?
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+ if @column_names.nil?
204
+ return false
205
+ end
206
+
207
+
208
+
209
+
210
+
211
+
212
+ if @phone_columns.nil?
213
+ return false
214
+ end
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+ end
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+ # Checks equality by comparing each attribute.
276
+ # @param [Object] Object to be compared
277
+ def ==(o)
278
+ return true if self.equal?(o)
279
+ self.class == o.class &&
280
+ id == o.id &&
281
+ name == o.name &&
282
+ division == o.division &&
283
+ column_names == o.column_names &&
284
+ phone_columns == o.phone_columns &&
285
+ import_status == o.import_status &&
286
+ size == o.size &&
287
+ self_uri == o.self_uri
288
+ end
289
+
290
+ # @see the `==` method
291
+ # @param [Object] Object to be compared
292
+ def eql?(o)
293
+ self == o
294
+ end
295
+
296
+ # Calculates hash code according to all attributes.
297
+ # @return [Fixnum] Hash code
298
+ def hash
299
+ [id, name, division, column_names, phone_columns, import_status, size, self_uri].hash
300
+ end
301
+
302
+ # build the object from hash
303
+ def build_from_hash(attributes)
304
+ return nil unless attributes.is_a?(Hash)
305
+ self.class.swagger_types.each_pair do |key, type|
306
+ if type =~ /^Array<(.*)>/i
307
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
308
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
309
+ else
310
+ #TODO show warning in debug mode
311
+ end
312
+ elsif !attributes[self.class.attribute_map[key]].nil?
313
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
314
+ else
315
+ # data not found in attributes(hash), not an issue as the data can be optional
316
+ end
317
+ end
318
+
319
+ self
320
+ end
321
+
322
+ def _deserialize(type, value)
323
+ case type.to_sym
324
+ when :DateTime
325
+ DateTime.parse(value)
326
+ when :Date
327
+ Date.parse(value)
328
+ when :String
329
+ value.to_s
330
+ when :Integer
331
+ value.to_i
332
+ when :Float
333
+ value.to_f
334
+ when :BOOLEAN
335
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
336
+ true
337
+ else
338
+ false
339
+ end
340
+ when :Object
341
+ # generic object (usually a Hash), return directly
342
+ value
343
+ when /\AArray<(?<inner_type>.+)>\z/
344
+ inner_type = Regexp.last_match[:inner_type]
345
+ value.map { |v| _deserialize(inner_type, v) }
346
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
347
+ k_type = Regexp.last_match[:k_type]
348
+ v_type = Regexp.last_match[:v_type]
349
+ {}.tap do |hash|
350
+ value.each do |k, v|
351
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
352
+ end
353
+ end
354
+ else # model
355
+ _model = Object.const_get("PureCloud").const_get(type).new
356
+ _model.build_from_hash(value)
357
+ end
358
+ end
359
+
360
+ def to_s
361
+ to_hash.to_s
362
+ end
363
+
364
+ # to_body is an alias to to_body (backward compatibility))
365
+ def to_body
366
+ to_hash
367
+ end
368
+
369
+ # return the object in the form of hash
370
+ def to_hash
371
+ hash = {}
372
+ self.class.attribute_map.each_pair do |attr, param|
373
+ value = self.send(attr)
374
+ next if value.nil?
375
+ hash[param] = _to_hash(value)
376
+ end
377
+ hash
378
+ end
379
+
380
+ # Method to output non-array value in the form of hash
381
+ # For object, use to_hash. Otherwise, just return the value
382
+ def _to_hash(value)
383
+ if value.is_a?(Array)
384
+ value.compact.map{ |v| _to_hash(v) }
385
+ elsif value.is_a?(Hash)
386
+ {}.tap do |hash|
387
+ value.each { |k, v| hash[k] = _to_hash(v) }
388
+ end
389
+ elsif value.respond_to? :to_hash
390
+ value.to_hash
391
+ else
392
+ value
393
+ end
394
+ end
395
+
396
+ end
397
+ end
@@ -0,0 +1,428 @@
1
+ =begin
2
+ PureCloud Platform API
3
+
4
+ With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
5
+
6
+ OpenAPI spec version: v2
7
+ Contact: DeveloperEvangelists@genesys.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ License: ININ
11
+ http://www.inin.com
12
+
13
+ Terms of Service: https://developer.mypurecloud.com/tos
14
+
15
+ =end
16
+
17
+ require 'date'
18
+
19
+ module PureCloud
20
+ class ContactListDivisionViewListing
21
+ attr_accessor :entities
22
+
23
+ attr_accessor :page_size
24
+
25
+ attr_accessor :page_number
26
+
27
+ attr_accessor :total
28
+
29
+ attr_accessor :self_uri
30
+
31
+ attr_accessor :first_uri
32
+
33
+ attr_accessor :previous_uri
34
+
35
+ attr_accessor :next_uri
36
+
37
+ attr_accessor :last_uri
38
+
39
+ attr_accessor :page_count
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+
45
+ :'entities' => :'entities',
46
+
47
+ :'page_size' => :'pageSize',
48
+
49
+ :'page_number' => :'pageNumber',
50
+
51
+ :'total' => :'total',
52
+
53
+ :'self_uri' => :'selfUri',
54
+
55
+ :'first_uri' => :'firstUri',
56
+
57
+ :'previous_uri' => :'previousUri',
58
+
59
+ :'next_uri' => :'nextUri',
60
+
61
+ :'last_uri' => :'lastUri',
62
+
63
+ :'page_count' => :'pageCount'
64
+
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.swagger_types
70
+ {
71
+
72
+ :'entities' => :'Array<ContactListDivisionView>',
73
+
74
+ :'page_size' => :'Integer',
75
+
76
+ :'page_number' => :'Integer',
77
+
78
+ :'total' => :'Integer',
79
+
80
+ :'self_uri' => :'String',
81
+
82
+ :'first_uri' => :'String',
83
+
84
+ :'previous_uri' => :'String',
85
+
86
+ :'next_uri' => :'String',
87
+
88
+ :'last_uri' => :'String',
89
+
90
+ :'page_count' => :'Integer'
91
+
92
+ }
93
+ end
94
+
95
+ # Initializes the object
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ def initialize(attributes = {})
98
+ return unless attributes.is_a?(Hash)
99
+
100
+ # convert string to symbol for hash key
101
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
102
+
103
+
104
+ if attributes.has_key?(:'entities')
105
+
106
+ if (value = attributes[:'entities']).is_a?(Array)
107
+ self.entities = value
108
+ end
109
+
110
+
111
+
112
+ end
113
+
114
+
115
+ if attributes.has_key?(:'pageSize')
116
+
117
+
118
+ self.page_size = attributes[:'pageSize']
119
+
120
+
121
+ end
122
+
123
+
124
+ if attributes.has_key?(:'pageNumber')
125
+
126
+
127
+ self.page_number = attributes[:'pageNumber']
128
+
129
+
130
+ end
131
+
132
+
133
+ if attributes.has_key?(:'total')
134
+
135
+
136
+ self.total = attributes[:'total']
137
+
138
+
139
+ end
140
+
141
+
142
+ if attributes.has_key?(:'selfUri')
143
+
144
+
145
+ self.self_uri = attributes[:'selfUri']
146
+
147
+
148
+ end
149
+
150
+
151
+ if attributes.has_key?(:'firstUri')
152
+
153
+
154
+ self.first_uri = attributes[:'firstUri']
155
+
156
+
157
+ end
158
+
159
+
160
+ if attributes.has_key?(:'previousUri')
161
+
162
+
163
+ self.previous_uri = attributes[:'previousUri']
164
+
165
+
166
+ end
167
+
168
+
169
+ if attributes.has_key?(:'nextUri')
170
+
171
+
172
+ self.next_uri = attributes[:'nextUri']
173
+
174
+
175
+ end
176
+
177
+
178
+ if attributes.has_key?(:'lastUri')
179
+
180
+
181
+ self.last_uri = attributes[:'lastUri']
182
+
183
+
184
+ end
185
+
186
+
187
+ if attributes.has_key?(:'pageCount')
188
+
189
+
190
+ self.page_count = attributes[:'pageCount']
191
+
192
+
193
+ end
194
+
195
+
196
+ end
197
+
198
+ # Show invalid properties with the reasons. Usually used together with valid?
199
+ # @return Array for valid properies with the reasons
200
+ def list_invalid_properties
201
+ invalid_properties = Array.new
202
+
203
+
204
+ return invalid_properties
205
+ end
206
+
207
+ # Check to see if the all the properties in the model are valid
208
+ # @return true if the model is valid
209
+ def valid?
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+
251
+ end
252
+
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+ # Checks equality by comparing each attribute.
305
+ # @param [Object] Object to be compared
306
+ def ==(o)
307
+ return true if self.equal?(o)
308
+ self.class == o.class &&
309
+ entities == o.entities &&
310
+ page_size == o.page_size &&
311
+ page_number == o.page_number &&
312
+ total == o.total &&
313
+ self_uri == o.self_uri &&
314
+ first_uri == o.first_uri &&
315
+ previous_uri == o.previous_uri &&
316
+ next_uri == o.next_uri &&
317
+ last_uri == o.last_uri &&
318
+ page_count == o.page_count
319
+ end
320
+
321
+ # @see the `==` method
322
+ # @param [Object] Object to be compared
323
+ def eql?(o)
324
+ self == o
325
+ end
326
+
327
+ # Calculates hash code according to all attributes.
328
+ # @return [Fixnum] Hash code
329
+ def hash
330
+ [entities, page_size, page_number, total, self_uri, first_uri, previous_uri, next_uri, last_uri, page_count].hash
331
+ end
332
+
333
+ # build the object from hash
334
+ def build_from_hash(attributes)
335
+ return nil unless attributes.is_a?(Hash)
336
+ self.class.swagger_types.each_pair do |key, type|
337
+ if type =~ /^Array<(.*)>/i
338
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
339
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
340
+ else
341
+ #TODO show warning in debug mode
342
+ end
343
+ elsif !attributes[self.class.attribute_map[key]].nil?
344
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
345
+ else
346
+ # data not found in attributes(hash), not an issue as the data can be optional
347
+ end
348
+ end
349
+
350
+ self
351
+ end
352
+
353
+ def _deserialize(type, value)
354
+ case type.to_sym
355
+ when :DateTime
356
+ DateTime.parse(value)
357
+ when :Date
358
+ Date.parse(value)
359
+ when :String
360
+ value.to_s
361
+ when :Integer
362
+ value.to_i
363
+ when :Float
364
+ value.to_f
365
+ when :BOOLEAN
366
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
367
+ true
368
+ else
369
+ false
370
+ end
371
+ when :Object
372
+ # generic object (usually a Hash), return directly
373
+ value
374
+ when /\AArray<(?<inner_type>.+)>\z/
375
+ inner_type = Regexp.last_match[:inner_type]
376
+ value.map { |v| _deserialize(inner_type, v) }
377
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
378
+ k_type = Regexp.last_match[:k_type]
379
+ v_type = Regexp.last_match[:v_type]
380
+ {}.tap do |hash|
381
+ value.each do |k, v|
382
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
383
+ end
384
+ end
385
+ else # model
386
+ _model = Object.const_get("PureCloud").const_get(type).new
387
+ _model.build_from_hash(value)
388
+ end
389
+ end
390
+
391
+ def to_s
392
+ to_hash.to_s
393
+ end
394
+
395
+ # to_body is an alias to to_body (backward compatibility))
396
+ def to_body
397
+ to_hash
398
+ end
399
+
400
+ # return the object in the form of hash
401
+ def to_hash
402
+ hash = {}
403
+ self.class.attribute_map.each_pair do |attr, param|
404
+ value = self.send(attr)
405
+ next if value.nil?
406
+ hash[param] = _to_hash(value)
407
+ end
408
+ hash
409
+ end
410
+
411
+ # Method to output non-array value in the form of hash
412
+ # For object, use to_hash. Otherwise, just return the value
413
+ def _to_hash(value)
414
+ if value.is_a?(Array)
415
+ value.compact.map{ |v| _to_hash(v) }
416
+ elsif value.is_a?(Hash)
417
+ {}.tap do |hash|
418
+ value.each { |k, v| hash[k] = _to_hash(v) }
419
+ end
420
+ elsif value.respond_to? :to_hash
421
+ value.to_hash
422
+ else
423
+ value
424
+ end
425
+ end
426
+
427
+ end
428
+ end