class PureCloud::UsersApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/purecloud/api/users_api.rb, line 23
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

delete_user_id(user_id, opts = {}) click to toggle source

Delete user

@param user_id User ID @param [Hash] opts the optional parameters @return [Empty]

# File lib/purecloud/api/users_api.rb, line 32
def delete_user_id(user_id, opts = {})
  data, status_code, headers = delete_user_id_with_http_info(user_id, opts)
  return data
end
delete_user_id_roles(user_id, opts = {}) click to toggle source

Removes all the roles from the user.

@param user_id User ID @param [Hash] opts the optional parameters @return [nil]

# File lib/purecloud/api/users_api.rb, line 92
def delete_user_id_roles(user_id, opts = {})
  delete_user_id_roles_with_http_info(user_id, opts)
  return nil
end
delete_user_id_roles_with_http_info(user_id, opts = {}) click to toggle source

Removes all the roles from the user.

@param user_id User ID @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 102
def delete_user_id_roles_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#delete_user_id_roles ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling delete_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_user_id_routingskills_skill_id(user_id, skill_id, opts = {}) click to toggle source

Remove routing skill from user

@param user_id User ID @param skill_id skillId @param [Hash] opts the optional parameters @return [String]

# File lib/purecloud/api/users_api.rb, line 152
def delete_user_id_routingskills_skill_id(user_id, skill_id, opts = {})
  data, status_code, headers = delete_user_id_routingskills_skill_id_with_http_info(user_id, skill_id, opts)
  return data
end
delete_user_id_routingskills_skill_id_with_http_info(user_id, skill_id, opts = {}) click to toggle source

Remove routing skill from user

@param user_id User ID @param skill_id skillId @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 163
def delete_user_id_routingskills_skill_id_with_http_info(user_id, skill_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#delete_user_id_routingskills_skill_id ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling delete_user_id_routingskills_skill_id" if user_id.nil?
  
  # verify the required parameter 'skill_id' is set
  fail "Missing the required parameter 'skill_id' when calling delete_user_id_routingskills_skill_id" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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 => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#delete_user_id_routingskills_skill_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_user_id_station_associatedstation(user_id, opts = {}) click to toggle source

Clear associated station

@param user_id User ID @param [Hash] opts the optional parameters @return [nil]

# File lib/purecloud/api/users_api.rb, line 216
def delete_user_id_station_associatedstation(user_id, opts = {})
  delete_user_id_station_associatedstation_with_http_info(user_id, opts)
  return nil
end
delete_user_id_station_associatedstation_with_http_info(user_id, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 226
def delete_user_id_station_associatedstation_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#delete_user_id_station_associatedstation ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling delete_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_station_associatedstation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_user_id_station_defaultstation(user_id, opts = {}) click to toggle source

Clear default station

@param user_id User ID @param [Hash] opts the optional parameters @return [nil]

# File lib/purecloud/api/users_api.rb, line 275
def delete_user_id_station_defaultstation(user_id, opts = {})
  delete_user_id_station_defaultstation_with_http_info(user_id, opts)
  return nil
end
delete_user_id_station_defaultstation_with_http_info(user_id, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 285
def delete_user_id_station_defaultstation_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#delete_user_id_station_defaultstation ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling delete_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_station_defaultstation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
delete_user_id_with_http_info(user_id, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 42
def delete_user_id_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#delete_user_id ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling delete_user_id" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_fieldconfig(type, opts = {}) click to toggle source

Fetch field config for an entity type

@param type Field type @param [Hash] opts the optional parameters @return [FieldConfig]

# File lib/purecloud/api/users_api.rb, line 334
def get_fieldconfig(type, opts = {})
  data, status_code, headers = get_fieldconfig_with_http_info(type, opts)
  return data
end
get_fieldconfig_with_http_info(type, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 344
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 "Missing the required parameter 'type' when calling get_fieldconfig" if type.nil?
  unless ['person', 'group', 'org', 'externalContact'].include?(type)
    fail "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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_me(opts = {}) click to toggle source

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<String>] :expand Which fields, if any, to expand. @return [UserMe]

# File lib/purecloud/api/users_api.rb, line 398
def get_me(opts = {})
  data, status_code, headers = get_me_with_http_info(opts)
  return data
end
get_me_with_http_info(opts = {}) click to toggle source

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<String>] :expand Which fields, if any, to expand. @return [Array<(UserMe, Fixnum, Hash)>] UserMe data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 408
def get_me_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_search_with_http_info(q64, opts = {}) click to toggle source

Search users using the q64 value returned from a previous search

@param q64 q64 @param [Hash] opts the optional parameters @option opts [Array<String>] :expand expand @return [Array<(UsersSearchResponse, Fixnum, Hash)>] UsersSearchResponse data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 468
def get_search_with_http_info(q64, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_search ..."
  end
  
  # verify the required parameter 'q64' is set
  fail "Missing the required parameter 'q64' when calling get_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id(user_id, opts = {}) click to toggle source

Get user.

@param user_id User ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [User]

# File lib/purecloud/api/users_api.rb, line 521
def get_user_id(user_id, opts = {})
  data, status_code, headers = get_user_id_with_http_info(user_id, opts)
  return data
end
get_user_id_adjacents(user_id, opts = {}) click to toggle source

Get adjacents

@param user_id User ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Adjacents]

# File lib/purecloud/api/users_api.rb, line 584
def get_user_id_adjacents(user_id, opts = {})
  data, status_code, headers = get_user_id_adjacents_with_http_info(user_id, opts)
  return data
end
get_user_id_adjacents_with_http_info(user_id, opts = {}) click to toggle source

Get adjacents

@param user_id User ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(Adjacents, Fixnum, Hash)>] Adjacents data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 595
def get_user_id_adjacents_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_adjacents ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_adjacents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_callforwarding(user_id, opts = {}) click to toggle source

Get a user's CallForwarding

@param user_id User ID @param [Hash] opts the optional parameters @return [CallForwarding]

# File lib/purecloud/api/users_api.rb, line 646
def get_user_id_callforwarding(user_id, opts = {})
  data, status_code, headers = get_user_id_callforwarding_with_http_info(user_id, opts)
  return data
end
get_user_id_callforwarding_with_http_info(user_id, opts = {}) click to toggle source

Get a user&#39;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

# File lib/purecloud/api/users_api.rb, line 656
def get_user_id_callforwarding_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_callforwarding ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_directreports(user_id, opts = {}) click to toggle source

Get direct reports

@param user_id User ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<User>]

# File lib/purecloud/api/users_api.rb, line 707
def get_user_id_directreports(user_id, opts = {})
  data, status_code, headers = get_user_id_directreports_with_http_info(user_id, opts)
  return data
end
get_user_id_directreports_with_http_info(user_id, opts = {}) click to toggle source

Get direct reports

@param user_id User ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(Array<User>, Fixnum, Hash)>] Array<User> data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 718
def get_user_id_directreports_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_directreports ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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<User>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_id_directreports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_favorites(user_id, opts = {}) click to toggle source

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<String>] :expand Which fields, if any, to expand @return [UserEntityListing]

# File lib/purecloud/api/users_api.rb, line 773
def get_user_id_favorites(user_id, opts = {})
  data, status_code, headers = get_user_id_favorites_with_http_info(user_id, opts)
  return data
end
get_user_id_favorites_with_http_info(user_id, opts = {}) click to toggle source

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<String>] :expand Which fields, if any, to expand @return [Array<(UserEntityListing, Fixnum, Hash)>] UserEntityListing data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 787
def get_user_id_favorites_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_favorites ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_favorites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_geolocations_client_id(user_id, client_id, opts = {}) click to toggle source

Get a user's Geolocation

@param user_id user Id @param client_id client Id @param [Hash] opts the optional parameters @return [Geolocation]

# File lib/purecloud/api/users_api.rb, line 842
def get_user_id_geolocations_client_id(user_id, client_id, opts = {})
  data, status_code, headers = get_user_id_geolocations_client_id_with_http_info(user_id, client_id, opts)
  return data
end
get_user_id_geolocations_client_id_with_http_info(user_id, client_id, opts = {}) click to toggle source

Get a user&#39;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

# File lib/purecloud/api/users_api.rb, line 853
def get_user_id_geolocations_client_id_with_http_info(user_id, client_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_geolocations_client_id ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_geolocations_client_id" if user_id.nil?
  
  # verify the required parameter 'client_id' is set
  fail "Missing the required parameter 'client_id' when calling get_user_id_geolocations_client_id" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_geolocations_client_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_outofoffice(user_id, opts = {}) click to toggle source

Get a OutOfOffice

@param user_id User ID @param [Hash] opts the optional parameters @return [OutOfOffice]

# File lib/purecloud/api/users_api.rb, line 906
def get_user_id_outofoffice(user_id, opts = {})
  data, status_code, headers = get_user_id_outofoffice_with_http_info(user_id, opts)
  return data
end
get_user_id_outofoffice_with_http_info(user_id, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 916
def get_user_id_outofoffice_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_outofoffice ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_outofoffice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_profileskills(user_id, opts = {}) click to toggle source

List profile skills for a user

@param user_id User ID @param [Hash] opts the optional parameters @return [Array<String>]

# File lib/purecloud/api/users_api.rb, line 966
def get_user_id_profileskills(user_id, opts = {})
  data, status_code, headers = get_user_id_profileskills_with_http_info(user_id, opts)
  return data
end
get_user_id_profileskills_with_http_info(user_id, opts = {}) click to toggle source

List profile skills for a user

@param user_id User ID @param [Hash] opts the optional parameters @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 976
def get_user_id_profileskills_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_profileskills ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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<String>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_id_profileskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_queues(user_id, opts = {}) click to toggle source

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) @return [UserQueueEntityListing]

# File lib/purecloud/api/users_api.rb, line 1029
def get_user_id_queues(user_id, opts = {})
  data, status_code, headers = get_user_id_queues_with_http_info(user_id, opts)
  return data
end
get_user_id_queues_with_http_info(user_id, opts = {}) click to toggle source

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 @return [Array<(UserQueueEntityListing, Fixnum, Hash)>] UserQueueEntityListing data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 1042
def get_user_id_queues_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_queues ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_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']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_queues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_roles(user_id, opts = {}) click to toggle source

Returns a listing of roles and permissions for a user.

@param user_id User ID @param [Hash] opts the optional parameters @return [UserAuthorization]

# File lib/purecloud/api/users_api.rb, line 1095
def get_user_id_roles(user_id, opts = {})
  data, status_code, headers = get_user_id_roles_with_http_info(user_id, opts)
  return data
end
get_user_id_roles_with_http_info(user_id, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 1105
def get_user_id_roles_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_roles ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_routingskills(user_id, opts = {}) click to toggle source

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]

# File lib/purecloud/api/users_api.rb, line 1158
def get_user_id_routingskills(user_id, opts = {})
  data, status_code, headers = get_user_id_routingskills_with_http_info(user_id, opts)
  return data
end
get_user_id_routingskills_with_http_info(user_id, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 1171
def get_user_id_routingskills_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_routingskills ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_routingskills" if user_id.nil?
  
  if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order'])
    fail '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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_routingskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_routingstatus(user_id, opts = {}) click to toggle source

Fetch the routing status of a user

@param user_id User ID @param [Hash] opts the optional parameters @return [RoutingStatus]

# File lib/purecloud/api/users_api.rb, line 1228
def get_user_id_routingstatus(user_id, opts = {})
  data, status_code, headers = get_user_id_routingstatus_with_http_info(user_id, opts)
  return data
end
get_user_id_routingstatus_with_http_info(user_id, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 1238
def get_user_id_routingstatus_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_routingstatus ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_routingstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_station(user_id, opts = {}) click to toggle source

Get station information for user

@param user_id User ID @param [Hash] opts the optional parameters @return [UserStations]

# File lib/purecloud/api/users_api.rb, line 1288
def get_user_id_station(user_id, opts = {})
  data, status_code, headers = get_user_id_station_with_http_info(user_id, opts)
  return data
end
get_user_id_station_with_http_info(user_id, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 1298
def get_user_id_station_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_station ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_station\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_superiors(user_id, opts = {}) click to toggle source

Get superiors

@param user_id User ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<User>]

# File lib/purecloud/api/users_api.rb, line 1349
def get_user_id_superiors(user_id, opts = {})
  data, status_code, headers = get_user_id_superiors_with_http_info(user_id, opts)
  return data
end
get_user_id_superiors_with_http_info(user_id, opts = {}) click to toggle source

Get superiors

@param user_id User ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(Array<User>, Fixnum, Hash)>] Array<User> data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 1360
def get_user_id_superiors_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id_superiors ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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<User>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_id_superiors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_user_id_with_http_info(user_id, opts = {}) click to toggle source

Get user.

@param user_id User ID @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(User, Fixnum, Hash)>] User data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 532
def get_user_id_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#get_user_id ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling get_user_id" 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 = {}
  query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
get_users(opts = {}) click to toggle source

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<String>] :id id @option opts [String] :sort_order Ascending or descending sort order (default to ASC) @option opts [Array<String>] :expand Which fields, if any, to expand @return [UserEntityListing]

# File lib/purecloud/api/users_api.rb, line 1415
def get_users(opts = {})
  data, status_code, headers = get_users_with_http_info(opts)
  return data
end
get_users_with_http_info(opts = {}) click to toggle source

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<String>] :id id @option opts [String] :sort_order Ascending or descending sort order @option opts [Array<String>] :expand Which fields, if any, to expand @return [Array<(UserEntityListing, Fixnum, Hash)>] UserEntityListing data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 1429
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 'invalid value for "sort_order", must be one of ascending, descending'
  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[:'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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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
patch_user_id(user_id, body, opts = {}) click to toggle source

Update user

@param user_id User ID @param body User @param [Hash] opts the optional parameters @return [User]

# File lib/purecloud/api/users_api.rb, line 1486
def patch_user_id(user_id, body, opts = {})
  data, status_code, headers = patch_user_id_with_http_info(user_id, body, opts)
  return data
end
patch_user_id_callforwarding(user_id, body, opts = {}) click to toggle source

Patch a user's CallForwarding

@param user_id User ID @param body Call forwarding @param [Hash] opts the optional parameters @return [CallForwarding]

# File lib/purecloud/api/users_api.rb, line 1551
def patch_user_id_callforwarding(user_id, body, opts = {})
  data, status_code, headers = patch_user_id_callforwarding_with_http_info(user_id, body, opts)
  return data
end
patch_user_id_callforwarding_with_http_info(user_id, body, opts = {}) click to toggle source

Patch a user&#39;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

# File lib/purecloud/api/users_api.rb, line 1562
def patch_user_id_callforwarding_with_http_info(user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#patch_user_id_callforwarding ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling patch_user_id_callforwarding" if user_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling patch_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_id_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_user_id_geolocations_client_id(user_id, client_id, body, opts = {}) click to toggle source

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]

# File lib/purecloud/api/users_api.rb, line 1617
def patch_user_id_geolocations_client_id(user_id, client_id, body, opts = {})
  data, status_code, headers = patch_user_id_geolocations_client_id_with_http_info(user_id, client_id, body, opts)
  return data
end
patch_user_id_geolocations_client_id_with_http_info(user_id, client_id, body, opts = {}) click to toggle source

Patch a user&#39;s Geolocation The geolocation object can be patched one of three ways. Option 1: Set the &#39;primary&#39; property to true. This will set the client as the user&#39;s primary geolocation source. Option 2: Provide the &#39;latitude&#39; and &#39;longitude&#39; values. This will enqueue an asynchronous update of the &#39;city&#39;, &#39;region&#39;, and &#39;country&#39;, generating a notification. A subsequent GET operation will include the new values for &#39;city&#39;, &#39;region&#39; and &#39;country&#39;. Option 3: Provide the &#39;city&#39;, &#39;region&#39;, &#39;country&#39; 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

# File lib/purecloud/api/users_api.rb, line 1629
def patch_user_id_geolocations_client_id_with_http_info(user_id, client_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#patch_user_id_geolocations_client_id ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling patch_user_id_geolocations_client_id" if user_id.nil?
  
  # verify the required parameter 'client_id' is set
  fail "Missing the required parameter 'client_id' when calling patch_user_id_geolocations_client_id" if client_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling patch_user_id_geolocations_client_id" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_id_geolocations_client_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_user_id_queues(user_id, body, opts = {}) click to toggle source

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 @return [UserQueueEntityListing]

# File lib/purecloud/api/users_api.rb, line 1686
def patch_user_id_queues(user_id, body, opts = {})
  data, status_code, headers = patch_user_id_queues_with_http_info(user_id, body, opts)
  return data
end
patch_user_id_queues_queue_id(queue_id, user_id, body, opts = {}) click to toggle source

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]

# File lib/purecloud/api/users_api.rb, line 1752
def patch_user_id_queues_queue_id(queue_id, user_id, body, opts = {})
  data, status_code, headers = patch_user_id_queues_queue_id_with_http_info(queue_id, user_id, body, opts)
  return data
end
patch_user_id_queues_queue_id_with_http_info(queue_id, user_id, body, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 1764
def patch_user_id_queues_queue_id_with_http_info(queue_id, user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#patch_user_id_queues_queue_id ..."
  end
  
  # verify the required parameter 'queue_id' is set
  fail "Missing the required parameter 'queue_id' when calling patch_user_id_queues_queue_id" if queue_id.nil?
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling patch_user_id_queues_queue_id" if user_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling patch_user_id_queues_queue_id" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_id_queues_queue_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_user_id_queues_with_http_info(user_id, body, opts = {}) click to toggle source

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 @return [Array<(UserQueueEntityListing, Fixnum, Hash)>] UserQueueEntityListing data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 1697
def patch_user_id_queues_with_http_info(user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#patch_user_id_queues ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling patch_user_id_queues" if user_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling patch_user_id_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 = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_id_queues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
patch_user_id_with_http_info(user_id, body, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 1497
def patch_user_id_with_http_info(user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#patch_user_id ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling patch_user_id" if user_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling patch_user_id" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_search(body, opts = {}) click to toggle source

Search users

@param body Search request options @param [Hash] opts the optional parameters @return [UsersSearchResponse]

# File lib/purecloud/api/users_api.rb, line 1820
def post_search(body, opts = {})
  data, status_code, headers = post_search_with_http_info(body, opts)
  return data
end
post_search_with_http_info(body, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 1830
def post_search_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#post_search ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_user_id_routingskills(user_id, body, opts = {}) click to toggle source

Add routing skill to user

@param user_id User ID @param body Skill @param [Hash] opts the optional parameters @return [UserRoutingSkill]

# File lib/purecloud/api/users_api.rb, line 1881
def post_user_id_routingskills(user_id, body, opts = {})
  data, status_code, headers = post_user_id_routingskills_with_http_info(user_id, body, opts)
  return data
end
post_user_id_routingskills_with_http_info(user_id, body, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 1892
def post_user_id_routingskills_with_http_info(user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#post_user_id_routingskills ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling post_user_id_routingskills" if user_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_id_routingskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_users(body, opts = {}) click to toggle source

Create user

@param body User @param [Hash] opts the optional parameters @return [User]

# File lib/purecloud/api/users_api.rb, line 1945
def post_users(body, opts = {})
  data, status_code, headers = post_users_with_http_info(body, opts)
  return data
end
post_users_aggregates_query(body, opts = {}) click to toggle source

Query for user aggregates

@param body query @param [Hash] opts the optional parameters @return [PresenceQueryResponse]

# File lib/purecloud/api/users_api.rb, line 2005
def post_users_aggregates_query(body, opts = {})
  data, status_code, headers = post_users_aggregates_query_with_http_info(body, opts)
  return data
end
post_users_aggregates_query_with_http_info(body, opts = {}) click to toggle source

Query for user aggregates

@param body query @param [Hash] opts the optional parameters @return [Array<(PresenceQueryResponse, Fixnum, Hash)>] PresenceQueryResponse data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 2015
def post_users_aggregates_query_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#post_users_aggregates_query ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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 => 'PresenceQueryResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#post_users_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_users_details_query(body, opts = {}) click to toggle source

Query for user details

@param body query @param [Hash] opts the optional parameters @return [AnalyticsUserDetailsQueryResponse]

# File lib/purecloud/api/users_api.rb, line 2065
def post_users_details_query(body, opts = {})
  data, status_code, headers = post_users_details_query_with_http_info(body, opts)
  return data
end
post_users_details_query_with_http_info(body, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 2075
def post_users_details_query_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#post_users_details_query ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_users_details_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_users_observations_query(body, opts = {}) click to toggle source

Query for user observations

@param body query @param [Hash] opts the optional parameters @return [ObservationQueryResponse]

# File lib/purecloud/api/users_api.rb, line 2125
def post_users_observations_query(body, opts = {})
  data, status_code, headers = post_users_observations_query_with_http_info(body, opts)
  return data
end
post_users_observations_query_with_http_info(body, opts = {}) click to toggle source

Query for user observations

@param body query @param [Hash] opts the optional parameters @return [Array<(ObservationQueryResponse, Fixnum, Hash)>] ObservationQueryResponse data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 2135
def post_users_observations_query_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#post_users_observations_query ..."
  end
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling post_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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 => 'ObservationQueryResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#post_users_observations_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
post_users_with_http_info(body, opts = {}) click to toggle source

Create user

@param body User @param [Hash] opts the optional parameters @return [Array<(User, Fixnum, Hash)>] User data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 1955
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 "Missing the required parameter 'body' when calling 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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
put_user_id_callforwarding(user_id, body, opts = {}) click to toggle source

Update a user's CallForwarding

@param user_id User ID @param body Call forwarding @param [Hash] opts the optional parameters @return [CallForwarding]

# File lib/purecloud/api/users_api.rb, line 2186
def put_user_id_callforwarding(user_id, body, opts = {})
  data, status_code, headers = put_user_id_callforwarding_with_http_info(user_id, body, opts)
  return data
end
put_user_id_callforwarding_with_http_info(user_id, body, opts = {}) click to toggle source

Update a user&#39;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

# File lib/purecloud/api/users_api.rb, line 2197
def put_user_id_callforwarding_with_http_info(user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#put_user_id_callforwarding ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling put_user_id_callforwarding" if user_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling put_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_id_callforwarding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_user_id_outofoffice(user_id, body, opts = {}) click to toggle source

Update an OutOfOffice

@param user_id User ID @param body The updated UserPresence @param [Hash] opts the optional parameters @return [OutOfOffice]

# File lib/purecloud/api/users_api.rb, line 2251
def put_user_id_outofoffice(user_id, body, opts = {})
  data, status_code, headers = put_user_id_outofoffice_with_http_info(user_id, body, opts)
  return data
end
put_user_id_outofoffice_with_http_info(user_id, body, opts = {}) click to toggle source

Update an OutOfOffice

@param user_id User ID @param body The updated UserPresence @param [Hash] opts the optional parameters @return [Array<(OutOfOffice, Fixnum, Hash)>] OutOfOffice data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 2262
def put_user_id_outofoffice_with_http_info(user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#put_user_id_outofoffice ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling put_user_id_outofoffice" if user_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling put_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_id_outofoffice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_user_id_profileskills(user_id, opts = {}) click to toggle source

Update profile skills for a user

@param user_id User ID @param [Hash] opts the optional parameters @option opts [Array<String>] :body Skills @return [Array<String>]

# File lib/purecloud/api/users_api.rb, line 2316
def put_user_id_profileskills(user_id, opts = {})
  data, status_code, headers = put_user_id_profileskills_with_http_info(user_id, opts)
  return data
end
put_user_id_profileskills_with_http_info(user_id, opts = {}) click to toggle source

Update profile skills for a user

@param user_id User ID @param [Hash] opts the optional parameters @option opts [Array<String>] :body Skills @return [Array<(Array<String>, Fixnum, Hash)>] Array<String> data, response status code and response headers

# File lib/purecloud/api/users_api.rb, line 2327
def put_user_id_profileskills_with_http_info(user_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#put_user_id_profileskills ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling put_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  
  auth_names = ['PureCloud Auth']
  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<String>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#put_user_id_profileskills\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_user_id_roles(user_id, body, opts = {}) click to toggle source

Sets the user's roles

@param user_id User ID @param body List of roles @param [Hash] opts the optional parameters @return [UserAuthorization]

# File lib/purecloud/api/users_api.rb, line 2378
def put_user_id_roles(user_id, body, opts = {})
  data, status_code, headers = put_user_id_roles_with_http_info(user_id, body, opts)
  return data
end
put_user_id_roles_with_http_info(user_id, body, opts = {}) click to toggle source

Sets the user&#39;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

# File lib/purecloud/api/users_api.rb, line 2389
def put_user_id_roles_with_http_info(user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#put_user_id_roles ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling put_user_id_roles" if user_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling put_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_id_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_user_id_routingskills_skill_id(user_id, skill_id, body, opts = {}) click to toggle source

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]

# File lib/purecloud/api/users_api.rb, line 2444
def put_user_id_routingskills_skill_id(user_id, skill_id, body, opts = {})
  data, status_code, headers = put_user_id_routingskills_skill_id_with_http_info(user_id, skill_id, body, opts)
  return data
end
put_user_id_routingskills_skill_id_with_http_info(user_id, skill_id, body, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 2456
def put_user_id_routingskills_skill_id_with_http_info(user_id, skill_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#put_user_id_routingskills_skill_id ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling put_user_id_routingskills_skill_id" if user_id.nil?
  
  # verify the required parameter 'skill_id' is set
  fail "Missing the required parameter 'skill_id' when calling put_user_id_routingskills_skill_id" if skill_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling put_user_id_routingskills_skill_id" 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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_id_routingskills_skill_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_user_id_routingstatus(user_id, body, opts = {}) click to toggle source

Update the routing status of a user

@param user_id User ID @param body Routing Status @param [Hash] opts the optional parameters @return [RoutingStatus]

# File lib/purecloud/api/users_api.rb, line 2513
def put_user_id_routingstatus(user_id, body, opts = {})
  data, status_code, headers = put_user_id_routingstatus_with_http_info(user_id, body, opts)
  return data
end
put_user_id_routingstatus_with_http_info(user_id, body, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 2524
def put_user_id_routingstatus_with_http_info(user_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi#put_user_id_routingstatus ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling put_user_id_routingstatus" if user_id.nil?
  
  # verify the required parameter 'body' is set
  fail "Missing the required parameter 'body' when calling put_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['PureCloud Auth']
  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_id_routingstatus\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_user_id_station_associatedstation_station_id(user_id, station_id, opts = {}) click to toggle source

Set associated station

@param user_id User ID @param station_id stationId @param [Hash] opts the optional parameters @return [nil]

# File lib/purecloud/api/users_api.rb, line 2578
def put_user_id_station_associatedstation_station_id(user_id, station_id, opts = {})
  put_user_id_station_associatedstation_station_id_with_http_info(user_id, station_id, opts)
  return nil
end
put_user_id_station_associatedstation_station_id_with_http_info(user_id, station_id, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 2589
def put_user_id_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_id_station_associatedstation_station_id ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling put_user_id_station_associatedstation_station_id" if user_id.nil?
  
  # verify the required parameter 'station_id' is set
  fail "Missing the required parameter 'station_id' when calling put_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_station_associatedstation_station_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
put_user_id_station_defaultstation_station_id(user_id, station_id, opts = {}) click to toggle source

Set default station

@param user_id User ID @param station_id stationId @param [Hash] opts the optional parameters @return [nil]

# File lib/purecloud/api/users_api.rb, line 2642
def put_user_id_station_defaultstation_station_id(user_id, station_id, opts = {})
  put_user_id_station_defaultstation_station_id_with_http_info(user_id, station_id, opts)
  return nil
end
put_user_id_station_defaultstation_station_id_with_http_info(user_id, station_id, opts = {}) click to toggle source

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

# File lib/purecloud/api/users_api.rb, line 2653
def put_user_id_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_id_station_defaultstation_station_id ..."
  end
  
  # verify the required parameter 'user_id' is set
  fail "Missing the required parameter 'user_id' when calling put_user_id_station_defaultstation_station_id" if user_id.nil?
  
  # verify the required parameter 'station_id' is set
  fail "Missing the required parameter 'station_id' when calling put_user_id_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)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['PureCloud Auth']
  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_id_station_defaultstation_station_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end