=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 group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/groups or GET /api/v2/scim/v2/groups. # @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} or 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 [nil] def delete_scim_group(group_id, opts = {}) delete_scim_group_with_http_info(group_id, opts) return nil end # Delete a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/groups or GET /api/v2/scim/v2/groups. # @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} or 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<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_scim_group_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.delete_scim_group ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling SCIMApi.delete_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/scim+json', '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/scim+json', 'application/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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#delete_scim_group\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/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/scim+json', '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/scim+json', 'application/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 group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/groups or GET /api/v2/scim/v2/groups. # @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} or 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 [nil] def delete_scim_v2_group(group_id, opts = {}) delete_scim_v2_group_with_http_info(group_id, opts) return nil end # Delete a group # # @param group_id The ID of a group. Returned with GET /api/v2/scim/groups or GET /api/v2/scim/v2/groups. # @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} or 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<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_scim_v2_group_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.delete_scim_v2_group ..." end # verify the required parameter 'group_id' is set fail ArgumentError, "Missing the required parameter 'group_id' when calling SCIMApi.delete_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/scim+json', '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/scim+json', 'application/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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#delete_scim_v2_group\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/scim+json', '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/scim+json', 'application/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 [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'active', and 'meta attributes . Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The'id', 'active', and 'meta' attributes will always be present in the output. # @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 [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'active', and 'meta attributes . Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The'id', 'active', and 'meta' attributes will always be present in the output. # @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 = {} query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :multi) if opts[:'attributes'] query_params[:'excludedAttributes'] = @api_client.build_collection_param(opts[:'excluded_attributes'], :multi) if opts[:'excluded_attributes'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', 'application/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\". Note that a page size over 25 will likely cause a 429 error by exceeding internal resource limits. Page sizes over 25 will require using excludedAttributes and includeAttributes query parameters to exclude secondary lookup values -- (i.e. externalId, roles, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills) (default to 25) # @option opts [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'active', and 'meta attributes . Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The'id', 'active', and 'meta' attributes will always be present in the output. # @option opts [String] :filter Filters results. If nothing is specified, returns all groups. Examples of valid values: \"id eq 5f4bc742-a019-4e38-8e2a-d39d5bc0b0f3\", \"displayname eq Sales\". # @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\". Note that a page size over 25 will likely cause a 429 error by exceeding internal resource limits. Page sizes over 25 will require using excludedAttributes and includeAttributes query parameters to exclude secondary lookup values -- (i.e. externalId, roles, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills) # @option opts [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'active', and 'meta attributes . Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The'id', 'active', and 'meta' attributes will always be present in the output. # @option opts [String] :filter Filters results. If nothing is specified, returns all groups. Examples of valid values: \"id eq 5f4bc742-a019-4e38-8e2a-d39d5bc0b0f3\", \"displayname eq Sales\". # @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[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :multi) if opts[:'attributes'] query_params[:'excludedAttributes'] = @api_client.build_collection_param(opts[:'excluded_attributes'], :multi) if opts[:'excluded_attributes'] query_params[:'filter'] = opts[:'filter'] if opts[:'filter'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', '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 => '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', 'Schema'].include?(resource_type) fail ArgumentError, "invalid value for 'resource_type', must be one of User, Group, ServiceProviderConfig, ResourceType, Schema" 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/scim+json', '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/scim+json', '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 => '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/scim+json', '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/scim+json', '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 => '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 SCIM schema # # @param schema_id The ID of a schema. Returned with GET /api/v2/scim/schemas. # @param [Hash] opts the optional parameters # @return [ScimV2SchemaDefinition] def get_scim_schema(schema_id, opts = {}) data, _status_code, _headers = get_scim_schema_with_http_info(schema_id, opts) return data end # Get a SCIM schema # # @param schema_id The ID of a schema. Returned with GET /api/v2/scim/schemas. # @param [Hash] opts the optional parameters # @return [Array<(ScimV2SchemaDefinition, Fixnum, Hash)>] ScimV2SchemaDefinition data, response status code and response headers def get_scim_schema_with_http_info(schema_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_schema ..." end # verify the required parameter 'schema_id' is set fail ArgumentError, "Missing the required parameter 'schema_id' when calling SCIMApi.get_scim_schema" if schema_id.nil? # verify enum value unless ['urn:ietf:params:scim:schemas:core:2.0:User', 'urn:ietf:params:scim:schemas:core:2.0:Group', 'urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig', 'urn:ietf:params:scim:schemas:core:2.0:ResourceType', 'urn:ietf:params:scim:schemas:core:2.0:Schema', 'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User', 'urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User'].include?(schema_id) fail ArgumentError, "invalid value for 'schema_id', must be one of urn:ietf:params:scim:schemas:core:2.0:User, urn:ietf:params:scim:schemas:core:2.0:Group, urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig, urn:ietf:params:scim:schemas:core:2.0:ResourceType, urn:ietf:params:scim:schemas:core:2.0:Schema, urn:ietf:params:scim:schemas:extension:enterprise:2.0:User, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User" end # resource path local_var_path = "/api/v2/scim/schemas/{schemaId}".sub('{format}','json').sub('{' + 'schemaId' + '}', schema_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', '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 => 'ScimV2SchemaDefinition') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of SCIM schemas # # @param [Hash] opts the optional parameters # @option opts [String] :filter Filtered results are invalid and return 403 Unauthorized. # @return [ScimV2SchemaListResponse] def get_scim_schemas(opts = {}) data, _status_code, _headers = get_scim_schemas_with_http_info(opts) return data end # Get a list of SCIM schemas # # @param [Hash] opts the optional parameters # @option opts [String] :filter Filtered results are invalid and return 403 Unauthorized. # @return [Array<(ScimV2SchemaListResponse, Fixnum, Hash)>] ScimV2SchemaListResponse data, response status code and response headers def get_scim_schemas_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_schemas ..." end # resource path local_var_path = "/api/v2/scim/schemas".sub('{format}','json') # query parameters query_params = {} query_params[:'filter'] = opts[:'filter'] if opts[:'filter'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', '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 => 'ScimV2SchemaListResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_schemas\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/scim+json', '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/scim+json', 'application/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 => '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 [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'userName', 'active', and 'meta' attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The 'id', 'userName', 'active', 'meta' attributes will always be present in output. # @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 [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'userName', 'active', and 'meta' attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The 'id', 'userName', 'active', 'meta' attributes will always be present in output. # @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 = {} query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :multi) if opts[:'attributes'] query_params[:'excludedAttributes'] = @api_client.build_collection_param(opts[:'excluded_attributes'], :multi) if opts[:'excluded_attributes'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', 'application/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 # To return all active users, do not use the filter parameter. To return inactive users, set the filter parameter to \"active eq false\". By default, returns SCIM attributes \"externalId\", \"enterprise-user:manager\", and \"roles\". To exclude these attributes, set the attributes parameter to \"id,active\" or the excludeAttributes parameter to \"externalId,roles,urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:division\". # @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\". Note that a page size over 25 will likely cause a 429 error by exceeding internal resource limits. Page sizes over 25 will require using excludedAttributes and includeAttributes query parameters to exclude secondary lookup values -- (i.e. externalId, roles, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills) (default to 25) # @option opts [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'userName', 'active', and 'meta' attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The 'id', 'userName', 'active', 'meta' attributes will always be present in output. # @option opts [String] :filter Filters results. If nothing is specified, returns all active users. Examples of valid values: \"id eq 857449b0-d9e7-4cd0-acbf-a6adfb9ef1e9\", \"userName eq search@sample.org\", \"manager eq 16e10e2f-1136-43fe-bb84-eac073168a49\", \"email eq search@sample.org\", \"division eq divisionName\", \"externalId eq 167844\", \"active eq false\", \"employeeNumber eq 9876543210\". # @return [ScimUserListResponse] def get_scim_users(opts = {}) data, _status_code, _headers = get_scim_users_with_http_info(opts) return data end # Get a list of users # To return all active users, do not use the filter parameter. To return inactive users, set the filter parameter to \"active eq false\". By default, returns SCIM attributes \"externalId\", \"enterprise-user:manager\", and \"roles\". To exclude these attributes, set the attributes parameter to \"id,active\" or the excludeAttributes parameter to \"externalId,roles,urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:division\". # @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\". Note that a page size over 25 will likely cause a 429 error by exceeding internal resource limits. Page sizes over 25 will require using excludedAttributes and includeAttributes query parameters to exclude secondary lookup values -- (i.e. externalId, roles, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills) # @option opts [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'userName', 'active', and 'meta' attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The 'id', 'userName', 'active', 'meta' attributes will always be present in output. # @option opts [String] :filter Filters results. If nothing is specified, returns all active users. Examples of valid values: \"id eq 857449b0-d9e7-4cd0-acbf-a6adfb9ef1e9\", \"userName eq search@sample.org\", \"manager eq 16e10e2f-1136-43fe-bb84-eac073168a49\", \"email eq search@sample.org\", \"division eq divisionName\", \"externalId eq 167844\", \"active eq false\", \"employeeNumber eq 9876543210\". # @return [Array<(ScimUserListResponse, Fixnum, Hash)>] ScimUserListResponse data, response status code and response headers def get_scim_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_users ..." end # resource path local_var_path = "/api/v2/scim/users".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[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :multi) if opts[:'attributes'] query_params[:'excludedAttributes'] = @api_client.build_collection_param(opts[:'excluded_attributes'], :multi) if opts[:'excluded_attributes'] query_params[:'filter'] = opts[:'filter'] if opts[:'filter'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', '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 => '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 [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'active', and 'meta attributes . Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The'id', 'active', and 'meta' attributes will always be present in the output. # @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 [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'active', and 'meta attributes . Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The'id', 'active', and 'meta' attributes will always be present in the output. # @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 = {} query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :multi) if opts[:'attributes'] query_params[:'excludedAttributes'] = @api_client.build_collection_param(opts[:'excluded_attributes'], :multi) if opts[:'excluded_attributes'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', 'application/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. If nothing is specified, returns all groups. Examples of valid values: \"id eq 5f4bc742-a019-4e38-8e2a-d39d5bc0b0f3\", \"displayname eq Sales\". # @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\". Note that a page size over 25 will likely cause a 429 error by exceeding internal resource limits. Page sizes over 25 will require using excludedAttributes and includeAttributes query parameters to exclude secondary lookup values -- (i.e. externalId, roles, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills) (default to 25) # @option opts [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'active', and 'meta attributes . Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The'id', 'active', and 'meta' attributes will always be present in the output. # @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. If nothing is specified, returns all groups. Examples of valid values: \"id eq 5f4bc742-a019-4e38-8e2a-d39d5bc0b0f3\", \"displayname eq Sales\". # @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\". Note that a page size over 25 will likely cause a 429 error by exceeding internal resource limits. Page sizes over 25 will require using excludedAttributes and includeAttributes query parameters to exclude secondary lookup values -- (i.e. externalId, roles, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills) # @option opts [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'active', and 'meta attributes . Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The'id', 'active', and 'meta' attributes will always be present in the output. # @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'] query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :multi) if opts[:'attributes'] query_params[:'excludedAttributes'] = @api_client.build_collection_param(opts[:'excluded_attributes'], :multi) if opts[:'excluded_attributes'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', '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 => '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', 'Schema'].include?(resource_type) fail ArgumentError, "invalid value for 'resource_type', must be one of User, Group, ServiceProviderConfig, ResourceType, Schema" 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/scim+json', '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/scim+json', '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 => '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/scim+json', '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/scim+json', '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 => '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 SCIM schema # # @param schema_id The ID of a schema. Returned with GET /api/v2/scim/v2/schemas. # @param [Hash] opts the optional parameters # @return [ScimV2SchemaDefinition] def get_scim_v2_schema(schema_id, opts = {}) data, _status_code, _headers = get_scim_v2_schema_with_http_info(schema_id, opts) return data end # Get a SCIM schema # # @param schema_id The ID of a schema. Returned with GET /api/v2/scim/v2/schemas. # @param [Hash] opts the optional parameters # @return [Array<(ScimV2SchemaDefinition, Fixnum, Hash)>] ScimV2SchemaDefinition data, response status code and response headers def get_scim_v2_schema_with_http_info(schema_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_v2_schema ..." end # verify the required parameter 'schema_id' is set fail ArgumentError, "Missing the required parameter 'schema_id' when calling SCIMApi.get_scim_v2_schema" if schema_id.nil? # verify enum value unless ['urn:ietf:params:scim:schemas:core:2.0:User', 'urn:ietf:params:scim:schemas:core:2.0:Group', 'urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig', 'urn:ietf:params:scim:schemas:core:2.0:ResourceType', 'urn:ietf:params:scim:schemas:core:2.0:Schema', 'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User', 'urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User'].include?(schema_id) fail ArgumentError, "invalid value for 'schema_id', must be one of urn:ietf:params:scim:schemas:core:2.0:User, urn:ietf:params:scim:schemas:core:2.0:Group, urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig, urn:ietf:params:scim:schemas:core:2.0:ResourceType, urn:ietf:params:scim:schemas:core:2.0:Schema, urn:ietf:params:scim:schemas:extension:enterprise:2.0:User, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User" end # resource path local_var_path = "/api/v2/scim/v2/schemas/{schemaId}".sub('{format}','json').sub('{' + 'schemaId' + '}', schema_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', '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 => 'ScimV2SchemaDefinition') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_v2_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of SCIM schemas # # @param [Hash] opts the optional parameters # @option opts [String] :filter Filtered results are invalid and return 403 Unauthorized. # @return [ScimV2SchemaListResponse] def get_scim_v2_schemas(opts = {}) data, _status_code, _headers = get_scim_v2_schemas_with_http_info(opts) return data end # Get a list of SCIM schemas # # @param [Hash] opts the optional parameters # @option opts [String] :filter Filtered results are invalid and return 403 Unauthorized. # @return [Array<(ScimV2SchemaListResponse, Fixnum, Hash)>] ScimV2SchemaListResponse data, response status code and response headers def get_scim_v2_schemas_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_v2_schemas ..." end # resource path local_var_path = "/api/v2/scim/v2/schemas".sub('{format}','json') # query parameters query_params = {} query_params[:'filter'] = opts[:'filter'] if opts[:'filter'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', '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 => 'ScimV2SchemaListResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#get_scim_v2_schemas\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/scim+json', '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/scim+json', 'application/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 => '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 [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'userName', 'active', and 'meta' attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The 'id', 'userName', 'active', 'meta' attributes will always be present in output. # @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 [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'userName', 'active', and 'meta' attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The 'id', 'userName', 'active', 'meta' attributes will always be present in output. # @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 = {} query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :multi) if opts[:'attributes'] query_params[:'excludedAttributes'] = @api_client.build_collection_param(opts[:'excluded_attributes'], :multi) if opts[:'excluded_attributes'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', 'application/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 # To return all active users, do not use the filter parameter. To return inactive users, set the filter parameter to \"active eq false\". By default, returns SCIM attributes \"externalId\", \"enterprise-user:manager\", and \"roles\". To exclude these attributes, set the attributes parameter to \"id,active\" or the excludeAttributes parameter to \"externalId,roles,urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:division\". # @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\". Note that a page size over 25 will likely cause a 429 error by exceeding internal resource limits. Page sizes over 25 will require using excludedAttributes and includeAttributes query parameters to exclude secondary lookup values -- (i.e. externalId, roles, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills) (default to 25) # @option opts [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'userName', 'active', and 'meta' attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The 'id', 'userName', 'active', 'meta' attributes will always be present in output. # @option opts [String] :filter Filters results. If nothing is specified, returns all active users. Examples of valid values: \"id eq 857449b0-d9e7-4cd0-acbf-a6adfb9ef1e9\", \"userName eq search@sample.org\", \"manager eq 16e10e2f-1136-43fe-bb84-eac073168a49\", \"email eq search@sample.org\", \"division eq divisionName\", \"externalId eq 167844\", \"active eq false\", \"employeeNumber eq 9876543210\". # @return [ScimUserListResponse] def get_scim_v2_users(opts = {}) data, _status_code, _headers = get_scim_v2_users_with_http_info(opts) return data end # Get a list of users # To return all active users, do not use the filter parameter. To return inactive users, set the filter parameter to \"active eq false\". By default, returns SCIM attributes \"externalId\", \"enterprise-user:manager\", and \"roles\". To exclude these attributes, set the attributes parameter to \"id,active\" or the excludeAttributes parameter to \"externalId,roles,urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:division\". # @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\". Note that a page size over 25 will likely cause a 429 error by exceeding internal resource limits. Page sizes over 25 will require using excludedAttributes and includeAttributes query parameters to exclude secondary lookup values -- (i.e. externalId, roles, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages, urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills) # @option opts [Array] :attributes Indicates which attributes to include. Returns these attributes and the 'id', 'userName', 'active', and 'meta' attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. # @option opts [Array] :excluded_attributes Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. The 'id', 'userName', 'active', 'meta' attributes will always be present in output. # @option opts [String] :filter Filters results. If nothing is specified, returns all active users. Examples of valid values: \"id eq 857449b0-d9e7-4cd0-acbf-a6adfb9ef1e9\", \"userName eq search@sample.org\", \"manager eq 16e10e2f-1136-43fe-bb84-eac073168a49\", \"email eq search@sample.org\", \"division eq divisionName\", \"externalId eq 167844\", \"active eq false\", \"employeeNumber eq 9876543210\". # @return [Array<(ScimUserListResponse, Fixnum, Hash)>] ScimUserListResponse data, response status code and response headers def get_scim_v2_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.get_scim_v2_users ..." end # resource path local_var_path = "/api/v2/scim/v2/users".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[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :multi) if opts[:'attributes'] query_params[:'excludedAttributes'] = @api_client.build_collection_param(opts[:'excluded_attributes'], :multi) if opts[:'excluded_attributes'] query_params[:'filter'] = opts[:'filter'] if opts[:'filter'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', '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 => '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/scim+json', '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/scim+json', 'application/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/scim+json', '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/scim+json', 'application/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/scim+json', '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/scim+json', 'application/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/scim+json', '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/scim+json', 'application/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 # Creates a group # Creates a Genesys Cloud group with group visibility set to \"public\" and rules visibility set to \"true\". Auto-creates an \"externalId\". \"externalId\" is used to determine if DELETE /api/v2/scim/groups/{groupId} or DELETE /api/v2/scim/v2/groups/{groupId} should be allowed. # @param body The information used to create a group. # @param [Hash] opts the optional parameters # @return [ScimV2Group] def post_scim_groups(body, opts = {}) data, _status_code, _headers = post_scim_groups_with_http_info(body, opts) return data end # Creates a group # Creates a Genesys Cloud group with group visibility set to \"public\" and rules visibility set to \"true\". Auto-creates an \"externalId\". \"externalId\" is used to determine if DELETE /api/v2/scim/groups/{groupId} or DELETE /api/v2/scim/v2/groups/{groupId} should be allowed. # @param body The information used to create a group. # @param [Hash] opts the optional parameters # @return [Array<(ScimV2Group, Fixnum, Hash)>] ScimV2Group data, response status code and response headers def post_scim_groups_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.post_scim_groups ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.post_scim_groups" if body.nil? # resource path local_var_path = "/api/v2/scim/groups".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', '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 => 'ScimV2Group') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#post_scim_groups\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/scim+json', '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/scim+json', '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 => '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 group # Creates an \"official\" Genesys Cloud group with group visibility set to \"public\" and rules visibility set to \"true\". Auto-creates an \"externalId\". \"externalId\" is used to determine if DELETE /api/v2/scim/groups/{groupId} or DELETE /api/v2/scim/v2/groups/{groupId} should be allowed. # @param body Creates a group. # @param [Hash] opts the optional parameters # @return [ScimV2Group] def post_scim_v2_groups(body, opts = {}) data, _status_code, _headers = post_scim_v2_groups_with_http_info(body, opts) return data end # Create a group # Creates an \"official\" Genesys Cloud group with group visibility set to \"public\" and rules visibility set to \"true\". Auto-creates an \"externalId\". \"externalId\" is used to determine if DELETE /api/v2/scim/groups/{groupId} or DELETE /api/v2/scim/v2/groups/{groupId} should be allowed. # @param body Creates a group. # @param [Hash] opts the optional parameters # @return [Array<(ScimV2Group, Fixnum, Hash)>] ScimV2Group data, response status code and response headers def post_scim_v2_groups_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SCIMApi.post_scim_v2_groups ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling SCIMApi.post_scim_v2_groups" if body.nil? # resource path local_var_path = "/api/v2/scim/v2/groups".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/scim+json', '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/scim+json', '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 => 'ScimV2Group') if @api_client.config.debugging @api_client.config.logger.debug "API called: SCIMApi#post_scim_v2_groups\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/scim+json', '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/scim+json', '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 => '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/scim+json', '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/scim+json', 'application/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/scim+json', '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/scim+json', 'application/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/scim+json', '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/scim+json', 'application/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/scim+json', '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/scim+json', 'application/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