=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@genesys.com Generated by: https://github.com/swagger-api/swagger-codegen.git License: UNLICENSED https://help.mypurecloud.com/articles/terms-and-conditions/ Terms of Service: https://help.mypurecloud.com/articles/terms-and-conditions/ =end require "uri" module PureCloud class UsersApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete/cancel an async request # # @param job_id jobId # @param [Hash] opts the optional parameters # @return [nil] def delete_analytics_users_details_job(job_id, opts = {}) delete_analytics_users_details_job_with_http_info(job_id, opts) return nil end # Delete/cancel an async request # # @param job_id jobId # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_analytics_users_details_job_with_http_info(job_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_analytics_users_details_job ..." end # verify the required parameter 'job_id' is set fail ArgumentError, "Missing the required parameter 'job_id' when calling UsersApi.delete_analytics_users_details_job" if job_id.nil? # resource path local_var_path = "/api/v2/analytics/users/details/jobs/{jobId}".sub('{format}','json').sub('{' + 'jobId' + '}', job_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_analytics_users_details_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a grant of a role in a division # # @param subject_id Subject ID (user or group) # @param division_id the id of the division of the grant # @param role_id the id of the role of the grant # @param [Hash] opts the optional parameters # @return [nil] def delete_authorization_subject_division_role(subject_id, division_id, role_id, opts = {}) delete_authorization_subject_division_role_with_http_info(subject_id, division_id, role_id, opts) return nil end # Delete a grant of a role in a division # # @param subject_id Subject ID (user or group) # @param division_id the id of the division of the grant # @param role_id the id of the role of the grant # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_authorization_subject_division_role_with_http_info(subject_id, division_id, role_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_authorization_subject_division_role ..." end # verify the required parameter 'subject_id' is set fail ArgumentError, "Missing the required parameter 'subject_id' when calling UsersApi.delete_authorization_subject_division_role" if subject_id.nil? # verify the required parameter 'division_id' is set fail ArgumentError, "Missing the required parameter 'division_id' when calling UsersApi.delete_authorization_subject_division_role" if division_id.nil? # verify the required parameter 'role_id' is set fail ArgumentError, "Missing the required parameter 'role_id' when calling UsersApi.delete_authorization_subject_division_role" if role_id.nil? # resource path local_var_path = "/api/v2/authorization/subjects/{subjectId}/divisions/{divisionId}/roles/{roleId}".sub('{format}','json').sub('{' + 'subjectId' + '}', subject_id.to_s).sub('{' + 'divisionId' + '}', division_id.to_s).sub('{' + 'roleId' + '}', role_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_authorization_subject_division_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete the user's max utilization settings and revert to the organization-wide default. # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [nil] def delete_routing_user_utilization(user_id, opts = {}) delete_routing_user_utilization_with_http_info(user_id, opts) return nil end # Delete the user's max utilization settings and revert to the organization-wide default. # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_routing_user_utilization_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_routing_user_utilization ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_routing_user_utilization" if user_id.nil? # resource path local_var_path = "/api/v2/routing/users/{userId}/utilization".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_routing_user_utilization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete user # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Empty] def delete_user(user_id, opts = {}) data, _status_code, _headers = delete_user_with_http_info(user_id, opts) return data end # Delete user # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers def delete_user_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Empty') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Remove routing language from user # # @param user_id User ID # @param language_id languageId # @param [Hash] opts the optional parameters # @return [nil] def delete_user_routinglanguage(user_id, language_id, opts = {}) delete_user_routinglanguage_with_http_info(user_id, language_id, opts) return nil end # Remove routing language from user # # @param user_id User ID # @param language_id languageId # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_user_routinglanguage_with_http_info(user_id, language_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_user_routinglanguage ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_routinglanguage" if user_id.nil? # verify the required parameter 'language_id' is set fail ArgumentError, "Missing the required parameter 'language_id' when calling UsersApi.delete_user_routinglanguage" if language_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/routinglanguages/{languageId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'languageId' + '}', language_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user_routinglanguage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Remove routing skill from user # # @param user_id User ID # @param skill_id skillId # @param [Hash] opts the optional parameters # @return [nil] def delete_user_routingskill(user_id, skill_id, opts = {}) delete_user_routingskill_with_http_info(user_id, skill_id, opts) return nil end # Remove routing skill from user # # @param user_id User ID # @param skill_id skillId # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_user_routingskill_with_http_info(user_id, skill_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_user_routingskill ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_routingskill" if user_id.nil? # verify the required parameter 'skill_id' is set fail ArgumentError, "Missing the required parameter 'skill_id' when calling UsersApi.delete_user_routingskill" if skill_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingskills/{skillId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'skillId' + '}', skill_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user_routingskill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Clear associated station # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [nil] def delete_user_station_associatedstation(user_id, opts = {}) delete_user_station_associatedstation_with_http_info(user_id, opts) return nil end # Clear associated station # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_user_station_associatedstation_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_user_station_associatedstation ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_station_associatedstation" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/station/associatedstation".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user_station_associatedstation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Clear default station # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [nil] def delete_user_station_defaultstation(user_id, opts = {}) delete_user_station_defaultstation_with_http_info(user_id, opts) return nil end # Clear default station # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_user_station_defaultstation_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.delete_user_station_defaultstation ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_user_station_defaultstation" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/station/defaultstation".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#delete_user_station_defaultstation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get status for async query for user details # # @param job_id jobId # @param [Hash] opts the optional parameters # @return [AsyncQueryStatus] def get_analytics_users_details_job(job_id, opts = {}) data, _status_code, _headers = get_analytics_users_details_job_with_http_info(job_id, opts) return data end # Get status for async query for user details # # @param job_id jobId # @param [Hash] opts the optional parameters # @return [Array<(AsyncQueryStatus, Fixnum, Hash)>] AsyncQueryStatus data, response status code and response headers def get_analytics_users_details_job_with_http_info(job_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_analytics_users_details_job ..." end # verify the required parameter 'job_id' is set fail ArgumentError, "Missing the required parameter 'job_id' when calling UsersApi.get_analytics_users_details_job" if job_id.nil? # resource path local_var_path = "/api/v2/analytics/users/details/jobs/{jobId}".sub('{format}','json').sub('{' + 'jobId' + '}', job_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AsyncQueryStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_analytics_users_details_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Fetch a page of results for an async query # # @param job_id jobId # @param [Hash] opts the optional parameters # @option opts [String] :cursor Indicates where to resume query results (not required for first page) # @option opts [Integer] :page_size The desired maximum number of results # @return [AnalyticsUserDetailsAsyncQueryResponse] def get_analytics_users_details_job_results(job_id, opts = {}) data, _status_code, _headers = get_analytics_users_details_job_results_with_http_info(job_id, opts) return data end # Fetch a page of results for an async query # # @param job_id jobId # @param [Hash] opts the optional parameters # @option opts [String] :cursor Indicates where to resume query results (not required for first page) # @option opts [Integer] :page_size The desired maximum number of results # @return [Array<(AnalyticsUserDetailsAsyncQueryResponse, Fixnum, Hash)>] AnalyticsUserDetailsAsyncQueryResponse data, response status code and response headers def get_analytics_users_details_job_results_with_http_info(job_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_analytics_users_details_job_results ..." end # verify the required parameter 'job_id' is set fail ArgumentError, "Missing the required parameter 'job_id' when calling UsersApi.get_analytics_users_details_job_results" if job_id.nil? # resource path local_var_path = "/api/v2/analytics/users/details/jobs/{jobId}/results".sub('{format}','json').sub('{' + 'jobId' + '}', job_id.to_s) # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if opts[:'cursor'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AnalyticsUserDetailsAsyncQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_analytics_users_details_job_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns which divisions the current user has the given permission in. # This route is deprecated, use authorization/divisionspermitted/paged/me instead. # @param permission The permission string, including the object to access, e.g. routing:queue:view # @param [Hash] opts the optional parameters # @option opts [String] :name Search term to filter by division name # @return [Array] def get_authorization_divisionspermitted_me(permission, opts = {}) data, _status_code, _headers = get_authorization_divisionspermitted_me_with_http_info(permission, opts) return data end # Returns which divisions the current user has the given permission in. # This route is deprecated, use authorization/divisionspermitted/paged/me instead. # @param permission The permission string, including the object to access, e.g. routing:queue:view # @param [Hash] opts the optional parameters # @option opts [String] :name Search term to filter by division name # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_authorization_divisionspermitted_me_with_http_info(permission, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_authorization_divisionspermitted_me ..." end # verify the required parameter 'permission' is set fail ArgumentError, "Missing the required parameter 'permission' when calling UsersApi.get_authorization_divisionspermitted_me" if permission.nil? # resource path local_var_path = "/api/v2/authorization/divisionspermitted/me".sub('{format}','json') # query parameters query_params = {} query_params[:'permission'] = permission query_params[:'name'] = opts[:'name'] if opts[:'name'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_authorization_divisionspermitted_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns which divisions the current user has the given permission in. # # @param permission The permission string, including the object to access, e.g. routing:queue:view # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @return [DivsPermittedEntityListing] def get_authorization_divisionspermitted_paged_me(permission, opts = {}) data, _status_code, _headers = get_authorization_divisionspermitted_paged_me_with_http_info(permission, opts) return data end # Returns which divisions the current user has the given permission in. # # @param permission The permission string, including the object to access, e.g. routing:queue:view # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @return [Array<(DivsPermittedEntityListing, Fixnum, Hash)>] DivsPermittedEntityListing data, response status code and response headers def get_authorization_divisionspermitted_paged_me_with_http_info(permission, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_authorization_divisionspermitted_paged_me ..." end # verify the required parameter 'permission' is set fail ArgumentError, "Missing the required parameter 'permission' when calling UsersApi.get_authorization_divisionspermitted_paged_me" if permission.nil? # resource path local_var_path = "/api/v2/authorization/divisionspermitted/paged/me".sub('{format}','json') # query parameters query_params = {} query_params[:'permission'] = permission query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DivsPermittedEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_authorization_divisionspermitted_paged_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns which divisions the specified user has the given permission in. # This route is deprecated, use authorization/divisionspermitted/paged/me instead. # @param subject_id Subject ID (user or group) # @param permission The permission string, including the object to access, e.g. routing:queue:view # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @return [DivsPermittedEntityListing] def get_authorization_divisionspermitted_paged_subject_id(subject_id, permission, opts = {}) data, _status_code, _headers = get_authorization_divisionspermitted_paged_subject_id_with_http_info(subject_id, permission, opts) return data end # Returns which divisions the specified user has the given permission in. # This route is deprecated, use authorization/divisionspermitted/paged/me instead. # @param subject_id Subject ID (user or group) # @param permission The permission string, including the object to access, e.g. routing:queue:view # @param [Hash] opts the optional parameters # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @return [Array<(DivsPermittedEntityListing, Fixnum, Hash)>] DivsPermittedEntityListing data, response status code and response headers def get_authorization_divisionspermitted_paged_subject_id_with_http_info(subject_id, permission, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_authorization_divisionspermitted_paged_subject_id ..." end # verify the required parameter 'subject_id' is set fail ArgumentError, "Missing the required parameter 'subject_id' when calling UsersApi.get_authorization_divisionspermitted_paged_subject_id" if subject_id.nil? # verify the required parameter 'permission' is set fail ArgumentError, "Missing the required parameter 'permission' when calling UsersApi.get_authorization_divisionspermitted_paged_subject_id" if permission.nil? # resource path local_var_path = "/api/v2/authorization/divisionspermitted/paged/{subjectId}".sub('{format}','json').sub('{' + 'subjectId' + '}', subject_id.to_s) # query parameters query_params = {} query_params[:'permission'] = permission query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DivsPermittedEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_authorization_divisionspermitted_paged_subject_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns which divisions the specified user has the given permission in. # This route is deprecated, use authorization/divisionspermitted/paged/{subjectId} instead. # @param subject_id Subject ID (user or group) # @param permission The permission string, including the object to access, e.g. routing:queue:view # @param [Hash] opts the optional parameters # @option opts [String] :name Search term to filter by division name # @return [Array] def get_authorization_divisionspermitted_subject_id(subject_id, permission, opts = {}) data, _status_code, _headers = get_authorization_divisionspermitted_subject_id_with_http_info(subject_id, permission, opts) return data end # Returns which divisions the specified user has the given permission in. # This route is deprecated, use authorization/divisionspermitted/paged/{subjectId} instead. # @param subject_id Subject ID (user or group) # @param permission The permission string, including the object to access, e.g. routing:queue:view # @param [Hash] opts the optional parameters # @option opts [String] :name Search term to filter by division name # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_authorization_divisionspermitted_subject_id_with_http_info(subject_id, permission, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_authorization_divisionspermitted_subject_id ..." end # verify the required parameter 'subject_id' is set fail ArgumentError, "Missing the required parameter 'subject_id' when calling UsersApi.get_authorization_divisionspermitted_subject_id" if subject_id.nil? # verify the required parameter 'permission' is set fail ArgumentError, "Missing the required parameter 'permission' when calling UsersApi.get_authorization_divisionspermitted_subject_id" if permission.nil? # resource path local_var_path = "/api/v2/authorization/divisionspermitted/{subjectId}".sub('{format}','json').sub('{' + 'subjectId' + '}', subject_id.to_s) # query parameters query_params = {} query_params[:'permission'] = permission query_params[:'name'] = opts[:'name'] if opts[:'name'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_authorization_divisionspermitted_subject_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns a listing of roles and permissions for a user. # # @param subject_id Subject ID (user or group) # @param [Hash] opts the optional parameters # @return [AuthzSubject] def get_authorization_subject(subject_id, opts = {}) data, _status_code, _headers = get_authorization_subject_with_http_info(subject_id, opts) return data end # Returns a listing of roles and permissions for a user. # # @param subject_id Subject ID (user or group) # @param [Hash] opts the optional parameters # @return [Array<(AuthzSubject, Fixnum, Hash)>] AuthzSubject data, response status code and response headers def get_authorization_subject_with_http_info(subject_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_authorization_subject ..." end # verify the required parameter 'subject_id' is set fail ArgumentError, "Missing the required parameter 'subject_id' when calling UsersApi.get_authorization_subject" if subject_id.nil? # resource path local_var_path = "/api/v2/authorization/subjects/{subjectId}".sub('{format}','json').sub('{' + 'subjectId' + '}', subject_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AuthzSubject') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_authorization_subject\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns a listing of roles and permissions for the currently authenticated user. # # @param [Hash] opts the optional parameters # @return [AuthzSubject] def get_authorization_subjects_me(opts = {}) data, _status_code, _headers = get_authorization_subjects_me_with_http_info(opts) return data end # Returns a listing of roles and permissions for the currently authenticated user. # # @param [Hash] opts the optional parameters # @return [Array<(AuthzSubject, Fixnum, Hash)>] AuthzSubject data, response status code and response headers def get_authorization_subjects_me_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_authorization_subjects_me ..." end # resource path local_var_path = "/api/v2/authorization/subjects/me".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AuthzSubject') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_authorization_subjects_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Fetch field config for an entity type # # @param type Field type # @param [Hash] opts the optional parameters # @return [FieldConfig] def get_fieldconfig(type, opts = {}) data, _status_code, _headers = get_fieldconfig_with_http_info(type, opts) return data end # Fetch field config for an entity type # # @param type Field type # @param [Hash] opts the optional parameters # @return [Array<(FieldConfig, Fixnum, Hash)>] FieldConfig data, response status code and response headers def get_fieldconfig_with_http_info(type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_fieldconfig ..." end # verify the required parameter 'type' is set fail ArgumentError, "Missing the required parameter 'type' when calling UsersApi.get_fieldconfig" if type.nil? # verify enum value unless ['person', 'group', 'org', 'externalContact'].include?(type) fail ArgumentError, "invalid value for 'type', must be one of person, group, org, externalContact" end # resource path local_var_path = "/api/v2/fieldconfig".sub('{format}','json') # query parameters query_params = {} query_params[:'type'] = type # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FieldConfig') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_fieldconfig\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a user profile listing # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Array] :id id # @option opts [Array] :jid jid # @option opts [String] :sort_order Ascending or descending sort order (default to ASC) # @option opts [Array] :expand Which fields, if any, to expand # @return [UserProfileEntityListing] def get_profiles_users(opts = {}) data, _status_code, _headers = get_profiles_users_with_http_info(opts) return data end # Get a user profile listing # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [Array] :id id # @option opts [Array] :jid jid # @option opts [String] :sort_order Ascending or descending sort order # @option opts [Array] :expand Which fields, if any, to expand # @return [Array<(UserProfileEntityListing, Fixnum, Hash)>] UserProfileEntityListing data, response status code and response headers def get_profiles_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_profiles_users ..." end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending' end # resource path local_var_path = "/api/v2/profiles/users".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id'] query_params[:'jid'] = @api_client.build_collection_param(opts[:'jid'], :multi) if opts[:'jid'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserProfileEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_profiles_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the user's max utilization settings. If not configured, the organization-wide default is returned. # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Utilization] def get_routing_user_utilization(user_id, opts = {}) data, _status_code, _headers = get_routing_user_utilization_with_http_info(user_id, opts) return data end # Get the user's max utilization settings. If not configured, the organization-wide default is returned. # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(Utilization, Fixnum, Hash)>] Utilization data, response status code and response headers def get_routing_user_utilization_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_routing_user_utilization ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_routing_user_utilization" if user_id.nil? # resource path local_var_path = "/api/v2/routing/users/{userId}/utilization".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Utilization') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_routing_user_utilization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get user. # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand # @option opts [String] :state Search for a user with this state (default to active) # @return [User] def get_user(user_id, opts = {}) data, _status_code, _headers = get_user_with_http_info(user_id, opts) return data end # Get user. # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand # @option opts [String] :state Search for a user with this state # @return [Array<(User, Fixnum, Hash)>] User data, response status code and response headers def get_user_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user" if user_id.nil? if opts[:'state'] && !['active', 'deleted'].include?(opts[:'state']) fail ArgumentError, 'invalid value for "state", must be one of active, deleted' end # resource path local_var_path = "/api/v2/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'state'] = opts[:'state'] if opts[:'state'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get adjacents # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand # @return [Adjacents] def get_user_adjacents(user_id, opts = {}) data, _status_code, _headers = get_user_adjacents_with_http_info(user_id, opts) return data end # Get adjacents # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand # @return [Array<(Adjacents, Fixnum, Hash)>] Adjacents data, response status code and response headers def get_user_adjacents_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_adjacents ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_adjacents" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/adjacents".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Adjacents') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_adjacents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a user's CallForwarding # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [CallForwarding] def get_user_callforwarding(user_id, opts = {}) data, _status_code, _headers = get_user_callforwarding_with_http_info(user_id, opts) return data end # Get a user's CallForwarding # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(CallForwarding, Fixnum, Hash)>] CallForwarding data, response status code and response headers def get_user_callforwarding_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_callforwarding ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_callforwarding" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/callforwarding".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CallForwarding') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get direct reports # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand # @return [Array] def get_user_directreports(user_id, opts = {}) data, _status_code, _headers = get_user_directreports_with_http_info(user_id, opts) return data end # Get direct reports # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_user_directreports_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_directreports ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_directreports" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/directreports".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_directreports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get favorites # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @option opts [String] :sort_order Sort order (default to ASC) # @option opts [Array] :expand Which fields, if any, to expand # @return [UserEntityListing] def get_user_favorites(user_id, opts = {}) data, _status_code, _headers = get_user_favorites_with_http_info(user_id, opts) return data end # Get favorites # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :sort_order Sort order # @option opts [Array] :expand Which fields, if any, to expand # @return [Array<(UserEntityListing, Fixnum, Hash)>] UserEntityListing data, response status code and response headers def get_user_favorites_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_favorites ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_favorites" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/favorites".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_favorites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a user's Geolocation # # @param user_id user Id # @param client_id client Id # @param [Hash] opts the optional parameters # @return [Geolocation] def get_user_geolocation(user_id, client_id, opts = {}) data, _status_code, _headers = get_user_geolocation_with_http_info(user_id, client_id, opts) return data end # Get a user's Geolocation # # @param user_id user Id # @param client_id client Id # @param [Hash] opts the optional parameters # @return [Array<(Geolocation, Fixnum, Hash)>] Geolocation data, response status code and response headers def get_user_geolocation_with_http_info(user_id, client_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_geolocation ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_geolocation" if user_id.nil? # verify the required parameter 'client_id' is set fail ArgumentError, "Missing the required parameter 'client_id' when calling UsersApi.get_user_geolocation" if client_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/geolocations/{clientId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'clientId' + '}', client_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Geolocation') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_geolocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a OutOfOffice # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [OutOfOffice] def get_user_outofoffice(user_id, opts = {}) data, _status_code, _headers = get_user_outofoffice_with_http_info(user_id, opts) return data end # Get a OutOfOffice # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(OutOfOffice, Fixnum, Hash)>] OutOfOffice data, response status code and response headers def get_user_outofoffice_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_outofoffice ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_outofoffice" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/outofoffice".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OutOfOffice') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_outofoffice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get user profile # # @param user_id userId # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand # @return [UserProfile] def get_user_profile(user_id, opts = {}) data, _status_code, _headers = get_user_profile_with_http_info(user_id, opts) return data end # Get user profile # # @param user_id userId # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand # @return [Array<(UserProfile, Fixnum, Hash)>] UserProfile data, response status code and response headers def get_user_profile_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_profile ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_profile" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/profile".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserProfile') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List profile skills for a user # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array] def get_user_profileskills(user_id, opts = {}) data, _status_code, _headers = get_user_profileskills_with_http_info(user_id, opts) return data end # List profile skills for a user # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_user_profileskills_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_profileskills ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_profileskills" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/profileskills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_profileskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get queues for user # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @option opts [BOOLEAN] :joined Is joined to the queue (default to true) # @option opts [Array] :division_id Division ID(s) # @return [UserQueueEntityListing] def get_user_queues(user_id, opts = {}) data, _status_code, _headers = get_user_queues_with_http_info(user_id, opts) return data end # Get queues for user # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [BOOLEAN] :joined Is joined to the queue # @option opts [Array] :division_id Division ID(s) # @return [Array<(UserQueueEntityListing, Fixnum, Hash)>] UserQueueEntityListing data, response status code and response headers def get_user_queues_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_queues ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_queues" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/queues".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'joined'] = opts[:'joined'] if opts[:'joined'] query_params[:'divisionId'] = @api_client.build_collection_param(opts[:'division_id'], :multi) if opts[:'division_id'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserQueueEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_queues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Returns a listing of roles and permissions for a user. # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [UserAuthorization] def get_user_roles(user_id, opts = {}) data, _status_code, _headers = get_user_roles_with_http_info(user_id, opts) return data end # Returns a listing of roles and permissions for a user. # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(UserAuthorization, Fixnum, Hash)>] UserAuthorization data, response status code and response headers def get_user_roles_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_roles ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_roles" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/roles".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserAuthorization') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List routing language for user # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @option opts [String] :sort_order Ascending or descending sort order (default to ASC) # @return [UserLanguageEntityListing] def get_user_routinglanguages(user_id, opts = {}) data, _status_code, _headers = get_user_routinglanguages_with_http_info(user_id, opts) return data end # List routing language for user # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :sort_order Ascending or descending sort order # @return [Array<(UserLanguageEntityListing, Fixnum, Hash)>] UserLanguageEntityListing data, response status code and response headers def get_user_routinglanguages_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_routinglanguages ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_routinglanguages" if user_id.nil? if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending' end # resource path local_var_path = "/api/v2/users/{userId}/routinglanguages".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserLanguageEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_routinglanguages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List routing skills for user # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @option opts [String] :sort_order Ascending or descending sort order (default to ASC) # @return [UserSkillEntityListing] def get_user_routingskills(user_id, opts = {}) data, _status_code, _headers = get_user_routingskills_with_http_info(user_id, opts) return data end # List routing skills for user # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :sort_order Ascending or descending sort order # @return [Array<(UserSkillEntityListing, Fixnum, Hash)>] UserSkillEntityListing data, response status code and response headers def get_user_routingskills_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_routingskills ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_routingskills" if user_id.nil? if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending' end # resource path local_var_path = "/api/v2/users/{userId}/routingskills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserSkillEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_routingskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Fetch the routing status of a user # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [RoutingStatus] def get_user_routingstatus(user_id, opts = {}) data, _status_code, _headers = get_user_routingstatus_with_http_info(user_id, opts) return data end # Fetch the routing status of a user # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(RoutingStatus, Fixnum, Hash)>] RoutingStatus data, response status code and response headers def get_user_routingstatus_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_routingstatus ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_routingstatus" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingstatus".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RoutingStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_routingstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get station information for user # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [UserStations] def get_user_station(user_id, opts = {}) data, _status_code, _headers = get_user_station_with_http_info(user_id, opts) return data end # Get station information for user # # @param user_id User ID # @param [Hash] opts the optional parameters # @return [Array<(UserStations, Fixnum, Hash)>] UserStations data, response status code and response headers def get_user_station_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_station ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_station" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/station".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserStations') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_station\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get superiors # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand # @return [Array] def get_user_superiors(user_id, opts = {}) data, _status_code, _headers = get_user_superiors_with_http_info(user_id, opts) return data end # Get superiors # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def get_user_superiors_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_superiors ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_superiors" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/superiors".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_superiors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List the organizations that have authorized/trusted the user. # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @return [TrustorEntityListing] def get_user_trustors(user_id, opts = {}) data, _status_code, _headers = get_user_trustors_with_http_info(user_id, opts) return data end # List the organizations that have authorized/trusted the user. # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(TrustorEntityListing, Fixnum, Hash)>] TrustorEntityListing data, response status code and response headers def get_user_trustors_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user_trustors ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_trustors" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/trustors".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TrustorEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user_trustors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the list of available users. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Array] :id A list of user IDs to fetch by bulk # @option opts [Array] :jabber_id A list of jabberIds to fetch by bulk (cannot be used with the \"id\" parameter) # @option opts [String] :sort_order Ascending or descending sort order (default to ASC) # @option opts [Array] :expand Which fields, if any, to expand # @option opts [String] :state Only list users of this state (default to active) # @return [UserEntityListing] def get_users(opts = {}) data, _status_code, _headers = get_users_with_http_info(opts) return data end # Get the list of available users. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [Array] :id A list of user IDs to fetch by bulk # @option opts [Array] :jabber_id A list of jabberIds to fetch by bulk (cannot be used with the \"id\" parameter) # @option opts [String] :sort_order Ascending or descending sort order # @option opts [Array] :expand Which fields, if any, to expand # @option opts [String] :state Only list users of this state # @return [Array<(UserEntityListing, Fixnum, Hash)>] UserEntityListing data, response status code and response headers def get_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_users ..." end if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order']) fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending' end if opts[:'state'] && !['active', 'inactive', 'deleted', 'any'].include?(opts[:'state']) fail ArgumentError, 'invalid value for "state", must be one of active, inactive, deleted, any' end # resource path local_var_path = "/api/v2/users".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id'] query_params[:'jabberId'] = @api_client.build_collection_param(opts[:'jabber_id'], :multi) if opts[:'jabber_id'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'state'] = opts[:'state'] if opts[:'state'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get current user details. # This request is not valid when using the Client Credentials OAuth grant. # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand. # @return [UserMe] def get_users_me(opts = {}) data, _status_code, _headers = get_users_me_with_http_info(opts) return data end # Get current user details. # This request is not valid when using the Client Credentials OAuth grant. # @param [Hash] opts the optional parameters # @option opts [Array] :expand Which fields, if any, to expand. # @return [Array<(UserMe, Fixnum, Hash)>] UserMe data, response status code and response headers def get_users_me_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_users_me ..." end # resource path local_var_path = "/api/v2/users/me".sub('{format}','json') # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserMe') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_users_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Search users using the q64 value returned from a previous search # # @param q64 q64 # @param [Hash] opts the optional parameters # @option opts [Array] :expand expand # @return [UsersSearchResponse] def get_users_search(q64, opts = {}) data, _status_code, _headers = get_users_search_with_http_info(q64, opts) return data end # Search users using the q64 value returned from a previous search # # @param q64 q64 # @param [Hash] opts the optional parameters # @option opts [Array] :expand expand # @return [Array<(UsersSearchResponse, Fixnum, Hash)>] UsersSearchResponse data, response status code and response headers def get_users_search_with_http_info(q64, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_users_search ..." end # verify the required parameter 'q64' is set fail ArgumentError, "Missing the required parameter 'q64' when calling UsersApi.get_users_search" if q64.nil? # resource path local_var_path = "/api/v2/users/search".sub('{format}','json') # query parameters query_params = {} query_params[:'q64'] = q64 query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UsersSearchResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_users_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update user # # @param user_id User ID # @param body User # @param [Hash] opts the optional parameters # @return [User] def patch_user(user_id, body, opts = {}) data, _status_code, _headers = patch_user_with_http_info(user_id, body, opts) return data end # Update user # # @param user_id User ID # @param body User # @param [Hash] opts the optional parameters # @return [Array<(User, Fixnum, Hash)>] User data, response status code and response headers def patch_user_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Patch a user's CallForwarding # # @param user_id User ID # @param body Call forwarding # @param [Hash] opts the optional parameters # @return [CallForwarding] def patch_user_callforwarding(user_id, body, opts = {}) data, _status_code, _headers = patch_user_callforwarding_with_http_info(user_id, body, opts) return data end # Patch a user's CallForwarding # # @param user_id User ID # @param body Call forwarding # @param [Hash] opts the optional parameters # @return [Array<(CallForwarding, Fixnum, Hash)>] CallForwarding data, response status code and response headers def patch_user_callforwarding_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_callforwarding ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_callforwarding" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_callforwarding" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/callforwarding".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CallForwarding') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Patch a user's Geolocation # The geolocation object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the client as the user's primary geolocation source. Option 2: Provide the 'latitude' and 'longitude' values. This will enqueue an asynchronous update of the 'city', 'region', and 'country', generating a notification. A subsequent GET operation will include the new values for 'city', 'region' and 'country'. Option 3: Provide the 'city', 'region', 'country' values. Option 1 can be combined with Option 2 or Option 3. For example, update the client as primary and provide latitude and longitude values. # @param user_id user Id # @param client_id client Id # @param body Geolocation # @param [Hash] opts the optional parameters # @return [Geolocation] def patch_user_geolocation(user_id, client_id, body, opts = {}) data, _status_code, _headers = patch_user_geolocation_with_http_info(user_id, client_id, body, opts) return data end # Patch a user's Geolocation # The geolocation object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the client as the user's primary geolocation source. Option 2: Provide the 'latitude' and 'longitude' values. This will enqueue an asynchronous update of the 'city', 'region', and 'country', generating a notification. A subsequent GET operation will include the new values for 'city', 'region' and 'country'. Option 3: Provide the 'city', 'region', 'country' values. Option 1 can be combined with Option 2 or Option 3. For example, update the client as primary and provide latitude and longitude values. # @param user_id user Id # @param client_id client Id # @param body Geolocation # @param [Hash] opts the optional parameters # @return [Array<(Geolocation, Fixnum, Hash)>] Geolocation data, response status code and response headers def patch_user_geolocation_with_http_info(user_id, client_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_geolocation ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_geolocation" if user_id.nil? # verify the required parameter 'client_id' is set fail ArgumentError, "Missing the required parameter 'client_id' when calling UsersApi.patch_user_geolocation" if client_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_geolocation" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/geolocations/{clientId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'clientId' + '}', client_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Geolocation') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_geolocation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Join or unjoin a queue for a user # # @param queue_id Queue ID # @param user_id User ID # @param body Queue Member # @param [Hash] opts the optional parameters # @return [UserQueue] def patch_user_queue(queue_id, user_id, body, opts = {}) data, _status_code, _headers = patch_user_queue_with_http_info(queue_id, user_id, body, opts) return data end # Join or unjoin a queue for a user # # @param queue_id Queue ID # @param user_id User ID # @param body Queue Member # @param [Hash] opts the optional parameters # @return [Array<(UserQueue, Fixnum, Hash)>] UserQueue data, response status code and response headers def patch_user_queue_with_http_info(queue_id, user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_queue ..." end # verify the required parameter 'queue_id' is set fail ArgumentError, "Missing the required parameter 'queue_id' when calling UsersApi.patch_user_queue" if queue_id.nil? # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_queue" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_queue" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserQueue') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Join or unjoin a set of queues for a user # # @param user_id User ID # @param body User Queues # @param [Hash] opts the optional parameters # @option opts [Array] :division_id Division ID(s) # @return [UserQueueEntityListing] def patch_user_queues(user_id, body, opts = {}) data, _status_code, _headers = patch_user_queues_with_http_info(user_id, body, opts) return data end # Join or unjoin a set of queues for a user # # @param user_id User ID # @param body User Queues # @param [Hash] opts the optional parameters # @option opts [Array] :division_id Division ID(s) # @return [Array<(UserQueueEntityListing, Fixnum, Hash)>] UserQueueEntityListing data, response status code and response headers def patch_user_queues_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_queues ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_queues" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_queues" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/queues".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'divisionId'] = @api_client.build_collection_param(opts[:'division_id'], :multi) if opts[:'division_id'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserQueueEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_queues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update routing language proficiency or state. # # @param user_id User ID # @param language_id languageId # @param body Language # @param [Hash] opts the optional parameters # @return [UserRoutingLanguage] def patch_user_routinglanguage(user_id, language_id, body, opts = {}) data, _status_code, _headers = patch_user_routinglanguage_with_http_info(user_id, language_id, body, opts) return data end # Update routing language proficiency or state. # # @param user_id User ID # @param language_id languageId # @param body Language # @param [Hash] opts the optional parameters # @return [Array<(UserRoutingLanguage, Fixnum, Hash)>] UserRoutingLanguage data, response status code and response headers def patch_user_routinglanguage_with_http_info(user_id, language_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_routinglanguage ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_routinglanguage" if user_id.nil? # verify the required parameter 'language_id' is set fail ArgumentError, "Missing the required parameter 'language_id' when calling UsersApi.patch_user_routinglanguage" if language_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_routinglanguage" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routinglanguages/{languageId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'languageId' + '}', language_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserRoutingLanguage') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_routinglanguage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add bulk routing language to user. Max limit 50 languages # # @param user_id User ID # @param body Language # @param [Hash] opts the optional parameters # @return [UserLanguageEntityListing] def patch_user_routinglanguages_bulk(user_id, body, opts = {}) data, _status_code, _headers = patch_user_routinglanguages_bulk_with_http_info(user_id, body, opts) return data end # Add bulk routing language to user. Max limit 50 languages # # @param user_id User ID # @param body Language # @param [Hash] opts the optional parameters # @return [Array<(UserLanguageEntityListing, Fixnum, Hash)>] UserLanguageEntityListing data, response status code and response headers def patch_user_routinglanguages_bulk_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_routinglanguages_bulk ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_routinglanguages_bulk" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_routinglanguages_bulk" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routinglanguages/bulk".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserLanguageEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_routinglanguages_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Bulk add routing skills to user # # @param user_id User ID # @param body Skill # @param [Hash] opts the optional parameters # @return [UserSkillEntityListing] def patch_user_routingskills_bulk(user_id, body, opts = {}) data, _status_code, _headers = patch_user_routingskills_bulk_with_http_info(user_id, body, opts) return data end # Bulk add routing skills to user # # @param user_id User ID # @param body Skill # @param [Hash] opts the optional parameters # @return [Array<(UserSkillEntityListing, Fixnum, Hash)>] UserSkillEntityListing data, response status code and response headers def patch_user_routingskills_bulk_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_user_routingskills_bulk ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.patch_user_routingskills_bulk" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_user_routingskills_bulk" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingskills/bulk".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserSkillEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_user_routingskills_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update bulk acd autoanswer on users # # @param body Users # @param [Hash] opts the optional parameters # @return [UserEntityListing] def patch_users_bulk(body, opts = {}) data, _status_code, _headers = patch_users_bulk_with_http_info(body, opts) return data end # Update bulk acd autoanswer on users # # @param body Users # @param [Hash] opts the optional parameters # @return [Array<(UserEntityListing, Fixnum, Hash)>] UserEntityListing data, response status code and response headers def patch_users_bulk_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.patch_users_bulk ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.patch_users_bulk" if body.nil? # resource path local_var_path = "/api/v2/users/bulk".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#patch_users_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query for user aggregates # # @param body query # @param [Hash] opts the optional parameters # @return [UserAggregateQueryResponse] def post_analytics_users_aggregates_query(body, opts = {}) data, _status_code, _headers = post_analytics_users_aggregates_query_with_http_info(body, opts) return data end # Query for user aggregates # # @param body query # @param [Hash] opts the optional parameters # @return [Array<(UserAggregateQueryResponse, Fixnum, Hash)>] UserAggregateQueryResponse data, response status code and response headers def post_analytics_users_aggregates_query_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_analytics_users_aggregates_query ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_analytics_users_aggregates_query" if body.nil? # resource path local_var_path = "/api/v2/analytics/users/aggregates/query".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserAggregateQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_analytics_users_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query for user details asynchronously # # @param body query # @param [Hash] opts the optional parameters # @return [AsyncQueryResponse] def post_analytics_users_details_jobs(body, opts = {}) data, _status_code, _headers = post_analytics_users_details_jobs_with_http_info(body, opts) return data end # Query for user details asynchronously # # @param body query # @param [Hash] opts the optional parameters # @return [Array<(AsyncQueryResponse, Fixnum, Hash)>] AsyncQueryResponse data, response status code and response headers def post_analytics_users_details_jobs_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_analytics_users_details_jobs ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_analytics_users_details_jobs" if body.nil? # resource path local_var_path = "/api/v2/analytics/users/details/jobs".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AsyncQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_analytics_users_details_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query for user details # # @param body query # @param [Hash] opts the optional parameters # @return [AnalyticsUserDetailsQueryResponse] def post_analytics_users_details_query(body, opts = {}) data, _status_code, _headers = post_analytics_users_details_query_with_http_info(body, opts) return data end # Query for user details # # @param body query # @param [Hash] opts the optional parameters # @return [Array<(AnalyticsUserDetailsQueryResponse, Fixnum, Hash)>] AnalyticsUserDetailsQueryResponse data, response status code and response headers def post_analytics_users_details_query_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_analytics_users_details_query ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_analytics_users_details_query" if body.nil? # resource path local_var_path = "/api/v2/analytics/users/details/query".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AnalyticsUserDetailsQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_analytics_users_details_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query for user observations # # @param body query # @param [Hash] opts the optional parameters # @return [UserObservationQueryResponse] def post_analytics_users_observations_query(body, opts = {}) data, _status_code, _headers = post_analytics_users_observations_query_with_http_info(body, opts) return data end # Query for user observations # # @param body query # @param [Hash] opts the optional parameters # @return [Array<(UserObservationQueryResponse, Fixnum, Hash)>] UserObservationQueryResponse data, response status code and response headers def post_analytics_users_observations_query_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_analytics_users_observations_query ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_analytics_users_observations_query" if body.nil? # resource path local_var_path = "/api/v2/analytics/users/observations/query".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserObservationQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_analytics_users_observations_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Bulk-grant roles and divisions to a subject. # # @param subject_id Subject ID (user or group) # @param body Pairs of role and division IDs # @param [Hash] opts the optional parameters # @option opts [String] :subject_type what the type of the subject is (PC_GROUP, PC_USER or PC_OAUTH_CLIENT) (default to PC_USER) # @return [nil] def post_authorization_subject_bulkadd(subject_id, body, opts = {}) post_authorization_subject_bulkadd_with_http_info(subject_id, body, opts) return nil end # Bulk-grant roles and divisions to a subject. # # @param subject_id Subject ID (user or group) # @param body Pairs of role and division IDs # @param [Hash] opts the optional parameters # @option opts [String] :subject_type what the type of the subject is (PC_GROUP, PC_USER or PC_OAUTH_CLIENT) # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_authorization_subject_bulkadd_with_http_info(subject_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_authorization_subject_bulkadd ..." end # verify the required parameter 'subject_id' is set fail ArgumentError, "Missing the required parameter 'subject_id' when calling UsersApi.post_authorization_subject_bulkadd" if subject_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_authorization_subject_bulkadd" if body.nil? # resource path local_var_path = "/api/v2/authorization/subjects/{subjectId}/bulkadd".sub('{format}','json').sub('{' + 'subjectId' + '}', subject_id.to_s) # query parameters query_params = {} query_params[:'subjectType'] = opts[:'subject_type'] if opts[:'subject_type'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_authorization_subject_bulkadd\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Bulk-remove grants from a subject. # # @param subject_id Subject ID (user or group) # @param body Pairs of role and division IDs # @param [Hash] opts the optional parameters # @return [nil] def post_authorization_subject_bulkremove(subject_id, body, opts = {}) post_authorization_subject_bulkremove_with_http_info(subject_id, body, opts) return nil end # Bulk-remove grants from a subject. # # @param subject_id Subject ID (user or group) # @param body Pairs of role and division IDs # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_authorization_subject_bulkremove_with_http_info(subject_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_authorization_subject_bulkremove ..." end # verify the required parameter 'subject_id' is set fail ArgumentError, "Missing the required parameter 'subject_id' when calling UsersApi.post_authorization_subject_bulkremove" if subject_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_authorization_subject_bulkremove" if body.nil? # resource path local_var_path = "/api/v2/authorization/subjects/{subjectId}/bulkremove".sub('{format}','json').sub('{' + 'subjectId' + '}', subject_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_authorization_subject_bulkremove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Make a grant of a role in a division # # @param subject_id Subject ID (user or group) # @param division_id the id of the division to which to make the grant # @param role_id the id of the role to grant # @param [Hash] opts the optional parameters # @option opts [String] :subject_type what the type of the subject is: PC_GROUP, PC_USER or PC_OAUTH_CLIENT (note: for cross-org authorization, please use the Organization Authorization endpoints) (default to PC_USER) # @return [nil] def post_authorization_subject_division_role(subject_id, division_id, role_id, opts = {}) post_authorization_subject_division_role_with_http_info(subject_id, division_id, role_id, opts) return nil end # Make a grant of a role in a division # # @param subject_id Subject ID (user or group) # @param division_id the id of the division to which to make the grant # @param role_id the id of the role to grant # @param [Hash] opts the optional parameters # @option opts [String] :subject_type what the type of the subject is: PC_GROUP, PC_USER or PC_OAUTH_CLIENT (note: for cross-org authorization, please use the Organization Authorization endpoints) # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_authorization_subject_division_role_with_http_info(subject_id, division_id, role_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_authorization_subject_division_role ..." end # verify the required parameter 'subject_id' is set fail ArgumentError, "Missing the required parameter 'subject_id' when calling UsersApi.post_authorization_subject_division_role" if subject_id.nil? # verify the required parameter 'division_id' is set fail ArgumentError, "Missing the required parameter 'division_id' when calling UsersApi.post_authorization_subject_division_role" if division_id.nil? # verify the required parameter 'role_id' is set fail ArgumentError, "Missing the required parameter 'role_id' when calling UsersApi.post_authorization_subject_division_role" if role_id.nil? # resource path local_var_path = "/api/v2/authorization/subjects/{subjectId}/divisions/{divisionId}/roles/{roleId}".sub('{format}','json').sub('{' + 'subjectId' + '}', subject_id.to_s).sub('{' + 'divisionId' + '}', division_id.to_s).sub('{' + 'roleId' + '}', role_id.to_s) # query parameters query_params = {} query_params[:'subjectType'] = opts[:'subject_type'] if opts[:'subject_type'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_authorization_subject_division_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Send an activation email to the user # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :force Resend the invitation even if one is already outstanding (default to false) # @return [nil] def post_user_invite(user_id, opts = {}) post_user_invite_with_http_info(user_id, opts) return nil end # Send an activation email to the user # # @param user_id User ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :force Resend the invitation even if one is already outstanding # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_user_invite_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_user_invite ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.post_user_invite" if user_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/invite".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'force'] = opts[:'force'] if opts[:'force'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_user_invite\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Change a users password # # @param user_id User ID # @param body Password # @param [Hash] opts the optional parameters # @return [nil] def post_user_password(user_id, body, opts = {}) post_user_password_with_http_info(user_id, body, opts) return nil end # Change a users password # # @param user_id User ID # @param body Password # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_user_password_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_user_password ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.post_user_password" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_user_password" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/password".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_user_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add routing language to user # # @param user_id User ID # @param body Language # @param [Hash] opts the optional parameters # @return [UserRoutingLanguage] def post_user_routinglanguages(user_id, body, opts = {}) data, _status_code, _headers = post_user_routinglanguages_with_http_info(user_id, body, opts) return data end # Add routing language to user # # @param user_id User ID # @param body Language # @param [Hash] opts the optional parameters # @return [Array<(UserRoutingLanguage, Fixnum, Hash)>] UserRoutingLanguage data, response status code and response headers def post_user_routinglanguages_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_user_routinglanguages ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.post_user_routinglanguages" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_user_routinglanguages" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routinglanguages".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserRoutingLanguage') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_user_routinglanguages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add routing skill to user # # @param user_id User ID # @param body Skill # @param [Hash] opts the optional parameters # @return [UserRoutingSkill] def post_user_routingskills(user_id, body, opts = {}) data, _status_code, _headers = post_user_routingskills_with_http_info(user_id, body, opts) return data end # Add routing skill to user # # @param user_id User ID # @param body Skill # @param [Hash] opts the optional parameters # @return [Array<(UserRoutingSkill, Fixnum, Hash)>] UserRoutingSkill data, response status code and response headers def post_user_routingskills_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_user_routingskills ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.post_user_routingskills" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_user_routingskills" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingskills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserRoutingSkill') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_user_routingskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create user # # @param body User # @param [Hash] opts the optional parameters # @return [User] def post_users(body, opts = {}) data, _status_code, _headers = post_users_with_http_info(body, opts) return data end # Create user # # @param body User # @param [Hash] opts the optional parameters # @return [Array<(User, Fixnum, Hash)>] User data, response status code and response headers def post_users_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_users ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_users" if body.nil? # resource path local_var_path = "/api/v2/users".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Change your password # # @param body Password # @param [Hash] opts the optional parameters # @return [nil] def post_users_me_password(body, opts = {}) post_users_me_password_with_http_info(body, opts) return nil end # Change your password # # @param body Password # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_users_me_password_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_users_me_password ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_users_me_password" if body.nil? # resource path local_var_path = "/api/v2/users/me/password".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_users_me_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Search users # # @param body Search request options # @param [Hash] opts the optional parameters # @return [UsersSearchResponse] def post_users_search(body, opts = {}) data, _status_code, _headers = post_users_search_with_http_info(body, opts) return data end # Search users # # @param body Search request options # @param [Hash] opts the optional parameters # @return [Array<(UsersSearchResponse, Fixnum, Hash)>] UsersSearchResponse data, response status code and response headers def post_users_search_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.post_users_search ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_users_search" if body.nil? # resource path local_var_path = "/api/v2/users/search".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UsersSearchResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_users_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update the user's max utilization settings. Include only those media types requiring custom configuration. # # @param user_id User ID # @param body utilization # @param [Hash] opts the optional parameters # @return [Utilization] def put_routing_user_utilization(user_id, body, opts = {}) data, _status_code, _headers = put_routing_user_utilization_with_http_info(user_id, body, opts) return data end # Update the user's max utilization settings. Include only those media types requiring custom configuration. # # @param user_id User ID # @param body utilization # @param [Hash] opts the optional parameters # @return [Array<(Utilization, Fixnum, Hash)>] Utilization data, response status code and response headers def put_routing_user_utilization_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_routing_user_utilization ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_routing_user_utilization" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_routing_user_utilization" if body.nil? # resource path local_var_path = "/api/v2/routing/users/{userId}/utilization".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Utilization') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_routing_user_utilization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a user's CallForwarding # # @param user_id User ID # @param body Call forwarding # @param [Hash] opts the optional parameters # @return [CallForwarding] def put_user_callforwarding(user_id, body, opts = {}) data, _status_code, _headers = put_user_callforwarding_with_http_info(user_id, body, opts) return data end # Update a user's CallForwarding # # @param user_id User ID # @param body Call forwarding # @param [Hash] opts the optional parameters # @return [Array<(CallForwarding, Fixnum, Hash)>] CallForwarding data, response status code and response headers def put_user_callforwarding_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_callforwarding ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_callforwarding" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_callforwarding" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/callforwarding".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CallForwarding') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an OutOfOffice # # @param user_id User ID # @param body The updated OutOffOffice # @param [Hash] opts the optional parameters # @return [OutOfOffice] def put_user_outofoffice(user_id, body, opts = {}) data, _status_code, _headers = put_user_outofoffice_with_http_info(user_id, body, opts) return data end # Update an OutOfOffice # # @param user_id User ID # @param body The updated OutOffOffice # @param [Hash] opts the optional parameters # @return [Array<(OutOfOffice, Fixnum, Hash)>] OutOfOffice data, response status code and response headers def put_user_outofoffice_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_outofoffice ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_outofoffice" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_outofoffice" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/outofoffice".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OutOfOffice') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_outofoffice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update profile skills for a user # # @param user_id User ID # @param body Skills # @param [Hash] opts the optional parameters # @return [Array] def put_user_profileskills(user_id, body, opts = {}) data, _status_code, _headers = put_user_profileskills_with_http_info(user_id, body, opts) return data end # Update profile skills for a user # # @param user_id User ID # @param body Skills # @param [Hash] opts the optional parameters # @return [Array<(Array, Fixnum, Hash)>] Array data, response status code and response headers def put_user_profileskills_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_profileskills ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_profileskills" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_profileskills" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/profileskills".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_profileskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Sets the user's roles # # @param user_id User ID # @param body List of roles # @param [Hash] opts the optional parameters # @return [UserAuthorization] def put_user_roles(user_id, body, opts = {}) data, _status_code, _headers = put_user_roles_with_http_info(user_id, body, opts) return data end # Sets the user's roles # # @param user_id User ID # @param body List of roles # @param [Hash] opts the optional parameters # @return [Array<(UserAuthorization, Fixnum, Hash)>] UserAuthorization data, response status code and response headers def put_user_roles_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_roles ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_roles" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_roles" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/roles".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserAuthorization') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update routing skill proficiency or state. # # @param user_id User ID # @param skill_id skillId # @param body Skill # @param [Hash] opts the optional parameters # @return [UserRoutingSkill] def put_user_routingskill(user_id, skill_id, body, opts = {}) data, _status_code, _headers = put_user_routingskill_with_http_info(user_id, skill_id, body, opts) return data end # Update routing skill proficiency or state. # # @param user_id User ID # @param skill_id skillId # @param body Skill # @param [Hash] opts the optional parameters # @return [Array<(UserRoutingSkill, Fixnum, Hash)>] UserRoutingSkill data, response status code and response headers def put_user_routingskill_with_http_info(user_id, skill_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_routingskill ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_routingskill" if user_id.nil? # verify the required parameter 'skill_id' is set fail ArgumentError, "Missing the required parameter 'skill_id' when calling UsersApi.put_user_routingskill" if skill_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_routingskill" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingskills/{skillId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'skillId' + '}', skill_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserRoutingSkill') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_routingskill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Replace all routing skills assigned to a user # # @param user_id User ID # @param body Skill # @param [Hash] opts the optional parameters # @return [UserSkillEntityListing] def put_user_routingskills_bulk(user_id, body, opts = {}) data, _status_code, _headers = put_user_routingskills_bulk_with_http_info(user_id, body, opts) return data end # Replace all routing skills assigned to a user # # @param user_id User ID # @param body Skill # @param [Hash] opts the optional parameters # @return [Array<(UserSkillEntityListing, Fixnum, Hash)>] UserSkillEntityListing data, response status code and response headers def put_user_routingskills_bulk_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_routingskills_bulk ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_routingskills_bulk" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_routingskills_bulk" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingskills/bulk".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserSkillEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_routingskills_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update the routing status of a user # # @param user_id User ID # @param body Routing Status # @param [Hash] opts the optional parameters # @return [RoutingStatus] def put_user_routingstatus(user_id, body, opts = {}) data, _status_code, _headers = put_user_routingstatus_with_http_info(user_id, body, opts) return data end # Update the routing status of a user # # @param user_id User ID # @param body Routing Status # @param [Hash] opts the optional parameters # @return [Array<(RoutingStatus, Fixnum, Hash)>] RoutingStatus data, response status code and response headers def put_user_routingstatus_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_routingstatus ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_routingstatus" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.put_user_routingstatus" if body.nil? # resource path local_var_path = "/api/v2/users/{userId}/routingstatus".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RoutingStatus') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_routingstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Set associated station # # @param user_id User ID # @param station_id stationId # @param [Hash] opts the optional parameters # @return [nil] def put_user_station_associatedstation_station_id(user_id, station_id, opts = {}) put_user_station_associatedstation_station_id_with_http_info(user_id, station_id, opts) return nil end # Set associated station # # @param user_id User ID # @param station_id stationId # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def put_user_station_associatedstation_station_id_with_http_info(user_id, station_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_station_associatedstation_station_id ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_station_associatedstation_station_id" if user_id.nil? # verify the required parameter 'station_id' is set fail ArgumentError, "Missing the required parameter 'station_id' when calling UsersApi.put_user_station_associatedstation_station_id" if station_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/station/associatedstation/{stationId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'stationId' + '}', station_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_station_associatedstation_station_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Set default station # # @param user_id User ID # @param station_id stationId # @param [Hash] opts the optional parameters # @return [nil] def put_user_station_defaultstation_station_id(user_id, station_id, opts = {}) put_user_station_defaultstation_station_id_with_http_info(user_id, station_id, opts) return nil end # Set default station # # @param user_id User ID # @param station_id stationId # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def put_user_station_defaultstation_station_id_with_http_info(user_id, station_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.put_user_station_defaultstation_station_id ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.put_user_station_defaultstation_station_id" if user_id.nil? # verify the required parameter 'station_id' is set fail ArgumentError, "Missing the required parameter 'station_id' when calling UsersApi.put_user_station_defaultstation_station_id" if station_id.nil? # resource path local_var_path = "/api/v2/users/{userId}/station/defaultstation/{stationId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'stationId' + '}', station_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#put_user_station_defaultstation_station_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end