purecloudplatformclientv2 30.0.0 → 30.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/docs/ConversationsApi.md +60 -0
- data/docs/CreateActivityCodeRequest.md +3 -3
- data/docs/JsonNode.md +1 -1
- data/docs/RoutingApi.md +259 -0
- data/docs/UserLanguageEntityListing.md +22 -0
- data/docs/UserRoutingLanguage.md +18 -0
- data/docs/UserRoutingLanguagePost.md +16 -0
- data/docs/UsersApi.md +259 -0
- data/docs/ViewFilter.md +22 -11
- data/docs/WorkforceManagementApi.md +14 -14
- data/lib/purecloudplatformclientv2.rb +3 -0
- data/lib/purecloudplatformclientv2/api/conversations_api.rb +65 -0
- data/lib/purecloudplatformclientv2/api/routing_api.rb +330 -0
- data/lib/purecloudplatformclientv2/api/users_api.rb +330 -0
- data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +14 -14
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/create_activity_code_request.rb +0 -15
- data/lib/purecloudplatformclientv2/models/json_node.rb +17 -17
- data/lib/purecloudplatformclientv2/models/reporting_export_job_request.rb +2 -2
- data/lib/purecloudplatformclientv2/models/reporting_export_job_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/user_language_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/user_routing_language.rb +346 -0
- data/lib/purecloudplatformclientv2/models/user_routing_language_post.rb +291 -0
- data/lib/purecloudplatformclientv2/models/view_filter.rb +313 -15
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +8 -2
@@ -157,7 +157,7 @@ module PureCloud
|
|
157
157
|
|
158
158
|
# Get intraday queues for the given date
|
159
159
|
#
|
160
|
-
# @param mu_id The
|
160
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
161
161
|
# @param date ISO-8601 date string with no time or timezone component, interpreted in the configured management unit time zone, e.g. 2017-01-23
|
162
162
|
# @param [Hash] opts the optional parameters
|
163
163
|
# @return [WfmIntradayQueueListing]
|
@@ -168,7 +168,7 @@ module PureCloud
|
|
168
168
|
|
169
169
|
# Get intraday queues for the given date
|
170
170
|
#
|
171
|
-
# @param mu_id The
|
171
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
172
172
|
# @param date ISO-8601 date string with no time or timezone component, interpreted in the configured management unit time zone, e.g. 2017-01-23
|
173
173
|
# @param [Hash] opts the optional parameters
|
174
174
|
# @return [Array<(WfmIntradayQueueListing, Fixnum, Hash)>] WfmIntradayQueueListing data, response status code and response headers
|
@@ -233,7 +233,7 @@ module PureCloud
|
|
233
233
|
|
234
234
|
# Get a time off request by id
|
235
235
|
#
|
236
|
-
# @param mu_id The
|
236
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
237
237
|
# @param user_id The userId to whom the Time Off Request applies.
|
238
238
|
# @param time_off_request_id Time Off Request Id
|
239
239
|
# @param [Hash] opts the optional parameters
|
@@ -245,7 +245,7 @@ module PureCloud
|
|
245
245
|
|
246
246
|
# Get a time off request by id
|
247
247
|
#
|
248
|
-
# @param mu_id The
|
248
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
249
249
|
# @param user_id The userId to whom the Time Off Request applies.
|
250
250
|
# @param time_off_request_id Time Off Request Id
|
251
251
|
# @param [Hash] opts the optional parameters
|
@@ -318,7 +318,7 @@ module PureCloud
|
|
318
318
|
|
319
319
|
# Get a list of time off requests for any user
|
320
320
|
#
|
321
|
-
# @param mu_id The
|
321
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
322
322
|
# @param user_id The userId to whom the Time Off Request applies.
|
323
323
|
# @param [Hash] opts the optional parameters
|
324
324
|
# @option opts [BOOLEAN] :recently_reviewed Limit results to requests that have been reviewed within the preceding 30 days (default to false)
|
@@ -330,7 +330,7 @@ module PureCloud
|
|
330
330
|
|
331
331
|
# Get a list of time off requests for any user
|
332
332
|
#
|
333
|
-
# @param mu_id The
|
333
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
334
334
|
# @param user_id The userId to whom the Time Off Request applies.
|
335
335
|
# @param [Hash] opts the optional parameters
|
336
336
|
# @option opts [BOOLEAN] :recently_reviewed Limit results to requests that have been reviewed within the preceding 30 days
|
@@ -402,7 +402,7 @@ module PureCloud
|
|
402
402
|
|
403
403
|
# Get agents in the management unit
|
404
404
|
#
|
405
|
-
# @param mu_id The
|
405
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
406
406
|
# @param [Hash] opts the optional parameters
|
407
407
|
# @return [WfmUserEntityListing]
|
408
408
|
def get_workforcemanagement_managementunit_users(mu_id, opts = {})
|
@@ -412,7 +412,7 @@ module PureCloud
|
|
412
412
|
|
413
413
|
# Get agents in the management unit
|
414
414
|
#
|
415
|
-
# @param mu_id The
|
415
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
416
416
|
# @param [Hash] opts the optional parameters
|
417
417
|
# @return [Array<(WfmUserEntityListing, Fixnum, Hash)>] WfmUserEntityListing data, response status code and response headers
|
418
418
|
def get_workforcemanagement_managementunit_users_with_http_info(mu_id, opts = {})
|
@@ -626,7 +626,7 @@ module PureCloud
|
|
626
626
|
|
627
627
|
# Request a historical adherence report
|
628
628
|
#
|
629
|
-
# @param mu_id The
|
629
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
630
630
|
# @param [Hash] opts the optional parameters
|
631
631
|
# @option opts [WfmHistoricalAdherenceQuery] :body body
|
632
632
|
# @return [WfmHistoricalAdherenceResponse]
|
@@ -637,7 +637,7 @@ module PureCloud
|
|
637
637
|
|
638
638
|
# Request a historical adherence report
|
639
639
|
#
|
640
|
-
# @param mu_id The
|
640
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
641
641
|
# @param [Hash] opts the optional parameters
|
642
642
|
# @option opts [WfmHistoricalAdherenceQuery] :body body
|
643
643
|
# @return [Array<(WfmHistoricalAdherenceResponse, Fixnum, Hash)>] WfmHistoricalAdherenceResponse data, response status code and response headers
|
@@ -699,7 +699,7 @@ module PureCloud
|
|
699
699
|
|
700
700
|
# Get intraday data for the given date for the requested queueIds
|
701
701
|
#
|
702
|
-
# @param mu_id The
|
702
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
703
703
|
# @param [Hash] opts the optional parameters
|
704
704
|
# @option opts [IntradayQueryDataCommand] :body body
|
705
705
|
# @return [IntradayResponse]
|
@@ -710,7 +710,7 @@ module PureCloud
|
|
710
710
|
|
711
711
|
# Get intraday data for the given date for the requested queueIds
|
712
712
|
#
|
713
|
-
# @param mu_id The
|
713
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
714
714
|
# @param [Hash] opts the optional parameters
|
715
715
|
# @option opts [IntradayQueryDataCommand] :body body
|
716
716
|
# @return [Array<(IntradayResponse, Fixnum, Hash)>] IntradayResponse data, response status code and response headers
|
@@ -772,7 +772,7 @@ module PureCloud
|
|
772
772
|
|
773
773
|
# Get user schedules within the given time range
|
774
774
|
#
|
775
|
-
# @param mu_id The
|
775
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
776
776
|
# @param [Hash] opts the optional parameters
|
777
777
|
# @option opts [UserListScheduleRequestBody] :body body
|
778
778
|
# @return [UserScheduleContainer]
|
@@ -783,7 +783,7 @@ module PureCloud
|
|
783
783
|
|
784
784
|
# Get user schedules within the given time range
|
785
785
|
#
|
786
|
-
# @param mu_id The
|
786
|
+
# @param mu_id The management unit ID of the management unit, or 'mine' for the management unit of the logged-in user.
|
787
787
|
# @param [Hash] opts the optional parameters
|
788
788
|
# @option opts [UserListScheduleRequestBody] :body body
|
789
789
|
# @return [Array<(UserScheduleContainer, Fixnum, Hash)>] UserScheduleContainer data, response status code and response headers
|
@@ -76,7 +76,7 @@ module PureCloud
|
|
76
76
|
http_method = http_method.to_sym.downcase
|
77
77
|
|
78
78
|
header_params = @default_headers.merge(opts[:header_params] || {})
|
79
|
-
header_params['purecloud-sdk'] = '30.
|
79
|
+
header_params['purecloud-sdk'] = '30.1.0'
|
80
80
|
query_params = opts[:query_params] || {}
|
81
81
|
form_params = opts[:form_params] || {}
|
82
82
|
|
@@ -177,28 +177,13 @@ module PureCloud
|
|
177
177
|
|
178
178
|
|
179
179
|
|
180
|
-
if @length_in_minutes.nil?
|
181
|
-
return false
|
182
|
-
end
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
180
|
|
188
181
|
|
189
|
-
if @counts_as_paid_time.nil?
|
190
|
-
return false
|
191
|
-
end
|
192
|
-
|
193
182
|
|
194
183
|
|
195
184
|
|
196
185
|
|
197
186
|
|
198
|
-
if @counts_as_work_time.nil?
|
199
|
-
return false
|
200
|
-
end
|
201
|
-
|
202
187
|
|
203
188
|
|
204
189
|
|
@@ -28,8 +28,6 @@ module PureCloud
|
|
28
28
|
|
29
29
|
attr_accessor :float
|
30
30
|
|
31
|
-
attr_accessor :floating_point_number
|
32
|
-
|
33
31
|
attr_accessor :container_node
|
34
32
|
|
35
33
|
attr_accessor :missing_node
|
@@ -38,6 +36,8 @@ module PureCloud
|
|
38
36
|
|
39
37
|
attr_accessor :integral_number
|
40
38
|
|
39
|
+
attr_accessor :floating_point_number
|
40
|
+
|
41
41
|
attr_accessor :short
|
42
42
|
|
43
43
|
attr_accessor :int
|
@@ -74,8 +74,6 @@ module PureCloud
|
|
74
74
|
|
75
75
|
:'float' => :'float',
|
76
76
|
|
77
|
-
:'floating_point_number' => :'floatingPointNumber',
|
78
|
-
|
79
77
|
:'container_node' => :'containerNode',
|
80
78
|
|
81
79
|
:'missing_node' => :'missingNode',
|
@@ -84,6 +82,8 @@ module PureCloud
|
|
84
82
|
|
85
83
|
:'integral_number' => :'integralNumber',
|
86
84
|
|
85
|
+
:'floating_point_number' => :'floatingPointNumber',
|
86
|
+
|
87
87
|
:'short' => :'short',
|
88
88
|
|
89
89
|
:'int' => :'int',
|
@@ -123,8 +123,6 @@ module PureCloud
|
|
123
123
|
|
124
124
|
:'float' => :'BOOLEAN',
|
125
125
|
|
126
|
-
:'floating_point_number' => :'BOOLEAN',
|
127
|
-
|
128
126
|
:'container_node' => :'BOOLEAN',
|
129
127
|
|
130
128
|
:'missing_node' => :'BOOLEAN',
|
@@ -133,6 +131,8 @@ module PureCloud
|
|
133
131
|
|
134
132
|
:'integral_number' => :'BOOLEAN',
|
135
133
|
|
134
|
+
:'floating_point_number' => :'BOOLEAN',
|
135
|
+
|
136
136
|
:'short' => :'BOOLEAN',
|
137
137
|
|
138
138
|
:'int' => :'BOOLEAN',
|
@@ -212,15 +212,6 @@ module PureCloud
|
|
212
212
|
end
|
213
213
|
|
214
214
|
|
215
|
-
if attributes.has_key?(:'floatingPointNumber')
|
216
|
-
|
217
|
-
|
218
|
-
self.floating_point_number = attributes[:'floatingPointNumber']
|
219
|
-
|
220
|
-
|
221
|
-
end
|
222
|
-
|
223
|
-
|
224
215
|
if attributes.has_key?(:'containerNode')
|
225
216
|
|
226
217
|
|
@@ -257,6 +248,15 @@ module PureCloud
|
|
257
248
|
end
|
258
249
|
|
259
250
|
|
251
|
+
if attributes.has_key?(:'floatingPointNumber')
|
252
|
+
|
253
|
+
|
254
|
+
self.floating_point_number = attributes[:'floatingPointNumber']
|
255
|
+
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
|
260
260
|
if attributes.has_key?(:'short')
|
261
261
|
|
262
262
|
|
@@ -587,11 +587,11 @@ module PureCloud
|
|
587
587
|
boolean == o.boolean &&
|
588
588
|
number == o.number &&
|
589
589
|
float == o.float &&
|
590
|
-
floating_point_number == o.floating_point_number &&
|
591
590
|
container_node == o.container_node &&
|
592
591
|
missing_node == o.missing_node &&
|
593
592
|
pojo == o.pojo &&
|
594
593
|
integral_number == o.integral_number &&
|
594
|
+
floating_point_number == o.floating_point_number &&
|
595
595
|
short == o.short &&
|
596
596
|
int == o.int &&
|
597
597
|
long == o.long &&
|
@@ -614,7 +614,7 @@ module PureCloud
|
|
614
614
|
# Calculates hash code according to all attributes.
|
615
615
|
# @return [Fixnum] Hash code
|
616
616
|
def hash
|
617
|
-
[node_type, object, boolean, number, float,
|
617
|
+
[node_type, object, boolean, number, float, container_node, missing_node, pojo, integral_number, floating_point_number, short, int, long, double, big_decimal, big_integer, textual, binary, value_node, array, null].hash
|
618
618
|
end
|
619
619
|
|
620
620
|
# build the object from hash
|
@@ -258,7 +258,7 @@ module PureCloud
|
|
258
258
|
|
259
259
|
|
260
260
|
|
261
|
-
allowed_values = ["QUEUE_PERFORMANCE_SUMMARY_VIEW", "QUEUE_PERFORMANCE_DETAIL_VIEW"]
|
261
|
+
allowed_values = ["QUEUE_PERFORMANCE_SUMMARY_VIEW", "QUEUE_PERFORMANCE_DETAIL_VIEW", "INTERACTION_SEARCH_VIEW", "AGENT_PERFORMANCE_SUMMARY_VIEW", "AGENT_PERFORMANCE_DETAIL_VIEW", "AGENT_STATUS_SUMMARY_VIEW", "AGENT_STATUS_DETAIL_VIEW", "AGENT_EVALUATION_SUMMARY_VIEW", "AGENT_EVALUATION_DETAIL_VIEW", "AGENT_QUEUE_DETAIL_VIEW", "AGENT_INTERACTION_DETAIL_VIEW", "ABANDON_INSIGHTS_VIEW", "SKILLS_PERFORMANCE_VIEW"]
|
262
262
|
if @view_type && !allowed_values.include?(@view_type)
|
263
263
|
return false
|
264
264
|
end
|
@@ -324,7 +324,7 @@ module PureCloud
|
|
324
324
|
# Custom attribute writer method checking allowed values (enum).
|
325
325
|
# @param [Object] view_type Object to be assigned
|
326
326
|
def view_type=(view_type)
|
327
|
-
allowed_values = ["QUEUE_PERFORMANCE_SUMMARY_VIEW", "QUEUE_PERFORMANCE_DETAIL_VIEW"]
|
327
|
+
allowed_values = ["QUEUE_PERFORMANCE_SUMMARY_VIEW", "QUEUE_PERFORMANCE_DETAIL_VIEW", "INTERACTION_SEARCH_VIEW", "AGENT_PERFORMANCE_SUMMARY_VIEW", "AGENT_PERFORMANCE_DETAIL_VIEW", "AGENT_STATUS_SUMMARY_VIEW", "AGENT_STATUS_DETAIL_VIEW", "AGENT_EVALUATION_SUMMARY_VIEW", "AGENT_EVALUATION_DETAIL_VIEW", "AGENT_QUEUE_DETAIL_VIEW", "AGENT_INTERACTION_DETAIL_VIEW", "ABANDON_INSIGHTS_VIEW", "SKILLS_PERFORMANCE_VIEW"]
|
328
328
|
if view_type && !allowed_values.include?(view_type)
|
329
329
|
fail ArgumentError, "invalid value for 'view_type', must be one of #{allowed_values}."
|
330
330
|
end
|
@@ -382,7 +382,7 @@ module PureCloud
|
|
382
382
|
|
383
383
|
|
384
384
|
|
385
|
-
allowed_values = ["QUEUE_PERFORMANCE_SUMMARY_VIEW", "QUEUE_PERFORMANCE_DETAIL_VIEW"]
|
385
|
+
allowed_values = ["QUEUE_PERFORMANCE_SUMMARY_VIEW", "QUEUE_PERFORMANCE_DETAIL_VIEW", "INTERACTION_SEARCH_VIEW", "AGENT_PERFORMANCE_SUMMARY_VIEW", "AGENT_PERFORMANCE_DETAIL_VIEW", "AGENT_STATUS_SUMMARY_VIEW", "AGENT_STATUS_DETAIL_VIEW", "AGENT_EVALUATION_SUMMARY_VIEW", "AGENT_EVALUATION_DETAIL_VIEW", "AGENT_QUEUE_DETAIL_VIEW", "AGENT_INTERACTION_DETAIL_VIEW", "ABANDON_INSIGHTS_VIEW", "SKILLS_PERFORMANCE_VIEW"]
|
386
386
|
if @view_type && !allowed_values.include?(@view_type)
|
387
387
|
return false
|
388
388
|
end
|
@@ -507,7 +507,7 @@ module PureCloud
|
|
507
507
|
# Custom attribute writer method checking allowed values (enum).
|
508
508
|
# @param [Object] view_type Object to be assigned
|
509
509
|
def view_type=(view_type)
|
510
|
-
allowed_values = ["QUEUE_PERFORMANCE_SUMMARY_VIEW", "QUEUE_PERFORMANCE_DETAIL_VIEW"]
|
510
|
+
allowed_values = ["QUEUE_PERFORMANCE_SUMMARY_VIEW", "QUEUE_PERFORMANCE_DETAIL_VIEW", "INTERACTION_SEARCH_VIEW", "AGENT_PERFORMANCE_SUMMARY_VIEW", "AGENT_PERFORMANCE_DETAIL_VIEW", "AGENT_STATUS_SUMMARY_VIEW", "AGENT_STATUS_DETAIL_VIEW", "AGENT_EVALUATION_SUMMARY_VIEW", "AGENT_EVALUATION_DETAIL_VIEW", "AGENT_QUEUE_DETAIL_VIEW", "AGENT_INTERACTION_DETAIL_VIEW", "ABANDON_INSIGHTS_VIEW", "SKILLS_PERFORMANCE_VIEW"]
|
511
511
|
if view_type && !allowed_values.include?(view_type)
|
512
512
|
fail ArgumentError, "invalid value for 'view_type', must be one of #{allowed_values}."
|
513
513
|
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 UserLanguageEntityListing
|
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<UserRoutingLanguage>',
|
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
|