purecloudplatformclientv2 2.0.40 → 3.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/AgentActivityEntityListing.md +1 -1
- data/docs/AttemptLimitsEntityListing.md +1 -1
- data/docs/AttributeEntityListing.md +1 -1
- data/docs/CalibrationEntityListing.md +1 -1
- data/docs/Call.md +1 -0
- data/docs/CallBasic.md +1 -0
- data/docs/CallConversationEntityListing.md +1 -1
- data/docs/CallableTimeSetEntityListing.md +1 -1
- data/docs/CallbackConversationEntityListing.md +1 -1
- data/docs/CampaignEntityListing.md +1 -1
- data/docs/CampaignRuleEntityListing.md +1 -1
- data/docs/CampaignSequenceEntityListing.md +1 -1
- data/docs/CertificateAuthorityEntityListing.md +1 -1
- data/docs/ChatConversationEntityListing.md +1 -1
- data/docs/CobrowseConversationEntityListing.md +1 -1
- data/docs/CommandStatusEntityListing.md +1 -1
- data/docs/ConsumedResourcesEntityListing.md +1 -1
- data/docs/ConsumingResourcesEntityListing.md +1 -1
- data/docs/ContactListEntityListing.md +1 -1
- data/docs/ContactListing.md +1 -1
- data/docs/ConversationEntityListing.md +1 -1
- data/docs/ConversationsApi.md +260 -260
- data/docs/DIDEntityListing.md +1 -1
- data/docs/DIDPoolEntityListing.md +1 -1
- data/docs/Dependency.md +1 -0
- data/docs/DependencyObject.md +1 -0
- data/docs/DependencyObjectEntityListing.md +1 -1
- data/docs/DependencyTypeEntityListing.md +1 -1
- data/docs/DncListEntityListing.md +1 -1
- data/docs/DocumentAuditEntityListing.md +1 -1
- data/docs/DocumentEntityListing.md +1 -1
- data/docs/DomainEdgeSoftwareVersionDtoEntityListing.md +1 -1
- data/docs/DomainEntityListing.md +1 -1
- data/docs/DomainEntityListingEvaluationForm.md +1 -1
- data/docs/DomainEntityListingQueryResult.md +1 -1
- data/docs/DomainOrganizationRole.md +1 -1
- data/docs/DomainOrganizationRoleCreate.md +1 -1
- data/docs/DomainOrganizationRoleUpdate.md +1 -1
- data/docs/EdgeEntityListing.md +1 -1
- data/docs/EdgeGroupEntityListing.md +1 -1
- data/docs/EdgeLineEntityListing.md +1 -1
- data/docs/EmailConversationEntityListing.md +1 -1
- data/docs/EmailMessageListing.md +1 -1
- data/docs/EncryptionKeyEntityListing.md +1 -1
- data/docs/EndpointEntityListing.md +1 -1
- data/docs/EvaluationEntityListing.md +1 -1
- data/docs/EvaluationFormEntityListing.md +1 -1
- data/docs/EvaluatorActivityEntityListing.md +1 -1
- data/docs/ExtensionEntityListing.md +1 -1
- data/docs/ExtensionPoolEntityListing.md +1 -1
- data/docs/ExternalOrganizationListing.md +1 -1
- data/docs/FaxDocumentEntityListing.md +1 -1
- data/docs/FlowEntityListing.md +1 -1
- data/docs/FlowVersionEntityListing.md +1 -1
- data/docs/GreetingListing.md +1 -1
- data/docs/GroupEntityListing.md +1 -1
- data/docs/HeartBeatAlertContainer.md +1 -1
- data/docs/HeartBeatRuleContainer.md +1 -1
- data/docs/InboundDomainEntityListing.md +1 -1
- data/docs/InboundRouteEntityListing.md +1 -1
- data/docs/InteractionStatsAlertContainer.md +1 -1
- data/docs/InteractionStatsRuleContainer.md +1 -1
- data/docs/IntradayDataGroup.md +19 -0
- data/docs/IntradayForecastData.md +15 -0
- data/docs/IntradayHistoricalAgentData.md +14 -0
- data/docs/IntradayHistoricalQueueData.md +20 -0
- data/docs/IntradayMetric.md +14 -0
- data/docs/IntradayPerformancePredictionAgentData.md +13 -0
- data/docs/IntradayPerformancePredictionQueueData.md +15 -0
- data/docs/IntradayQueryDataCommand.md +17 -0
- data/docs/IntradayQueue.md +15 -0
- data/docs/IntradayResponse.md +20 -0
- data/docs/IntradayScheduleData.md +14 -0
- data/docs/JsonNode.md +5 -5
- data/docs/KeywordSetEntityListing.md +1 -1
- data/docs/LanguageEntityListing.md +1 -1
- data/docs/LibraryEntityListing.md +1 -1
- data/docs/LicenseDefinition.md +1 -0
- data/docs/LicenseDefinitionListing.md +1 -1
- data/docs/LineBaseEntityListing.md +1 -1
- data/docs/LineEntityListing.md +1 -1
- data/docs/LogicalInterfaceEntityListing.md +1 -1
- data/docs/MediaTranscription.md +15 -0
- data/docs/NoteListing.md +1 -1
- data/docs/OAuthClientEntityListing.md +1 -1
- data/docs/OAuthProviderEntityListing.md +1 -1
- data/docs/OrganizationPresenceEntityListing.md +1 -1
- data/docs/OrganizationRoleEntityListing.md +1 -1
- data/docs/OrphanRecordingListing.md +1 -1
- data/docs/OutboundRouteBaseEntityListing.md +1 -1
- data/docs/OutboundRouteEntityListing.md +1 -1
- data/docs/PermissionCollectionEntityListing.md +1 -1
- data/docs/PhoneBaseEntityListing.md +1 -1
- data/docs/PhoneEntityListing.md +1 -1
- data/docs/PhoneMetaBaseEntityListing.md +1 -1
- data/docs/PhysicalInterfaceEntityListing.md +1 -1
- data/docs/PolicyActions.md +1 -0
- data/docs/PolicyEntityListing.md +1 -1
- data/docs/PromptAssetEntityListing.md +1 -1
- data/docs/PromptEntityListing.md +1 -1
- data/docs/QualityAuditPage.md +1 -1
- data/docs/QueueEntityListing.md +1 -1
- data/docs/QueueMemberEntityListing.md +1 -1
- data/docs/RelationshipListing.md +1 -1
- data/docs/ReportMetaDataEntityListing.md +1 -1
- data/docs/ReportRunEntryEntityDomainListing.md +1 -1
- data/docs/ReportScheduleEntityListing.md +1 -1
- data/docs/ResponseEntityList.md +1 -1
- data/docs/ResponseEntityListing.md +1 -1
- data/docs/ResponseSetEntityListing.md +1 -1
- data/docs/RoutingStatusAlertContainer.md +1 -1
- data/docs/RoutingStatusRuleContainer.md +1 -1
- data/docs/RuleSetEntityListing.md +1 -1
- data/docs/SchemaCategoryEntityListing.md +1 -1
- data/docs/SchemaReferenceEntityListing.md +1 -1
- data/docs/ScreenRecordingSessionListing.md +1 -1
- data/docs/ScriptEntityListing.md +1 -1
- data/docs/SecurityProfileEntityListing.md +1 -1
- data/docs/ShareEntityListing.md +1 -1
- data/docs/SiteEntityListing.md +1 -1
- data/docs/SkillEntityListing.md +1 -1
- data/docs/StationEntityListing.md +1 -1
- data/docs/SystemPromptAssetEntityListing.md +1 -1
- data/docs/SystemPromptEntityListing.md +1 -1
- data/docs/TagValueEntityListing.md +1 -1
- data/docs/TelephonyProvidersEdgeApi.md +60 -0
- data/docs/TimeZoneEntityListing.md +1 -1
- data/docs/TrunkBaseEntityListing.md +1 -1
- data/docs/TrunkEntityListing.md +1 -1
- data/docs/TrunkMetabaseEntityListing.md +1 -1
- data/docs/UserEntityListing.md +1 -1
- data/docs/UserPresenceAlertContainer.md +1 -1
- data/docs/UserPresenceRuleContainer.md +1 -1
- data/docs/UserQueueEntityListing.md +1 -1
- data/docs/UserRecordingEntityListing.md +1 -1
- data/docs/UserSkillEntityListing.md +1 -1
- data/docs/VoicemailMessageEntityListing.md +1 -1
- data/docs/WfmIntradayQueueListing.md +14 -0
- data/docs/WorkforceManagementApi.md +127 -0
- data/docs/WorkspaceEntityListing.md +1 -1
- data/docs/WorkspaceMemberEntityListing.md +1 -1
- data/docs/WrapupCodeEntityListing.md +1 -1
- data/lib/purecloudplatformclientv2.rb +13 -0
- data/lib/purecloudplatformclientv2/api/architect_api.rb +6 -6
- data/lib/purecloudplatformclientv2/api/conversations_api.rb +416 -416
- data/lib/purecloudplatformclientv2/api/telephony_providers_edge_api.rb +58 -0
- data/lib/purecloudplatformclientv2/api/workforce_management_api.rb +121 -0
- data/lib/purecloudplatformclientv2/models/agent_activity_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/attempt_limits_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/attribute_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/calibration_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/call.rb +14 -4
- data/lib/purecloudplatformclientv2/models/call_basic.rb +14 -4
- data/lib/purecloudplatformclientv2/models/call_conversation_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/callable_time_set_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/callback_conversation_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/campaign_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/campaign_rule_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/campaign_sequence_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/certificate_authority_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/chat_conversation_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/cobrowse_conversation_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/command_status_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/consumed_resources_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/consuming_resources_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/contact_list_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/contact_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/conversation_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/dependency.rb +12 -3
- data/lib/purecloudplatformclientv2/models/dependency_object.rb +12 -3
- data/lib/purecloudplatformclientv2/models/dependency_object_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/dependency_type_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/did_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/did_pool_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/dnc_list_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/document_audit_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/document_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/domain_edge_software_version_dto_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/domain_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/domain_entity_listing_evaluation_form.rb +10 -10
- data/lib/purecloudplatformclientv2/models/domain_entity_listing_query_result.rb +10 -10
- data/lib/purecloudplatformclientv2/models/domain_organization_role.rb +10 -10
- data/lib/purecloudplatformclientv2/models/domain_organization_role_create.rb +10 -10
- data/lib/purecloudplatformclientv2/models/domain_organization_role_update.rb +10 -10
- data/lib/purecloudplatformclientv2/models/edge_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/edge_group_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/edge_line_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/email_conversation_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/email_message_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/encryption_key_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/endpoint_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/evaluation_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/evaluation_form_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/evaluator_activity_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/extension_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/extension_pool_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/external_organization_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/fax_document_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/flow_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/flow_version_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/greeting_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/group_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/heart_beat_alert_container.rb +10 -10
- data/lib/purecloudplatformclientv2/models/heart_beat_rule_container.rb +10 -10
- data/lib/purecloudplatformclientv2/models/inbound_domain_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/inbound_route_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/interaction_stats_alert_container.rb +10 -10
- data/lib/purecloudplatformclientv2/models/interaction_stats_rule_container.rb +10 -10
- data/lib/purecloudplatformclientv2/models/intraday_data_group.rb +265 -0
- data/lib/purecloudplatformclientv2/models/intraday_forecast_data.rb +199 -0
- data/lib/purecloudplatformclientv2/models/intraday_historical_agent_data.rb +189 -0
- data/lib/purecloudplatformclientv2/models/intraday_historical_queue_data.rb +249 -0
- data/lib/purecloudplatformclientv2/models/intraday_metric.rb +203 -0
- data/lib/purecloudplatformclientv2/models/intraday_performance_prediction_agent_data.rb +179 -0
- data/lib/purecloudplatformclientv2/models/intraday_performance_prediction_queue_data.rb +199 -0
- data/lib/purecloudplatformclientv2/models/intraday_query_data_command.rb +235 -0
- data/lib/purecloudplatformclientv2/models/intraday_queue.rb +201 -0
- data/lib/purecloudplatformclientv2/models/intraday_response.rb +269 -0
- data/lib/purecloudplatformclientv2/models/intraday_schedule_data.rb +189 -0
- data/lib/purecloudplatformclientv2/models/json_node.rb +37 -37
- data/lib/purecloudplatformclientv2/models/keyword_set_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/language_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/library_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/license_definition.rb +12 -1
- data/lib/purecloudplatformclientv2/models/license_definition_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/line_base_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/line_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/logical_interface_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/media_transcription.rb +210 -0
- data/lib/purecloudplatformclientv2/models/note_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/o_auth_client_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/o_auth_provider_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/organization_presence_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/organization_role_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/orphan_recording_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/outbound_route_base_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/outbound_route_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/permission_collection_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/phone_base_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/phone_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/phone_meta_base_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/physical_interface_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/policy_actions.rb +15 -4
- data/lib/purecloudplatformclientv2/models/policy_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/prompt_asset_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/prompt_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/quality_audit_page.rb +10 -10
- data/lib/purecloudplatformclientv2/models/queue_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/queue_member_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/relationship_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/report_meta_data_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/report_run_entry_entity_domain_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/report_schedule_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/response_entity_list.rb +10 -10
- data/lib/purecloudplatformclientv2/models/response_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/response_set_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/routing_status_alert_container.rb +10 -10
- data/lib/purecloudplatformclientv2/models/routing_status_rule_container.rb +10 -10
- data/lib/purecloudplatformclientv2/models/rule_set_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/schema_category_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/schema_reference_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/screen_recording_session_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/script_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/security_profile_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/share_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/site_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/skill_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/station_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/system_prompt_asset_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/system_prompt_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/tag_value_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/time_zone_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/trunk_base_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/trunk_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/trunk_metabase_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/user_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/user_presence_alert_container.rb +10 -10
- data/lib/purecloudplatformclientv2/models/user_presence_rule_container.rb +10 -10
- data/lib/purecloudplatformclientv2/models/user_queue_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/user_recording_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/user_skill_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/voicemail_message_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/wfm_intraday_queue_listing.rb +204 -0
- data/lib/purecloudplatformclientv2/models/workspace_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/workspace_member_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/models/wrapup_code_entity_listing.rb +10 -10
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +28 -2
|
@@ -0,0 +1,179 @@
|
|
|
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@inin.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
|
|
10
|
+
License: ININ
|
|
11
|
+
http://www.inin.com
|
|
12
|
+
|
|
13
|
+
Terms of Service: https://developer.mypurecloud.com/tos
|
|
14
|
+
|
|
15
|
+
=end
|
|
16
|
+
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
module PureCloud
|
|
20
|
+
class IntradayPerformancePredictionAgentData
|
|
21
|
+
# The total time spent interacting in seconds for all agents in this group
|
|
22
|
+
attr_accessor :interacting_time_seconds
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'interacting_time_seconds' => :'interactingTimeSeconds'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Attribute type mapping.
|
|
32
|
+
def self.swagger_types
|
|
33
|
+
{
|
|
34
|
+
:'interacting_time_seconds' => :'Float'
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Initializes the object
|
|
39
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
40
|
+
def initialize(attributes = {})
|
|
41
|
+
return unless attributes.is_a?(Hash)
|
|
42
|
+
|
|
43
|
+
# convert string to symbol for hash key
|
|
44
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
45
|
+
|
|
46
|
+
if attributes.has_key?(:'interactingTimeSeconds')
|
|
47
|
+
self.interacting_time_seconds = attributes[:'interactingTimeSeconds']
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
53
|
+
# @return Array for valid properies with the reasons
|
|
54
|
+
def list_invalid_properties
|
|
55
|
+
invalid_properties = Array.new
|
|
56
|
+
return invalid_properties
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Check to see if the all the properties in the model are valid
|
|
60
|
+
# @return true if the model is valid
|
|
61
|
+
def valid?
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Checks equality by comparing each attribute.
|
|
65
|
+
# @param [Object] Object to be compared
|
|
66
|
+
def ==(o)
|
|
67
|
+
return true if self.equal?(o)
|
|
68
|
+
self.class == o.class &&
|
|
69
|
+
interacting_time_seconds == o.interacting_time_seconds
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# @see the `==` method
|
|
73
|
+
# @param [Object] Object to be compared
|
|
74
|
+
def eql?(o)
|
|
75
|
+
self == o
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Calculates hash code according to all attributes.
|
|
79
|
+
# @return [Fixnum] Hash code
|
|
80
|
+
def hash
|
|
81
|
+
[interacting_time_seconds].hash
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# build the object from hash
|
|
85
|
+
def build_from_hash(attributes)
|
|
86
|
+
return nil unless attributes.is_a?(Hash)
|
|
87
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
88
|
+
if type =~ /^Array<(.*)>/i
|
|
89
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
90
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
91
|
+
else
|
|
92
|
+
#TODO show warning in debug mode
|
|
93
|
+
end
|
|
94
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
95
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
96
|
+
else
|
|
97
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
self
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def _deserialize(type, value)
|
|
105
|
+
case type.to_sym
|
|
106
|
+
when :DateTime
|
|
107
|
+
DateTime.parse(value)
|
|
108
|
+
when :Date
|
|
109
|
+
Date.parse(value)
|
|
110
|
+
when :String
|
|
111
|
+
value.to_s
|
|
112
|
+
when :Integer
|
|
113
|
+
value.to_i
|
|
114
|
+
when :Float
|
|
115
|
+
value.to_f
|
|
116
|
+
when :BOOLEAN
|
|
117
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
118
|
+
true
|
|
119
|
+
else
|
|
120
|
+
false
|
|
121
|
+
end
|
|
122
|
+
when :Object
|
|
123
|
+
# generic object (usually a Hash), return directly
|
|
124
|
+
value
|
|
125
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
126
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
127
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
128
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
129
|
+
k_type = Regexp.last_match[:k_type]
|
|
130
|
+
v_type = Regexp.last_match[:v_type]
|
|
131
|
+
{}.tap do |hash|
|
|
132
|
+
value.each do |k, v|
|
|
133
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
else # model
|
|
137
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
|
138
|
+
_model.build_from_hash(value)
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
def to_s
|
|
143
|
+
to_hash.to_s
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# to_body is an alias to to_body (backward compatibility))
|
|
147
|
+
def to_body
|
|
148
|
+
to_hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# return the object in the form of hash
|
|
152
|
+
def to_hash
|
|
153
|
+
hash = {}
|
|
154
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
155
|
+
value = self.send(attr)
|
|
156
|
+
next if value.nil?
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Method to output non-array value in the form of hash
|
|
163
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
164
|
+
def _to_hash(value)
|
|
165
|
+
if value.is_a?(Array)
|
|
166
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
167
|
+
elsif value.is_a?(Hash)
|
|
168
|
+
{}.tap do |hash|
|
|
169
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
170
|
+
end
|
|
171
|
+
elsif value.respond_to? :to_hash
|
|
172
|
+
value.to_hash
|
|
173
|
+
else
|
|
174
|
+
value
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
end
|
|
179
|
+
end
|
|
@@ -0,0 +1,199 @@
|
|
|
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@inin.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
|
|
10
|
+
License: ININ
|
|
11
|
+
http://www.inin.com
|
|
12
|
+
|
|
13
|
+
Terms of Service: https://developer.mypurecloud.com/tos
|
|
14
|
+
|
|
15
|
+
=end
|
|
16
|
+
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
module PureCloud
|
|
20
|
+
class IntradayPerformancePredictionQueueData
|
|
21
|
+
# Predicted percent of interactions answered in X seconds, where X is the service level objective configured in the service goal group matching this intraday group
|
|
22
|
+
attr_accessor :service_level_percent
|
|
23
|
+
|
|
24
|
+
# Predicted average time in seconds it takes to answer an interaction once the interaction becomes available to be routed
|
|
25
|
+
attr_accessor :average_speed_of_answer_seconds
|
|
26
|
+
|
|
27
|
+
# Predicted number of interactions
|
|
28
|
+
attr_accessor :number_of_interactions
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'service_level_percent' => :'serviceLevelPercent',
|
|
34
|
+
:'average_speed_of_answer_seconds' => :'averageSpeedOfAnswerSeconds',
|
|
35
|
+
:'number_of_interactions' => :'numberOfInteractions'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
def self.swagger_types
|
|
41
|
+
{
|
|
42
|
+
:'service_level_percent' => :'Float',
|
|
43
|
+
:'average_speed_of_answer_seconds' => :'Float',
|
|
44
|
+
:'number_of_interactions' => :'Float'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Initializes the object
|
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
50
|
+
def initialize(attributes = {})
|
|
51
|
+
return unless attributes.is_a?(Hash)
|
|
52
|
+
|
|
53
|
+
# convert string to symbol for hash key
|
|
54
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
55
|
+
|
|
56
|
+
if attributes.has_key?(:'serviceLevelPercent')
|
|
57
|
+
self.service_level_percent = attributes[:'serviceLevelPercent']
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
if attributes.has_key?(:'averageSpeedOfAnswerSeconds')
|
|
61
|
+
self.average_speed_of_answer_seconds = attributes[:'averageSpeedOfAnswerSeconds']
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
if attributes.has_key?(:'numberOfInteractions')
|
|
65
|
+
self.number_of_interactions = attributes[:'numberOfInteractions']
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
71
|
+
# @return Array for valid properies with the reasons
|
|
72
|
+
def list_invalid_properties
|
|
73
|
+
invalid_properties = Array.new
|
|
74
|
+
return invalid_properties
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Check to see if the all the properties in the model are valid
|
|
78
|
+
# @return true if the model is valid
|
|
79
|
+
def valid?
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Checks equality by comparing each attribute.
|
|
83
|
+
# @param [Object] Object to be compared
|
|
84
|
+
def ==(o)
|
|
85
|
+
return true if self.equal?(o)
|
|
86
|
+
self.class == o.class &&
|
|
87
|
+
service_level_percent == o.service_level_percent &&
|
|
88
|
+
average_speed_of_answer_seconds == o.average_speed_of_answer_seconds &&
|
|
89
|
+
number_of_interactions == o.number_of_interactions
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# @see the `==` method
|
|
93
|
+
# @param [Object] Object to be compared
|
|
94
|
+
def eql?(o)
|
|
95
|
+
self == o
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Calculates hash code according to all attributes.
|
|
99
|
+
# @return [Fixnum] Hash code
|
|
100
|
+
def hash
|
|
101
|
+
[service_level_percent, average_speed_of_answer_seconds, number_of_interactions].hash
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# build the object from hash
|
|
105
|
+
def build_from_hash(attributes)
|
|
106
|
+
return nil unless attributes.is_a?(Hash)
|
|
107
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
108
|
+
if type =~ /^Array<(.*)>/i
|
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
111
|
+
else
|
|
112
|
+
#TODO show warning in debug mode
|
|
113
|
+
end
|
|
114
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
115
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
116
|
+
else
|
|
117
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
self
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
def _deserialize(type, value)
|
|
125
|
+
case type.to_sym
|
|
126
|
+
when :DateTime
|
|
127
|
+
DateTime.parse(value)
|
|
128
|
+
when :Date
|
|
129
|
+
Date.parse(value)
|
|
130
|
+
when :String
|
|
131
|
+
value.to_s
|
|
132
|
+
when :Integer
|
|
133
|
+
value.to_i
|
|
134
|
+
when :Float
|
|
135
|
+
value.to_f
|
|
136
|
+
when :BOOLEAN
|
|
137
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
138
|
+
true
|
|
139
|
+
else
|
|
140
|
+
false
|
|
141
|
+
end
|
|
142
|
+
when :Object
|
|
143
|
+
# generic object (usually a Hash), return directly
|
|
144
|
+
value
|
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
148
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
|
151
|
+
{}.tap do |hash|
|
|
152
|
+
value.each do |k, v|
|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
else # model
|
|
157
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
|
158
|
+
_model.build_from_hash(value)
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def to_s
|
|
163
|
+
to_hash.to_s
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# to_body is an alias to to_body (backward compatibility))
|
|
167
|
+
def to_body
|
|
168
|
+
to_hash
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# return the object in the form of hash
|
|
172
|
+
def to_hash
|
|
173
|
+
hash = {}
|
|
174
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
175
|
+
value = self.send(attr)
|
|
176
|
+
next if value.nil?
|
|
177
|
+
hash[param] = _to_hash(value)
|
|
178
|
+
end
|
|
179
|
+
hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Method to output non-array value in the form of hash
|
|
183
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
184
|
+
def _to_hash(value)
|
|
185
|
+
if value.is_a?(Array)
|
|
186
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
187
|
+
elsif value.is_a?(Hash)
|
|
188
|
+
{}.tap do |hash|
|
|
189
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
190
|
+
end
|
|
191
|
+
elsif value.respond_to? :to_hash
|
|
192
|
+
value.to_hash
|
|
193
|
+
else
|
|
194
|
+
value
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
end
|
|
199
|
+
end
|
|
@@ -0,0 +1,235 @@
|
|
|
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@inin.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
|
|
10
|
+
License: ININ
|
|
11
|
+
http://www.inin.com
|
|
12
|
+
|
|
13
|
+
Terms of Service: https://developer.mypurecloud.com/tos
|
|
14
|
+
|
|
15
|
+
=end
|
|
16
|
+
|
|
17
|
+
require 'date'
|
|
18
|
+
|
|
19
|
+
module PureCloud
|
|
20
|
+
class IntradayQueryDataCommand
|
|
21
|
+
# Start date of the requested date range in ISO-8601 format
|
|
22
|
+
attr_accessor :start_date
|
|
23
|
+
|
|
24
|
+
# End date of the requested date range in ISO-8601 format. Must be within the same 7 day schedule week as defined by the management unit's start day of week
|
|
25
|
+
attr_accessor :end_date
|
|
26
|
+
|
|
27
|
+
# The metrics to validate
|
|
28
|
+
attr_accessor :metrics
|
|
29
|
+
|
|
30
|
+
# The queue IDs for which to fetch data. Omitting or passing an empty list will return all available queues
|
|
31
|
+
attr_accessor :queue_ids
|
|
32
|
+
|
|
33
|
+
# The period/interval for which to aggregate the data. Optional, defaults to 15
|
|
34
|
+
attr_accessor :interval_length_minutes
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'start_date' => :'startDate',
|
|
40
|
+
:'end_date' => :'endDate',
|
|
41
|
+
:'metrics' => :'metrics',
|
|
42
|
+
:'queue_ids' => :'queueIds',
|
|
43
|
+
:'interval_length_minutes' => :'intervalLengthMinutes'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Attribute type mapping.
|
|
48
|
+
def self.swagger_types
|
|
49
|
+
{
|
|
50
|
+
:'start_date' => :'DateTime',
|
|
51
|
+
:'end_date' => :'DateTime',
|
|
52
|
+
:'metrics' => :'Array<IntradayMetric>',
|
|
53
|
+
:'queue_ids' => :'Array<String>',
|
|
54
|
+
:'interval_length_minutes' => :'Integer'
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Initializes the object
|
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
60
|
+
def initialize(attributes = {})
|
|
61
|
+
return unless attributes.is_a?(Hash)
|
|
62
|
+
|
|
63
|
+
# convert string to symbol for hash key
|
|
64
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
65
|
+
|
|
66
|
+
if attributes.has_key?(:'startDate')
|
|
67
|
+
self.start_date = attributes[:'startDate']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.has_key?(:'endDate')
|
|
71
|
+
self.end_date = attributes[:'endDate']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.has_key?(:'metrics')
|
|
75
|
+
if (value = attributes[:'metrics']).is_a?(Array)
|
|
76
|
+
self.metrics = value
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.has_key?(:'queueIds')
|
|
81
|
+
if (value = attributes[:'queueIds']).is_a?(Array)
|
|
82
|
+
self.queue_ids = value
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.has_key?(:'intervalLengthMinutes')
|
|
87
|
+
self.interval_length_minutes = attributes[:'intervalLengthMinutes']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
93
|
+
# @return Array for valid properies with the reasons
|
|
94
|
+
def list_invalid_properties
|
|
95
|
+
invalid_properties = Array.new
|
|
96
|
+
return invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
if @start_date.nil?
|
|
103
|
+
return false
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if @end_date.nil?
|
|
107
|
+
return false
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if @metrics.nil?
|
|
111
|
+
return false
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Checks equality by comparing each attribute.
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def ==(o)
|
|
119
|
+
return true if self.equal?(o)
|
|
120
|
+
self.class == o.class &&
|
|
121
|
+
start_date == o.start_date &&
|
|
122
|
+
end_date == o.end_date &&
|
|
123
|
+
metrics == o.metrics &&
|
|
124
|
+
queue_ids == o.queue_ids &&
|
|
125
|
+
interval_length_minutes == o.interval_length_minutes
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# @see the `==` method
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def eql?(o)
|
|
131
|
+
self == o
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Calculates hash code according to all attributes.
|
|
135
|
+
# @return [Fixnum] Hash code
|
|
136
|
+
def hash
|
|
137
|
+
[start_date, end_date, metrics, queue_ids, interval_length_minutes].hash
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# build the object from hash
|
|
141
|
+
def build_from_hash(attributes)
|
|
142
|
+
return nil unless attributes.is_a?(Hash)
|
|
143
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
144
|
+
if type =~ /^Array<(.*)>/i
|
|
145
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
146
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
147
|
+
else
|
|
148
|
+
#TODO show warning in debug mode
|
|
149
|
+
end
|
|
150
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
151
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
152
|
+
else
|
|
153
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
self
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
def _deserialize(type, value)
|
|
161
|
+
case type.to_sym
|
|
162
|
+
when :DateTime
|
|
163
|
+
DateTime.parse(value)
|
|
164
|
+
when :Date
|
|
165
|
+
Date.parse(value)
|
|
166
|
+
when :String
|
|
167
|
+
value.to_s
|
|
168
|
+
when :Integer
|
|
169
|
+
value.to_i
|
|
170
|
+
when :Float
|
|
171
|
+
value.to_f
|
|
172
|
+
when :BOOLEAN
|
|
173
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
|
174
|
+
true
|
|
175
|
+
else
|
|
176
|
+
false
|
|
177
|
+
end
|
|
178
|
+
when :Object
|
|
179
|
+
# generic object (usually a Hash), return directly
|
|
180
|
+
value
|
|
181
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
182
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
183
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
184
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
|
185
|
+
k_type = Regexp.last_match[:k_type]
|
|
186
|
+
v_type = Regexp.last_match[:v_type]
|
|
187
|
+
{}.tap do |hash|
|
|
188
|
+
value.each do |k, v|
|
|
189
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
else # model
|
|
193
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
|
194
|
+
_model.build_from_hash(value)
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
def to_s
|
|
199
|
+
to_hash.to_s
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# to_body is an alias to to_body (backward compatibility))
|
|
203
|
+
def to_body
|
|
204
|
+
to_hash
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# return the object in the form of hash
|
|
208
|
+
def to_hash
|
|
209
|
+
hash = {}
|
|
210
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
211
|
+
value = self.send(attr)
|
|
212
|
+
next if value.nil?
|
|
213
|
+
hash[param] = _to_hash(value)
|
|
214
|
+
end
|
|
215
|
+
hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Method to output non-array value in the form of hash
|
|
219
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
220
|
+
def _to_hash(value)
|
|
221
|
+
if value.is_a?(Array)
|
|
222
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
223
|
+
elsif value.is_a?(Hash)
|
|
224
|
+
{}.tap do |hash|
|
|
225
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
226
|
+
end
|
|
227
|
+
elsif value.respond_to? :to_hash
|
|
228
|
+
value.to_hash
|
|
229
|
+
else
|
|
230
|
+
value
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
end
|
|
235
|
+
end
|