=begin PureCloud Platform API With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more. OpenAPI spec version: v2 Contact: DeveloperEvangelists@genesys.com Generated by: https://github.com/swagger-api/swagger-codegen.git License: UNLICENSED https://help.mypurecloud.com/articles/terms-and-conditions/ Terms of Service: https://help.mypurecloud.com/articles/terms-and-conditions/ =end require "uri" module PureCloud class SCIMApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/users. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Empty] def delete_scim_user(user_id, opts = {}) data, _status_code, _headers = delete_scim_user_with_http_info(user_id, opts) return data end # Delete a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/users. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers def delete_scim_user_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.delete_scim_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling SCIMApi.delete_scim_user" if user_id.nil? # resource path local_var_path = "/api/v2/scim/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-Match'] = opts[:'if_match'] if opts[:'if_match'] # 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, :return_type => 'Empty') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#delete_scim_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/v2/users. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Empty] def delete_scim_v2_user(user_id, opts = {}) data, _status_code, _headers = delete_scim_v2_user_with_http_info(user_id, opts) return data end # Delete a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/v2/users. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers def delete_scim_v2_user_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.delete_scim_v2_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling SCIMApi.delete_scim_v2_user" if user_id.nil? # resource path local_var_path = "/api/v2/scim/v2/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-Match'] = opts[:'if_match'] if opts[:'if_match'] # 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, :return_type => 'Empty') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#delete_scim_v2_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/groups. # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [ScimV2Group] def get_scim_group(group_id, opts = {}) data, _status_code, _headers = get_scim_group_with_http_info(group_id, opts) return data end # Get a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/groups. # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [Array<(ScimV2Group, Fixnum, Hash)>] ScimV2Group data, response status code and response headers def get_scim_group_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_group ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling SCIMApi.get_scim_group" if group_id.nil? # resource path local_var_path = "/api/v2/scim/groups/{groupId}".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-None-Match'] = opts[:'if_none_match'] if opts[:'if_none_match'] # 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 => 'ScimV2Group') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of groups # # @param [Hash] opts the optional parameters # @option opts [Integer] :start_index The 1-based index of the first query result. (default to 1) # @option opts [Integer] :count The requested number of items per page. A value of 0 returns \"totalResults\". (default to 25) # @option opts [String] :filter Filters results. # @return [ScimGroupListResponse] def get_scim_groups(opts = {}) data, _status_code, _headers = get_scim_groups_with_http_info(opts) return data end # Get a list of groups # # @param [Hash] opts the optional parameters # @option opts [Integer] :start_index The 1-based index of the first query result. # @option opts [Integer] :count The requested number of items per page. A value of 0 returns \"totalResults\". # @option opts [String] :filter Filters results. # @return [Array<(ScimGroupListResponse, Fixnum, Hash)>] ScimGroupListResponse data, response status code and response headers def get_scim_groups_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_groups ..." end # resource path local_var_path = "/api/v2/scim/groups".sub('{format}','json') # query parameters query_params = {} query_params[:'startIndex'] = opts[:'start_index'] if opts[:'start_index'] query_params[:'count'] = opts[:'count'] if opts[:'count'] query_params[:'filter'] = opts[:'filter'] if opts[:'filter'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+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 => 'ScimGroupListResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a resource type # # @param resource_type The type of resource. Returned with GET /api/v2/scim/resourcetypes. # @param [Hash] opts the optional parameters # @return [ScimConfigResourceType] def get_scim_resourcetype(resource_type, opts = {}) data, _status_code, _headers = get_scim_resourcetype_with_http_info(resource_type, opts) return data end # Get a resource type # # @param resource_type The type of resource. Returned with GET /api/v2/scim/resourcetypes. # @param [Hash] opts the optional parameters # @return [Array<(ScimConfigResourceType, Fixnum, Hash)>] ScimConfigResourceType data, response status code and response headers def get_scim_resourcetype_with_http_info(resource_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_resourcetype ..." end # verify the required parameter 'resource_type' is set fail ArgumentError, "Missing the required parameter 'resource_type' when calling SCIMApi.get_scim_resourcetype" if resource_type.nil? # verify enum value unless ['User', 'Group', 'ServiceProviderConfig', 'ResourceType'].include?(resource_type) fail ArgumentError, "invalid value for 'resource_type', must be one of User, Group, ServiceProviderConfig, ResourceType" end # resource path local_var_path = "/api/v2/scim/resourcetypes/{resourceType}".sub('{format}','json').sub('{' + 'resourceType' + '}', resource_type.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+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 = [] 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 => 'ScimConfigResourceType') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_resourcetype\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of resource types # # @param [Hash] opts the optional parameters # @return [ScimConfigResourceTypesListResponse] def get_scim_resourcetypes(opts = {}) data, _status_code, _headers = get_scim_resourcetypes_with_http_info(opts) return data end # Get a list of resource types # # @param [Hash] opts the optional parameters # @return [Array<(ScimConfigResourceTypesListResponse, Fixnum, Hash)>] ScimConfigResourceTypesListResponse data, response status code and response headers def get_scim_resourcetypes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_resourcetypes ..." end # resource path local_var_path = "/api/v2/scim/resourcetypes".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+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 = [] 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 => 'ScimConfigResourceTypesListResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_resourcetypes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a service provider's configuration # # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/serviceproviderconfig. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [ScimServiceProviderConfig] def get_scim_serviceproviderconfig(opts = {}) data, _status_code, _headers = get_scim_serviceproviderconfig_with_http_info(opts) return data end # Get a service provider's configuration # # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/serviceproviderconfig. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [Array<(ScimServiceProviderConfig, Fixnum, Hash)>] ScimServiceProviderConfig data, response status code and response headers def get_scim_serviceproviderconfig_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_serviceproviderconfig ..." end # resource path local_var_path = "/api/v2/scim/serviceproviderconfig".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-None-Match'] = opts[:'if_none_match'] if opts[:'if_none_match'] # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'ScimServiceProviderConfig') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_serviceproviderconfig\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/users. # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match TThe ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [ScimV2User] def get_scim_user(user_id, opts = {}) data, _status_code, _headers = get_scim_user_with_http_info(user_id, opts) return data end # Get a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/users. # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match TThe ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [Array<(ScimV2User, Fixnum, Hash)>] ScimV2User data, response status code and response headers def get_scim_user_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling SCIMApi.get_scim_user" if user_id.nil? # resource path local_var_path = "/api/v2/scim/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-None-Match'] = opts[:'if_none_match'] if opts[:'if_none_match'] # 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 => 'ScimV2User') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of users # # @param filter Filters results. # @param [Hash] opts the optional parameters # @option opts [Integer] :start_index The 1-based index of the first query result. (default to 1) # @option opts [Integer] :count The requested number of items per page. A value of 0 returns \"totalResults\". (default to 25) # @return [ScimUserListResponse] def get_scim_users(filter, opts = {}) data, _status_code, _headers = get_scim_users_with_http_info(filter, opts) return data end # Get a list of users # # @param filter Filters results. # @param [Hash] opts the optional parameters # @option opts [Integer] :start_index The 1-based index of the first query result. # @option opts [Integer] :count The requested number of items per page. A value of 0 returns \"totalResults\". # @return [Array<(ScimUserListResponse, Fixnum, Hash)>] ScimUserListResponse data, response status code and response headers def get_scim_users_with_http_info(filter, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_users ..." end # verify the required parameter 'filter' is set fail ArgumentError, "Missing the required parameter 'filter' when calling SCIMApi.get_scim_users" if filter.nil? # resource path local_var_path = "/api/v2/scim/users".sub('{format}','json') # query parameters query_params = {} query_params[:'filter'] = filter query_params[:'startIndex'] = opts[:'start_index'] if opts[:'start_index'] query_params[:'count'] = opts[:'count'] if opts[:'count'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+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 => 'ScimUserListResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/v2/groups. # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match TThe ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [ScimV2Group] def get_scim_v2_group(group_id, opts = {}) data, _status_code, _headers = get_scim_v2_group_with_http_info(group_id, opts) return data end # Get a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/v2/groups. # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match TThe ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [Array<(ScimV2Group, Fixnum, Hash)>] ScimV2Group data, response status code and response headers def get_scim_v2_group_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_v2_group ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling SCIMApi.get_scim_v2_group" if group_id.nil? # resource path local_var_path = "/api/v2/scim/v2/groups/{groupId}".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-None-Match'] = opts[:'if_none_match'] if opts[:'if_none_match'] # 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 => 'ScimV2Group') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_v2_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of groups # # @param filter Filters results. # @param [Hash] opts the optional parameters # @option opts [Integer] :start_index The 1-based index of the first query result. (default to 1) # @option opts [Integer] :count The requested number of items per page. A value of 0 returns \"totalResults\". (default to 25) # @return [ScimGroupListResponse] def get_scim_v2_groups(filter, opts = {}) data, _status_code, _headers = get_scim_v2_groups_with_http_info(filter, opts) return data end # Get a list of groups # # @param filter Filters results. # @param [Hash] opts the optional parameters # @option opts [Integer] :start_index The 1-based index of the first query result. # @option opts [Integer] :count The requested number of items per page. A value of 0 returns \"totalResults\". # @return [Array<(ScimGroupListResponse, Fixnum, Hash)>] ScimGroupListResponse data, response status code and response headers def get_scim_v2_groups_with_http_info(filter, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_v2_groups ..." end # verify the required parameter 'filter' is set fail ArgumentError, "Missing the required parameter 'filter' when calling SCIMApi.get_scim_v2_groups" if filter.nil? # resource path local_var_path = "/api/v2/scim/v2/groups".sub('{format}','json') # query parameters query_params = {} query_params[:'filter'] = filter query_params[:'startIndex'] = opts[:'start_index'] if opts[:'start_index'] query_params[:'count'] = opts[:'count'] if opts[:'count'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+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 => 'ScimGroupListResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_v2_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a resource type # # @param resource_type The type of resource. Returned with GET /api/v2/scim/v2/resourcetypes. # @param [Hash] opts the optional parameters # @return [ScimConfigResourceType] def get_scim_v2_resourcetype(resource_type, opts = {}) data, _status_code, _headers = get_scim_v2_resourcetype_with_http_info(resource_type, opts) return data end # Get a resource type # # @param resource_type The type of resource. Returned with GET /api/v2/scim/v2/resourcetypes. # @param [Hash] opts the optional parameters # @return [Array<(ScimConfigResourceType, Fixnum, Hash)>] ScimConfigResourceType data, response status code and response headers def get_scim_v2_resourcetype_with_http_info(resource_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_v2_resourcetype ..." end # verify the required parameter 'resource_type' is set fail ArgumentError, "Missing the required parameter 'resource_type' when calling SCIMApi.get_scim_v2_resourcetype" if resource_type.nil? # verify enum value unless ['User', 'Group', 'ServiceProviderConfig', 'ResourceType'].include?(resource_type) fail ArgumentError, "invalid value for 'resource_type', must be one of User, Group, ServiceProviderConfig, ResourceType" end # resource path local_var_path = "/api/v2/scim/v2/resourcetypes/{resourceType}".sub('{format}','json').sub('{' + 'resourceType' + '}', resource_type.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+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 = [] 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 => 'ScimConfigResourceType') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_v2_resourcetype\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of resource types # # @param [Hash] opts the optional parameters # @return [ScimConfigResourceTypesListResponse] def get_scim_v2_resourcetypes(opts = {}) data, _status_code, _headers = get_scim_v2_resourcetypes_with_http_info(opts) return data end # Get a list of resource types # # @param [Hash] opts the optional parameters # @return [Array<(ScimConfigResourceTypesListResponse, Fixnum, Hash)>] ScimConfigResourceTypesListResponse data, response status code and response headers def get_scim_v2_resourcetypes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_v2_resourcetypes ..." end # resource path local_var_path = "/api/v2/scim/v2/resourcetypes".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+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 = [] 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 => 'ScimConfigResourceTypesListResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_v2_resourcetypes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a service provider's configuration # # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/serviceproviderconfig. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [ScimServiceProviderConfig] def get_scim_v2_serviceproviderconfig(opts = {}) data, _status_code, _headers = get_scim_v2_serviceproviderconfig_with_http_info(opts) return data end # Get a service provider's configuration # # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/serviceproviderconfig. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [Array<(ScimServiceProviderConfig, Fixnum, Hash)>] ScimServiceProviderConfig data, response status code and response headers def get_scim_v2_serviceproviderconfig_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_v2_serviceproviderconfig ..." end # resource path local_var_path = "/api/v2/scim/v2/serviceproviderconfig".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-None-Match'] = opts[:'if_none_match'] if opts[:'if_none_match'] # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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 => 'ScimServiceProviderConfig') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_v2_serviceproviderconfig\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/v2/users. # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [ScimV2User] def get_scim_v2_user(user_id, opts = {}) data, _status_code, _headers = get_scim_v2_user_with_http_info(user_id, opts) return data end # Get a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/v2/users. # @param [Hash] opts the optional parameters # @option opts [String] :if_none_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. # @return [Array<(ScimV2User, Fixnum, Hash)>] ScimV2User data, response status code and response headers def get_scim_v2_user_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_v2_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling SCIMApi.get_scim_v2_user" if user_id.nil? # resource path local_var_path = "/api/v2/scim/v2/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-None-Match'] = opts[:'if_none_match'] if opts[:'if_none_match'] # 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 => 'ScimV2User') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_v2_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of users # # @param filter Filters results. # @param [Hash] opts the optional parameters # @option opts [Integer] :start_index The 1-based index of the first query result. (default to 1) # @option opts [Integer] :count The requested number of items per page. A value of 0 returns \"totalResults\". (default to 25) # @return [ScimUserListResponse] def get_scim_v2_users(filter, opts = {}) data, _status_code, _headers = get_scim_v2_users_with_http_info(filter, opts) return data end # Get a list of users # # @param filter Filters results. # @param [Hash] opts the optional parameters # @option opts [Integer] :start_index The 1-based index of the first query result. # @option opts [Integer] :count The requested number of items per page. A value of 0 returns \"totalResults\". # @return [Array<(ScimUserListResponse, Fixnum, Hash)>] ScimUserListResponse data, response status code and response headers def get_scim_v2_users_with_http_info(filter, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_v2_users ..." end # verify the required parameter 'filter' is set fail ArgumentError, "Missing the required parameter 'filter' when calling SCIMApi.get_scim_v2_users" if filter.nil? # resource path local_var_path = "/api/v2/scim/v2/users".sub('{format}','json') # query parameters query_params = {} query_params[:'filter'] = filter query_params[:'startIndex'] = opts[:'start_index'] if opts[:'start_index'] query_params[:'count'] = opts[:'count'] if opts[:'count'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+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 => 'ScimUserListResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_v2_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Modify a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/groups. # @param body The information used to modify a group. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [ScimV2Group] def patch_scim_group(group_id, body, opts = {}) data, _status_code, _headers = patch_scim_group_with_http_info(group_id, body, opts) return data end # Modify a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/groups. # @param body The information used to modify a group. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Array<(ScimV2Group, Fixnum, Hash)>] ScimV2Group data, response status code and response headers def patch_scim_group_with_http_info(group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.patch_scim_group ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling SCIMApi.patch_scim_group" if group_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.patch_scim_group" if body.nil? # resource path local_var_path = "/api/v2/scim/groups/{groupId}".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-Match'] = opts[:'if_match'] if opts[:'if_match'] # 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(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ScimV2Group') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#patch_scim_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Modify a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/users. # @param body The information used to modify a user. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [ScimV2User] def patch_scim_user(user_id, body, opts = {}) data, _status_code, _headers = patch_scim_user_with_http_info(user_id, body, opts) return data end # Modify a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/users. # @param body The information used to modify a user. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Array<(ScimV2User, Fixnum, Hash)>] ScimV2User data, response status code and response headers def patch_scim_user_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.patch_scim_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling SCIMApi.patch_scim_user" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.patch_scim_user" if body.nil? # resource path local_var_path = "/api/v2/scim/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-Match'] = opts[:'if_match'] if opts[:'if_match'] # 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(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ScimV2User') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#patch_scim_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Modify a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/v2/groups. # @param body The information used to modify a group. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [ScimV2Group] def patch_scim_v2_group(group_id, body, opts = {}) data, _status_code, _headers = patch_scim_v2_group_with_http_info(group_id, body, opts) return data end # Modify a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/v2/groups. # @param body The information used to modify a group. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Array<(ScimV2Group, Fixnum, Hash)>] ScimV2Group data, response status code and response headers def patch_scim_v2_group_with_http_info(group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.patch_scim_v2_group ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling SCIMApi.patch_scim_v2_group" if group_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.patch_scim_v2_group" if body.nil? # resource path local_var_path = "/api/v2/scim/v2/groups/{groupId}".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-Match'] = opts[:'if_match'] if opts[:'if_match'] # 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(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ScimV2Group') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#patch_scim_v2_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Modify a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/v2/users. # @param body The information used to modify a user. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [ScimV2User] def patch_scim_v2_user(user_id, body, opts = {}) data, _status_code, _headers = patch_scim_v2_user_with_http_info(user_id, body, opts) return data end # Modify a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/v2/users. # @param body The information used to modify a user. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Array<(ScimV2User, Fixnum, Hash)>] ScimV2User data, response status code and response headers def patch_scim_v2_user_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.patch_scim_v2_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling SCIMApi.patch_scim_v2_user" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.patch_scim_v2_user" if body.nil? # resource path local_var_path = "/api/v2/scim/v2/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-Match'] = opts[:'if_match'] if opts[:'if_match'] # 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(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ScimV2User') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#patch_scim_v2_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a user # # @param body The information used to create a user. # @param [Hash] opts the optional parameters # @return [ScimV2User] def post_scim_users(body, opts = {}) data, _status_code, _headers = post_scim_users_with_http_info(body, opts) return data end # Create a user # # @param body The information used to create a user. # @param [Hash] opts the optional parameters # @return [Array<(ScimV2User, Fixnum, Hash)>] ScimV2User data, response status code and response headers def post_scim_users_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.post_scim_users ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.post_scim_users" if body.nil? # resource path local_var_path = "/api/v2/scim/users".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+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 => 'ScimV2User') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#post_scim_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a user # # @param body The information used to create a user. # @param [Hash] opts the optional parameters # @return [ScimV2User] def post_scim_v2_users(body, opts = {}) data, _status_code, _headers = post_scim_v2_users_with_http_info(body, opts) return data end # Create a user # # @param body The information used to create a user. # @param [Hash] opts the optional parameters # @return [Array<(ScimV2User, Fixnum, Hash)>] ScimV2User data, response status code and response headers def post_scim_v2_users_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.post_scim_v2_users ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.post_scim_v2_users" if body.nil? # resource path local_var_path = "/api/v2/scim/v2/users".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+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 => 'ScimV2User') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#post_scim_v2_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Replace a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/groups. # @param body The information used to replace a group. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [ScimV2Group] def put_scim_group(group_id, body, opts = {}) data, _status_code, _headers = put_scim_group_with_http_info(group_id, body, opts) return data end # Replace a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/groups. # @param body The information used to replace a group. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Array<(ScimV2Group, Fixnum, Hash)>] ScimV2Group data, response status code and response headers def put_scim_group_with_http_info(group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.put_scim_group ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling SCIMApi.put_scim_group" if group_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.put_scim_group" if body.nil? # resource path local_var_path = "/api/v2/scim/groups/{groupId}".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-Match'] = opts[:'if_match'] if opts[:'if_match'] # 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(: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 => 'ScimV2Group') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#put_scim_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Replace a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/users. # @param body The information used to replace a user. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [ScimV2User] def put_scim_user(user_id, body, opts = {}) data, _status_code, _headers = put_scim_user_with_http_info(user_id, body, opts) return data end # Replace a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/users. # @param body The information used to replace a user. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Array<(ScimV2User, Fixnum, Hash)>] ScimV2User data, response status code and response headers def put_scim_user_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.put_scim_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling SCIMApi.put_scim_user" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.put_scim_user" if body.nil? # resource path local_var_path = "/api/v2/scim/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-Match'] = opts[:'if_match'] if opts[:'if_match'] # 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(: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 => 'ScimV2User') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#put_scim_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Replace a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/v2/groups. # @param body The information used to replace a group. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [ScimV2Group] def put_scim_v2_group(group_id, body, opts = {}) data, _status_code, _headers = put_scim_v2_group_with_http_info(group_id, body, opts) return data end # Replace a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/v2/groups. # @param body The information used to replace a group. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Array<(ScimV2Group, Fixnum, Hash)>] ScimV2Group data, response status code and response headers def put_scim_v2_group_with_http_info(group_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.put_scim_v2_group ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling SCIMApi.put_scim_v2_group" if group_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.put_scim_v2_group" if body.nil? # resource path local_var_path = "/api/v2/scim/v2/groups/{groupId}".sub('{format}','json').sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-Match'] = opts[:'if_match'] if opts[:'if_match'] # 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(: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 => 'ScimV2Group') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#put_scim_v2_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Replace a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/v2/users. # @param body The information used to replace a user. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [ScimV2User] def put_scim_v2_user(user_id, body, opts = {}) data, _status_code, _headers = put_scim_v2_user_with_http_info(user_id, body, opts) return data end # Replace a user # # @param user_id The ID of a user. Returned with GET /api/v2/scim/v2/users. # @param body The information used to replace a user. # @param [Hash] opts the optional parameters # @option opts [String] :if_match The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". # @return [Array<(ScimV2User, Fixnum, Hash)>] ScimV2User data, response status code and response headers def put_scim_v2_user_with_http_info(user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.put_scim_v2_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling SCIMApi.put_scim_v2_user" if user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.put_scim_v2_user" if body.nil? # resource path local_var_path = "/api/v2/scim/v2/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json', 'application/scim+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', 'application/scim+json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) header_params[:'If-Match'] = opts[:'if_match'] if opts[:'if_match'] # 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(: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 => 'ScimV2User') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#put_scim_v2_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end