lib/purecloud/api/workforce_management_api.rb in purecloud-0.68.1 vs lib/purecloud/api/workforce_management_api.rb in purecloud-0.69.1
- old
+ new
@@ -83,41 +83,42 @@
@api_client.config.logger.debug "API called: WorkforceManagementApi#get_adherence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
- # Get decisions download link
+ # Get management units
#
- # @param download_id The decisions file download id
# @param [Hash] opts the optional parameters
- # @option opts [String] :downloadfilename The file name used to get the download url (default to downloadfilename)
- # @return [DecisionsDownloadLink]
- def get_decisions_downloads_download_id(download_id, opts = {})
- data, status_code, headers = get_decisions_downloads_download_id_with_http_info(download_id, opts)
+ # @option opts [String] :selector Selector
+ # @option opts [Integer] :page_size (default to 25)
+ # @option opts [Integer] :page_number (default to 1)
+ # @return [Array<ManagementUnit>]
+ def get_managementunits(opts = {})
+ data, status_code, headers = get_managementunits_with_http_info(opts)
return data
end
- # Get decisions download link
+ # Get management units
#
- # @param download_id The decisions file download id
# @param [Hash] opts the optional parameters
- # @option opts [String] :downloadfilename The file name used to get the download url
- # @return [Array<(DecisionsDownloadLink, Fixnum, Hash)>] DecisionsDownloadLink data, response status code and response headers
- def get_decisions_downloads_download_id_with_http_info(download_id, opts = {})
+ # @option opts [String] :selector Selector
+ # @option opts [Integer] :page_size
+ # @option opts [Integer] :page_number
+ # @return [Array<(Array<ManagementUnit>, Fixnum, Hash)>] Array<ManagementUnit> data, response status code and response headers
+ def get_managementunits_with_http_info(opts = {})
if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: WorkforceManagementApi#get_decisions_downloads_download_id ..."
+ @api_client.config.logger.debug "Calling API: WorkforceManagementApi#get_managementunits ..."
end
- # verify the required parameter 'download_id' is set
- fail "Missing the required parameter 'download_id' when calling get_decisions_downloads_download_id" if download_id.nil?
-
# resource path
- local_var_path = "/api/v2/workforcemanagement/decisions/downloads/{downloadId}".sub('{format}','json').sub('{' + 'downloadId' + '}', download_id.to_s)
+ local_var_path = "/api/v2/workforcemanagement/managementunits".sub('{format}','json')
# query parameters
query_params = {}
- query_params[:'downloadfilename'] = opts[:'downloadfilename'] if opts[:'downloadfilename']
+ query_params[:'selector'] = opts[:'selector'] if opts[:'selector']
+ query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
+ query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
@@ -139,13 +140,13 @@
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
- :return_type => 'DecisionsDownloadLink')
+ :return_type => 'Array<ManagementUnit>')
if @api_client.config.debugging
- @api_client.config.logger.debug "API called: WorkforceManagementApi#get_decisions_downloads_download_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ @api_client.config.logger.debug "API called: WorkforceManagementApi#get_managementunits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
# Get activity codes corresponding to a management unit
@@ -579,129 +580,9 @@
:form_params => form_params,
:body => post_body,
:auth_names => auth_names)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: WorkforceManagementApi#patch_timeoffrequests_timeoffrequest_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Download decisions files metadata
- #
- # @param body
- # @param [Hash] opts the optional parameters
- # @return [DecisionsFileMetadataEntityListing]
- def post_decisions_downloads_search(body, opts = {})
- data, status_code, headers = post_decisions_downloads_search_with_http_info(body, opts)
- return data
- end
-
- # Download decisions files metadata
- #
- # @param body
- # @param [Hash] opts the optional parameters
- # @return [Array<(DecisionsFileMetadataEntityListing, Fixnum, Hash)>] DecisionsFileMetadataEntityListing data, response status code and response headers
- def post_decisions_downloads_search_with_http_info(body, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: WorkforceManagementApi#post_decisions_downloads_search ..."
- end
-
- # verify the required parameter 'body' is set
- fail "Missing the required parameter 'body' when calling post_decisions_downloads_search" if body.nil?
-
- # resource path
- local_var_path = "/api/v2/workforcemanagement/decisions/downloads/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 => 'DecisionsFileMetadataEntityListing')
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: WorkforceManagementApi#post_decisions_downloads_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Create a forecast
- #
- # @param body The request body
- # @param [Hash] opts the optional parameters
- # @return [ForecastCreationCompletion]
- def post_longtermforecasts(body, opts = {})
- data, status_code, headers = post_longtermforecasts_with_http_info(body, opts)
- return data
- end
-
- # Create a forecast
- #
- # @param body The request body
- # @param [Hash] opts the optional parameters
- # @return [Array<(ForecastCreationCompletion, Fixnum, Hash)>] ForecastCreationCompletion data, response status code and response headers
- def post_longtermforecasts_with_http_info(body, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: WorkforceManagementApi#post_longtermforecasts ..."
- end
-
- # verify the required parameter 'body' is set
- fail "Missing the required parameter 'body' when calling post_longtermforecasts" if body.nil?
-
- # resource path
- local_var_path = "/api/v2/workforcemanagement/longtermforecasts".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 => 'ForecastCreationCompletion')
- if @api_client.config.debugging
- @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