=begin PureCloud Platform API 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. OpenAPI spec version: v2 Contact: DeveloperEvangelists@inin.com Generated by: https://github.com/swagger-api/swagger-codegen.git License: ININ http://www.inin.com Terms of Service: https://developer.mypurecloud.com/tos =end # Common files require 'purecloud/api_client' require 'purecloud/api_error' require 'purecloud/version' require 'purecloud/configuration' # Models require 'purecloud/models/account' require 'purecloud/models/account_manager' require 'purecloud/models/account_overview' require 'purecloud/models/account_status' require 'purecloud/models/actions' require 'purecloud/models/acw_settings' require 'purecloud/models/address' require 'purecloud/models/address_listing' require 'purecloud/models/agent' require 'purecloud/models/agent_activity' require 'purecloud/models/agent_activity_entity_listing' require 'purecloud/models/agent_evaluator_activity' require 'purecloud/models/aggregate_data_container' require 'purecloud/models/aggregate_metric_data' require 'purecloud/models/aggregate_query_response' require 'purecloud/models/aggregation_query' require 'purecloud/models/aggregation_range' require 'purecloud/models/aggregation_result' require 'purecloud/models/aggregation_result_entry' require 'purecloud/models/analytics_conversation' require 'purecloud/models/analytics_conversation_query_response' require 'purecloud/models/analytics_conversation_segment' require 'purecloud/models/analytics_evaluation' require 'purecloud/models/analytics_participant' require 'purecloud/models/analytics_property' require 'purecloud/models/analytics_query_aggregation' require 'purecloud/models/analytics_query_clause' require 'purecloud/models/analytics_query_filter' require 'purecloud/models/analytics_query_predicate' require 'purecloud/models/analytics_session' require 'purecloud/models/annotation' require 'purecloud/models/app' require 'purecloud/models/architect_audit_message' require 'purecloud/models/architect_audit_message_listing' require 'purecloud/models/archive_retention' require 'purecloud/models/associated_document' require 'purecloud/models/attachment' require 'purecloud/models/attribute' require 'purecloud/models/attribute_entity_listing' require 'purecloud/models/attribute_filter_item' require 'purecloud/models/attribute_query_request' require 'purecloud/models/audit_change' require 'purecloud/models/audit_entity' require 'purecloud/models/audit_entity_reference' require 'purecloud/models/audit_facet' require 'purecloud/models/audit_filter' require 'purecloud/models/audit_message' require 'purecloud/models/audit_search_result' require 'purecloud/models/audit_user' require 'purecloud/models/authz_grant' require 'purecloud/models/authz_grant_policy' require 'purecloud/models/authz_grant_role' require 'purecloud/models/authz_object' require 'purecloud/models/authz_permission_context' require 'purecloud/models/authz_subject' require 'purecloud/models/available_additional_service' require 'purecloud/models/available_additional_service_listing' require 'purecloud/models/available_topic' require 'purecloud/models/available_topic_entity_listing' require 'purecloud/models/backend_flow_available_actions' require 'purecloud/models/basic_transform' require 'purecloud/models/batch_command' require 'purecloud/models/batch_item' require 'purecloud/models/batch_item_body' require 'purecloud/models/batch_reply' require 'purecloud/models/batch_reply_item' require 'purecloud/models/billing_address' require 'purecloud/models/billing_pending_task' require 'purecloud/models/billing_period' require 'purecloud/models/billing_task_result' require 'purecloud/models/bullseye' require 'purecloud/models/calibration' require 'purecloud/models/calibration_assignment' require 'purecloud/models/calibration_entity_listing' require 'purecloud/models/call' require 'purecloud/models/call_command' require 'purecloud/models/call_conversation' require 'purecloud/models/call_conversation_entity_listing' require 'purecloud/models/call_forwarding' require 'purecloud/models/call_media_participant' require 'purecloud/models/call_media_policy' require 'purecloud/models/call_media_policy_conditions' require 'purecloud/models/call_record' require 'purecloud/models/callable_contacts_diagnostic' require 'purecloud/models/callable_time' require 'purecloud/models/callable_time_set' require 'purecloud/models/callable_time_set_entity_listing' require 'purecloud/models/callback' require 'purecloud/models/callback_conversation' require 'purecloud/models/callback_conversation_entity_listing' require 'purecloud/models/callback_media_participant' require 'purecloud/models/campaign' require 'purecloud/models/campaign_diagnostics' require 'purecloud/models/campaign_entity_listing' require 'purecloud/models/campaign_progress' require 'purecloud/models/campaign_schedule' require 'purecloud/models/campaign_schedule_intervals' require 'purecloud/models/campaign_sequence' require 'purecloud/models/campaign_sequence_entity_listing' require 'purecloud/models/campaign_stats' require 'purecloud/models/campaign_time_slot' require 'purecloud/models/carrier' require 'purecloud/models/carrier_address' require 'purecloud/models/carrier_entity_listing' require 'purecloud/models/certificate' require 'purecloud/models/certificate_authority_entity_listing' require 'purecloud/models/certificate_details' require 'purecloud/models/change' require 'purecloud/models/channel' require 'purecloud/models/channel_entity_listing' require 'purecloud/models/channel_topic' require 'purecloud/models/channel_topic_entity_listing' require 'purecloud/models/charge' require 'purecloud/models/chat' require 'purecloud/models/chat_conversation' require 'purecloud/models/chat_conversation_entity_listing' require 'purecloud/models/chat_media_participant' require 'purecloud/models/chat_media_policy' require 'purecloud/models/chat_media_policy_conditions' require 'purecloud/models/chat_message' require 'purecloud/models/chat_message_user' require 'purecloud/models/client_spreadsheet_transform' require 'purecloud/models/client_text_table_transform' require 'purecloud/models/column_collapse' require 'purecloud/models/command_status' require 'purecloud/models/command_status_entity_listing' require 'purecloud/models/composer_template' require 'purecloud/models/condition' require 'purecloud/models/connect_rate' require 'purecloud/models/consult_transfer' require 'purecloud/models/consult_transfer_response' require 'purecloud/models/consult_transfer_update' require 'purecloud/models/consumed_resources_entity_listing' require 'purecloud/models/consuming_resources_entity_listing' require 'purecloud/models/contact' require 'purecloud/models/contact_address' require 'purecloud/models/contact_callback_request' require 'purecloud/models/contact_list' require 'purecloud/models/contact_list_entity_listing' require 'purecloud/models/contact_listing' require 'purecloud/models/contact_phone_number_column' require 'purecloud/models/contact_sales' require 'purecloud/models/contact_sales_response' require 'purecloud/models/contact_sort' require 'purecloud/models/content_attribute_filter_item' require 'purecloud/models/content_facet_filter_item' require 'purecloud/models/content_filter_item' require 'purecloud/models/content_query_request' require 'purecloud/models/content_sort_item' require 'purecloud/models/contract' require 'purecloud/models/contract_job' require 'purecloud/models/control' require 'purecloud/models/control_options' require 'purecloud/models/conversation' require 'purecloud/models/conversation_chat' require 'purecloud/models/conversation_entity_listing' require 'purecloud/models/conversation_query' require 'purecloud/models/cover_sheet' require 'purecloud/models/create_call_request' require 'purecloud/models/create_call_response' require 'purecloud/models/create_callback_command' require 'purecloud/models/create_share_request' require 'purecloud/models/create_share_request_member' require 'purecloud/models/create_share_response' require 'purecloud/models/create_template_from_script_request_data' require 'purecloud/models/create_user' require 'purecloud/models/csv_schema' require 'purecloud/models/currency' require 'purecloud/models/customer_account' require 'purecloud/models/did' require 'purecloud/models/did_entity_listing' require 'purecloud/models/did_pool' require 'purecloud/models/did_pool_entity_listing' require 'purecloud/models/data_item' require 'purecloud/models/data_value_info' require 'purecloud/models/default_greeting_list' require 'purecloud/models/delete_retention' require 'purecloud/models/deleted_resource_consumer_entity_listing' require 'purecloud/models/delta_document' require 'purecloud/models/delta_request' require 'purecloud/models/delta_response' require 'purecloud/models/dependency' require 'purecloud/models/dependency_object' require 'purecloud/models/dependency_object_entity_listing' require 'purecloud/models/dependency_status' require 'purecloud/models/dependency_type' require 'purecloud/models/dependency_type_entity_listing' require 'purecloud/models/destination' require 'purecloud/models/detail' require 'purecloud/models/diagnostic_email' require 'purecloud/models/dialer_action' require 'purecloud/models/dialer_audit_request' require 'purecloud/models/dialer_contact' require 'purecloud/models/dialer_preview' require 'purecloud/models/dialer_rule' require 'purecloud/models/digit_length' require 'purecloud/models/disconnect_reason' require 'purecloud/models/discount' require 'purecloud/models/dnc_list' require 'purecloud/models/dnc_list_entity_listing' require 'purecloud/models/dns' require 'purecloud/models/document' require 'purecloud/models/document_attribute' require 'purecloud/models/document_audit' require 'purecloud/models/document_audit_entity_listing' require 'purecloud/models/document_entity_listing' require 'purecloud/models/document_thumbnail' require 'purecloud/models/document_update' require 'purecloud/models/document_upload' require 'purecloud/models/domain_billing_period_entity_listing' require 'purecloud/models/domain_capabilities' require 'purecloud/models/domain_certificate_authority' require 'purecloud/models/domain_edge_software_update_dto' require 'purecloud/models/domain_edge_software_version_dto' require 'purecloud/models/domain_entity' require 'purecloud/models/domain_entity_listing' require 'purecloud/models/domain_entity_listing_evaluation_form' require 'purecloud/models/domain_entity_listing_query_result' require 'purecloud/models/domain_invoice_entity_listing' require 'purecloud/models/domain_logical_interface' require 'purecloud/models/domain_network_address' require 'purecloud/models/domain_network_command_response' require 'purecloud/models/domain_network_route' require 'purecloud/models/domain_org_role_difference' require 'purecloud/models/domain_organization_product' require 'purecloud/models/domain_organization_role' require 'purecloud/models/domain_permission' require 'purecloud/models/domain_permission_collection' require 'purecloud/models/domain_permission_policy' require 'purecloud/models/domain_physical_capabilities' require 'purecloud/models/domain_physical_interface' require 'purecloud/models/domain_resource_condition_node' require 'purecloud/models/domain_resource_condition_value' require 'purecloud/models/domain_role' require 'purecloud/models/domain_schema_reference' require 'purecloud/models/domain_third_party_account_entity_listing' require 'purecloud/models/domain_third_party_subscription_entity_listing' require 'purecloud/models/domain_voice_rate_extended_response_item_entity_listing' require 'purecloud/models/domain_voice_rate_international_response_item_entity_listing' require 'purecloud/models/domain_voice_rate_response_item_entity_listing' require 'purecloud/models/download_response' require 'purecloud/models/duration_condition' require 'purecloud/models/edge' require 'purecloud/models/edge_auto_update_config' require 'purecloud/models/edge_entity_listing' require 'purecloud/models/edge_group' require 'purecloud/models/edge_group_entity_listing' require 'purecloud/models/edge_interface' require 'purecloud/models/edge_line' require 'purecloud/models/edge_line_entity_listing' require 'purecloud/models/edge_logs_job' require 'purecloud/models/edge_logs_job_file' require 'purecloud/models/edge_logs_job_request' require 'purecloud/models/edge_logs_job_response' require 'purecloud/models/edge_logs_job_upload_request' require 'purecloud/models/edge_version_information' require 'purecloud/models/edge_version_report' require 'purecloud/models/email' require 'purecloud/models/email_address' require 'purecloud/models/email_attachment' require 'purecloud/models/email_conversation' require 'purecloud/models/email_conversation_entity_listing' require 'purecloud/models/email_media_participant' require 'purecloud/models/email_media_policy' require 'purecloud/models/email_media_policy_conditions' require 'purecloud/models/email_message' require 'purecloud/models/email_message_listing' require 'purecloud/models/email_setup' require 'purecloud/models/embedded_signature_view' require 'purecloud/models/encryption_key' require 'purecloud/models/encryption_key_entity_listing' require 'purecloud/models/endpoint' require 'purecloud/models/endpoint_entity_listing' require 'purecloud/models/entity' require 'purecloud/models/entry' require 'purecloud/models/error_body' require 'purecloud/models/error_details' require 'purecloud/models/estimated_wait_time_predictions' require 'purecloud/models/evaluation' require 'purecloud/models/evaluation_assignment' require 'purecloud/models/evaluation_entity_listing' require 'purecloud/models/evaluation_form' require 'purecloud/models/evaluation_form_and_scoring_set' require 'purecloud/models/evaluation_form_entity_listing' require 'purecloud/models/evaluation_scoring_set' require 'purecloud/models/evaluator_activity' require 'purecloud/models/evaluator_activity_entity_listing' require 'purecloud/models/expansion_criterium' require 'purecloud/models/export_uri' require 'purecloud/models/expression_response' require 'purecloud/models/extension' require 'purecloud/models/extension_entity_listing' require 'purecloud/models/extension_pool' require 'purecloud/models/extension_pool_entity_listing' require 'purecloud/models/external_contact' require 'purecloud/models/external_organization' require 'purecloud/models/external_organization_listing' require 'purecloud/models/facet_entry' require 'purecloud/models/facet_info' require 'purecloud/models/facet_key_attribute' require 'purecloud/models/facet_request' require 'purecloud/models/facet_result' require 'purecloud/models/facet_result_item' require 'purecloud/models/facet_statistics' require 'purecloud/models/facet_term' require 'purecloud/models/failed_object' require 'purecloud/models/favorite_template_request_data' require 'purecloud/models/fax_document' require 'purecloud/models/fax_document_entity_listing' require 'purecloud/models/fax_send_request' require 'purecloud/models/fax_send_response' require 'purecloud/models/fax_summary' require 'purecloud/models/filter_item' require 'purecloud/models/flow' require 'purecloud/models/flow_body' require 'purecloud/models/flow_body_format' require 'purecloud/models/flow_config_id' require 'purecloud/models/flow_config_meta_data' require 'purecloud/models/flow_config_meta_data_entity_listing' require 'purecloud/models/flow_details' require 'purecloud/models/flow_details_search_result' require 'purecloud/models/flow_entity_listing' require 'purecloud/models/flow_exec_id' require 'purecloud/models/flow_history_data_item' require 'purecloud/models/flow_history_item' require 'purecloud/models/flow_history_result_item' require 'purecloud/models/flow_history_result_item_entity_listing' require 'purecloud/models/flow_input_data' require 'purecloud/models/flow_launch_request' require 'purecloud/models/flow_publish' require 'purecloud/models/flow_report_result_item' require 'purecloud/models/flow_search_request' require 'purecloud/models/flow_state' require 'purecloud/models/flow_terminate_request' require 'purecloud/models/flow_upload_response' require 'purecloud/models/flow_version' require 'purecloud/models/flow_version_config_meta_data' require 'purecloud/models/flow_version_config_meta_data_entity_listing' require 'purecloud/models/flow_version_entity_listing' require 'purecloud/models/form' require 'purecloud/models/gateway' require 'purecloud/models/geolocation' require 'purecloud/models/geolocation_settings' require 'purecloud/models/gistener' require 'purecloud/models/greeting' require 'purecloud/models/greeting_audio_file' require 'purecloud/models/greeting_media_info' require 'purecloud/models/greeting_owner' require 'purecloud/models/group' require 'purecloud/models/group_entity_listing' require 'purecloud/models/group_members_update' require 'purecloud/models/group_tag' require 'purecloud/models/groups_search_response' require 'purecloud/models/hipaa_config' require 'purecloud/models/hardware_rate' require 'purecloud/models/hardware_rate_listing' require 'purecloud/models/health_check_info' require 'purecloud/models/ivr' require 'purecloud/models/ivr_entity_listing' require 'purecloud/models/import_status' require 'purecloud/models/inbound_domain' require 'purecloud/models/inbound_domain_entity_listing' require 'purecloud/models/inbound_route' require 'purecloud/models/inbound_route_entity_listing' require 'purecloud/models/indexed_transform' require 'purecloud/models/integration_type' require 'purecloud/models/integration_type_entity_listing' require 'purecloud/models/interaction_stats_alert' require 'purecloud/models/interaction_stats_alert_container' require 'purecloud/models/interaction_stats_rule' require 'purecloud/models/interaction_stats_rule_container' require 'purecloud/models/invoice' require 'purecloud/models/json_node' require 'purecloud/models/json_node_search_response' require 'purecloud/models/key_rotation_schedule' require 'purecloud/models/language' require 'purecloud/models/language_entity_listing' require 'purecloud/models/library' require 'purecloud/models/library_entity_listing' require 'purecloud/models/license' require 'purecloud/models/licenses_by_permission' require 'purecloud/models/line' require 'purecloud/models/line_base' require 'purecloud/models/line_base_entity_listing' require 'purecloud/models/line_entity_listing' require 'purecloud/models/line_status' require 'purecloud/models/linked_entity_listing_flow_details' require 'purecloud/models/linked_entity_listing_work_item_search_details' require 'purecloud/models/location' require 'purecloud/models/location_address' require 'purecloud/models/location_emergency_number' require 'purecloud/models/lock_info' require 'purecloud/models/logical_interface_entity_listing' require 'purecloud/models/management_unit' require 'purecloud/models/management_unit_timezone' require 'purecloud/models/max_participants' require 'purecloud/models/media_participant_request' require 'purecloud/models/media_policies' require 'purecloud/models/media_result' require 'purecloud/models/media_setting' require 'purecloud/models/media_summary' require 'purecloud/models/media_summary_detail' require 'purecloud/models/member_entity' require 'purecloud/models/metabase' require 'purecloud/models/metered_evaluation_assignment' require 'purecloud/models/noc_support' require 'purecloud/models/note' require 'purecloud/models/note_listing' require 'purecloud/models/number' require 'purecloud/models/number_order_request' require 'purecloud/models/number_plan' require 'purecloud/models/numeric_range' require 'purecloud/models/o_auth_client' require 'purecloud/models/o_auth_client_entity_listing' require 'purecloud/models/o_auth_provider' require 'purecloud/models/o_auth_provider_entity_listing' require 'purecloud/models/observation_data_container' require 'purecloud/models/observation_query' require 'purecloud/models/observation_query_response' require 'purecloud/models/okta' require 'purecloud/models/one_login' require 'purecloud/models/order' require 'purecloud/models/org_license_assignment' require 'purecloud/models/org_media_utilization' require 'purecloud/models/organization' require 'purecloud/models/organization_create' require 'purecloud/models/organization_presence' require 'purecloud/models/organization_presence_entity_listing' require 'purecloud/models/organization_product_entity_listing' require 'purecloud/models/organization_role_entity_listing' require 'purecloud/models/orphan_recording' require 'purecloud/models/orphan_recording_listing' require 'purecloud/models/out_of_office' require 'purecloud/models/outbound_route' require 'purecloud/models/outbound_route_entity_listing' require 'purecloud/models/pin_configuration' require 'purecloud/models/page' require 'purecloud/models/paging_spec' require 'purecloud/models/parameter' require 'purecloud/models/parsed_certificate' require 'purecloud/models/participant' require 'purecloud/models/participant_attributes' require 'purecloud/models/payment_method' require 'purecloud/models/payment_method_listing' require 'purecloud/models/payment_token_provider' require 'purecloud/models/permission_collection_entity_listing' require 'purecloud/models/permissions' require 'purecloud/models/phone' require 'purecloud/models/phone_base' require 'purecloud/models/phone_base_entity_listing' require 'purecloud/models/phone_capabilities' require 'purecloud/models/phone_column' require 'purecloud/models/phone_entity_listing' require 'purecloud/models/phone_meta_base_entity_listing' require 'purecloud/models/phone_number' require 'purecloud/models/phone_number_column' require 'purecloud/models/phone_number_status' require 'purecloud/models/phone_status' require 'purecloud/models/phones_reboot' require 'purecloud/models/physical_interface_entity_listing' require 'purecloud/models/policy' require 'purecloud/models/policy_actions' require 'purecloud/models/policy_conditions' require 'purecloud/models/policy_entity_listing' require 'purecloud/models/policy_error_message' require 'purecloud/models/policy_errors' require 'purecloud/models/prediction_results' require 'purecloud/models/presence_query_response' require 'purecloud/models/product' require 'purecloud/models/prompt' require 'purecloud/models/prompt_asset' require 'purecloud/models/prompt_asset_entity_listing' require 'purecloud/models/prompt_entity_listing' require 'purecloud/models/property_index_request' require 'purecloud/models/provision_info' require 'purecloud/models/publication' require 'purecloud/models/publish_script_request_data' require 'purecloud/models/published_result' require 'purecloud/models/pure_cloud' require 'purecloud/models/quality_audit' require 'purecloud/models/quality_audit_page' require 'purecloud/models/query_facet_info' require 'purecloud/models/query_request' require 'purecloud/models/query_result' require 'purecloud/models/query_results' require 'purecloud/models/question_group' require 'purecloud/models/question_group_score' require 'purecloud/models/question_score' require 'purecloud/models/queue' require 'purecloud/models/queue_entity_listing' require 'purecloud/models/queue_member' require 'purecloud/models/queue_utilization_diagnostic' require 'purecloud/models/quote' require 'purecloud/models/quote_charge' require 'purecloud/models/quote_listing' require 'purecloud/models/rate' require 'purecloud/models/reaction' require 'purecloud/models/recording' require 'purecloud/models/recording_email_message' require 'purecloud/models/recording_settings' require 'purecloud/models/relationship' require 'purecloud/models/relationship_listing' require 'purecloud/models/replace_request' require 'purecloud/models/replace_response' require 'purecloud/models/report_meta_data' require 'purecloud/models/report_meta_data_entity_listing' require 'purecloud/models/report_request' require 'purecloud/models/report_run_entry' require 'purecloud/models/report_run_entry_entity_domain_listing' require 'purecloud/models/report_schedule' require 'purecloud/models/report_schedule_entity_listing' require 'purecloud/models/reservation' require 'purecloud/models/resource_condition_node' require 'purecloud/models/resource_condition_value' require 'purecloud/models/resource_permission_policy' require 'purecloud/models/response' require 'purecloud/models/response_entity_list' require 'purecloud/models/response_entity_listing' require 'purecloud/models/response_filter' require 'purecloud/models/response_query_request' require 'purecloud/models/response_query_results' require 'purecloud/models/response_set' require 'purecloud/models/response_set_entity_listing' require 'purecloud/models/response_text' require 'purecloud/models/rest_error_detail' require 'purecloud/models/retention_duration' require 'purecloud/models/ring' require 'purecloud/models/routing_skill' require 'purecloud/models/routing_status' require 'purecloud/models/rule_set' require 'purecloud/models/rule_set_entity_listing' require 'purecloud/models/run_now_response' require 'purecloud/models/salesforce' require 'purecloud/models/schedule' require 'purecloud/models/schedule_entity_listing' require 'purecloud/models/schedule_group' require 'purecloud/models/schedule_group_entity_listing' require 'purecloud/models/schema_category' require 'purecloud/models/schema_category_entity_listing' require 'purecloud/models/schema_reference_entity_listing' require 'purecloud/models/script' require 'purecloud/models/script_entity_listing' require 'purecloud/models/search_aggregation' require 'purecloud/models/search_criteria' require 'purecloud/models/search_request' require 'purecloud/models/security_profile' require 'purecloud/models/security_profile_entity_listing' require 'purecloud/models/segment' require 'purecloud/models/sequence_schedule' require 'purecloud/models/server_date' require 'purecloud/models/service' require 'purecloud/models/service_context' require 'purecloud/models/service_entity_listing' require 'purecloud/models/service_level' require 'purecloud/models/service_type' require 'purecloud/models/share' require 'purecloud/models/share_entity_listing' require 'purecloud/models/shared_entity' require 'purecloud/models/shared_response' require 'purecloud/models/sheet_schema' require 'purecloud/models/sheet_transform' require 'purecloud/models/signature_document_info' require 'purecloud/models/site' require 'purecloud/models/site_entity_listing' require 'purecloud/models/skill_entity_listing' require 'purecloud/models/skills_to_remove' require 'purecloud/models/snapshot' require 'purecloud/models/social_account' require 'purecloud/models/social_conversation' require 'purecloud/models/social_conversation_entity_listing' require 'purecloud/models/social_expression' require 'purecloud/models/social_media_participant' require 'purecloud/models/socialize_entity_filter' require 'purecloud/models/socialize_filter_request' require 'purecloud/models/sort_field' require 'purecloud/models/sort_item' require 'purecloud/models/spreadsheet_transform' require 'purecloud/models/spreadsheet_transform_entity_listing' require 'purecloud/models/station' require 'purecloud/models/station_entity_listing' require 'purecloud/models/statistical_response' require 'purecloud/models/statistical_summary' require 'purecloud/models/sub_data_item' require 'purecloud/models/subscriber_response' require 'purecloud/models/support' require 'purecloud/models/system_prompt' require 'purecloud/models/system_prompt_asset' require 'purecloud/models/system_prompt_asset_entity_listing' require 'purecloud/models/system_prompt_entity_listing' require 'purecloud/models/table_transform' require 'purecloud/models/tag_model' require 'purecloud/models/tag_query_request' require 'purecloud/models/tag_value' require 'purecloud/models/tag_value_entity_listing' require 'purecloud/models/template_entity_listing' require 'purecloud/models/term_attribute' require 'purecloud/models/text_table_transform' require 'purecloud/models/text_table_transform_entity_listing' require 'purecloud/models/third_party_account' require 'purecloud/models/third_party_subscription' require 'purecloud/models/ticker' require 'purecloud/models/tier' require 'purecloud/models/time_allowed' require 'purecloud/models/time_interval' require 'purecloud/models/time_slot' require 'purecloud/models/time_zone' require 'purecloud/models/time_zone_entity_listing' require 'purecloud/models/trace' require 'purecloud/models/trace_list' require 'purecloud/models/transfer_request' require 'purecloud/models/transform_endpoint' require 'purecloud/models/transform_lens' require 'purecloud/models/trunk' require 'purecloud/models/trunk_base' require 'purecloud/models/trunk_base_assignment' require 'purecloud/models/trunk_entity_listing' require 'purecloud/models/trunk_metabase_entity_listing' require 'purecloud/models/twitter_expression' require 'purecloud/models/twitter_expression_buffer' require 'purecloud/models/unpivot_columns' require 'purecloud/models/unread_metric' require 'purecloud/models/unread_status' require 'purecloud/models/upload_progress' require 'purecloud/models/uri_reference' require 'purecloud/models/url_response' require 'purecloud/models/user' require 'purecloud/models/user_action_category' require 'purecloud/models/user_action_category_entity_listing' require 'purecloud/models/user_action_metadata' require 'purecloud/models/user_action_metadata_entity_listing' require 'purecloud/models/user_action_metadata_request' require 'purecloud/models/user_authorization' require 'purecloud/models/user_conversation_summary' require 'purecloud/models/user_entity_listing' require 'purecloud/models/user_image' require 'purecloud/models/user_license_assignment' require 'purecloud/models/user_me' require 'purecloud/models/user_param' require 'purecloud/models/user_presence' require 'purecloud/models/user_queue' require 'purecloud/models/user_queue_entity_listing' require 'purecloud/models/user_recording' require 'purecloud/models/user_recording_entity_listing' require 'purecloud/models/user_routing_skill' require 'purecloud/models/user_skill_entity_listing' require 'purecloud/models/user_station' require 'purecloud/models/user_stations' require 'purecloud/models/users_entity_listing' require 'purecloud/models/users_search_response' require 'purecloud/models/utilization' require 'purecloud/models/validate_address_request' require 'purecloud/models/validate_address_response' require 'purecloud/models/value' require 'purecloud/models/vendor_connection_request' require 'purecloud/models/video' require 'purecloud/models/video_conversation' require 'purecloud/models/video_conversation_entity_listing' require 'purecloud/models/video_media_participant' require 'purecloud/models/view' require 'purecloud/models/voice_rate' require 'purecloud/models/voice_rate_extended' require 'purecloud/models/voice_rate_international' require 'purecloud/models/voice_rate_international_entity_listing' require 'purecloud/models/voice_rate_update' require 'purecloud/models/voice_rates_csv' require 'purecloud/models/voice_xml_operation' require 'purecloud/models/voice_xml_operation_entity_listing' require 'purecloud/models/voicemail_mailbox_info' require 'purecloud/models/voicemail_media_info' require 'purecloud/models/voicemail_message' require 'purecloud/models/voicemail_message_entity_listing' require 'purecloud/models/voicemail_organization_policy' require 'purecloud/models/voicemail_user_policy' require 'purecloud/models/vpn' require 'purecloud/models/work_item' require 'purecloud/models/work_item_actions' require 'purecloud/models/work_item_cache' require 'purecloud/models/work_item_command' require 'purecloud/models/work_item_command_group' require 'purecloud/models/work_item_definition' require 'purecloud/models/work_item_details' require 'purecloud/models/work_item_search_details' require 'purecloud/models/work_item_search_details_search_result' require 'purecloud/models/work_item_submit_request' require 'purecloud/models/work_item_transfer_request' require 'purecloud/models/workspace' require 'purecloud/models/workspace_create' require 'purecloud/models/workspace_entity_listing' require 'purecloud/models/workspace_member' require 'purecloud/models/workspace_member_entity_listing' require 'purecloud/models/workspace_summary' require 'purecloud/models/wrap_up_code_mapping' require 'purecloud/models/wrapup' require 'purecloud/models/wrapup_code' require 'purecloud/models/wrapup_code_entity_listing' require 'purecloud/models/xlsx_schema' # APIs require 'purecloud/api/alerting_api' require 'purecloud/api/analytics_api' require 'purecloud/api/attributes_api' require 'purecloud/api/authorization_api' require 'purecloud/api/configuration_api' require 'purecloud/api/content_management_api' require 'purecloud/api/conversations_api' require 'purecloud/api/fax_api' require 'purecloud/api/geolocation_api' require 'purecloud/api/greetings_api' require 'purecloud/api/groups_api' require 'purecloud/api/languages_api' require 'purecloud/api/locations_api' require 'purecloud/api/notifications_api' require 'purecloud/api/o_auth_api' require 'purecloud/api/objects_api' require 'purecloud/api/organization_api' require 'purecloud/api/outbound_api' require 'purecloud/api/presence_api' require 'purecloud/api/quality_api' require 'purecloud/api/recording_api' require 'purecloud/api/response_management_api' require 'purecloud/api/routing_api' require 'purecloud/api/search_api' require 'purecloud/api/stations_api' require 'purecloud/api/suggest_api' require 'purecloud/api/telephony_providers_edge_api' require 'purecloud/api/tokens_api' require 'purecloud/api/user_recordings_api' require 'purecloud/api/users_api' require 'purecloud/api/utilities_api' require 'purecloud/api/voicemail_api' module PureCloud class << self # Customize default settings for the SDK using block. # PureCloud.configure do |config| # config.username = "xxx" # config.password = "xxx" # end # If no block given, return the default Configuration object. def configure if block_given? yield(Configuration.default) else Configuration.default end end end end require 'rest_client' require 'json' require 'base64' module PureCloud class << self # Authenticates to PureCloud using the client credientals OAuth grant. # # @param client_id OAuth client id # @param client_secret OAuth client secret # @param environment PureCloud environment (mypurecloud.com, mypurecloud.ie, mypurecloud.com.au, etc) def authenticate_with_client_credentials(client_id, client_secret, environment = nil) environment ||= "mypurecloud.com" self.configure.host = 'api.' + environment; basic = Base64.strict_encode64("#{client_id}:#{client_secret}") tokenData = JSON.parse RestClient.post("https://login.#{environment}/token", {:grant_type => 'client_credentials'}, :Authorization => "Basic " + basic, 'content-type'=> 'application/x-www-form-urlencoded', :accept => :json) self.configure.access_token = tokenData["access_token"] end # Retrieves an Access token given an authorization code (authorization code grant) # # @param auth_code Authorization code from the OAuth redirec # @param client_id OAuth client id # @param client_secret OAuth client secret # @param client_secret OAuth redirect URI # @param environment (Optional) PureCloud environment (mypurecloud.com, mypurecloud.ie, mypurecloud.com.au, etc) def get_access_token_from_auth_code(auth_code, client_id, client_secret, redirect_uri, environment = nil) environment ||= "mypurecloud.com" tokenFormData = { "grant_type" => "authorization_code", "code" => auth_code, "redirect_uri" => redirect_uri } tokenResponse =JSON.parse RestClient.post "https://#{client_id}:#{client_secret}@login.#{environment}/token", tokenFormData return tokenResponse['access_token']; end end end