lib/purecloudplatformclientv2/api/users_api.rb in purecloudplatformclientv2-71.0.0 vs lib/purecloudplatformclientv2/api/users_api.rb in purecloudplatformclientv2-72.0.0

- old
+ new

@@ -22,10 +22,74 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end + # Delete/cancel an async request + # + # @param job_id jobId + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_analytics_users_details_job(job_id, opts = {}) + delete_analytics_users_details_job_with_http_info(job_id, opts) + return nil + end + + # Delete/cancel an async request + # + # @param job_id jobId + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def delete_analytics_users_details_job_with_http_info(job_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: UsersApi.delete_analytics_users_details_job ..." + end + + + # verify the required parameter 'job_id' is set + fail ArgumentError, "Missing the required parameter 'job_id' when calling UsersApi.delete_analytics_users_details_job" if job_id.nil? + + + + + + # resource path + local_var_path = "/api/v2/analytics/users/details/jobs/{jobId}".sub('{format}','json').sub('{' + 'jobId' + '}', job_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + + # HTTP header 'Accept' (if needed) + local_header_accept = ['application/json'] + local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result + + # HTTP header 'Content-Type' + local_header_content_type = ['application/json'] + header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + + auth_names = ['PureCloud OAuth'] + 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_analytics_users_details_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete a grant of a role in a division # # @param subject_id Subject ID (user or group) # @param division_id the id of the division of the grant # @param role_id the id of the role of the grant @@ -511,10 +575,149 @@ @api_client.config.logger.debug "API called: UsersApi#delete_user_station_defaultstation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end + # Get status for async query for user details + # + # @param job_id jobId + # @param [Hash] opts the optional parameters + # @return [AsyncQueryStatus] + def get_analytics_users_details_job(job_id, opts = {}) + data, _status_code, _headers = get_analytics_users_details_job_with_http_info(job_id, opts) + return data + end + + # Get status for async query for user details + # + # @param job_id jobId + # @param [Hash] opts the optional parameters + # @return [Array<(AsyncQueryStatus, Fixnum, Hash)>] AsyncQueryStatus data, response status code and response headers + def get_analytics_users_details_job_with_http_info(job_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: UsersApi.get_analytics_users_details_job ..." + end + + + # verify the required parameter 'job_id' is set + fail ArgumentError, "Missing the required parameter 'job_id' when calling UsersApi.get_analytics_users_details_job" if job_id.nil? + + + + + + # resource path + local_var_path = "/api/v2/analytics/users/details/jobs/{jobId}".sub('{format}','json').sub('{' + 'jobId' + '}', job_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + + # HTTP header 'Accept' (if needed) + local_header_accept = ['application/json'] + local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result + + # HTTP header 'Content-Type' + local_header_content_type = ['application/json'] + header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + + auth_names = ['PureCloud OAuth'] + 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 => 'AsyncQueryStatus') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: UsersApi#get_analytics_users_details_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Fetch a page of results for an async query + # + # @param job_id jobId + # @param [Hash] opts the optional parameters + # @option opts [String] :cursor Indicates where to resume query results (not required for first page) + # @return [AnalyticsUserDetailsAsyncQueryResponse] + def get_analytics_users_details_job_results(job_id, opts = {}) + data, _status_code, _headers = get_analytics_users_details_job_results_with_http_info(job_id, opts) + return data + end + + # Fetch a page of results for an async query + # + # @param job_id jobId + # @param [Hash] opts the optional parameters + # @option opts [String] :cursor Indicates where to resume query results (not required for first page) + # @return [Array<(AnalyticsUserDetailsAsyncQueryResponse, Fixnum, Hash)>] AnalyticsUserDetailsAsyncQueryResponse data, response status code and response headers + def get_analytics_users_details_job_results_with_http_info(job_id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: UsersApi.get_analytics_users_details_job_results ..." + end + + + # verify the required parameter 'job_id' is set + fail ArgumentError, "Missing the required parameter 'job_id' when calling UsersApi.get_analytics_users_details_job_results" if job_id.nil? + + + + + + + + + + + + # resource path + local_var_path = "/api/v2/analytics/users/details/jobs/{jobId}/results".sub('{format}','json').sub('{' + 'jobId' + '}', job_id.to_s) + + # query parameters + query_params = {} + query_params[:'cursor'] = opts[:'cursor'] if opts[:'cursor'] + + # header parameters + header_params = {} + + # HTTP header 'Accept' (if needed) + local_header_accept = ['application/json'] + local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result + + # HTTP header 'Content-Type' + local_header_content_type = ['application/json'] + header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) + + # form parameters + form_params = {} + + # http body (model) + post_body = nil + + auth_names = ['PureCloud OAuth'] + 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 => 'AnalyticsUserDetailsAsyncQueryResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: UsersApi#get_analytics_users_details_job_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Returns whether or not current user can perform the specified action(s). # # @param permission The permission string, including the object to access, e.g. routing:queue:view # @param [Hash] opts the optional parameters # @option opts [String] :name Search term to filter by division name @@ -3330,9 +3533,74 @@ :body => post_body, :auth_names => auth_names, :return_type => 'UserAggregateQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#post_analytics_users_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Query for user details asynchronously + # + # @param body query + # @param [Hash] opts the optional parameters + # @return [AsyncQueryResponse] + def post_analytics_users_details_jobs(body, opts = {}) + data, _status_code, _headers = post_analytics_users_details_jobs_with_http_info(body, opts) + return data + end + + # Query for user details asynchronously + # + # @param body query + # @param [Hash] opts the optional parameters + # @return [Array<(AsyncQueryResponse, Fixnum, Hash)>] AsyncQueryResponse data, response status code and response headers + def post_analytics_users_details_jobs_with_http_info(body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: UsersApi.post_analytics_users_details_jobs ..." + end + + + # verify the required parameter 'body' is set + fail ArgumentError, "Missing the required parameter 'body' when calling UsersApi.post_analytics_users_details_jobs" if body.nil? + + + + + + # resource path + local_var_path = "/api/v2/analytics/users/details/jobs".sub('{format}','json') + + # query parameters + query_params = {} + + # header parameters + header_params = {} + + # HTTP header 'Accept' (if needed) + local_header_accept = ['application/json'] + local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result + + # HTTP header 'Content-Type' + local_header_content_type = ['application/json'] + header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(body) + + auth_names = ['PureCloud OAuth'] + 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 => 'AsyncQueryResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: UsersApi#post_analytics_users_details_jobs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query for user details