lib/purecloud/api/workforce_management_api.rb in purecloud-0.56.1 vs lib/purecloud/api/workforce_management_api.rb in purecloud-0.57.1
- old
+ new
@@ -22,133 +22,10 @@
def initialize(api_client = ApiClient.default)
@api_client = api_client
end
- # Delete a forecast
- #
- # @param forecast_id The forecast id
- # @param [Hash] opts the optional parameters
- # @return [nil]
- def delete_longtermforecasts_forecast_id(forecast_id, opts = {})
- delete_longtermforecasts_forecast_id_with_http_info(forecast_id, opts)
- return nil
- end
-
- # Delete a forecast
- #
- # @param forecast_id The forecast id
- # @param [Hash] opts the optional parameters
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
- def delete_longtermforecasts_forecast_id_with_http_info(forecast_id, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: WorkforceManagementApi#delete_longtermforecasts_forecast_id ..."
- end
-
- # verify the required parameter 'forecast_id' is set
- fail "Missing the required parameter 'forecast_id' when calling delete_longtermforecasts_forecast_id" if forecast_id.nil?
-
- # resource path
- local_var_path = "/api/v2/workforcemanagement/longtermforecasts/{forecastId}".sub('{format}','json').sub('{' + 'forecastId' + '}', forecast_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: WorkforceManagementApi#delete_longtermforecasts_forecast_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Delete a forecast modification
- #
- # @param forecast_id The forecast id
- # @param forecast_modification_id The forecast Modification id
- # @param [Hash] opts the optional parameters
- # @return [nil]
- def delete_longtermforecasts_forecast_id_modifications_forecastmodification_id(forecast_id, forecast_modification_id, opts = {})
- delete_longtermforecasts_forecast_id_modifications_forecastmodification_id_with_http_info(forecast_id, forecast_modification_id, opts)
- return nil
- end
-
- # Delete a forecast modification
- #
- # @param forecast_id The forecast id
- # @param forecast_modification_id The forecast Modification id
- # @param [Hash] opts the optional parameters
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
- def delete_longtermforecasts_forecast_id_modifications_forecastmodification_id_with_http_info(forecast_id, forecast_modification_id, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: WorkforceManagementApi#delete_longtermforecasts_forecast_id_modifications_forecastmodification_id ..."
- end
-
- # verify the required parameter 'forecast_id' is set
- fail "Missing the required parameter 'forecast_id' when calling delete_longtermforecasts_forecast_id_modifications_forecastmodification_id" if forecast_id.nil?
-
- # verify the required parameter 'forecast_modification_id' is set
- fail "Missing the required parameter 'forecast_modification_id' when calling delete_longtermforecasts_forecast_id_modifications_forecastmodification_id" if forecast_modification_id.nil?
-
- # resource path
- local_var_path = "/api/v2/workforcemanagement/longtermforecasts/{forecastId}/modifications/{forecastModificationId}".sub('{format}','json').sub('{' + 'forecastId' + '}', forecast_id.to_s).sub('{' + 'forecastModificationId' + '}', forecast_modification_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: WorkforceManagementApi#delete_longtermforecasts_forecast_id_modifications_forecastmodification_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
# Get a list of UserScheduleAdherence records for the requested users
#
# @param user_id User Id(s) for which to fetch current schedule adherence information. Max of 100 userIds per request
# @param [Hash] opts the optional parameters
# @return [UserScheduleAdherence]
@@ -206,130 +83,10 @@
@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 forecast
- #
- # @param forecast_id The forecast id
- # @param [Hash] opts the optional parameters
- # @return [Forecast]
- def get_longtermforecasts_forecast_id(forecast_id, opts = {})
- data, status_code, headers = get_longtermforecasts_forecast_id_with_http_info(forecast_id, opts)
- return data
- end
-
- # Get forecast
- #
- # @param forecast_id The forecast id
- # @param [Hash] opts the optional parameters
- # @return [Array<(Forecast, Fixnum, Hash)>] Forecast data, response status code and response headers
- def get_longtermforecasts_forecast_id_with_http_info(forecast_id, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: WorkforceManagementApi#get_longtermforecasts_forecast_id ..."
- end
-
- # verify the required parameter 'forecast_id' is set
- fail "Missing the required parameter 'forecast_id' when calling get_longtermforecasts_forecast_id" if forecast_id.nil?
-
- # resource path
- local_var_path = "/api/v2/workforcemanagement/longtermforecasts/{forecastId}".sub('{format}','json').sub('{' + 'forecastId' + '}', forecast_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 => 'Forecast')
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: WorkforceManagementApi#get_longtermforecasts_forecast_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Get forecast Modifications
- #
- # @param forecast_id The forecast id
- # @param [Hash] opts the optional parameters
- # @return [Array<ForecastModification>]
- def get_longtermforecasts_forecast_id_modifications(forecast_id, opts = {})
- data, status_code, headers = get_longtermforecasts_forecast_id_modifications_with_http_info(forecast_id, opts)
- return data
- end
-
- # Get forecast Modifications
- #
- # @param forecast_id The forecast id
- # @param [Hash] opts the optional parameters
- # @return [Array<(Array<ForecastModification>, Fixnum, Hash)>] Array<ForecastModification> data, response status code and response headers
- def get_longtermforecasts_forecast_id_modifications_with_http_info(forecast_id, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: WorkforceManagementApi#get_longtermforecasts_forecast_id_modifications ..."
- end
-
- # verify the required parameter 'forecast_id' is set
- fail "Missing the required parameter 'forecast_id' when calling get_longtermforecasts_forecast_id_modifications" if forecast_id.nil?
-
- # resource path
- local_var_path = "/api/v2/workforcemanagement/longtermforecasts/{forecastId}/modifications".sub('{format}','json').sub('{' + 'forecastId' + '}', forecast_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<ForecastModification>')
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: WorkforceManagementApi#get_longtermforecasts_forecast_id_modifications\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]
@@ -382,199 +139,9 @@
: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
-
- # Create a forecast modification
- #
- # @param forecast_id The forecast id
- # @param body The request body
- # @param [Hash] opts the optional parameters
- # @return [ForecastModificationCreation]
- def post_longtermforecasts_forecast_id_modifications(forecast_id, body, opts = {})
- data, status_code, headers = post_longtermforecasts_forecast_id_modifications_with_http_info(forecast_id, body, opts)
- return data
- end
-
- # Create a forecast modification
- #
- # @param forecast_id The forecast id
- # @param body The request body
- # @param [Hash] opts the optional parameters
- # @return [Array<(ForecastModificationCreation, Fixnum, Hash)>] ForecastModificationCreation data, response status code and response headers
- def post_longtermforecasts_forecast_id_modifications_with_http_info(forecast_id, body, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: WorkforceManagementApi#post_longtermforecasts_forecast_id_modifications ..."
- end
-
- # verify the required parameter 'forecast_id' is set
- fail "Missing the required parameter 'forecast_id' when calling post_longtermforecasts_forecast_id_modifications" if forecast_id.nil?
-
- # verify the required parameter 'body' is set
- fail "Missing the required parameter 'body' when calling post_longtermforecasts_forecast_id_modifications" if body.nil?
-
- # resource path
- local_var_path = "/api/v2/workforcemanagement/longtermforecasts/{forecastId}/modifications".sub('{format}','json').sub('{' + 'forecastId' + '}', forecast_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 => 'ForecastModificationCreation')
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: WorkforceManagementApi#post_longtermforecasts_forecast_id_modifications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Search forecasts
- #
- # @param body
- # @param [Hash] opts the optional parameters
- # @return [ForecastMetadataEntityListing]
- def post_longtermforecasts_search(body, opts = {})
- data, status_code, headers = post_longtermforecasts_search_with_http_info(body, opts)
- return data
- end
-
- # Search forecasts
- #
- # @param body
- # @param [Hash] opts the optional parameters
- # @return [Array<(ForecastMetadataEntityListing, Fixnum, Hash)>] ForecastMetadataEntityListing data, response status code and response headers
- def post_longtermforecasts_search_with_http_info(body, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: WorkforceManagementApi#post_longtermforecasts_search ..."
- end
-
- # verify the required parameter 'body' is set
- fail "Missing the required parameter 'body' when calling post_longtermforecasts_search" if body.nil?
-
- # resource path
- local_var_path = "/api/v2/workforcemanagement/longtermforecasts/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 => 'ForecastMetadataEntityListing')
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: WorkforceManagementApi#post_longtermforecasts_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
- end
- return data, status_code, headers
- end
-
- # Update a forecast modification
- #
- # @param forecast_id The forecast id
- # @param body The request body
- # @param [Hash] opts the optional parameters
- # @return [ForecastModification]
- def put_longtermforecasts_forecast_id_modifications(forecast_id, body, opts = {})
- data, status_code, headers = put_longtermforecasts_forecast_id_modifications_with_http_info(forecast_id, body, opts)
- return data
- end
-
- # Update a forecast modification
- #
- # @param forecast_id The forecast id
- # @param body The request body
- # @param [Hash] opts the optional parameters
- # @return [Array<(ForecastModification, Fixnum, Hash)>] ForecastModification data, response status code and response headers
- def put_longtermforecasts_forecast_id_modifications_with_http_info(forecast_id, body, opts = {})
- if @api_client.config.debugging
- @api_client.config.logger.debug "Calling API: WorkforceManagementApi#put_longtermforecasts_forecast_id_modifications ..."
- end
-
- # verify the required parameter 'forecast_id' is set
- fail "Missing the required parameter 'forecast_id' when calling put_longtermforecasts_forecast_id_modifications" if forecast_id.nil?
-
- # verify the required parameter 'body' is set
- fail "Missing the required parameter 'body' when calling put_longtermforecasts_forecast_id_modifications" if body.nil?
-
- # resource path
- local_var_path = "/api/v2/workforcemanagement/longtermforecasts/{forecastId}/modifications".sub('{format}','json').sub('{' + 'forecastId' + '}', forecast_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 => 'ForecastModification')
- if @api_client.config.debugging
- @api_client.config.logger.debug "API called: WorkforceManagementApi#put_longtermforecasts_forecast_id_modifications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end
end
end