purecloudplatformclientv2 19.0.0 → 20.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/docs/ActionEntityListing.md +1 -1
- data/docs/AgentActivityEntityListing.md +1 -1
- data/docs/AnalyticsSession.md +3 -0
- data/docs/ArchitectApi.md +272 -2
- data/docs/AttemptLimitsEntityListing.md +1 -1
- data/docs/AttributeEntityListing.md +1 -1
- data/docs/CalibrationEntityListing.md +1 -1
- data/docs/CallConversationEntityListing.md +1 -1
- data/docs/CallHistoryConversationEntityListing.md +1 -1
- data/docs/CallHistoryParticipant.md +2 -0
- 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/ContactListFilterEntityListing.md +1 -1
- data/docs/ContactListing.md +1 -1
- data/docs/ConversationEntityListing.md +1 -1
- data/docs/ConversationNotificationEmail.md +1 -0
- data/docs/ConversationNotificationEmails.md +1 -0
- data/docs/ConversationNotificationMessage.md +27 -0
- data/docs/ConversationNotificationMessageDetails.md +14 -0
- data/docs/ConversationNotificationMessages.md +14 -0
- data/docs/ConversationNotificationMessages1.md +27 -0
- data/docs/ConversationNotificationParticipant.md +1 -0
- data/docs/ConversationNotificationParticipants.md +1 -0
- data/docs/DIDEntityListing.md +1 -1
- data/docs/DIDPoolEntityListing.md +1 -1
- data/docs/DependencyObjectEntityListing.md +1 -1
- data/docs/DependencyTypeEntityListing.md +1 -1
- data/docs/DialerEventEntityListing.md +1 -1
- data/docs/DirectoryUserDevicesListing.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/IVREntityListing.md +1 -1
- data/docs/InboundDomainEntityListing.md +1 -1
- data/docs/InboundRouteEntityListing.md +1 -1
- data/docs/IntegrationsApi.md +4 -0
- data/docs/InteractionStatsAlertContainer.md +1 -1
- data/docs/InteractionStatsRuleContainer.md +1 -1
- data/docs/JsonNode.md +2 -2
- data/docs/KeywordSetEntityListing.md +1 -1
- data/docs/LanguageEntityListing.md +1 -1
- data/docs/LibraryEntityListing.md +1 -1
- data/docs/LineBaseEntityListing.md +1 -1
- data/docs/LineEntityListing.md +1 -1
- data/docs/LocationEntityListing.md +1 -1
- data/docs/LogicalInterfaceEntityListing.md +1 -1
- data/docs/ManagementUnitListing.md +1 -1
- data/docs/Message.md +29 -0
- data/docs/MessageConversationNotification.md +16 -0
- data/docs/MessageConversationNotificationDetail.md +16 -0
- data/docs/MessageConversationNotificationErrorBody.md +22 -0
- data/docs/MessageConversationNotificationErrorInfo.md +22 -0
- data/docs/MessageConversationNotificationMessageDetails.md +14 -0
- data/docs/MessageConversationNotificationMessageMediaParticipant.md +40 -0
- data/docs/MessageConversationNotificationMessages.md +14 -0
- data/docs/MessageConversationNotificationParticipants.md +40 -0
- data/docs/MessageConversationNotificationUriReference.md +14 -0
- data/docs/MessageConversationNotificationWrapup.md +18 -0
- data/docs/MessageDetails.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/Participant.md +1 -0
- data/docs/ParticipantBasic.md +1 -0
- 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/PolicyEntityListing.md +1 -1
- data/docs/PromptAssetEntityListing.md +1 -1
- data/docs/PromptEntityListing.md +1 -1
- data/docs/QualityApi.md +2 -2
- 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/RuleSetEntityListing.md +1 -1
- data/docs/ScheduleEntityListing.md +1 -1
- data/docs/ScheduleGroupEntityListing.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/ScriptsApi.md +46 -15
- 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 +10 -10
- 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/TrustEntityListing.md +1 -1
- data/docs/TrustUserEntityListing.md +1 -1
- data/docs/TrustorEntityListing.md +1 -1
- data/docs/UserEntityListing.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/WorkspaceEntityListing.md +1 -1
- data/docs/WorkspaceMemberEntityListing.md +1 -1
- data/docs/WrapupCodeEntityListing.md +1 -1
- data/lib/purecloudplatformclientv2.rb +16 -0
- data/lib/purecloudplatformclientv2/api/architect_api.rb +380 -2
- data/lib/purecloudplatformclientv2/api/integrations_api.rb +26 -0
- data/lib/purecloudplatformclientv2/api/quality_api.rb +2 -2
- data/lib/purecloudplatformclientv2/api/scripts_api.rb +95 -4
- data/lib/purecloudplatformclientv2/api/telephony_providers_edge_api.rb +15 -15
- data/lib/purecloudplatformclientv2/api_client.rb +1 -1
- data/lib/purecloudplatformclientv2/models/action_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/agent_activity_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/aggregate_metric_data.rb +2 -2
- data/lib/purecloudplatformclientv2/models/analytics_conversation_segment.rb +2 -2
- data/lib/purecloudplatformclientv2/models/analytics_participant.rb +2 -2
- data/lib/purecloudplatformclientv2/models/analytics_query_predicate.rb +4 -4
- data/lib/purecloudplatformclientv2/models/analytics_session.rb +79 -3
- data/lib/purecloudplatformclientv2/models/attempt_limits_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/attribute_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/calibration_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/call_conversation_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/call_history_conversation_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/call_history_participant.rb +58 -4
- data/lib/purecloudplatformclientv2/models/callable_time_set_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/callback_conversation_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/campaign_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/campaign_rule_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/campaign_sequence_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/certificate_authority_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/chat_conversation_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/cobrowse_conversation_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/command_status_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/consumed_resources_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/consuming_resources_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/contact_list_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/contact_list_filter_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/contact_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/conversation_association.rb +2 -2
- data/lib/purecloudplatformclientv2/models/conversation_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/conversation_notification_email.rb +40 -1
- data/lib/purecloudplatformclientv2/models/conversation_notification_emails.rb +40 -1
- data/lib/purecloudplatformclientv2/models/conversation_notification_message.rb +581 -0
- data/lib/purecloudplatformclientv2/models/conversation_notification_message_details.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_notification_messages.rb +226 -0
- data/lib/purecloudplatformclientv2/models/conversation_notification_messages_1.rb +581 -0
- data/lib/purecloudplatformclientv2/models/conversation_notification_participant.rb +30 -3
- data/lib/purecloudplatformclientv2/models/conversation_notification_participants.rb +30 -3
- data/lib/purecloudplatformclientv2/models/dependency_object_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/dependency_type_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/dialer_event_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/did_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/did_pool_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/directory_user_devices_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/dnc_list_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/document_audit_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/document_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/domain_edge_software_version_dto_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/domain_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/domain_entity_listing_evaluation_form.rb +14 -14
- data/lib/purecloudplatformclientv2/models/domain_entity_listing_query_result.rb +14 -14
- data/lib/purecloudplatformclientv2/models/domain_organization_role.rb +12 -12
- data/lib/purecloudplatformclientv2/models/domain_organization_role_create.rb +12 -12
- data/lib/purecloudplatformclientv2/models/domain_organization_role_update.rb +12 -12
- data/lib/purecloudplatformclientv2/models/edge_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/edge_group_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/edge_line_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/email_conversation_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/email_message_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/encryption_key_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/endpoint_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/evaluation_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/evaluation_form_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/evaluator_activity_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/extension_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/extension_pool_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/external_organization_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/fax_document_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/flow_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/flow_version_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/greeting_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/group_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/inbound_domain_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/inbound_route_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/interaction_stats_alert_container.rb +14 -14
- data/lib/purecloudplatformclientv2/models/interaction_stats_rule_container.rb +14 -14
- data/lib/purecloudplatformclientv2/models/ivr_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/json_node.rb +50 -50
- data/lib/purecloudplatformclientv2/models/keyword_set_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/language_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/library_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/line_base_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/line_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/location_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/logical_interface_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/management_unit_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/message.rb +663 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification.rb +280 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_detail.rb +276 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_error_body.rb +432 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_error_info.rb +432 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_message_details.rb +226 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_message_media_participant.rb +922 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_messages.rb +226 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_participants.rb +922 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_uri_reference.rb +226 -0
- data/lib/purecloudplatformclientv2/models/message_conversation_notification_wrapup.rb +328 -0
- data/lib/purecloudplatformclientv2/models/message_details.rb +254 -0
- data/lib/purecloudplatformclientv2/models/note_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/o_auth_client_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/o_auth_provider_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/organization_presence_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/organization_role_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/orphan_recording_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/outbound_route_base_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/outbound_route_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/participant.rb +28 -1
- data/lib/purecloudplatformclientv2/models/participant_basic.rb +28 -1
- data/lib/purecloudplatformclientv2/models/permission_collection_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/phone_base_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/phone_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/phone_meta_base_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/physical_interface_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/policy_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/prompt_asset_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/prompt_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/quality_audit_page.rb +14 -14
- data/lib/purecloudplatformclientv2/models/queue_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/queue_member_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/relationship_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/report_meta_data_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/report_run_entry_entity_domain_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/report_schedule_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/response_entity_list.rb +14 -14
- data/lib/purecloudplatformclientv2/models/response_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/response_set_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/rule_set_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/schedule_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/schedule_group_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/schema_category_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/schema_reference_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/screen_recording_session_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/script_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/security_profile_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/share_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/site_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/skill_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/station_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/system_prompt_asset_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/system_prompt_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/tag_value_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/time_zone_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/trunk_base_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/trunk_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/trunk_metabase_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/trust_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/trust_user_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/trustor_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/user_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/user_queue_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/user_recording_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/user_skill_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/voicemail_message_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/workspace_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/workspace_member_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/models/wrapup_code_entity_listing.rb +14 -14
- data/lib/purecloudplatformclientv2/version.rb +1 -1
- metadata +34 -2
@@ -0,0 +1,432 @@
|
|
1
|
+
=begin
|
2
|
+
PureCloud Platform API
|
3
|
+
|
4
|
+
With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: DeveloperEvangelists@genesys.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
License: ININ
|
11
|
+
http://www.inin.com
|
12
|
+
|
13
|
+
Terms of Service: https://developer.mypurecloud.com/tos
|
14
|
+
|
15
|
+
=end
|
16
|
+
|
17
|
+
require 'date'
|
18
|
+
|
19
|
+
module PureCloud
|
20
|
+
class MessageConversationNotificationErrorBody
|
21
|
+
attr_accessor :status
|
22
|
+
|
23
|
+
attr_accessor :code
|
24
|
+
|
25
|
+
attr_accessor :entity_id
|
26
|
+
|
27
|
+
attr_accessor :entity_name
|
28
|
+
|
29
|
+
attr_accessor :message
|
30
|
+
|
31
|
+
attr_accessor :message_with_params
|
32
|
+
|
33
|
+
attr_accessor :message_params
|
34
|
+
|
35
|
+
attr_accessor :context_id
|
36
|
+
|
37
|
+
attr_accessor :details
|
38
|
+
|
39
|
+
attr_accessor :errors
|
40
|
+
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
def self.attribute_map
|
43
|
+
{
|
44
|
+
|
45
|
+
:'status' => :'status',
|
46
|
+
|
47
|
+
:'code' => :'code',
|
48
|
+
|
49
|
+
:'entity_id' => :'entityId',
|
50
|
+
|
51
|
+
:'entity_name' => :'entityName',
|
52
|
+
|
53
|
+
:'message' => :'message',
|
54
|
+
|
55
|
+
:'message_with_params' => :'messageWithParams',
|
56
|
+
|
57
|
+
:'message_params' => :'messageParams',
|
58
|
+
|
59
|
+
:'context_id' => :'contextId',
|
60
|
+
|
61
|
+
:'details' => :'details',
|
62
|
+
|
63
|
+
:'errors' => :'errors'
|
64
|
+
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.swagger_types
|
70
|
+
{
|
71
|
+
|
72
|
+
:'status' => :'Integer',
|
73
|
+
|
74
|
+
:'code' => :'String',
|
75
|
+
|
76
|
+
:'entity_id' => :'String',
|
77
|
+
|
78
|
+
:'entity_name' => :'String',
|
79
|
+
|
80
|
+
:'message' => :'String',
|
81
|
+
|
82
|
+
:'message_with_params' => :'String',
|
83
|
+
|
84
|
+
:'message_params' => :'Hash<String, String>',
|
85
|
+
|
86
|
+
:'context_id' => :'String',
|
87
|
+
|
88
|
+
:'details' => :'Array<CallbackConversationNotificationErrorInfoDetails>',
|
89
|
+
|
90
|
+
:'errors' => :'Array<MessageConversationNotificationErrorBody>'
|
91
|
+
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
# Initializes the object
|
96
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
97
|
+
def initialize(attributes = {})
|
98
|
+
return unless attributes.is_a?(Hash)
|
99
|
+
|
100
|
+
# convert string to symbol for hash key
|
101
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
102
|
+
|
103
|
+
|
104
|
+
if attributes.has_key?(:'status')
|
105
|
+
|
106
|
+
|
107
|
+
self.status = attributes[:'status']
|
108
|
+
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
if attributes.has_key?(:'code')
|
114
|
+
|
115
|
+
|
116
|
+
self.code = attributes[:'code']
|
117
|
+
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
if attributes.has_key?(:'entityId')
|
123
|
+
|
124
|
+
|
125
|
+
self.entity_id = attributes[:'entityId']
|
126
|
+
|
127
|
+
|
128
|
+
end
|
129
|
+
|
130
|
+
|
131
|
+
if attributes.has_key?(:'entityName')
|
132
|
+
|
133
|
+
|
134
|
+
self.entity_name = attributes[:'entityName']
|
135
|
+
|
136
|
+
|
137
|
+
end
|
138
|
+
|
139
|
+
|
140
|
+
if attributes.has_key?(:'message')
|
141
|
+
|
142
|
+
|
143
|
+
self.message = attributes[:'message']
|
144
|
+
|
145
|
+
|
146
|
+
end
|
147
|
+
|
148
|
+
|
149
|
+
if attributes.has_key?(:'messageWithParams')
|
150
|
+
|
151
|
+
|
152
|
+
self.message_with_params = attributes[:'messageWithParams']
|
153
|
+
|
154
|
+
|
155
|
+
end
|
156
|
+
|
157
|
+
|
158
|
+
if attributes.has_key?(:'messageParams')
|
159
|
+
|
160
|
+
if (value = attributes[:'messageParams']).is_a?(Array)
|
161
|
+
self.message_params = value
|
162
|
+
end
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
end
|
167
|
+
|
168
|
+
|
169
|
+
if attributes.has_key?(:'contextId')
|
170
|
+
|
171
|
+
|
172
|
+
self.context_id = attributes[:'contextId']
|
173
|
+
|
174
|
+
|
175
|
+
end
|
176
|
+
|
177
|
+
|
178
|
+
if attributes.has_key?(:'details')
|
179
|
+
|
180
|
+
if (value = attributes[:'details']).is_a?(Array)
|
181
|
+
self.details = value
|
182
|
+
end
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
end
|
187
|
+
|
188
|
+
|
189
|
+
if attributes.has_key?(:'errors')
|
190
|
+
|
191
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
192
|
+
self.errors = value
|
193
|
+
end
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
end
|
198
|
+
|
199
|
+
|
200
|
+
end
|
201
|
+
|
202
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
203
|
+
# @return Array for valid properies with the reasons
|
204
|
+
def list_invalid_properties
|
205
|
+
invalid_properties = Array.new
|
206
|
+
|
207
|
+
|
208
|
+
return invalid_properties
|
209
|
+
end
|
210
|
+
|
211
|
+
# Check to see if the all the properties in the model are valid
|
212
|
+
# @return true if the model is valid
|
213
|
+
def valid?
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
end
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
# Checks equality by comparing each attribute.
|
309
|
+
# @param [Object] Object to be compared
|
310
|
+
def ==(o)
|
311
|
+
return true if self.equal?(o)
|
312
|
+
self.class == o.class &&
|
313
|
+
status == o.status &&
|
314
|
+
code == o.code &&
|
315
|
+
entity_id == o.entity_id &&
|
316
|
+
entity_name == o.entity_name &&
|
317
|
+
message == o.message &&
|
318
|
+
message_with_params == o.message_with_params &&
|
319
|
+
message_params == o.message_params &&
|
320
|
+
context_id == o.context_id &&
|
321
|
+
details == o.details &&
|
322
|
+
errors == o.errors
|
323
|
+
end
|
324
|
+
|
325
|
+
# @see the `==` method
|
326
|
+
# @param [Object] Object to be compared
|
327
|
+
def eql?(o)
|
328
|
+
self == o
|
329
|
+
end
|
330
|
+
|
331
|
+
# Calculates hash code according to all attributes.
|
332
|
+
# @return [Fixnum] Hash code
|
333
|
+
def hash
|
334
|
+
[status, code, entity_id, entity_name, message, message_with_params, message_params, context_id, details, errors].hash
|
335
|
+
end
|
336
|
+
|
337
|
+
# build the object from hash
|
338
|
+
def build_from_hash(attributes)
|
339
|
+
return nil unless attributes.is_a?(Hash)
|
340
|
+
self.class.swagger_types.each_pair do |key, type|
|
341
|
+
if type =~ /^Array<(.*)>/i
|
342
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
343
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
344
|
+
else
|
345
|
+
#TODO show warning in debug mode
|
346
|
+
end
|
347
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
348
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
349
|
+
else
|
350
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
self
|
355
|
+
end
|
356
|
+
|
357
|
+
def _deserialize(type, value)
|
358
|
+
case type.to_sym
|
359
|
+
when :DateTime
|
360
|
+
DateTime.parse(value)
|
361
|
+
when :Date
|
362
|
+
Date.parse(value)
|
363
|
+
when :String
|
364
|
+
value.to_s
|
365
|
+
when :Integer
|
366
|
+
value.to_i
|
367
|
+
when :Float
|
368
|
+
value.to_f
|
369
|
+
when :BOOLEAN
|
370
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
371
|
+
true
|
372
|
+
else
|
373
|
+
false
|
374
|
+
end
|
375
|
+
when :Object
|
376
|
+
# generic object (usually a Hash), return directly
|
377
|
+
value
|
378
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
379
|
+
inner_type = Regexp.last_match[:inner_type]
|
380
|
+
value.map { |v| _deserialize(inner_type, v) }
|
381
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
382
|
+
k_type = Regexp.last_match[:k_type]
|
383
|
+
v_type = Regexp.last_match[:v_type]
|
384
|
+
{}.tap do |hash|
|
385
|
+
value.each do |k, v|
|
386
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
387
|
+
end
|
388
|
+
end
|
389
|
+
else # model
|
390
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
391
|
+
_model.build_from_hash(value)
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
def to_s
|
396
|
+
to_hash.to_s
|
397
|
+
end
|
398
|
+
|
399
|
+
# to_body is an alias to to_body (backward compatibility))
|
400
|
+
def to_body
|
401
|
+
to_hash
|
402
|
+
end
|
403
|
+
|
404
|
+
# return the object in the form of hash
|
405
|
+
def to_hash
|
406
|
+
hash = {}
|
407
|
+
self.class.attribute_map.each_pair do |attr, param|
|
408
|
+
value = self.send(attr)
|
409
|
+
next if value.nil?
|
410
|
+
hash[param] = _to_hash(value)
|
411
|
+
end
|
412
|
+
hash
|
413
|
+
end
|
414
|
+
|
415
|
+
# Method to output non-array value in the form of hash
|
416
|
+
# For object, use to_hash. Otherwise, just return the value
|
417
|
+
def _to_hash(value)
|
418
|
+
if value.is_a?(Array)
|
419
|
+
value.compact.map{ |v| _to_hash(v) }
|
420
|
+
elsif value.is_a?(Hash)
|
421
|
+
{}.tap do |hash|
|
422
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
423
|
+
end
|
424
|
+
elsif value.respond_to? :to_hash
|
425
|
+
value.to_hash
|
426
|
+
else
|
427
|
+
value
|
428
|
+
end
|
429
|
+
end
|
430
|
+
|
431
|
+
end
|
432
|
+
end
|
@@ -0,0 +1,432 @@
|
|
1
|
+
=begin
|
2
|
+
PureCloud Platform API
|
3
|
+
|
4
|
+
With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more.
|
5
|
+
|
6
|
+
OpenAPI spec version: v2
|
7
|
+
Contact: DeveloperEvangelists@genesys.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
License: ININ
|
11
|
+
http://www.inin.com
|
12
|
+
|
13
|
+
Terms of Service: https://developer.mypurecloud.com/tos
|
14
|
+
|
15
|
+
=end
|
16
|
+
|
17
|
+
require 'date'
|
18
|
+
|
19
|
+
module PureCloud
|
20
|
+
class MessageConversationNotificationErrorInfo
|
21
|
+
attr_accessor :status
|
22
|
+
|
23
|
+
attr_accessor :code
|
24
|
+
|
25
|
+
attr_accessor :entity_id
|
26
|
+
|
27
|
+
attr_accessor :entity_name
|
28
|
+
|
29
|
+
attr_accessor :message
|
30
|
+
|
31
|
+
attr_accessor :message_with_params
|
32
|
+
|
33
|
+
attr_accessor :message_params
|
34
|
+
|
35
|
+
attr_accessor :context_id
|
36
|
+
|
37
|
+
attr_accessor :details
|
38
|
+
|
39
|
+
attr_accessor :errors
|
40
|
+
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
42
|
+
def self.attribute_map
|
43
|
+
{
|
44
|
+
|
45
|
+
:'status' => :'status',
|
46
|
+
|
47
|
+
:'code' => :'code',
|
48
|
+
|
49
|
+
:'entity_id' => :'entityId',
|
50
|
+
|
51
|
+
:'entity_name' => :'entityName',
|
52
|
+
|
53
|
+
:'message' => :'message',
|
54
|
+
|
55
|
+
:'message_with_params' => :'messageWithParams',
|
56
|
+
|
57
|
+
:'message_params' => :'messageParams',
|
58
|
+
|
59
|
+
:'context_id' => :'contextId',
|
60
|
+
|
61
|
+
:'details' => :'details',
|
62
|
+
|
63
|
+
:'errors' => :'errors'
|
64
|
+
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.swagger_types
|
70
|
+
{
|
71
|
+
|
72
|
+
:'status' => :'Integer',
|
73
|
+
|
74
|
+
:'code' => :'String',
|
75
|
+
|
76
|
+
:'entity_id' => :'String',
|
77
|
+
|
78
|
+
:'entity_name' => :'String',
|
79
|
+
|
80
|
+
:'message' => :'String',
|
81
|
+
|
82
|
+
:'message_with_params' => :'String',
|
83
|
+
|
84
|
+
:'message_params' => :'Hash<String, String>',
|
85
|
+
|
86
|
+
:'context_id' => :'String',
|
87
|
+
|
88
|
+
:'details' => :'Array<CallbackConversationNotificationErrorInfoDetails>',
|
89
|
+
|
90
|
+
:'errors' => :'Array<MessageConversationNotificationErrorBody>'
|
91
|
+
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
# Initializes the object
|
96
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
97
|
+
def initialize(attributes = {})
|
98
|
+
return unless attributes.is_a?(Hash)
|
99
|
+
|
100
|
+
# convert string to symbol for hash key
|
101
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
102
|
+
|
103
|
+
|
104
|
+
if attributes.has_key?(:'status')
|
105
|
+
|
106
|
+
|
107
|
+
self.status = attributes[:'status']
|
108
|
+
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
|
113
|
+
if attributes.has_key?(:'code')
|
114
|
+
|
115
|
+
|
116
|
+
self.code = attributes[:'code']
|
117
|
+
|
118
|
+
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
if attributes.has_key?(:'entityId')
|
123
|
+
|
124
|
+
|
125
|
+
self.entity_id = attributes[:'entityId']
|
126
|
+
|
127
|
+
|
128
|
+
end
|
129
|
+
|
130
|
+
|
131
|
+
if attributes.has_key?(:'entityName')
|
132
|
+
|
133
|
+
|
134
|
+
self.entity_name = attributes[:'entityName']
|
135
|
+
|
136
|
+
|
137
|
+
end
|
138
|
+
|
139
|
+
|
140
|
+
if attributes.has_key?(:'message')
|
141
|
+
|
142
|
+
|
143
|
+
self.message = attributes[:'message']
|
144
|
+
|
145
|
+
|
146
|
+
end
|
147
|
+
|
148
|
+
|
149
|
+
if attributes.has_key?(:'messageWithParams')
|
150
|
+
|
151
|
+
|
152
|
+
self.message_with_params = attributes[:'messageWithParams']
|
153
|
+
|
154
|
+
|
155
|
+
end
|
156
|
+
|
157
|
+
|
158
|
+
if attributes.has_key?(:'messageParams')
|
159
|
+
|
160
|
+
if (value = attributes[:'messageParams']).is_a?(Array)
|
161
|
+
self.message_params = value
|
162
|
+
end
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
end
|
167
|
+
|
168
|
+
|
169
|
+
if attributes.has_key?(:'contextId')
|
170
|
+
|
171
|
+
|
172
|
+
self.context_id = attributes[:'contextId']
|
173
|
+
|
174
|
+
|
175
|
+
end
|
176
|
+
|
177
|
+
|
178
|
+
if attributes.has_key?(:'details')
|
179
|
+
|
180
|
+
if (value = attributes[:'details']).is_a?(Array)
|
181
|
+
self.details = value
|
182
|
+
end
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
end
|
187
|
+
|
188
|
+
|
189
|
+
if attributes.has_key?(:'errors')
|
190
|
+
|
191
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
192
|
+
self.errors = value
|
193
|
+
end
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
end
|
198
|
+
|
199
|
+
|
200
|
+
end
|
201
|
+
|
202
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
203
|
+
# @return Array for valid properies with the reasons
|
204
|
+
def list_invalid_properties
|
205
|
+
invalid_properties = Array.new
|
206
|
+
|
207
|
+
|
208
|
+
return invalid_properties
|
209
|
+
end
|
210
|
+
|
211
|
+
# Check to see if the all the properties in the model are valid
|
212
|
+
# @return true if the model is valid
|
213
|
+
def valid?
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
end
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
# Checks equality by comparing each attribute.
|
309
|
+
# @param [Object] Object to be compared
|
310
|
+
def ==(o)
|
311
|
+
return true if self.equal?(o)
|
312
|
+
self.class == o.class &&
|
313
|
+
status == o.status &&
|
314
|
+
code == o.code &&
|
315
|
+
entity_id == o.entity_id &&
|
316
|
+
entity_name == o.entity_name &&
|
317
|
+
message == o.message &&
|
318
|
+
message_with_params == o.message_with_params &&
|
319
|
+
message_params == o.message_params &&
|
320
|
+
context_id == o.context_id &&
|
321
|
+
details == o.details &&
|
322
|
+
errors == o.errors
|
323
|
+
end
|
324
|
+
|
325
|
+
# @see the `==` method
|
326
|
+
# @param [Object] Object to be compared
|
327
|
+
def eql?(o)
|
328
|
+
self == o
|
329
|
+
end
|
330
|
+
|
331
|
+
# Calculates hash code according to all attributes.
|
332
|
+
# @return [Fixnum] Hash code
|
333
|
+
def hash
|
334
|
+
[status, code, entity_id, entity_name, message, message_with_params, message_params, context_id, details, errors].hash
|
335
|
+
end
|
336
|
+
|
337
|
+
# build the object from hash
|
338
|
+
def build_from_hash(attributes)
|
339
|
+
return nil unless attributes.is_a?(Hash)
|
340
|
+
self.class.swagger_types.each_pair do |key, type|
|
341
|
+
if type =~ /^Array<(.*)>/i
|
342
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
343
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
344
|
+
else
|
345
|
+
#TODO show warning in debug mode
|
346
|
+
end
|
347
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
348
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
349
|
+
else
|
350
|
+
# data not found in attributes(hash), not an issue as the data can be optional
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
self
|
355
|
+
end
|
356
|
+
|
357
|
+
def _deserialize(type, value)
|
358
|
+
case type.to_sym
|
359
|
+
when :DateTime
|
360
|
+
DateTime.parse(value)
|
361
|
+
when :Date
|
362
|
+
Date.parse(value)
|
363
|
+
when :String
|
364
|
+
value.to_s
|
365
|
+
when :Integer
|
366
|
+
value.to_i
|
367
|
+
when :Float
|
368
|
+
value.to_f
|
369
|
+
when :BOOLEAN
|
370
|
+
if value.to_s =~ /^(true|t|yes|y|1)$/i
|
371
|
+
true
|
372
|
+
else
|
373
|
+
false
|
374
|
+
end
|
375
|
+
when :Object
|
376
|
+
# generic object (usually a Hash), return directly
|
377
|
+
value
|
378
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
379
|
+
inner_type = Regexp.last_match[:inner_type]
|
380
|
+
value.map { |v| _deserialize(inner_type, v) }
|
381
|
+
when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
|
382
|
+
k_type = Regexp.last_match[:k_type]
|
383
|
+
v_type = Regexp.last_match[:v_type]
|
384
|
+
{}.tap do |hash|
|
385
|
+
value.each do |k, v|
|
386
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
387
|
+
end
|
388
|
+
end
|
389
|
+
else # model
|
390
|
+
_model = Object.const_get("PureCloud").const_get(type).new
|
391
|
+
_model.build_from_hash(value)
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
def to_s
|
396
|
+
to_hash.to_s
|
397
|
+
end
|
398
|
+
|
399
|
+
# to_body is an alias to to_body (backward compatibility))
|
400
|
+
def to_body
|
401
|
+
to_hash
|
402
|
+
end
|
403
|
+
|
404
|
+
# return the object in the form of hash
|
405
|
+
def to_hash
|
406
|
+
hash = {}
|
407
|
+
self.class.attribute_map.each_pair do |attr, param|
|
408
|
+
value = self.send(attr)
|
409
|
+
next if value.nil?
|
410
|
+
hash[param] = _to_hash(value)
|
411
|
+
end
|
412
|
+
hash
|
413
|
+
end
|
414
|
+
|
415
|
+
# Method to output non-array value in the form of hash
|
416
|
+
# For object, use to_hash. Otherwise, just return the value
|
417
|
+
def _to_hash(value)
|
418
|
+
if value.is_a?(Array)
|
419
|
+
value.compact.map{ |v| _to_hash(v) }
|
420
|
+
elsif value.is_a?(Hash)
|
421
|
+
{}.tap do |hash|
|
422
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
423
|
+
end
|
424
|
+
elsif value.respond_to? :to_hash
|
425
|
+
value.to_hash
|
426
|
+
else
|
427
|
+
value
|
428
|
+
end
|
429
|
+
end
|
430
|
+
|
431
|
+
end
|
432
|
+
end
|