lib/purecloud/api/workforce_management_api.rb in purecloud-0.67.1 vs lib/purecloud/api/workforce_management_api.rb in purecloud-0.68.1
- old
+ new
@@ -146,10 +146,130 @@
@api_client.config.logger.debug "API called: WorkforceManagementApi#get_decisions_downloads_download_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
+ # Get activity codes corresponding to a management unit
+ #
+ # @param mu_id The muId of the management unit.
+ # @param [Hash] opts the optional parameters
+ # @return [ActivityCodeContainer]
+ def get_managementunits_mu_id_activitycodes(mu_id, opts = {})
+ data, status_code, headers = get_managementunits_mu_id_activitycodes_with_http_info(mu_id, opts)
+ return data
+ end
+
+ # Get activity codes corresponding to a management unit
+ #
+ # @param mu_id The muId of the management unit.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(ActivityCodeContainer, Fixnum, Hash)>] ActivityCodeContainer data, response status code and response headers
+ def get_managementunits_mu_id_activitycodes_with_http_info(mu_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: WorkforceManagementApi#get_managementunits_mu_id_activitycodes ..."
+ end
+
+ # verify the required parameter 'mu_id' is set
+ fail "Missing the required parameter 'mu_id' when calling get_managementunits_mu_id_activitycodes" if mu_id.nil?
+
+ # resource path
+ local_var_path = "/api/v2/workforcemanagement/managementunits/{muId}/activitycodes".sub('{format}','json').sub('{' + 'muId' + '}', mu_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 => 'ActivityCodeContainer')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: WorkforceManagementApi#get_managementunits_mu_id_activitycodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get agents in the management unit
+ #
+ # @param mu_id The muId of the management unit.
+ # @param [Hash] opts the optional parameters
+ # @return [WfmUserEntityListing]
+ def get_managementunits_mu_id_users(mu_id, opts = {})
+ data, status_code, headers = get_managementunits_mu_id_users_with_http_info(mu_id, opts)
+ return data
+ end
+
+ # Get agents in the management unit
+ #
+ # @param mu_id The muId of the management unit.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(WfmUserEntityListing, Fixnum, Hash)>] WfmUserEntityListing data, response status code and response headers
+ def get_managementunits_mu_id_users_with_http_info(mu_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: WorkforceManagementApi#get_managementunits_mu_id_users ..."
+ end
+
+ # verify the required parameter 'mu_id' is set
+ fail "Missing the required parameter 'mu_id' when calling get_managementunits_mu_id_users" if mu_id.nil?
+
+ # resource path
+ local_var_path = "/api/v2/workforcemanagement/managementunits/{muId}/users".sub('{format}','json').sub('{' + 'muId' + '}', mu_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 => 'WfmUserEntityListing')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: WorkforceManagementApi#get_managementunits_mu_id_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
# Get a list of time off requests for any user
#
# @param mu_id The muId of the management unit.
# @param user_id The userId to whom the Time Off Request applies.
# @param [Hash] opts the optional parameters
@@ -583,25 +703,87 @@
@api_client.config.logger.debug "API called: WorkforceManagementApi#post_longtermforecasts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
+ # Get user schedules within the given time range
+ #
+ # @param mu_id The muId of the management unit.
+ # @param [Hash] opts the optional parameters
+ # @option opts [UserListScheduleRequestBody] :body body
+ # @return [UserScheduleContainer]
+ def post_managementunits_mu_id_schedules_search(mu_id, opts = {})
+ data, status_code, headers = post_managementunits_mu_id_schedules_search_with_http_info(mu_id, opts)
+ return data
+ end
+
+ # Get user schedules within the given time range
+ #
+ # @param mu_id The muId of the management unit.
+ # @param [Hash] opts the optional parameters
+ # @option opts [UserListScheduleRequestBody] :body body
+ # @return [Array<(UserScheduleContainer, Fixnum, Hash)>] UserScheduleContainer data, response status code and response headers
+ def post_managementunits_mu_id_schedules_search_with_http_info(mu_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "Calling API: WorkforceManagementApi#post_managementunits_mu_id_schedules_search ..."
+ end
+
+ # verify the required parameter 'mu_id' is set
+ fail "Missing the required parameter 'mu_id' when calling post_managementunits_mu_id_schedules_search" if mu_id.nil?
+
+ # resource path
+ local_var_path = "/api/v2/workforcemanagement/managementunits/{muId}/schedules/search".sub('{format}','json').sub('{' + 'muId' + '}', mu_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(: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 => 'UserScheduleContainer')
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: WorkforceManagementApi#post_managementunits_mu_id_schedules_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
# Get a schedule for the current user
#
# @param [Hash] opts the optional parameters
# @option opts [CurrentUserScheduleRequestBody] :body body
- # @return [TimeOffRequestList]
+ # @return [UserScheduleContainer]
def post_schedules(opts = {})
data, status_code, headers = post_schedules_with_http_info(opts)
return data
end
# Get a schedule for the current user
#
# @param [Hash] opts the optional parameters
# @option opts [CurrentUserScheduleRequestBody] :body body
- # @return [Array<(TimeOffRequestList, Fixnum, Hash)>] TimeOffRequestList data, response status code and response headers
+ # @return [Array<(UserScheduleContainer, Fixnum, Hash)>] UserScheduleContainer data, response status code and response headers
def post_schedules_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: WorkforceManagementApi#post_schedules ..."
end
@@ -633,10 +815,10 @@
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
- :return_type => 'TimeOffRequestList')
+ :return_type => 'UserScheduleContainer')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: WorkforceManagementApi#post_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end