purecloudplatformclientv2 92.0.0 → 93.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/AnalyticsEvaluation.md +1 -1
- data/docs/AnalyticsSession.md +4 -0
- data/docs/ArchitectApi.md +51 -49
- data/docs/CoachingApi.md +8 -7
- data/docs/CommonCampaign.md +17 -0
- data/docs/CommonCampaignDivisionView.md +17 -0
- data/docs/CommonCampaignDivisionViewEntityListing.md +22 -0
- data/docs/CommonCampaignEntityListing.md +22 -0
- data/docs/ConversationAssociation.md +1 -1
- data/docs/ConversationEventTopicMessage.md +1 -0
- data/docs/ConversationsApi.md +4 -4
- data/docs/ExternalContactsApi.md +4 -4
- data/docs/HistoricalAdherenceActuals.md +15 -0
- data/docs/HistoricalAdherenceDayMetrics.md +23 -0
- data/docs/HistoricalAdherenceExceptionInfo.md +21 -0
- data/docs/HistoricalAdherenceQueryResult.md +21 -0
- data/docs/KnowledgeSearchRequest.md +3 -3
- data/docs/MessagingCampaign.md +28 -0
- data/docs/MessagingCampaignDivisionView.md +16 -0
- data/docs/MessagingCampaignDivisionViewEntityListing.md +22 -0
- data/docs/MessagingCampaignEntityListing.md +22 -0
- data/docs/ObservationValue.md +3 -1
- data/docs/OutboundApi.md +881 -76
- data/docs/QueueConversationEventTopicMessage.md +1 -0
- data/docs/QueueConversationSocialExpressionEventTopicMessage.md +1 -0
- data/docs/QueueConversationVideoEventTopicMessage.md +1 -0
- data/docs/ReportingExportJobRequest.md +2 -0
- data/docs/ReportingExportJobResponse.md +3 -0
- data/docs/SCIMApi.md +96 -108
- data/docs/ScimConfigResourceType.md +1 -1
- data/docs/ScimUserExtensions.md +2 -2
- data/docs/ScimUserRole.md +1 -1
- data/docs/ScimUserRoutingLanguage.md +2 -2
- data/docs/ScimUserRoutingSkill.md +2 -2
- data/docs/ScimV2CreateUser.md +3 -3
- data/docs/ScimV2Group.md +1 -1
- data/docs/ScimV2SchemaAttribute.md +11 -11
- data/docs/ScimV2SchemaDefinition.md +4 -4
- data/docs/ScimV2SchemaListResponse.md +1 -1
- data/docs/ScimV2User.md +4 -4
- data/docs/SmsConfig.md +15 -0
- data/docs/SmsPhoneNumberRef.md +14 -0
- data/docs/UserRoutingLanguage.md +3 -3
- data/docs/UserRoutingLanguagePost.md +1 -1
- data/docs/UserRoutingSkill.md +1 -1
- data/docs/VoicemailUserPolicy.md +1 -0
- data/docs/WfmBusinessUnitReference.md +14 -0
- data/docs/WfmHistoricalAdherenceResponse.md +1 -0
- data/docs/WfmHistoricalAdherenceResultWrapper.md +15 -0
- data/docs/WfmHistoricalDataUploadRequestStatusTopicDateTime.md +16 -0
- data/docs/WfmHistoricalDataUploadRequestStatusTopicHistoricalDataUploadRequestUpdate.md +20 -0
- data/docs/WfmScheduleReference.md +16 -0
- data/lib/purecloudplatformclientv2.rb +19 -0
- data/lib/purecloudplatformclientv2/api/architect_api.rb +15 -6
- data/lib/purecloudplatformclientv2/api/coaching_api.rb +10 -9
- data/lib/purecloudplatformclientv2/api/conversations_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/external_contacts_api.rb +4 -4
- data/lib/purecloudplatformclientv2/api/outbound_api.rb +1215 -155
- data/lib/purecloudplatformclientv2/api/scim_api.rb +88 -88
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/analytics_evaluation.rb +13 -13
- data/lib/purecloudplatformclientv2/models/analytics_session.rb +124 -4
- data/lib/purecloudplatformclientv2/models/common_campaign.rb +320 -0
- data/lib/purecloudplatformclientv2/models/common_campaign_division_view.rb +320 -0
- data/lib/purecloudplatformclientv2/models/common_campaign_division_view_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/common_campaign_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/conversation_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/conversation_association.rb +1 -1
- data/lib/purecloudplatformclientv2/models/conversation_event_topic_message.rb +26 -1
- 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/flow_aggregate_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/historical_adherence_actuals.rb +268 -0
- data/lib/purecloudplatformclientv2/models/historical_adherence_day_metrics.rb +462 -0
- data/lib/purecloudplatformclientv2/models/historical_adherence_exception_info.rb +466 -0
- data/lib/purecloudplatformclientv2/models/historical_adherence_query_result.rb +430 -0
- data/lib/purecloudplatformclientv2/models/knowledge_search_request.rb +0 -15
- data/lib/purecloudplatformclientv2/models/messaging_campaign.rb +621 -0
- data/lib/purecloudplatformclientv2/models/messaging_campaign_division_view.rb +279 -0
- data/lib/purecloudplatformclientv2/models/messaging_campaign_division_view_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/messaging_campaign_entity_listing.rb +428 -0
- data/lib/purecloudplatformclientv2/models/observation_value.rb +70 -2
- data/lib/purecloudplatformclientv2/models/queue_conversation_event_topic_message.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_social_expression_event_topic_message.rb +26 -1
- data/lib/purecloudplatformclientv2/models/queue_conversation_video_event_topic_message.rb +26 -1
- data/lib/purecloudplatformclientv2/models/reporting_export_job_request.rb +53 -1
- data/lib/purecloudplatformclientv2/models/reporting_export_job_response.rb +78 -1
- data/lib/purecloudplatformclientv2/models/scim_config_resource_type.rb +1 -1
- data/lib/purecloudplatformclientv2/models/scim_user_extensions.rb +3 -3
- data/lib/purecloudplatformclientv2/models/scim_user_role.rb +1 -1
- data/lib/purecloudplatformclientv2/models/scim_user_routing_language.rb +3 -3
- data/lib/purecloudplatformclientv2/models/scim_user_routing_skill.rb +3 -3
- data/lib/purecloudplatformclientv2/models/scim_v2_create_user.rb +3 -2
- data/lib/purecloudplatformclientv2/models/scim_v2_enterprise_user.rb +1 -1
- data/lib/purecloudplatformclientv2/models/scim_v2_group.rb +1 -1
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_attribute.rb +12 -12
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_definition.rb +5 -5
- data/lib/purecloudplatformclientv2/models/scim_v2_schema_list_response.rb +2 -2
- data/lib/purecloudplatformclientv2/models/scim_v2_user.rb +4 -3
- data/lib/purecloudplatformclientv2/models/segment_detail_query_predicate.rb +2 -2
- data/lib/purecloudplatformclientv2/models/sms_config.rb +269 -0
- data/lib/purecloudplatformclientv2/models/sms_phone_number_ref.rb +232 -0
- data/lib/purecloudplatformclientv2/models/user_routing_language.rb +4 -4
- data/lib/purecloudplatformclientv2/models/user_routing_language_post.rb +1 -1
- data/lib/purecloudplatformclientv2/models/user_routing_skill.rb +1 -1
- data/lib/purecloudplatformclientv2/models/voicemail_user_policy.rb +30 -4
- data/lib/purecloudplatformclientv2/models/wem_coaching_appointment_topic_coaching_appointment_notification.rb +4 -4
- data/lib/purecloudplatformclientv2/models/wfm_business_unit_reference.rb +228 -0
- data/lib/purecloudplatformclientv2/models/wfm_historical_adherence_response.rb +27 -1
- data/lib/purecloudplatformclientv2/models/wfm_historical_adherence_result_wrapper.rb +258 -0
- data/lib/purecloudplatformclientv2/models/wfm_historical_data_upload_request_status_topic_date_time.rb +276 -0
- data/lib/purecloudplatformclientv2/models/wfm_historical_data_upload_request_status_topic_historical_data_upload_request_update.rb +390 -0
- data/lib/purecloudplatformclientv2/models/wfm_schedule_reference.rb +280 -0
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +41 -3
|
@@ -24,6 +24,8 @@ module PureCloud
|
|
|
24
24
|
|
|
25
25
|
attr_accessor :held
|
|
26
26
|
|
|
27
|
+
attr_accessor :error_info
|
|
28
|
+
|
|
27
29
|
attr_accessor :provider
|
|
28
30
|
|
|
29
31
|
attr_accessor :script_id
|
|
@@ -66,6 +68,8 @@ module PureCloud
|
|
|
66
68
|
|
|
67
69
|
:'held' => :'held',
|
|
68
70
|
|
|
71
|
+
:'error_info' => :'errorInfo',
|
|
72
|
+
|
|
69
73
|
:'provider' => :'provider',
|
|
70
74
|
|
|
71
75
|
:'script_id' => :'scriptId',
|
|
@@ -111,6 +115,8 @@ module PureCloud
|
|
|
111
115
|
|
|
112
116
|
:'held' => :'BOOLEAN',
|
|
113
117
|
|
|
118
|
+
:'error_info' => :'ConversationEventTopicErrorDetails',
|
|
119
|
+
|
|
114
120
|
:'provider' => :'String',
|
|
115
121
|
|
|
116
122
|
:'script_id' => :'String',
|
|
@@ -182,6 +188,15 @@ module PureCloud
|
|
|
182
188
|
end
|
|
183
189
|
|
|
184
190
|
|
|
191
|
+
if attributes.has_key?(:'errorInfo')
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
self.error_info = attributes[:'errorInfo']
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
|
|
185
200
|
if attributes.has_key?(:'provider')
|
|
186
201
|
|
|
187
202
|
|
|
@@ -369,6 +384,10 @@ module PureCloud
|
|
|
369
384
|
|
|
370
385
|
|
|
371
386
|
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
372
391
|
|
|
373
392
|
|
|
374
393
|
|
|
@@ -471,6 +490,11 @@ module PureCloud
|
|
|
471
490
|
|
|
472
491
|
|
|
473
492
|
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
474
498
|
|
|
475
499
|
|
|
476
500
|
|
|
@@ -567,6 +591,7 @@ module PureCloud
|
|
|
567
591
|
id == o.id &&
|
|
568
592
|
state == o.state &&
|
|
569
593
|
held == o.held &&
|
|
594
|
+
error_info == o.error_info &&
|
|
570
595
|
provider == o.provider &&
|
|
571
596
|
script_id == o.script_id &&
|
|
572
597
|
peer_id == o.peer_id &&
|
|
@@ -594,7 +619,7 @@ module PureCloud
|
|
|
594
619
|
# Calculates hash code according to all attributes.
|
|
595
620
|
# @return [Fixnum] Hash code
|
|
596
621
|
def hash
|
|
597
|
-
[id, state, held, provider, script_id, peer_id, disconnect_type, start_hold_time, connected_time, disconnected_time, to_address, from_address, messages, messages_transcript_uri, type, recipient_country, recipient_type, wrapup, additional_properties].hash
|
|
622
|
+
[id, state, held, error_info, provider, script_id, peer_id, disconnect_type, start_hold_time, connected_time, disconnected_time, to_address, from_address, messages, messages_transcript_uri, type, recipient_country, recipient_type, wrapup, additional_properties].hash
|
|
598
623
|
end
|
|
599
624
|
|
|
600
625
|
# build the object from hash
|
|
@@ -192,7 +192,7 @@ module PureCloud
|
|
|
192
192
|
|
|
193
193
|
|
|
194
194
|
|
|
195
|
-
allowed_values = ["ACDLANGUAGE", "ACDSKILL", "ACDWRAPUPCODE", "BOTFLOW", "BRIDGEACTION", "COMMONMODULEFLOW", "COMPOSERSCRIPT", "CONTACTLIST", "DATAACTION", "DATATABLE", "DIALOGENGINEBOT", "DIALOGENGINEBOTVERSION", "DIALOGFLOWAGENT", "EMAILROUTE", "EMERGENCYGROUP", "FLOWACTION", "FLOWDATATYPE", "FLOWOUTCOME", "GROUP", "INBOUNDCALLFLOW", "INBOUNDCHATFLOW", "INBOUNDEMAILFLOW", "INBOUNDSHORTMESSAGEFLOW", "INQUEUECALLFLOW", "IVRCONFIGURATION", "LANGUAGE", "LEXBOT", "LEXBOTALIAS", "OUTBOUNDCALLFLOW", "QUEUE", "RECORDINGPOLICY", "RESPONSE", "SCHEDULE", "SCHEDULEGROUP", "SECUREACTION", "SECURECALLFLOW", "SURVEYINVITEFLOW", "SYSTEMPROMPT", "TTSENGINE", "TTSVOICE", "USER", "USERPROMPT", "WIDGET", "WORKFLOW"]
|
|
195
|
+
allowed_values = ["ACDLANGUAGE", "ACDSKILL", "ACDWRAPUPCODE", "BOTFLOW", "BRIDGEACTION", "COMMONMODULEFLOW", "COMPOSERSCRIPT", "CONTACTLIST", "DATAACTION", "DATATABLE", "DIALOGENGINEBOT", "DIALOGENGINEBOTVERSION", "DIALOGFLOWAGENT", "EMAILROUTE", "EMERGENCYGROUP", "FLOWACTION", "FLOWDATATYPE", "FLOWOUTCOME", "GROUP", "INBOUNDCALLFLOW", "INBOUNDCHATFLOW", "INBOUNDEMAILFLOW", "INBOUNDSHORTMESSAGEFLOW", "INQUEUECALLFLOW", "IVRCONFIGURATION", "LANGUAGE", "LEXBOT", "LEXBOTALIAS", "NLUDOMAIN", "OUTBOUNDCALLFLOW", "QUEUE", "RECORDINGPOLICY", "RESPONSE", "SCHEDULE", "SCHEDULEGROUP", "SECUREACTION", "SECURECALLFLOW", "SURVEYINVITEFLOW", "SYSTEMPROMPT", "TTSENGINE", "TTSVOICE", "USER", "USERPROMPT", "WIDGET", "WORKFLOW"]
|
|
196
196
|
if @type && !allowed_values.include?(@type)
|
|
197
197
|
return false
|
|
198
198
|
end
|
|
@@ -237,7 +237,7 @@ module PureCloud
|
|
|
237
237
|
# Custom attribute writer method checking allowed values (enum).
|
|
238
238
|
# @param [Object] type Object to be assigned
|
|
239
239
|
def type=(type)
|
|
240
|
-
allowed_values = ["ACDLANGUAGE", "ACDSKILL", "ACDWRAPUPCODE", "BOTFLOW", "BRIDGEACTION", "COMMONMODULEFLOW", "COMPOSERSCRIPT", "CONTACTLIST", "DATAACTION", "DATATABLE", "DIALOGENGINEBOT", "DIALOGENGINEBOTVERSION", "DIALOGFLOWAGENT", "EMAILROUTE", "EMERGENCYGROUP", "FLOWACTION", "FLOWDATATYPE", "FLOWOUTCOME", "GROUP", "INBOUNDCALLFLOW", "INBOUNDCHATFLOW", "INBOUNDEMAILFLOW", "INBOUNDSHORTMESSAGEFLOW", "INQUEUECALLFLOW", "IVRCONFIGURATION", "LANGUAGE", "LEXBOT", "LEXBOTALIAS", "OUTBOUNDCALLFLOW", "QUEUE", "RECORDINGPOLICY", "RESPONSE", "SCHEDULE", "SCHEDULEGROUP", "SECUREACTION", "SECURECALLFLOW", "SURVEYINVITEFLOW", "SYSTEMPROMPT", "TTSENGINE", "TTSVOICE", "USER", "USERPROMPT", "WIDGET", "WORKFLOW"]
|
|
240
|
+
allowed_values = ["ACDLANGUAGE", "ACDSKILL", "ACDWRAPUPCODE", "BOTFLOW", "BRIDGEACTION", "COMMONMODULEFLOW", "COMPOSERSCRIPT", "CONTACTLIST", "DATAACTION", "DATATABLE", "DIALOGENGINEBOT", "DIALOGENGINEBOTVERSION", "DIALOGFLOWAGENT", "EMAILROUTE", "EMERGENCYGROUP", "FLOWACTION", "FLOWDATATYPE", "FLOWOUTCOME", "GROUP", "INBOUNDCALLFLOW", "INBOUNDCHATFLOW", "INBOUNDEMAILFLOW", "INBOUNDSHORTMESSAGEFLOW", "INQUEUECALLFLOW", "IVRCONFIGURATION", "LANGUAGE", "LEXBOT", "LEXBOTALIAS", "NLUDOMAIN", "OUTBOUNDCALLFLOW", "QUEUE", "RECORDINGPOLICY", "RESPONSE", "SCHEDULE", "SCHEDULEGROUP", "SECUREACTION", "SECURECALLFLOW", "SURVEYINVITEFLOW", "SYSTEMPROMPT", "TTSENGINE", "TTSVOICE", "USER", "USERPROMPT", "WIDGET", "WORKFLOW"]
|
|
241
241
|
if type && !allowed_values.include?(type)
|
|
242
242
|
fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
|
|
243
243
|
end
|
|
@@ -226,7 +226,7 @@ module PureCloud
|
|
|
226
226
|
|
|
227
227
|
|
|
228
228
|
|
|
229
|
-
allowed_values = ["ACDLANGUAGE", "ACDSKILL", "ACDWRAPUPCODE", "BOTFLOW", "BRIDGEACTION", "COMMONMODULEFLOW", "COMPOSERSCRIPT", "CONTACTLIST", "DATAACTION", "DATATABLE", "DIALOGENGINEBOT", "DIALOGENGINEBOTVERSION", "DIALOGFLOWAGENT", "EMAILROUTE", "EMERGENCYGROUP", "FLOWACTION", "FLOWDATATYPE", "FLOWOUTCOME", "GROUP", "INBOUNDCALLFLOW", "INBOUNDCHATFLOW", "INBOUNDEMAILFLOW", "INBOUNDSHORTMESSAGEFLOW", "INQUEUECALLFLOW", "IVRCONFIGURATION", "LANGUAGE", "LEXBOT", "LEXBOTALIAS", "OUTBOUNDCALLFLOW", "QUEUE", "RECORDINGPOLICY", "RESPONSE", "SCHEDULE", "SCHEDULEGROUP", "SECUREACTION", "SECURECALLFLOW", "SURVEYINVITEFLOW", "SYSTEMPROMPT", "TTSENGINE", "TTSVOICE", "USER", "USERPROMPT", "WIDGET", "WORKFLOW"]
|
|
229
|
+
allowed_values = ["ACDLANGUAGE", "ACDSKILL", "ACDWRAPUPCODE", "BOTFLOW", "BRIDGEACTION", "COMMONMODULEFLOW", "COMPOSERSCRIPT", "CONTACTLIST", "DATAACTION", "DATATABLE", "DIALOGENGINEBOT", "DIALOGENGINEBOTVERSION", "DIALOGFLOWAGENT", "EMAILROUTE", "EMERGENCYGROUP", "FLOWACTION", "FLOWDATATYPE", "FLOWOUTCOME", "GROUP", "INBOUNDCALLFLOW", "INBOUNDCHATFLOW", "INBOUNDEMAILFLOW", "INBOUNDSHORTMESSAGEFLOW", "INQUEUECALLFLOW", "IVRCONFIGURATION", "LANGUAGE", "LEXBOT", "LEXBOTALIAS", "NLUDOMAIN", "OUTBOUNDCALLFLOW", "QUEUE", "RECORDINGPOLICY", "RESPONSE", "SCHEDULE", "SCHEDULEGROUP", "SECUREACTION", "SECURECALLFLOW", "SURVEYINVITEFLOW", "SYSTEMPROMPT", "TTSENGINE", "TTSVOICE", "USER", "USERPROMPT", "WIDGET", "WORKFLOW"]
|
|
230
230
|
if @type && !allowed_values.include?(@type)
|
|
231
231
|
return false
|
|
232
232
|
end
|
|
@@ -279,7 +279,7 @@ module PureCloud
|
|
|
279
279
|
# Custom attribute writer method checking allowed values (enum).
|
|
280
280
|
# @param [Object] type Object to be assigned
|
|
281
281
|
def type=(type)
|
|
282
|
-
allowed_values = ["ACDLANGUAGE", "ACDSKILL", "ACDWRAPUPCODE", "BOTFLOW", "BRIDGEACTION", "COMMONMODULEFLOW", "COMPOSERSCRIPT", "CONTACTLIST", "DATAACTION", "DATATABLE", "DIALOGENGINEBOT", "DIALOGENGINEBOTVERSION", "DIALOGFLOWAGENT", "EMAILROUTE", "EMERGENCYGROUP", "FLOWACTION", "FLOWDATATYPE", "FLOWOUTCOME", "GROUP", "INBOUNDCALLFLOW", "INBOUNDCHATFLOW", "INBOUNDEMAILFLOW", "INBOUNDSHORTMESSAGEFLOW", "INQUEUECALLFLOW", "IVRCONFIGURATION", "LANGUAGE", "LEXBOT", "LEXBOTALIAS", "OUTBOUNDCALLFLOW", "QUEUE", "RECORDINGPOLICY", "RESPONSE", "SCHEDULE", "SCHEDULEGROUP", "SECUREACTION", "SECURECALLFLOW", "SURVEYINVITEFLOW", "SYSTEMPROMPT", "TTSENGINE", "TTSVOICE", "USER", "USERPROMPT", "WIDGET", "WORKFLOW"]
|
|
282
|
+
allowed_values = ["ACDLANGUAGE", "ACDSKILL", "ACDWRAPUPCODE", "BOTFLOW", "BRIDGEACTION", "COMMONMODULEFLOW", "COMPOSERSCRIPT", "CONTACTLIST", "DATAACTION", "DATATABLE", "DIALOGENGINEBOT", "DIALOGENGINEBOTVERSION", "DIALOGFLOWAGENT", "EMAILROUTE", "EMERGENCYGROUP", "FLOWACTION", "FLOWDATATYPE", "FLOWOUTCOME", "GROUP", "INBOUNDCALLFLOW", "INBOUNDCHATFLOW", "INBOUNDEMAILFLOW", "INBOUNDSHORTMESSAGEFLOW", "INQUEUECALLFLOW", "IVRCONFIGURATION", "LANGUAGE", "LEXBOT", "LEXBOTALIAS", "NLUDOMAIN", "OUTBOUNDCALLFLOW", "QUEUE", "RECORDINGPOLICY", "RESPONSE", "SCHEDULE", "SCHEDULEGROUP", "SECUREACTION", "SECURECALLFLOW", "SURVEYINVITEFLOW", "SYSTEMPROMPT", "TTSENGINE", "TTSVOICE", "USER", "USERPROMPT", "WIDGET", "WORKFLOW"]
|
|
283
283
|
if type && !allowed_values.include?(type)
|
|
284
284
|
fail ArgumentError, "invalid value for 'type', must be one of #{allowed_values}."
|
|
285
285
|
end
|
|
@@ -152,7 +152,7 @@ module PureCloud
|
|
|
152
152
|
|
|
153
153
|
|
|
154
154
|
|
|
155
|
-
allowed_values = ["APPROACHING_CONTACT_LIMIT", "APPROACHING_ENTITY_LIMIT", "AUTOMATIC_TIME_ZONE_ZIP_CODE_INVALID", "CAMPAIGN_START_ERROR", "CAMPAIGN_RULE_START_ERROR", "CAMPAIGN_SET_DIALING_MODE_ERROR", "CAMPAIGN_STOPPED", "CAMPAIGN_THROTTLED", "CAMPAIGN_QUEUE_MEMBERS_LIMIT_EXCEEDED", "INVALID_CALLABLE_TIME_ZONE", "CALLBACK_CREATION_INVALID_NUMBER", "CALL_RULE_INVALID_CONTACT_COLUMN", "CALL_RULE_MISSING_DATA_ACTION_INPUT", "CALL_RULE_MISMATCH_TYPE", "CALL_RULE_INVALID_OPERATOR", "CALL_RULE_NO_DNC_LISTS_CONFIGURED", "CALL_RULE_UPDATED_PHONE_COLUMN", "CONTACT_LIST_FILTER_EVALUATION_FAILED", "CONTACT_LIST_FILTER_INTERNAL_ERROR", "CONTACT_COLUMNS_LIMIT_EXCEEDED", "CONTACT_COLUMN_LENGTH_LIMIT_EXCEEDED", "CONTACT_DATUM_LENGTH_LIMIT_EXCEEDED", "CONTACT_ZIP_CODE_COLUMN_VALUE_INVALID", "DATA_ACTION_EXECUTION_FAILED", "DATA_ACTION_AUTHENTICATION_FAILURE", "DATA_ACTION_NOT_FOUND", "DNC_AUTHENTICATION_FAILURE", "EXCEEDED_CONTACT_LIMIT", "INACTIVE_EDGES_FAILED_PLACE_CALLS", "INACTIVE_EDGES_TURNED_CAMPAIGN_OFF", "INVALID_PHONE_NUMBER", "IMPORT_FAILED_TO_READ_HEADERS", "IMPORT_COULD_NOT_PARSE_AN_ENTRY", "IMPORT_CONTACT_DOES_NOT_MATCH_LIST_FORMAT", "IMPORT_ENTRY_DOES_NOT_ALIGN_WITH_HEADERS", "IMPORT_INVALID_CUSTOM_ID", "IMPORT_INVALID_DATA", "IMPORT_COLUMN_EXCEEDS_LENGTH_LIMIT", "IMPORT_DATUM_EXCEEDS_LENGTH_LIMIT", "IMPORT_MISSING_CUSTOM_ID", "IMPORT_NO_COLUMNS_DEFINED", "IMPORT_COLUMNS_DO_NOT_EXIST_ON_LIST", "IMPORT_LIST_NO_LONGER_EXISTS", "IMPORT_FAILED_CONTACT_ZIP_CODE_COLUMN_VALUE_INVALID", "IMPORT_TOO_MANY_COLUMNS", "ORGANIZATION_HAS_NO_DOMAIN_SET", "RECYCLE_CAMPAIGN"]
|
|
155
|
+
allowed_values = ["APPROACHING_CONTACT_LIMIT", "APPROACHING_DNC_LIST_PHONE_NUMBER_LIMIT", "APPROACHING_DNC_ORGANIZATION_PHONE_NUMBER_LIMIT", "APPROACHING_ENTITY_LIMIT", "AUTOMATIC_TIME_ZONE_ZIP_CODE_INVALID", "CAMPAIGN_START_ERROR", "CAMPAIGN_RULE_START_ERROR", "CAMPAIGN_SET_DIALING_MODE_ERROR", "CAMPAIGN_STOPPED", "CAMPAIGN_THROTTLED", "CAMPAIGN_QUEUE_MEMBERS_LIMIT_EXCEEDED", "INVALID_CALLABLE_TIME_ZONE", "CALLBACK_CREATION_INVALID_NUMBER", "CALL_RULE_INVALID_CONTACT_COLUMN", "CALL_RULE_MISSING_DATA_ACTION_INPUT", "CALL_RULE_MISMATCH_TYPE", "CALL_RULE_INVALID_OPERATOR", "CALL_RULE_NO_DNC_LISTS_CONFIGURED", "CALL_RULE_UPDATED_PHONE_COLUMN", "CONTACT_LIST_FILTER_EVALUATION_FAILED", "CONTACT_LIST_FILTER_INTERNAL_ERROR", "CONTACT_COLUMNS_LIMIT_EXCEEDED", "CONTACT_COLUMN_LENGTH_LIMIT_EXCEEDED", "CONTACT_DATUM_LENGTH_LIMIT_EXCEEDED", "CONTACT_ZIP_CODE_COLUMN_VALUE_INVALID", "DATA_ACTION_EXECUTION_FAILED", "DATA_ACTION_AUTHENTICATION_FAILURE", "DATA_ACTION_NOT_FOUND", "DNC_AUTHENTICATION_FAILURE", "EXCEEDED_CONTACT_LIMIT", "INACTIVE_EDGES_FAILED_PLACE_CALLS", "INACTIVE_EDGES_TURNED_CAMPAIGN_OFF", "INVALID_PHONE_NUMBER", "IMPORT_FAILED_TO_READ_HEADERS", "IMPORT_COULD_NOT_PARSE_AN_ENTRY", "IMPORT_CONTACT_DOES_NOT_MATCH_LIST_FORMAT", "IMPORT_ENTRY_DOES_NOT_ALIGN_WITH_HEADERS", "IMPORT_INVALID_CUSTOM_ID", "IMPORT_INVALID_DATA", "IMPORT_COLUMN_EXCEEDS_LENGTH_LIMIT", "IMPORT_DATUM_EXCEEDS_LENGTH_LIMIT", "IMPORT_MISSING_CUSTOM_ID", "IMPORT_NO_COLUMNS_DEFINED", "IMPORT_COLUMNS_DO_NOT_EXIST_ON_LIST", "IMPORT_LIST_NO_LONGER_EXISTS", "IMPORT_FAILED_CONTACT_ZIP_CODE_COLUMN_VALUE_INVALID", "IMPORT_TOO_MANY_COLUMNS", "ORGANIZATION_HAS_NO_DOMAIN_SET", "RECYCLE_CAMPAIGN"]
|
|
156
156
|
if @code && !allowed_values.include?(@code)
|
|
157
157
|
return false
|
|
158
158
|
end
|
|
@@ -186,7 +186,7 @@ module PureCloud
|
|
|
186
186
|
# Custom attribute writer method checking allowed values (enum).
|
|
187
187
|
# @param [Object] code Object to be assigned
|
|
188
188
|
def code=(code)
|
|
189
|
-
allowed_values = ["APPROACHING_CONTACT_LIMIT", "APPROACHING_ENTITY_LIMIT", "AUTOMATIC_TIME_ZONE_ZIP_CODE_INVALID", "CAMPAIGN_START_ERROR", "CAMPAIGN_RULE_START_ERROR", "CAMPAIGN_SET_DIALING_MODE_ERROR", "CAMPAIGN_STOPPED", "CAMPAIGN_THROTTLED", "CAMPAIGN_QUEUE_MEMBERS_LIMIT_EXCEEDED", "INVALID_CALLABLE_TIME_ZONE", "CALLBACK_CREATION_INVALID_NUMBER", "CALL_RULE_INVALID_CONTACT_COLUMN", "CALL_RULE_MISSING_DATA_ACTION_INPUT", "CALL_RULE_MISMATCH_TYPE", "CALL_RULE_INVALID_OPERATOR", "CALL_RULE_NO_DNC_LISTS_CONFIGURED", "CALL_RULE_UPDATED_PHONE_COLUMN", "CONTACT_LIST_FILTER_EVALUATION_FAILED", "CONTACT_LIST_FILTER_INTERNAL_ERROR", "CONTACT_COLUMNS_LIMIT_EXCEEDED", "CONTACT_COLUMN_LENGTH_LIMIT_EXCEEDED", "CONTACT_DATUM_LENGTH_LIMIT_EXCEEDED", "CONTACT_ZIP_CODE_COLUMN_VALUE_INVALID", "DATA_ACTION_EXECUTION_FAILED", "DATA_ACTION_AUTHENTICATION_FAILURE", "DATA_ACTION_NOT_FOUND", "DNC_AUTHENTICATION_FAILURE", "EXCEEDED_CONTACT_LIMIT", "INACTIVE_EDGES_FAILED_PLACE_CALLS", "INACTIVE_EDGES_TURNED_CAMPAIGN_OFF", "INVALID_PHONE_NUMBER", "IMPORT_FAILED_TO_READ_HEADERS", "IMPORT_COULD_NOT_PARSE_AN_ENTRY", "IMPORT_CONTACT_DOES_NOT_MATCH_LIST_FORMAT", "IMPORT_ENTRY_DOES_NOT_ALIGN_WITH_HEADERS", "IMPORT_INVALID_CUSTOM_ID", "IMPORT_INVALID_DATA", "IMPORT_COLUMN_EXCEEDS_LENGTH_LIMIT", "IMPORT_DATUM_EXCEEDS_LENGTH_LIMIT", "IMPORT_MISSING_CUSTOM_ID", "IMPORT_NO_COLUMNS_DEFINED", "IMPORT_COLUMNS_DO_NOT_EXIST_ON_LIST", "IMPORT_LIST_NO_LONGER_EXISTS", "IMPORT_FAILED_CONTACT_ZIP_CODE_COLUMN_VALUE_INVALID", "IMPORT_TOO_MANY_COLUMNS", "ORGANIZATION_HAS_NO_DOMAIN_SET", "RECYCLE_CAMPAIGN"]
|
|
189
|
+
allowed_values = ["APPROACHING_CONTACT_LIMIT", "APPROACHING_DNC_LIST_PHONE_NUMBER_LIMIT", "APPROACHING_DNC_ORGANIZATION_PHONE_NUMBER_LIMIT", "APPROACHING_ENTITY_LIMIT", "AUTOMATIC_TIME_ZONE_ZIP_CODE_INVALID", "CAMPAIGN_START_ERROR", "CAMPAIGN_RULE_START_ERROR", "CAMPAIGN_SET_DIALING_MODE_ERROR", "CAMPAIGN_STOPPED", "CAMPAIGN_THROTTLED", "CAMPAIGN_QUEUE_MEMBERS_LIMIT_EXCEEDED", "INVALID_CALLABLE_TIME_ZONE", "CALLBACK_CREATION_INVALID_NUMBER", "CALL_RULE_INVALID_CONTACT_COLUMN", "CALL_RULE_MISSING_DATA_ACTION_INPUT", "CALL_RULE_MISMATCH_TYPE", "CALL_RULE_INVALID_OPERATOR", "CALL_RULE_NO_DNC_LISTS_CONFIGURED", "CALL_RULE_UPDATED_PHONE_COLUMN", "CONTACT_LIST_FILTER_EVALUATION_FAILED", "CONTACT_LIST_FILTER_INTERNAL_ERROR", "CONTACT_COLUMNS_LIMIT_EXCEEDED", "CONTACT_COLUMN_LENGTH_LIMIT_EXCEEDED", "CONTACT_DATUM_LENGTH_LIMIT_EXCEEDED", "CONTACT_ZIP_CODE_COLUMN_VALUE_INVALID", "DATA_ACTION_EXECUTION_FAILED", "DATA_ACTION_AUTHENTICATION_FAILURE", "DATA_ACTION_NOT_FOUND", "DNC_AUTHENTICATION_FAILURE", "EXCEEDED_CONTACT_LIMIT", "INACTIVE_EDGES_FAILED_PLACE_CALLS", "INACTIVE_EDGES_TURNED_CAMPAIGN_OFF", "INVALID_PHONE_NUMBER", "IMPORT_FAILED_TO_READ_HEADERS", "IMPORT_COULD_NOT_PARSE_AN_ENTRY", "IMPORT_CONTACT_DOES_NOT_MATCH_LIST_FORMAT", "IMPORT_ENTRY_DOES_NOT_ALIGN_WITH_HEADERS", "IMPORT_INVALID_CUSTOM_ID", "IMPORT_INVALID_DATA", "IMPORT_COLUMN_EXCEEDS_LENGTH_LIMIT", "IMPORT_DATUM_EXCEEDS_LENGTH_LIMIT", "IMPORT_MISSING_CUSTOM_ID", "IMPORT_NO_COLUMNS_DEFINED", "IMPORT_COLUMNS_DO_NOT_EXIST_ON_LIST", "IMPORT_LIST_NO_LONGER_EXISTS", "IMPORT_FAILED_CONTACT_ZIP_CODE_COLUMN_VALUE_INVALID", "IMPORT_TOO_MANY_COLUMNS", "ORGANIZATION_HAS_NO_DOMAIN_SET", "RECYCLE_CAMPAIGN"]
|
|
190
190
|
if code && !allowed_values.include?(code)
|
|
191
191
|
fail ArgumentError, "invalid value for 'code', must be one of #{allowed_values}."
|
|
192
192
|
end
|
|
@@ -147,7 +147,7 @@ module PureCloud
|
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
|
|
150
|
-
allowed_values = ["addressFrom", "addressTo", "agentScore", "ani", "conversationId", "convertedFrom", "convertedTo", "direction", "disconnectType", "divisionId", "dnis", "edgeId", "endingLanguage", "entryReason", "entryType", "exitReason", "externalContactId", "externalMediaCount", "externalOrganizationId", "flaggedReason", "flowId", "flowName", "flowOutType", "flowOutcome", "flowOutcomeId", "flowOutcomeValue", "flowType", "flowVersion", "groupId", "interactionType", "journeyActionId", "journeyActionMapId", "journeyActionMapVersion", "journeyCustomerId", "journeyCustomerIdType", "journeyCustomerSessionId", "journeyCustomerSessionIdType", "mediaCount", "mediaType", "messageType", "originatingDirection", "outboundCampaignId", "outboundContactId", "outboundContactListId", "participantName", "peerId", "provider", "purpose", "queueId", "remote", "requestedLanguageId", "requestedRoutingSkillId", "roomId", "routingPriority", "scoredAgentId", "sessionDnis", "sessionId", "startingLanguage", "stationId", "teamId", "transferTargetAddress", "transferTargetName", "transferType", "userId", "wrapUpCode"]
|
|
150
|
+
allowed_values = ["addressFrom", "addressTo", "agentScore", "ani", "conversationId", "convertedFrom", "convertedTo", "direction", "disconnectType", "divisionId", "dnis", "edgeId", "endingLanguage", "entryReason", "entryType", "exitReason", "externalContactId", "externalMediaCount", "externalOrganizationId", "flaggedReason", "flowId", "flowName", "flowOutType", "flowOutcome", "flowOutcomeId", "flowOutcomeValue", "flowType", "flowVersion", "groupId", "interactionType", "journeyActionId", "journeyActionMapId", "journeyActionMapVersion", "journeyCustomerId", "journeyCustomerIdType", "journeyCustomerSessionId", "journeyCustomerSessionIdType", "mediaCount", "mediaType", "messageType", "originatingDirection", "outboundCampaignId", "outboundContactId", "outboundContactListId", "participantName", "peerId", "provider", "purpose", "queueId", "remote", "requestedLanguageId", "requestedRouting", "requestedRoutingSkillId", "roomId", "routingPriority", "scoredAgentId", "selectedAgentId", "selectedAgentRank", "sessionDnis", "sessionId", "startingLanguage", "stationId", "teamId", "transferTargetAddress", "transferTargetName", "transferType", "usedRouting", "userId", "wrapUpCode"]
|
|
151
151
|
if @dimension && !allowed_values.include?(@dimension)
|
|
152
152
|
return false
|
|
153
153
|
end
|
|
@@ -192,7 +192,7 @@ module PureCloud
|
|
|
192
192
|
# Custom attribute writer method checking allowed values (enum).
|
|
193
193
|
# @param [Object] dimension Object to be assigned
|
|
194
194
|
def dimension=(dimension)
|
|
195
|
-
allowed_values = ["addressFrom", "addressTo", "agentScore", "ani", "conversationId", "convertedFrom", "convertedTo", "direction", "disconnectType", "divisionId", "dnis", "edgeId", "endingLanguage", "entryReason", "entryType", "exitReason", "externalContactId", "externalMediaCount", "externalOrganizationId", "flaggedReason", "flowId", "flowName", "flowOutType", "flowOutcome", "flowOutcomeId", "flowOutcomeValue", "flowType", "flowVersion", "groupId", "interactionType", "journeyActionId", "journeyActionMapId", "journeyActionMapVersion", "journeyCustomerId", "journeyCustomerIdType", "journeyCustomerSessionId", "journeyCustomerSessionIdType", "mediaCount", "mediaType", "messageType", "originatingDirection", "outboundCampaignId", "outboundContactId", "outboundContactListId", "participantName", "peerId", "provider", "purpose", "queueId", "remote", "requestedLanguageId", "requestedRoutingSkillId", "roomId", "routingPriority", "scoredAgentId", "sessionDnis", "sessionId", "startingLanguage", "stationId", "teamId", "transferTargetAddress", "transferTargetName", "transferType", "userId", "wrapUpCode"]
|
|
195
|
+
allowed_values = ["addressFrom", "addressTo", "agentScore", "ani", "conversationId", "convertedFrom", "convertedTo", "direction", "disconnectType", "divisionId", "dnis", "edgeId", "endingLanguage", "entryReason", "entryType", "exitReason", "externalContactId", "externalMediaCount", "externalOrganizationId", "flaggedReason", "flowId", "flowName", "flowOutType", "flowOutcome", "flowOutcomeId", "flowOutcomeValue", "flowType", "flowVersion", "groupId", "interactionType", "journeyActionId", "journeyActionMapId", "journeyActionMapVersion", "journeyCustomerId", "journeyCustomerIdType", "journeyCustomerSessionId", "journeyCustomerSessionIdType", "mediaCount", "mediaType", "messageType", "originatingDirection", "outboundCampaignId", "outboundContactId", "outboundContactListId", "participantName", "peerId", "provider", "purpose", "queueId", "remote", "requestedLanguageId", "requestedRouting", "requestedRoutingSkillId", "roomId", "routingPriority", "scoredAgentId", "selectedAgentId", "selectedAgentRank", "sessionDnis", "sessionId", "startingLanguage", "stationId", "teamId", "transferTargetAddress", "transferTargetName", "transferType", "usedRouting", "userId", "wrapUpCode"]
|
|
196
196
|
if dimension && !allowed_values.include?(dimension)
|
|
197
197
|
fail ArgumentError, "invalid value for 'dimension', must be one of #{allowed_values}."
|
|
198
198
|
end
|
|
@@ -0,0 +1,268 @@
|
|
|
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
|
+
class HistoricalAdherenceActuals
|
|
21
|
+
# Activity in which the user is actually engaged
|
|
22
|
+
attr_accessor :actual_activity_category
|
|
23
|
+
|
|
24
|
+
# Actual start offset in seconds relative to query start time
|
|
25
|
+
attr_accessor :start_offset_seconds
|
|
26
|
+
|
|
27
|
+
# Actual end offset in seconds relative to query start time
|
|
28
|
+
attr_accessor :end_offset_seconds
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
|
|
34
|
+
:'actual_activity_category' => :'actualActivityCategory',
|
|
35
|
+
|
|
36
|
+
:'start_offset_seconds' => :'startOffsetSeconds',
|
|
37
|
+
|
|
38
|
+
:'end_offset_seconds' => :'endOffsetSeconds'
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.swagger_types
|
|
45
|
+
{
|
|
46
|
+
|
|
47
|
+
:'actual_activity_category' => :'String',
|
|
48
|
+
|
|
49
|
+
:'start_offset_seconds' => :'Integer',
|
|
50
|
+
|
|
51
|
+
:'end_offset_seconds' => :'Integer'
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
return unless attributes.is_a?(Hash)
|
|
60
|
+
|
|
61
|
+
# convert string to symbol for hash key
|
|
62
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
if attributes.has_key?(:'actualActivityCategory')
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
self.actual_activity_category = attributes[:'actualActivityCategory']
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
if attributes.has_key?(:'startOffsetSeconds')
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
self.start_offset_seconds = attributes[:'startOffsetSeconds']
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
if attributes.has_key?(:'endOffsetSeconds')
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
self.end_offset_seconds = attributes[:'endOffsetSeconds']
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
95
|
+
# @return Array for valid properies with the reasons
|
|
96
|
+
def list_invalid_properties
|
|
97
|
+
invalid_properties = Array.new
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
return invalid_properties
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Check to see if the all the properties in the model are valid
|
|
104
|
+
# @return true if the model is valid
|
|
105
|
+
def valid?
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
allowed_values = ["OnQueueWork", "Break", "Meal", "Meeting", "OffQueueWork", "TimeOff", "Training", "Unavailable", "Unscheduled"]
|
|
110
|
+
if @actual_activity_category && !allowed_values.include?(@actual_activity_category)
|
|
111
|
+
return false
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
129
|
+
# @param [Object] actual_activity_category Object to be assigned
|
|
130
|
+
def actual_activity_category=(actual_activity_category)
|
|
131
|
+
allowed_values = ["OnQueueWork", "Break", "Meal", "Meeting", "OffQueueWork", "TimeOff", "Training", "Unavailable", "Unscheduled"]
|
|
132
|
+
if actual_activity_category && !allowed_values.include?(actual_activity_category)
|
|
133
|
+
fail ArgumentError, "invalid value for 'actual_activity_category', must be one of #{allowed_values}."
|
|
134
|
+
end
|
|
135
|
+
@actual_activity_category = actual_activity_category
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
# Checks equality by comparing each attribute.
|
|
152
|
+
# @param [Object] Object to be compared
|
|
153
|
+
def ==(o)
|
|
154
|
+
return true if self.equal?(o)
|
|
155
|
+
self.class == o.class &&
|
|
156
|
+
actual_activity_category == o.actual_activity_category &&
|
|
157
|
+
start_offset_seconds == o.start_offset_seconds &&
|
|
158
|
+
end_offset_seconds == o.end_offset_seconds
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# @see the `==` method
|
|
162
|
+
# @param [Object] Object to be compared
|
|
163
|
+
def eql?(o)
|
|
164
|
+
self == o
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Calculates hash code according to all attributes.
|
|
168
|
+
# @return [Fixnum] Hash code
|
|
169
|
+
def hash
|
|
170
|
+
[actual_activity_category, start_offset_seconds, end_offset_seconds].hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# build the object from hash
|
|
174
|
+
def build_from_hash(attributes)
|
|
175
|
+
return nil unless attributes.is_a?(Hash)
|
|
176
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
177
|
+
if type =~ /^Array<(.*)>/i
|
|
178
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
179
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
180
|
+
else
|
|
181
|
+
#TODO show warning in debug mode
|
|
182
|
+
end
|
|
183
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
184
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
185
|
+
else
|
|
186
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
self
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
def _deserialize(type, value)
|
|
194
|
+
case type.to_sym
|
|
195
|
+
when :DateTime
|
|
196
|
+
DateTime.parse(value)
|
|
197
|
+
when :Date
|
|
198
|
+
Date.parse(value)
|
|
199
|
+
when :String
|
|
200
|
+
value.to_s
|
|
201
|
+
when :Integer
|
|
202
|
+
value.to_i
|
|
203
|
+
when :Float
|
|
204
|
+
value.to_f
|
|
205
|
+
when :BOOLEAN
|
|
206
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
207
|
+
true
|
|
208
|
+
else
|
|
209
|
+
false
|
|
210
|
+
end
|
|
211
|
+
when :Object
|
|
212
|
+
# generic object (usually a Hash), return directly
|
|
213
|
+
value
|
|
214
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
215
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
216
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
217
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
218
|
+
k_type = Regexp.last_match[:k_type]
|
|
219
|
+
v_type = Regexp.last_match[:v_type]
|
|
220
|
+
{}.tap do |hash|
|
|
221
|
+
value.each do |k, v|
|
|
222
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
else # model
|
|
226
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
|
227
|
+
_model.build_from_hash(value)
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
def to_s
|
|
232
|
+
to_hash.to_s
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# to_body is an alias to to_body (backward compatibility))
|
|
236
|
+
def to_body
|
|
237
|
+
to_hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# return the object in the form of hash
|
|
241
|
+
def to_hash
|
|
242
|
+
hash = {}
|
|
243
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
244
|
+
value = self.send(attr)
|
|
245
|
+
next if value.nil?
|
|
246
|
+
hash[param] = _to_hash(value)
|
|
247
|
+
end
|
|
248
|
+
hash
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Method to output non-array value in the form of hash
|
|
252
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
253
|
+
def _to_hash(value)
|
|
254
|
+
if value.is_a?(Array)
|
|
255
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
256
|
+
elsif value.is_a?(Hash)
|
|
257
|
+
{}.tap do |hash|
|
|
258
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
259
|
+
end
|
|
260
|
+
elsif value.respond_to? :to_hash
|
|
261
|
+
value.to_hash
|
|
262
|
+
else
|
|
263
|
+
value
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
end
|
|
268
|
+
end
|
|
@@ -0,0 +1,462 @@
|
|
|
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
|
+
class HistoricalAdherenceDayMetrics
|
|
21
|
+
# Start of day offset in seconds relative to query start time
|
|
22
|
+
attr_accessor :day_start_offset_secs
|
|
23
|
+
|
|
24
|
+
# Duration of schedule in seconds included for adherence percentage calculation
|
|
25
|
+
attr_accessor :adherence_schedule_secs
|
|
26
|
+
|
|
27
|
+
# Total scheduled duration in seconds for OnQueue activities
|
|
28
|
+
attr_accessor :conformance_schedule_secs
|
|
29
|
+
|
|
30
|
+
# Total actually worked duration in seconds for OnQueue activities
|
|
31
|
+
attr_accessor :conformance_actual_secs
|
|
32
|
+
|
|
33
|
+
# Total number of adherence exceptions for this user
|
|
34
|
+
attr_accessor :exception_count
|
|
35
|
+
|
|
36
|
+
# Total duration in seconds of adherence exceptions for this user
|
|
37
|
+
attr_accessor :exception_duration_secs
|
|
38
|
+
|
|
39
|
+
# The impact duration in seconds of current adherence state for this user
|
|
40
|
+
attr_accessor :impact_seconds
|
|
41
|
+
|
|
42
|
+
# Total duration in seconds for all scheduled activities
|
|
43
|
+
attr_accessor :schedule_length_secs
|
|
44
|
+
|
|
45
|
+
# Total duration in seconds for all actually worked activities
|
|
46
|
+
attr_accessor :actual_length_secs
|
|
47
|
+
|
|
48
|
+
# Total adherence percentage for this user, in the scale of 0 - 100
|
|
49
|
+
attr_accessor :adherence_percentage
|
|
50
|
+
|
|
51
|
+
# Total conformance percentage for this user, in the scale of 0 - 100. Conformance percentage can be greater than 100 when the actual on queue time is greater than the scheduled on queue time for the same period.
|
|
52
|
+
attr_accessor :conformance_percentage
|
|
53
|
+
|
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
|
+
def self.attribute_map
|
|
56
|
+
{
|
|
57
|
+
|
|
58
|
+
:'day_start_offset_secs' => :'dayStartOffsetSecs',
|
|
59
|
+
|
|
60
|
+
:'adherence_schedule_secs' => :'adherenceScheduleSecs',
|
|
61
|
+
|
|
62
|
+
:'conformance_schedule_secs' => :'conformanceScheduleSecs',
|
|
63
|
+
|
|
64
|
+
:'conformance_actual_secs' => :'conformanceActualSecs',
|
|
65
|
+
|
|
66
|
+
:'exception_count' => :'exceptionCount',
|
|
67
|
+
|
|
68
|
+
:'exception_duration_secs' => :'exceptionDurationSecs',
|
|
69
|
+
|
|
70
|
+
:'impact_seconds' => :'impactSeconds',
|
|
71
|
+
|
|
72
|
+
:'schedule_length_secs' => :'scheduleLengthSecs',
|
|
73
|
+
|
|
74
|
+
:'actual_length_secs' => :'actualLengthSecs',
|
|
75
|
+
|
|
76
|
+
:'adherence_percentage' => :'adherencePercentage',
|
|
77
|
+
|
|
78
|
+
:'conformance_percentage' => :'conformancePercentage'
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Attribute type mapping.
|
|
84
|
+
def self.swagger_types
|
|
85
|
+
{
|
|
86
|
+
|
|
87
|
+
:'day_start_offset_secs' => :'Integer',
|
|
88
|
+
|
|
89
|
+
:'adherence_schedule_secs' => :'Integer',
|
|
90
|
+
|
|
91
|
+
:'conformance_schedule_secs' => :'Integer',
|
|
92
|
+
|
|
93
|
+
:'conformance_actual_secs' => :'Integer',
|
|
94
|
+
|
|
95
|
+
:'exception_count' => :'Integer',
|
|
96
|
+
|
|
97
|
+
:'exception_duration_secs' => :'Integer',
|
|
98
|
+
|
|
99
|
+
:'impact_seconds' => :'Integer',
|
|
100
|
+
|
|
101
|
+
:'schedule_length_secs' => :'Integer',
|
|
102
|
+
|
|
103
|
+
:'actual_length_secs' => :'Integer',
|
|
104
|
+
|
|
105
|
+
:'adherence_percentage' => :'Float',
|
|
106
|
+
|
|
107
|
+
:'conformance_percentage' => :'Float'
|
|
108
|
+
|
|
109
|
+
}
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Initializes the object
|
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
114
|
+
def initialize(attributes = {})
|
|
115
|
+
return unless attributes.is_a?(Hash)
|
|
116
|
+
|
|
117
|
+
# convert string to symbol for hash key
|
|
118
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
if attributes.has_key?(:'dayStartOffsetSecs')
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
self.day_start_offset_secs = attributes[:'dayStartOffsetSecs']
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
if attributes.has_key?(:'adherenceScheduleSecs')
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
self.adherence_schedule_secs = attributes[:'adherenceScheduleSecs']
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
if attributes.has_key?(:'conformanceScheduleSecs')
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
self.conformance_schedule_secs = attributes[:'conformanceScheduleSecs']
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
if attributes.has_key?(:'conformanceActualSecs')
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
self.conformance_actual_secs = attributes[:'conformanceActualSecs']
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
if attributes.has_key?(:'exceptionCount')
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
self.exception_count = attributes[:'exceptionCount']
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
if attributes.has_key?(:'exceptionDurationSecs')
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
self.exception_duration_secs = attributes[:'exceptionDurationSecs']
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
if attributes.has_key?(:'impactSeconds')
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
self.impact_seconds = attributes[:'impactSeconds']
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
if attributes.has_key?(:'scheduleLengthSecs')
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
self.schedule_length_secs = attributes[:'scheduleLengthSecs']
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
if attributes.has_key?(:'actualLengthSecs')
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
self.actual_length_secs = attributes[:'actualLengthSecs']
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
if attributes.has_key?(:'adherencePercentage')
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
self.adherence_percentage = attributes[:'adherencePercentage']
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
if attributes.has_key?(:'conformancePercentage')
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
self.conformance_percentage = attributes[:'conformancePercentage']
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
223
|
+
# @return Array for valid properies with the reasons
|
|
224
|
+
def list_invalid_properties
|
|
225
|
+
invalid_properties = Array.new
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
return invalid_properties
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Check to see if the all the properties in the model are valid
|
|
232
|
+
# @return true if the model is valid
|
|
233
|
+
def valid?
|
|
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
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
end
|
|
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
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
# Checks equality by comparing each attribute.
|
|
338
|
+
# @param [Object] Object to be compared
|
|
339
|
+
def ==(o)
|
|
340
|
+
return true if self.equal?(o)
|
|
341
|
+
self.class == o.class &&
|
|
342
|
+
day_start_offset_secs == o.day_start_offset_secs &&
|
|
343
|
+
adherence_schedule_secs == o.adherence_schedule_secs &&
|
|
344
|
+
conformance_schedule_secs == o.conformance_schedule_secs &&
|
|
345
|
+
conformance_actual_secs == o.conformance_actual_secs &&
|
|
346
|
+
exception_count == o.exception_count &&
|
|
347
|
+
exception_duration_secs == o.exception_duration_secs &&
|
|
348
|
+
impact_seconds == o.impact_seconds &&
|
|
349
|
+
schedule_length_secs == o.schedule_length_secs &&
|
|
350
|
+
actual_length_secs == o.actual_length_secs &&
|
|
351
|
+
adherence_percentage == o.adherence_percentage &&
|
|
352
|
+
conformance_percentage == o.conformance_percentage
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# @see the `==` method
|
|
356
|
+
# @param [Object] Object to be compared
|
|
357
|
+
def eql?(o)
|
|
358
|
+
self == o
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# Calculates hash code according to all attributes.
|
|
362
|
+
# @return [Fixnum] Hash code
|
|
363
|
+
def hash
|
|
364
|
+
[day_start_offset_secs, adherence_schedule_secs, conformance_schedule_secs, conformance_actual_secs, exception_count, exception_duration_secs, impact_seconds, schedule_length_secs, actual_length_secs, adherence_percentage, conformance_percentage].hash
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
# build the object from hash
|
|
368
|
+
def build_from_hash(attributes)
|
|
369
|
+
return nil unless attributes.is_a?(Hash)
|
|
370
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
371
|
+
if type =~ /^Array<(.*)>/i
|
|
372
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
373
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
374
|
+
else
|
|
375
|
+
#TODO show warning in debug mode
|
|
376
|
+
end
|
|
377
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
378
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
379
|
+
else
|
|
380
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
self
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
def _deserialize(type, value)
|
|
388
|
+
case type.to_sym
|
|
389
|
+
when :DateTime
|
|
390
|
+
DateTime.parse(value)
|
|
391
|
+
when :Date
|
|
392
|
+
Date.parse(value)
|
|
393
|
+
when :String
|
|
394
|
+
value.to_s
|
|
395
|
+
when :Integer
|
|
396
|
+
value.to_i
|
|
397
|
+
when :Float
|
|
398
|
+
value.to_f
|
|
399
|
+
when :BOOLEAN
|
|
400
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
401
|
+
true
|
|
402
|
+
else
|
|
403
|
+
false
|
|
404
|
+
end
|
|
405
|
+
when :Object
|
|
406
|
+
# generic object (usually a Hash), return directly
|
|
407
|
+
value
|
|
408
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
409
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
410
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
411
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
412
|
+
k_type = Regexp.last_match[:k_type]
|
|
413
|
+
v_type = Regexp.last_match[:v_type]
|
|
414
|
+
{}.tap do |hash|
|
|
415
|
+
value.each do |k, v|
|
|
416
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
417
|
+
end
|
|
418
|
+
end
|
|
419
|
+
else # model
|
|
420
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
|
421
|
+
_model.build_from_hash(value)
|
|
422
|
+
end
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
def to_s
|
|
426
|
+
to_hash.to_s
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
# to_body is an alias to to_body (backward compatibility))
|
|
430
|
+
def to_body
|
|
431
|
+
to_hash
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# return the object in the form of hash
|
|
435
|
+
def to_hash
|
|
436
|
+
hash = {}
|
|
437
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
438
|
+
value = self.send(attr)
|
|
439
|
+
next if value.nil?
|
|
440
|
+
hash[param] = _to_hash(value)
|
|
441
|
+
end
|
|
442
|
+
hash
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
# Method to output non-array value in the form of hash
|
|
446
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
447
|
+
def _to_hash(value)
|
|
448
|
+
if value.is_a?(Array)
|
|
449
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
450
|
+
elsif value.is_a?(Hash)
|
|
451
|
+
{}.tap do |hash|
|
|
452
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
453
|
+
end
|
|
454
|
+
elsif value.respond_to? :to_hash
|
|
455
|
+
value.to_hash
|
|
456
|
+
else
|
|
457
|
+
value
|
|
458
|
+
end
|
|
459
|
+
end
|
|
460
|
+
|
|
461
|
+
end
|
|
462
|
+
end
|