lib/purecloud/api/workforce_management_api.rb in purecloud-0.64.1 vs lib/purecloud/api/workforce_management_api.rb in purecloud-0.65.1

- old
+ new

@@ -582,7 +582,64 @@ 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 a schedule for the current user + # + # @param [Hash] opts the optional parameters + # @option opts [CurrentUserScheduleRequestBody] :body body + # @return [TimeOffRequestList] + 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 + def post_schedules_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: WorkforceManagementApi#post_schedules ..." + end + + # resource path + local_var_path = "/api/v2/workforcemanagement/schedules".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(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 => 'TimeOffRequestList') + 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 end end