purecloudplatformclientv2 20.0.0 → 21.0.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/AdherenceSettings.md +18 -0
- data/docs/AgentManagementUnitReference.md +14 -0
- data/docs/AnalyticsSession.md +1 -0
- data/docs/AnalyticsView.md +1 -1
- data/docs/ArchitectApi.md +19 -15
- data/docs/CallForwarding.md +4 -2
- data/docs/CallMediaParticipant.md +1 -0
- data/docs/CallRoute.md +14 -0
- data/docs/CallTarget.md +14 -0
- data/docs/Contact.md +1 -1
- data/docs/ConversationNotificationMessage.md +3 -0
- data/docs/ConversationNotificationMessageDetails.md +2 -0
- data/docs/ConversationNotificationMessages.md +2 -0
- data/docs/ConversationNotificationMessages1.md +3 -0
- data/docs/ConversationsApi.md +196 -0
- data/docs/CreateEmailRequest.md +2 -0
- data/docs/CreateQueueRequest.md +2 -0
- data/docs/CreateSecureSession.md +16 -0
- data/docs/ExternalContact.md +1 -0
- data/docs/ImportScriptStatusResponse.md +15 -0
- data/docs/InboundRoute.md +1 -0
- data/docs/JsonNode.md +1 -1
- data/docs/ManagementUnit.md +5 -3
- data/docs/ManagementUnitReference.md +14 -0
- data/docs/ManagementUnitSettings.md +19 -0
- data/docs/Message.md +3 -0
- data/docs/MessageConversationNotificationMessageDetails.md +2 -0
- data/docs/MessageConversationNotificationMessageMediaParticipant.md +3 -0
- data/docs/MessageConversationNotificationMessages.md +2 -0
- data/docs/MessageConversationNotificationParticipants.md +3 -0
- data/docs/MessageDetails.md +2 -0
- data/docs/QualityApi.md +3 -1
- data/docs/Queue.md +2 -0
- data/docs/SchedulingSettings.md +14 -0
- data/docs/ScriptsApi.md +64 -0
- data/docs/SecureSession.md +19 -0
- data/docs/SecureSessionEntityListing.md +13 -0
- data/docs/ShortTermForecastingSettings.md +13 -0
- data/docs/SignedData.md +13 -0
- data/docs/SignedDataApi.md +73 -0
- data/docs/TimeOffRequestSettings.md +15 -0
- data/docs/UpdateUser.md +2 -2
- data/docs/UserConversationSummaryNotification.md +1 -0
- data/docs/UserQueue.md +2 -0
- data/docs/UserReference.md +14 -0
- data/docs/WorkforceManagementApi.md +61 -0
- data/lib/purecloudplatformclientv2.rb +16 -0
- data/lib/purecloudplatformclientv2/api/architect_api.rb +24 -6
- data/lib/purecloudplatformclientv2/api/conversations_api.rb +243 -0
- data/lib/purecloudplatformclientv2/api/quality_api.rb +9 -0
- data/lib/purecloudplatformclientv2/api/scripts_api.rb +74 -0
- data/lib/purecloudplatformclientv2/api/signed_data_api.rb +90 -0
- data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +63 -0
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/adherence_settings.rb +335 -0
- data/lib/purecloudplatformclientv2/models/agent_management_unit_reference.rb +229 -0
- data/lib/purecloudplatformclientv2/models/aggregate_metric_data.rb +2 -2
- data/lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb +2 -2
- data/lib/purecloudplatformclientv2/models/analytics_query_predicate.rb +4 -4
- data/lib/purecloudplatformclientv2/models/analytics_session.rb +41 -1
- data/lib/purecloudplatformclientv2/models/analytics_view.rb +1 -1
- data/lib/purecloudplatformclientv2/models/call_forwarding.rb +71 -1
- data/lib/purecloudplatformclientv2/models/call_media_participant.rb +30 -4
- data/lib/purecloudplatformclientv2/models/call_route.rb +230 -0
- data/lib/purecloudplatformclientv2/models/call_target.rb +242 -0
- data/lib/purecloudplatformclientv2/models/contact.rb +1 -1
- data/lib/purecloudplatformclientv2/models/conversation_notification_message.rb +90 -1
- data/lib/purecloudplatformclientv2/models/conversation_notification_message_details.rb +68 -4
- data/lib/purecloudplatformclientv2/models/conversation_notification_messages.rb +68 -4
- data/lib/purecloudplatformclientv2/models/conversation_notification_messages_1.rb +90 -1
- data/lib/purecloudplatformclientv2/models/create_email_request.rb +56 -4
- data/lib/purecloudplatformclientv2/models/create_queue_request.rb +53 -1
- data/lib/purecloudplatformclientv2/models/create_secure_session.rb +290 -0
- data/lib/purecloudplatformclientv2/models/dependency.rb +2 -2
- data/lib/purecloudplatformclientv2/models/dependency_object.rb +2 -2
- data/lib/purecloudplatformclientv2/models/event_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/external_contact.rb +26 -1
- data/lib/purecloudplatformclientv2/models/import_script_status_response.rb +251 -0
- data/lib/purecloudplatformclientv2/models/inbound_route.rb +27 -1
- data/lib/purecloudplatformclientv2/models/interaction_stat_alert_notification.rb +2 -2
- data/lib/purecloudplatformclientv2/models/interaction_stat_rule_notification.rb +2 -2
- data/lib/purecloudplatformclientv2/models/interaction_stats_alert.rb +2 -2
- data/lib/purecloudplatformclientv2/models/interaction_stats_rule.rb +2 -2
- data/lib/purecloudplatformclientv2/models/intraday_data_group.rb +2 -2
- data/lib/purecloudplatformclientv2/models/intraday_data_update_notification_intraday_data_group.rb +2 -2
- data/lib/purecloudplatformclientv2/models/intraday_data_update_notification_intraday_data_groupings.rb +2 -2
- data/lib/purecloudplatformclientv2/models/json_node.rb +17 -17
- data/lib/purecloudplatformclientv2/models/management_unit.rb +59 -7
- data/lib/purecloudplatformclientv2/models/management_unit_reference.rb +229 -0
- data/lib/purecloudplatformclientv2/models/management_unit_settings.rb +364 -0
- data/lib/purecloudplatformclientv2/models/message.rb +93 -1
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_message_details.rb +68 -4
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_message_media_participant.rb +93 -4
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_messages.rb +68 -4
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_participants.rb +93 -4
- data/lib/purecloudplatformclientv2/models/message_details.rb +67 -1
- data/lib/purecloudplatformclientv2/models/participant.rb +2 -2
- data/lib/purecloudplatformclientv2/models/participant_basic.rb +2 -2
- data/lib/purecloudplatformclientv2/models/queue.rb +53 -1
- data/lib/purecloudplatformclientv2/models/scheduling_settings.rb +229 -0
- data/lib/purecloudplatformclientv2/models/secure_session.rb +382 -0
- data/lib/purecloudplatformclientv2/models/secure_session_entity_listing.rb +203 -0
- data/lib/purecloudplatformclientv2/models/short_term_forecasting_settings.rb +203 -0
- data/lib/purecloudplatformclientv2/models/signed_data.rb +201 -0
- data/lib/purecloudplatformclientv2/models/time_off_request_settings.rb +255 -0
- data/lib/purecloudplatformclientv2/models/update_user.rb +2 -1
- data/lib/purecloudplatformclientv2/models/user_conversation_summary_notification.rb +26 -1
- data/lib/purecloudplatformclientv2/models/user_queue.rb +53 -1
- data/lib/purecloudplatformclientv2/models/user_reference.rb +228 -0
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +34 -2
|
@@ -24,6 +24,12 @@ module PureCloud
|
|
|
24
24
|
# A URI for this message entity.
|
|
25
25
|
attr_accessor :message_uri
|
|
26
26
|
|
|
27
|
+
# Indicates the delivery status of the message.
|
|
28
|
+
attr_accessor :message_status
|
|
29
|
+
|
|
30
|
+
# The message segment count, greater than 1 if the message content was split into multiple parts for this message type, e.g. SMS character limits.
|
|
31
|
+
attr_accessor :message_segment_count
|
|
32
|
+
|
|
27
33
|
# The time when the message was sent or received. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
|
28
34
|
attr_accessor :message_time
|
|
29
35
|
|
|
@@ -35,6 +41,10 @@ module PureCloud
|
|
|
35
41
|
|
|
36
42
|
:'message_uri' => :'messageURI',
|
|
37
43
|
|
|
44
|
+
:'message_status' => :'messageStatus',
|
|
45
|
+
|
|
46
|
+
:'message_segment_count' => :'messageSegmentCount',
|
|
47
|
+
|
|
38
48
|
:'message_time' => :'messageTime'
|
|
39
49
|
|
|
40
50
|
}
|
|
@@ -48,6 +58,10 @@ module PureCloud
|
|
|
48
58
|
|
|
49
59
|
:'message_uri' => :'String',
|
|
50
60
|
|
|
61
|
+
:'message_status' => :'String',
|
|
62
|
+
|
|
63
|
+
:'message_segment_count' => :'Integer',
|
|
64
|
+
|
|
51
65
|
:'message_time' => :'DateTime'
|
|
52
66
|
|
|
53
67
|
}
|
|
@@ -80,6 +94,24 @@ module PureCloud
|
|
|
80
94
|
end
|
|
81
95
|
|
|
82
96
|
|
|
97
|
+
if attributes.has_key?(:'messageStatus')
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
self.message_status = attributes[:'messageStatus']
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
if attributes.has_key?(:'messageSegmentCount')
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
self.message_segment_count = attributes[:'messageSegmentCount']
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
|
|
83
115
|
if attributes.has_key?(:'messageTime')
|
|
84
116
|
|
|
85
117
|
|
|
@@ -114,6 +146,19 @@ module PureCloud
|
|
|
114
146
|
|
|
115
147
|
|
|
116
148
|
|
|
149
|
+
allowed_values = ["queued", "sent", "failed", "received"]
|
|
150
|
+
if @message_status && !allowed_values.include?(@message_status)
|
|
151
|
+
return false
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
117
162
|
|
|
118
163
|
|
|
119
164
|
end
|
|
@@ -130,6 +175,25 @@ module PureCloud
|
|
|
130
175
|
|
|
131
176
|
|
|
132
177
|
|
|
178
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
179
|
+
# @param [Object] message_status Object to be assigned
|
|
180
|
+
def message_status=(message_status)
|
|
181
|
+
allowed_values = ["queued", "sent", "failed", "received"]
|
|
182
|
+
if message_status && !allowed_values.include?(message_status)
|
|
183
|
+
fail ArgumentError, "invalid value for 'message_status', must be one of #{allowed_values}."
|
|
184
|
+
end
|
|
185
|
+
@message_status = message_status
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
133
197
|
|
|
134
198
|
|
|
135
199
|
|
|
@@ -141,6 +205,8 @@ module PureCloud
|
|
|
141
205
|
self.class == o.class &&
|
|
142
206
|
message_id == o.message_id &&
|
|
143
207
|
message_uri == o.message_uri &&
|
|
208
|
+
message_status == o.message_status &&
|
|
209
|
+
message_segment_count == o.message_segment_count &&
|
|
144
210
|
message_time == o.message_time
|
|
145
211
|
end
|
|
146
212
|
|
|
@@ -153,7 +219,7 @@ module PureCloud
|
|
|
153
219
|
# Calculates hash code according to all attributes.
|
|
154
220
|
# @return [Fixnum] Hash code
|
|
155
221
|
def hash
|
|
156
|
-
[message_id, message_uri, message_time].hash
|
|
222
|
+
[message_id, message_uri, message_status, message_segment_count, message_time].hash
|
|
157
223
|
end
|
|
158
224
|
|
|
159
225
|
# build the object from hash
|
|
@@ -831,7 +831,7 @@ module PureCloud
|
|
|
831
831
|
|
|
832
832
|
|
|
833
833
|
|
|
834
|
-
allowed_values = ["requested", "active", "paused", "stopped", "error"]
|
|
834
|
+
allowed_values = ["requested", "active", "paused", "stopped", "error", "timeout"]
|
|
835
835
|
if @screen_recording_state && !allowed_values.include?(@screen_recording_state)
|
|
836
836
|
return false
|
|
837
837
|
end
|
|
@@ -1039,7 +1039,7 @@ module PureCloud
|
|
|
1039
1039
|
# Custom attribute writer method checking allowed values (enum).
|
|
1040
1040
|
# @param [Object] screen_recording_state Object to be assigned
|
|
1041
1041
|
def screen_recording_state=(screen_recording_state)
|
|
1042
|
-
allowed_values = ["requested", "active", "paused", "stopped", "error"]
|
|
1042
|
+
allowed_values = ["requested", "active", "paused", "stopped", "error", "timeout"]
|
|
1043
1043
|
if screen_recording_state && !allowed_values.include?(screen_recording_state)
|
|
1044
1044
|
fail ArgumentError, "invalid value for 'screen_recording_state', must be one of #{allowed_values}."
|
|
1045
1045
|
end
|
|
@@ -831,7 +831,7 @@ module PureCloud
|
|
|
831
831
|
|
|
832
832
|
|
|
833
833
|
|
|
834
|
-
allowed_values = ["requested", "active", "paused", "stopped", "error"]
|
|
834
|
+
allowed_values = ["requested", "active", "paused", "stopped", "error", "timeout"]
|
|
835
835
|
if @screen_recording_state && !allowed_values.include?(@screen_recording_state)
|
|
836
836
|
return false
|
|
837
837
|
end
|
|
@@ -1039,7 +1039,7 @@ module PureCloud
|
|
|
1039
1039
|
# Custom attribute writer method checking allowed values (enum).
|
|
1040
1040
|
# @param [Object] screen_recording_state Object to be assigned
|
|
1041
1041
|
def screen_recording_state=(screen_recording_state)
|
|
1042
|
-
allowed_values = ["requested", "active", "paused", "stopped", "error"]
|
|
1042
|
+
allowed_values = ["requested", "active", "paused", "stopped", "error", "timeout"]
|
|
1043
1043
|
if screen_recording_state && !allowed_values.include?(screen_recording_state)
|
|
1044
1044
|
fail ArgumentError, "invalid value for 'screen_recording_state', must be one of #{allowed_values}."
|
|
1045
1045
|
end
|
|
@@ -65,6 +65,12 @@ module PureCloud
|
|
|
65
65
|
# The in-queue flow to use for conversations waiting in queue.
|
|
66
66
|
attr_accessor :queue_flow
|
|
67
67
|
|
|
68
|
+
# The prompt used for whisper audio on the queue, if configured.
|
|
69
|
+
attr_accessor :whisper
|
|
70
|
+
|
|
71
|
+
# Specifies whether the configured whisper audio should play for all ACD calls, or only for those which are auto-answered.
|
|
72
|
+
attr_accessor :auto_answer_only
|
|
73
|
+
|
|
68
74
|
# The name to use for caller identification for outbound calls from this queue.
|
|
69
75
|
attr_accessor :calling_party_name
|
|
70
76
|
|
|
@@ -117,6 +123,10 @@ module PureCloud
|
|
|
117
123
|
|
|
118
124
|
:'queue_flow' => :'queueFlow',
|
|
119
125
|
|
|
126
|
+
:'whisper' => :'whisper',
|
|
127
|
+
|
|
128
|
+
:'auto_answer_only' => :'autoAnswerOnly',
|
|
129
|
+
|
|
120
130
|
:'calling_party_name' => :'callingPartyName',
|
|
121
131
|
|
|
122
132
|
:'calling_party_number' => :'callingPartyNumber',
|
|
@@ -168,6 +178,10 @@ module PureCloud
|
|
|
168
178
|
|
|
169
179
|
:'queue_flow' => :'UriReference',
|
|
170
180
|
|
|
181
|
+
:'whisper' => :'UriReference',
|
|
182
|
+
|
|
183
|
+
:'auto_answer_only' => :'BOOLEAN',
|
|
184
|
+
|
|
171
185
|
:'calling_party_name' => :'String',
|
|
172
186
|
|
|
173
187
|
:'calling_party_number' => :'String',
|
|
@@ -338,6 +352,24 @@ module PureCloud
|
|
|
338
352
|
end
|
|
339
353
|
|
|
340
354
|
|
|
355
|
+
if attributes.has_key?(:'whisper')
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
self.whisper = attributes[:'whisper']
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
if attributes.has_key?(:'autoAnswerOnly')
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
self.auto_answer_only = attributes[:'autoAnswerOnly']
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
|
|
341
373
|
if attributes.has_key?(:'callingPartyName')
|
|
342
374
|
|
|
343
375
|
|
|
@@ -513,6 +545,14 @@ module PureCloud
|
|
|
513
545
|
|
|
514
546
|
|
|
515
547
|
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
|
|
516
556
|
|
|
517
557
|
|
|
518
558
|
|
|
@@ -642,6 +682,16 @@ module PureCloud
|
|
|
642
682
|
|
|
643
683
|
|
|
644
684
|
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
645
695
|
|
|
646
696
|
|
|
647
697
|
|
|
@@ -674,6 +724,8 @@ module PureCloud
|
|
|
674
724
|
acw_settings == o.acw_settings &&
|
|
675
725
|
skill_evaluation_method == o.skill_evaluation_method &&
|
|
676
726
|
queue_flow == o.queue_flow &&
|
|
727
|
+
whisper == o.whisper &&
|
|
728
|
+
auto_answer_only == o.auto_answer_only &&
|
|
677
729
|
calling_party_name == o.calling_party_name &&
|
|
678
730
|
calling_party_number == o.calling_party_number &&
|
|
679
731
|
default_scripts == o.default_scripts &&
|
|
@@ -691,7 +743,7 @@ module PureCloud
|
|
|
691
743
|
# Calculates hash code according to all attributes.
|
|
692
744
|
# @return [Fixnum] Hash code
|
|
693
745
|
def hash
|
|
694
|
-
[id, name, description, version, date_created, date_modified, modified_by, created_by, state, modified_by_app, created_by_app, media_settings, bullseye, acw_settings, skill_evaluation_method, queue_flow, calling_party_name, calling_party_number, default_scripts, outbound_email_address, member_count, self_uri].hash
|
|
746
|
+
[id, name, description, version, date_created, date_modified, modified_by, created_by, state, modified_by_app, created_by_app, media_settings, bullseye, acw_settings, skill_evaluation_method, queue_flow, whisper, auto_answer_only, calling_party_name, calling_party_number, default_scripts, outbound_email_address, member_count, self_uri].hash
|
|
695
747
|
end
|
|
696
748
|
|
|
697
749
|
# build the object from hash
|
|
@@ -0,0 +1,229 @@
|
|
|
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
|
+
# Scheduling Settings
|
|
21
|
+
class SchedulingSettings
|
|
22
|
+
# Max occupancy percent for deferred work
|
|
23
|
+
attr_accessor :max_occupancy_percent_for_deferred_work
|
|
24
|
+
|
|
25
|
+
# Default shrinkage percent for scheduling
|
|
26
|
+
attr_accessor :default_shrinkage_percent
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
|
|
32
|
+
:'max_occupancy_percent_for_deferred_work' => :'maxOccupancyPercentForDeferredWork',
|
|
33
|
+
|
|
34
|
+
:'default_shrinkage_percent' => :'defaultShrinkagePercent'
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
def self.swagger_types
|
|
41
|
+
{
|
|
42
|
+
|
|
43
|
+
:'max_occupancy_percent_for_deferred_work' => :'Integer',
|
|
44
|
+
|
|
45
|
+
:'default_shrinkage_percent' => :'Float'
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
return unless attributes.is_a?(Hash)
|
|
54
|
+
|
|
55
|
+
# convert string to symbol for hash key
|
|
56
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
if attributes.has_key?(:'maxOccupancyPercentForDeferredWork')
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
self.max_occupancy_percent_for_deferred_work = attributes[:'maxOccupancyPercentForDeferredWork']
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
if attributes.has_key?(:'defaultShrinkagePercent')
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
self.default_shrinkage_percent = attributes[:'defaultShrinkagePercent']
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properies with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
invalid_properties = Array.new
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
return invalid_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
def valid?
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
# Checks equality by comparing each attribute.
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def ==(o)
|
|
116
|
+
return true if self.equal?(o)
|
|
117
|
+
self.class == o.class &&
|
|
118
|
+
max_occupancy_percent_for_deferred_work == o.max_occupancy_percent_for_deferred_work &&
|
|
119
|
+
default_shrinkage_percent == o.default_shrinkage_percent
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# @see the `==` method
|
|
123
|
+
# @param [Object] Object to be compared
|
|
124
|
+
def eql?(o)
|
|
125
|
+
self == o
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Calculates hash code according to all attributes.
|
|
129
|
+
# @return [Fixnum] Hash code
|
|
130
|
+
def hash
|
|
131
|
+
[max_occupancy_percent_for_deferred_work, default_shrinkage_percent].hash
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# build the object from hash
|
|
135
|
+
def build_from_hash(attributes)
|
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
|
137
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
138
|
+
if type =~ /^Array<(.*)>/i
|
|
139
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
140
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
141
|
+
else
|
|
142
|
+
#TODO show warning in debug mode
|
|
143
|
+
end
|
|
144
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
145
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
146
|
+
else
|
|
147
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
self
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
def _deserialize(type, value)
|
|
155
|
+
case type.to_sym
|
|
156
|
+
when :DateTime
|
|
157
|
+
DateTime.parse(value)
|
|
158
|
+
when :Date
|
|
159
|
+
Date.parse(value)
|
|
160
|
+
when :String
|
|
161
|
+
value.to_s
|
|
162
|
+
when :Integer
|
|
163
|
+
value.to_i
|
|
164
|
+
when :Float
|
|
165
|
+
value.to_f
|
|
166
|
+
when :BOOLEAN
|
|
167
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
168
|
+
true
|
|
169
|
+
else
|
|
170
|
+
false
|
|
171
|
+
end
|
|
172
|
+
when :Object
|
|
173
|
+
# generic object (usually a Hash), return directly
|
|
174
|
+
value
|
|
175
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
176
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
177
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
178
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
179
|
+
k_type = Regexp.last_match[:k_type]
|
|
180
|
+
v_type = Regexp.last_match[:v_type]
|
|
181
|
+
{}.tap do |hash|
|
|
182
|
+
value.each do |k, v|
|
|
183
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
else # model
|
|
187
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
|
188
|
+
_model.build_from_hash(value)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
def to_s
|
|
193
|
+
to_hash.to_s
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# to_body is an alias to to_body (backward compatibility))
|
|
197
|
+
def to_body
|
|
198
|
+
to_hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# return the object in the form of hash
|
|
202
|
+
def to_hash
|
|
203
|
+
hash = {}
|
|
204
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
205
|
+
value = self.send(attr)
|
|
206
|
+
next if value.nil?
|
|
207
|
+
hash[param] = _to_hash(value)
|
|
208
|
+
end
|
|
209
|
+
hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Method to output non-array value in the form of hash
|
|
213
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
214
|
+
def _to_hash(value)
|
|
215
|
+
if value.is_a?(Array)
|
|
216
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
217
|
+
elsif value.is_a?(Hash)
|
|
218
|
+
{}.tap do |hash|
|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
220
|
+
end
|
|
221
|
+
elsif value.respond_to? :to_hash
|
|
222
|
+
value.to_hash
|
|
223
|
+
else
|
|
224
|
+
value
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
|
229
|
+
end
|