purecloudplatformclientv2 87.0.0 → 92.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/docs/AmazonLexRequest.md +14 -0
- data/docs/AnalyticsEvaluation.md +1 -1
- data/docs/ApiUsageQuery.md +16 -0
- data/docs/ApiUsageQueryResult.md +14 -0
- data/docs/ApiUsageRow.md +25 -0
- data/docs/ArchitectApi.md +132 -0
- data/docs/AuditApi.md +130 -0
- data/docs/AuditQueryEntity.md +14 -0
- data/docs/AuditQueryExecutionStatusResponse.md +1 -0
- data/docs/AuditQueryRequest.md +1 -0
- data/docs/AuditQueryService.md +14 -0
- data/docs/AuditQueryServiceMapping.md +13 -0
- data/docs/AuditQuerySort.md +14 -0
- data/docs/AuditRealtimeQueryRequest.md +18 -0
- data/docs/AuditRealtimeQueryResultsResponse.md +17 -0
- data/docs/BuAgentScheduleActivity.md +2 -0
- data/docs/BuRescheduleRequest.md +2 -2
- data/docs/ButtonComponent.md +16 -0
- data/docs/CoachingApi.md +1 -1
- data/docs/ContentActions.md +17 -0
- data/docs/ContentAttachment.md +19 -0
- data/docs/ContentGeneric.md +19 -0
- data/docs/ContentList.md +19 -0
- data/docs/ContentLocation.md +17 -0
- data/docs/ContentNotificationTemplate.md +17 -0
- data/docs/ContentQuickReply.md +16 -0
- data/docs/ConversationAggregationQuery.md +1 -1
- data/docs/CreateQueueRequest.md +1 -0
- data/docs/EdgeGroup.md +1 -0
- data/docs/EntityListing.md +1 -5
- data/docs/EvaluationAggregationQuery.md +1 -1
- data/docs/ExternalContact.md +2 -0
- data/docs/ExternalOrganization.md +2 -0
- data/docs/FlowAggregationQuery.md +1 -1
- data/docs/FlowExecutionLaunchRequest.md +16 -0
- data/docs/FlowExecutionLaunchResponse.md +16 -0
- data/docs/FlowRuntimeExecution.md +23 -0
- data/docs/GenericSAML.md +22 -0
- data/docs/GoogleDialogflowCustomSettings.md +13 -0
- data/docs/GroupsApi.md +4 -4
- data/docs/IdentityProviderApi.md +187 -0
- data/docs/IpAddressAuthentication.md +13 -0
- data/docs/KnowledgeSearchResponse.md +1 -1
- data/docs/LanguageUnderstandingApi.md +164 -30
- data/docs/ListItemComponent.md +19 -0
- data/docs/MessageContent.md +19 -0
- data/docs/NluDomainVersion.md +3 -1
- data/docs/NotificationTemplateBody.md +14 -0
- data/docs/NotificationTemplateFooter.md +13 -0
- data/docs/NotificationTemplateHeader.md +16 -0
- data/docs/NotificationTemplateParameter.md +14 -0
- data/docs/OAuthApi.md +208 -0
- data/docs/OrganizationApi.md +126 -0
- data/docs/PostTextMessage.md +15 -0
- data/docs/PostTextRequest.md +23 -0
- data/docs/PostTextResponse.md +20 -0
- data/docs/Prompt.md +2 -2
- data/docs/Queue.md +1 -0
- data/docs/QueueRequest.md +1 -0
- data/docs/RecordingApi.md +12 -0
- data/docs/ReportingDataExportTopicDataExportNotification.md +1 -0
- data/docs/ScimEmail.md +1 -1
- data/docs/SurveyAggregationQuery.md +1 -1
- data/docs/SurveyForm.md +0 -2
- data/docs/TextbotsApi.md +78 -0
- data/docs/UploadUrlRequest.md +1 -0
- data/docs/UsageApi.md +144 -0
- data/docs/UsageExecutionResult.md +14 -0
- data/docs/UserAggregationQuery.md +1 -1
- data/docs/UserQueue.md +1 -0
- data/docs/UsersApi.md +5 -5
- data/docs/ViewFilter.md +2 -0
- data/docs/VoicemailMessagesTopicOwner.md +13 -0
- data/docs/VoicemailMessagesTopicVoicemailCopyRecord.md +14 -0
- data/docs/VoicemailMessagesTopicVoicemailMessage.md +2 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicBuForecastModification.md +23 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicBuShortTermForecast.md +24 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicBuShortTermForecastNotification.md +15 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicForecastSourceDayPointer.md +17 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicModificationIntervalOffsetValue.md +14 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicUserReference.md +13 -0
- data/docs/WfmBuShortTermForecastImportCompleteTopicWfmVersionedEntityMetadata.md +15 -0
- data/docs/WorkforceManagementApi.md +3 -3
- data/lib/purecloudplatformclientv2.rb +45 -0
- data/lib/purecloudplatformclientv2/api/architect_api.rb +130 -0
- data/lib/purecloudplatformclientv2/api/audit_api.rb +129 -0
- data/lib/purecloudplatformclientv2/api/groups_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/identity_provider_api.rb +175 -0
- data/lib/purecloudplatformclientv2/api/language_understanding_api.rb +189 -30
- data/lib/purecloudplatformclientv2/api/o_auth_api.rb +224 -0
- data/lib/purecloudplatformclientv2/api/organization_api.rb +120 -0
- data/lib/purecloudplatformclientv2/api/recording_api.rb +78 -0
- data/lib/purecloudplatformclientv2/api/textbots_api.rb +92 -0
- data/lib/purecloudplatformclientv2/api/usage_api.rb +157 -0
- data/lib/purecloudplatformclientv2/api/users_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +6 -6
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/amazon_lex_request.rb +232 -0
- data/lib/purecloudplatformclientv2/models/analytics_evaluation.rb +13 -13
- data/lib/purecloudplatformclientv2/models/api_usage_query.rb +303 -0
- data/lib/purecloudplatformclientv2/models/api_usage_query_result.rb +244 -0
- data/lib/purecloudplatformclientv2/models/api_usage_row.rb +514 -0
- data/lib/purecloudplatformclientv2/models/audit_log_message.rb +6 -6
- data/lib/purecloudplatformclientv2/models/audit_query_entity.rb +244 -0
- data/lib/purecloudplatformclientv2/models/audit_query_execution_status_response.rb +34 -6
- data/lib/purecloudplatformclientv2/models/audit_query_request.rb +34 -6
- data/lib/purecloudplatformclientv2/models/audit_query_service.rb +244 -0
- data/lib/purecloudplatformclientv2/models/audit_query_service_mapping.rb +204 -0
- data/lib/purecloudplatformclientv2/models/audit_query_sort.rb +266 -0
- data/lib/purecloudplatformclientv2/models/audit_realtime_query_request.rb +360 -0
- data/lib/purecloudplatformclientv2/models/audit_realtime_query_results_response.rb +303 -0
- data/lib/purecloudplatformclientv2/models/bu_agent_schedule_activity.rb +70 -4
- data/lib/purecloudplatformclientv2/models/bu_reschedule_request.rb +2 -12
- data/lib/purecloudplatformclientv2/models/button_component.rb +281 -0
- data/lib/purecloudplatformclientv2/models/coaching_appointment_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/coaching_notification.rb +2 -2
- data/lib/purecloudplatformclientv2/models/content_actions.rb +309 -0
- data/lib/purecloudplatformclientv2/models/content_attachment.rb +378 -0
- data/lib/purecloudplatformclientv2/models/content_generic.rb +361 -0
- data/lib/purecloudplatformclientv2/models/content_list.rb +375 -0
- data/lib/purecloudplatformclientv2/models/content_location.rb +307 -0
- data/lib/purecloudplatformclientv2/models/content_notification_template.rb +312 -0
- data/lib/purecloudplatformclientv2/models/content_quick_reply.rb +300 -0
- data/lib/purecloudplatformclientv2/models/conversation_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/conversation_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/create_queue_request.rb +29 -1
- data/lib/purecloudplatformclientv2/models/edge_group.rb +27 -1
- data/lib/purecloudplatformclientv2/models/entity_listing.rb +4 -104
- data/lib/purecloudplatformclientv2/models/evaluation_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/event_message.rb +2 -2
- data/lib/purecloudplatformclientv2/models/external_contact.rb +55 -1
- data/lib/purecloudplatformclientv2/models/external_organization.rb +55 -1
- data/lib/purecloudplatformclientv2/models/flow_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/flow_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/flow_execution_launch_request.rb +288 -0
- data/lib/purecloudplatformclientv2/models/flow_execution_launch_response.rb +281 -0
- data/lib/purecloudplatformclientv2/models/flow_runtime_execution.rb +494 -0
- data/lib/purecloudplatformclientv2/models/generic_saml.rb +428 -0
- data/lib/purecloudplatformclientv2/models/google_dialogflow_custom_settings.rb +202 -0
- data/lib/purecloudplatformclientv2/models/ip_address_authentication.rb +203 -0
- data/lib/purecloudplatformclientv2/models/knowledge_search_response.rb +18 -18
- data/lib/purecloudplatformclientv2/models/list_item_component.rb +373 -0
- data/lib/purecloudplatformclientv2/models/message_content.rb +378 -0
- data/lib/purecloudplatformclientv2/models/nlu_domain_version.rb +72 -1
- data/lib/purecloudplatformclientv2/models/notification_template_body.rb +236 -0
- data/lib/purecloudplatformclientv2/models/notification_template_footer.rb +203 -0
- data/lib/purecloudplatformclientv2/models/notification_template_header.rb +302 -0
- data/lib/purecloudplatformclientv2/models/notification_template_parameter.rb +234 -0
- data/lib/purecloudplatformclientv2/models/post_text_message.rb +275 -0
- data/lib/purecloudplatformclientv2/models/post_text_request.rb +482 -0
- data/lib/purecloudplatformclientv2/models/post_text_response.rb +413 -0
- data/lib/purecloudplatformclientv2/models/prompt.rb +2 -0
- data/lib/purecloudplatformclientv2/models/prompt_asset.rb +15 -1
- data/lib/purecloudplatformclientv2/models/prompt_asset_create.rb +15 -1
- data/lib/purecloudplatformclientv2/models/queue.rb +29 -1
- data/lib/purecloudplatformclientv2/models/queue_request.rb +29 -1
- data/lib/purecloudplatformclientv2/models/reporting_data_export_topic_data_export_notification.rb +31 -4
- data/lib/purecloudplatformclientv2/models/scim_email.rb +1 -1
- data/lib/purecloudplatformclientv2/models/survey_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/survey_form.rb +1 -53
- data/lib/purecloudplatformclientv2/models/upload_url_request.rb +43 -4
- data/lib/purecloudplatformclientv2/models/usage_execution_result.rb +228 -0
- data/lib/purecloudplatformclientv2/models/user_aggregation_query.rb +1 -1
- data/lib/purecloudplatformclientv2/models/user_queue.rb +29 -1
- data/lib/purecloudplatformclientv2/models/view_filter.rb +58 -4
- data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_owner.rb +201 -0
- data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_voicemail_copy_record.rb +226 -0
- data/lib/purecloudplatformclientv2/models/voicemail_messages_topic_voicemail_message.rb +56 -4
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_forecast_modification.rb +497 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_short_term_forecast.rb +494 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_bu_short_term_forecast_notification.rb +265 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_forecast_source_day_pointer.rb +315 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_modification_interval_offset_value.rb +226 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_user_reference.rb +201 -0
- data/lib/purecloudplatformclientv2/models/wfm_bu_short_term_forecast_import_complete_topic_wfm_versioned_entity_metadata.rb +251 -0
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +92 -2
@@ -36,6 +36,12 @@ module PureCloud
|
|
36
36
|
# The ID of the time off request associated with this activity, if applicable
|
37
37
|
attr_accessor :time_off_request_id
|
38
38
|
|
39
|
+
# The ID of the external activity associated with this activity, if applicable
|
40
|
+
attr_accessor :external_activity_id
|
41
|
+
|
42
|
+
# The type of the external activity associated with this activity, if applicable
|
43
|
+
attr_accessor :external_activity_type
|
44
|
+
|
39
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
46
|
def self.attribute_map
|
41
47
|
{
|
@@ -50,7 +56,11 @@ module PureCloud
|
|
50
56
|
|
51
57
|
:'paid' => :'paid',
|
52
58
|
|
53
|
-
:'time_off_request_id' => :'timeOffRequestId'
|
59
|
+
:'time_off_request_id' => :'timeOffRequestId',
|
60
|
+
|
61
|
+
:'external_activity_id' => :'externalActivityId',
|
62
|
+
|
63
|
+
:'external_activity_type' => :'externalActivityType'
|
54
64
|
|
55
65
|
}
|
56
66
|
end
|
@@ -69,7 +79,11 @@ module PureCloud
|
|
69
79
|
|
70
80
|
:'paid' => :'BOOLEAN',
|
71
81
|
|
72
|
-
:'time_off_request_id' => :'String'
|
82
|
+
:'time_off_request_id' => :'String',
|
83
|
+
|
84
|
+
:'external_activity_id' => :'String',
|
85
|
+
|
86
|
+
:'external_activity_type' => :'String'
|
73
87
|
|
74
88
|
}
|
75
89
|
end
|
@@ -137,6 +151,24 @@ module PureCloud
|
|
137
151
|
end
|
138
152
|
|
139
153
|
|
154
|
+
if attributes.has_key?(:'externalActivityId')
|
155
|
+
|
156
|
+
|
157
|
+
self.external_activity_id = attributes[:'externalActivityId']
|
158
|
+
|
159
|
+
|
160
|
+
end
|
161
|
+
|
162
|
+
|
163
|
+
if attributes.has_key?(:'externalActivityType')
|
164
|
+
|
165
|
+
|
166
|
+
self.external_activity_type = attributes[:'externalActivityType']
|
167
|
+
|
168
|
+
|
169
|
+
end
|
170
|
+
|
171
|
+
|
140
172
|
end
|
141
173
|
|
142
174
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -173,6 +205,19 @@ module PureCloud
|
|
173
205
|
|
174
206
|
|
175
207
|
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
allowed_values = ["Coaching"]
|
218
|
+
if @external_activity_type && !allowed_values.include?(@external_activity_type)
|
219
|
+
return false
|
220
|
+
end
|
176
221
|
|
177
222
|
|
178
223
|
|
@@ -206,6 +251,25 @@ module PureCloud
|
|
206
251
|
|
207
252
|
|
208
253
|
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
# Custom attribute writer method checking allowed values (enum).
|
264
|
+
# @param [Object] external_activity_type Object to be assigned
|
265
|
+
def external_activity_type=(external_activity_type)
|
266
|
+
allowed_values = ["Coaching"]
|
267
|
+
if external_activity_type && !allowed_values.include?(external_activity_type)
|
268
|
+
fail ArgumentError, "invalid value for 'external_activity_type', must be one of #{allowed_values}."
|
269
|
+
end
|
270
|
+
@external_activity_type = external_activity_type
|
271
|
+
end
|
272
|
+
|
209
273
|
|
210
274
|
|
211
275
|
|
@@ -219,7 +283,9 @@ module PureCloud
|
|
219
283
|
description == o.description &&
|
220
284
|
activity_code_id == o.activity_code_id &&
|
221
285
|
paid == o.paid &&
|
222
|
-
time_off_request_id == o.time_off_request_id
|
286
|
+
time_off_request_id == o.time_off_request_id &&
|
287
|
+
external_activity_id == o.external_activity_id &&
|
288
|
+
external_activity_type == o.external_activity_type
|
223
289
|
end
|
224
290
|
|
225
291
|
# @see the `==` method
|
@@ -231,7 +297,7 @@ module PureCloud
|
|
231
297
|
# Calculates hash code according to all attributes.
|
232
298
|
# @return [Fixnum] Hash code
|
233
299
|
def hash
|
234
|
-
[start_date, length_minutes, description, activity_code_id, paid, time_off_request_id].hash
|
300
|
+
[start_date, length_minutes, description, activity_code_id, paid, time_off_request_id, external_activity_id, external_activity_type].hash
|
235
301
|
end
|
236
302
|
|
237
303
|
# build the object from hash
|
@@ -18,10 +18,10 @@ require 'date'
|
|
18
18
|
|
19
19
|
module PureCloud
|
20
20
|
class BuRescheduleRequest
|
21
|
-
# The start of the range to reschedule. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
21
|
+
# The start of the range to reschedule. Defaults to the beginning of the schedule. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
22
22
|
attr_accessor :start_date
|
23
23
|
|
24
|
-
# The end of the range to reschedule. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
24
|
+
# The end of the range to reschedule. Defaults the the end of the schedule. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
|
25
25
|
attr_accessor :end_date
|
26
26
|
|
27
27
|
# The IDs of the agents to consider for rescheduling. Omit to consider all agents in the specified management units.Agents not in the specified management units will be ignored
|
@@ -207,20 +207,10 @@ module PureCloud
|
|
207
207
|
def valid?
|
208
208
|
|
209
209
|
|
210
|
-
if @start_date.nil?
|
211
|
-
return false
|
212
|
-
end
|
213
|
-
|
214
|
-
|
215
210
|
|
216
211
|
|
217
212
|
|
218
213
|
|
219
|
-
if @end_date.nil?
|
220
|
-
return false
|
221
|
-
end
|
222
|
-
|
223
|
-
|
224
214
|
|
225
215
|
|
226
216
|
|
@@ -0,0 +1,281 @@
|
|
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: UNLICENSED
|
11
|
+
https://help.mypurecloud.com/articles/terms-and-conditions/
|
12
|
+
|
13
|
+
Terms of Service: https://help.mypurecloud.com/articles/terms-and-conditions/
|
14
|
+
|
15
|
+
=end
|
16
|
+
|
17
|
+
require 'date'
|
18
|
+
|
19
|
+
module PureCloud
|
20
|
+
# Structured template button object
|
21
|
+
class ButtonComponent
|
22
|
+
# An ID assigned to this component
|
23
|
+
attr_accessor :id
|
24
|
+
|
25
|
+
# Text to show inside the button
|
26
|
+
attr_accessor :text
|
27
|
+
|
28
|
+
# Tooltip text to show when hovering over the button
|
29
|
+
attr_accessor :title
|
30
|
+
|
31
|
+
# User actions available on the content. All actions are optional and all actions are executed simultaneously.
|
32
|
+
attr_accessor :actions
|
33
|
+
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
|
38
|
+
:'id' => :'id',
|
39
|
+
|
40
|
+
:'text' => :'text',
|
41
|
+
|
42
|
+
:'title' => :'title',
|
43
|
+
|
44
|
+
:'actions' => :'actions'
|
45
|
+
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.swagger_types
|
51
|
+
{
|
52
|
+
|
53
|
+
:'id' => :'String',
|
54
|
+
|
55
|
+
:'text' => :'String',
|
56
|
+
|
57
|
+
:'title' => :'String',
|
58
|
+
|
59
|
+
:'actions' => :'ContentActions'
|
60
|
+
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Initializes the object
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
66
|
+
def initialize(attributes = {})
|
67
|
+
return unless attributes.is_a?(Hash)
|
68
|
+
|
69
|
+
# convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
71
|
+
|
72
|
+
|
73
|
+
if attributes.has_key?(:'id')
|
74
|
+
|
75
|
+
|
76
|
+
self.id = attributes[:'id']
|
77
|
+
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
if attributes.has_key?(:'text')
|
83
|
+
|
84
|
+
|
85
|
+
self.text = attributes[:'text']
|
86
|
+
|
87
|
+
|
88
|
+
end
|
89
|
+
|
90
|
+
|
91
|
+
if attributes.has_key?(:'title')
|
92
|
+
|
93
|
+
|
94
|
+
self.title = attributes[:'title']
|
95
|
+
|
96
|
+
|
97
|
+
end
|
98
|
+
|
99
|
+
|
100
|
+
if attributes.has_key?(:'actions')
|
101
|
+
|
102
|
+
|
103
|
+
self.actions = attributes[:'actions']
|
104
|
+
|
105
|
+
|
106
|
+
end
|
107
|
+
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
112
|
+
# @return Array for valid properies with the reasons
|
113
|
+
def list_invalid_properties
|
114
|
+
invalid_properties = Array.new
|
115
|
+
|
116
|
+
|
117
|
+
return invalid_properties
|
118
|
+
end
|
119
|
+
|
120
|
+
# Check to see if the all the properties in the model are valid
|
121
|
+
# @return true if the model is valid
|
122
|
+
def valid?
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
end
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
# Checks equality by comparing each attribute.
|
164
|
+
# @param [Object] Object to be compared
|
165
|
+
def ==(o)
|
166
|
+
return true if self.equal?(o)
|
167
|
+
self.class == o.class &&
|
168
|
+
id == o.id &&
|
169
|
+
text == o.text &&
|
170
|
+
title == o.title &&
|
171
|
+
actions == o.actions
|
172
|
+
end
|
173
|
+
|
174
|
+
# @see the `==` method
|
175
|
+
# @param [Object] Object to be compared
|
176
|
+
def eql?(o)
|
177
|
+
self == o
|
178
|
+
end
|
179
|
+
|
180
|
+
# Calculates hash code according to all attributes.
|
181
|
+
# @return [Fixnum] Hash code
|
182
|
+
def hash
|
183
|
+
[id, text, title, actions].hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# build the object from hash
|
187
|
+
def build_from_hash(attributes)
|
188
|
+
return nil unless attributes.is_a?(Hash)
|
189
|
+
self.class.swagger_types.each_pair do |key, type|
|
190
|
+
if type =~ /^Array<(.*)>/i
|
191
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
192
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
193
|
+
else
|
194
|
+
#TODO show warning in debug mode
|
195
|
+
end
|
196
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
197
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
198
|
+
else
|
199
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
self
|
204
|
+
end
|
205
|
+
|
206
|
+
def _deserialize(type, value)
|
207
|
+
case type.to_sym
|
208
|
+
when :DateTime
|
209
|
+
DateTime.parse(value)
|
210
|
+
when :Date
|
211
|
+
Date.parse(value)
|
212
|
+
when :String
|
213
|
+
value.to_s
|
214
|
+
when :Integer
|
215
|
+
value.to_i
|
216
|
+
when :Float
|
217
|
+
value.to_f
|
218
|
+
when :BOOLEAN
|
219
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
220
|
+
true
|
221
|
+
else
|
222
|
+
false
|
223
|
+
end
|
224
|
+
when :Object
|
225
|
+
# generic object (usually a Hash), return directly
|
226
|
+
value
|
227
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
228
|
+
inner_type = Regexp.last_match[:inner_type]
|
229
|
+
value.map { |v| _deserialize(inner_type, v) }
|
230
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
231
|
+
k_type = Regexp.last_match[:k_type]
|
232
|
+
v_type = Regexp.last_match[:v_type]
|
233
|
+
{}.tap do |hash|
|
234
|
+
value.each do |k, v|
|
235
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
236
|
+
end
|
237
|
+
end
|
238
|
+
else # model
|
239
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
240
|
+
_model.build_from_hash(value)
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
def to_s
|
245
|
+
to_hash.to_s
|
246
|
+
end
|
247
|
+
|
248
|
+
# to_body is an alias to to_body (backward compatibility))
|
249
|
+
def to_body
|
250
|
+
to_hash
|
251
|
+
end
|
252
|
+
|
253
|
+
# return the object in the form of hash
|
254
|
+
def to_hash
|
255
|
+
hash = {}
|
256
|
+
self.class.attribute_map.each_pair do |attr, param|
|
257
|
+
value = self.send(attr)
|
258
|
+
next if value.nil?
|
259
|
+
hash[param] = _to_hash(value)
|
260
|
+
end
|
261
|
+
hash
|
262
|
+
end
|
263
|
+
|
264
|
+
# Method to output non-array value in the form of hash
|
265
|
+
# For object, use to_hash. Otherwise, just return the value
|
266
|
+
def _to_hash(value)
|
267
|
+
if value.is_a?(Array)
|
268
|
+
value.compact.map{ |v| _to_hash(v) }
|
269
|
+
elsif value.is_a?(Hash)
|
270
|
+
{}.tap do |hash|
|
271
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
272
|
+
end
|
273
|
+
elsif value.respond_to? :to_hash
|
274
|
+
value.to_hash
|
275
|
+
else
|
276
|
+
value
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
end
|
281
|
+
end
|
@@ -325,7 +325,7 @@ module PureCloud
|
|
325
325
|
|
326
326
|
|
327
327
|
|
328
|
-
allowed_values = ["Scheduled", "InProgress", "Completed"]
|
328
|
+
allowed_values = ["Scheduled", "InProgress", "Completed", "InvalidSchedule"]
|
329
329
|
if @status && !allowed_values.include?(@status)
|
330
330
|
return false
|
331
331
|
end
|
@@ -400,7 +400,7 @@ module PureCloud
|
|
400
400
|
# Custom attribute writer method checking allowed values (enum).
|
401
401
|
# @param [Object] status Object to be assigned
|
402
402
|
def status=(status)
|
403
|
-
allowed_values = ["Scheduled", "InProgress", "Completed"]
|
403
|
+
allowed_values = ["Scheduled", "InProgress", "Completed", "InvalidSchedule"]
|
404
404
|
if status && !allowed_values.include?(status)
|
405
405
|
fail ArgumentError, "invalid value for 'status', must be one of #{allowed_values}."
|
406
406
|
end
|