class DocuSign_Rooms::UsersApi
Attributes
Public Class Methods
# File lib/docusign_rooms/api/users_api.rb, line 56 def initialize(api_client = UsersApi.default) @api_client = api_client end
Public Instance Methods
Adds the user to the designated office.
@param user_id @param account_id @param body (optional parameter) @return [nil]
# File lib/docusign_rooms/api/users_api.rb, line 66 def add_user_to_office(user_id, account_id, body) add_user_to_office_with_http_info(user_id, account_id, body) return nil end
Adds the user to the designated office.
@param user_id @param account_id @param body (optional parameter) @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 77 def add_user_to_office_with_http_info(user_id, account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.add_user_to_office ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.add_user_to_office" if user_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.add_user_to_office" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/{userId}/add_to_office".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#add_user_to_office\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Adds the user to the designated region.
@param user_id @param account_id @param body (optional parameter) @return [nil]
# File lib/docusign_rooms/api/users_api.rb, line 122 def add_user_to_region(user_id, account_id, body) add_user_to_region_with_http_info(user_id, account_id, body) return nil end
Adds the user to the designated region.
@param user_id @param account_id @param body (optional parameter) @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 133 def add_user_to_region_with_http_info(user_id, account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.add_user_to_region ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.add_user_to_region" if user_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.add_user_to_region" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/{userId}/add_to_region".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#add_user_to_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Retrieves user information for the user having the given UserId.
@param user_id @param account_id @return [User]
# File lib/docusign_rooms/api/users_api.rb, line 177 def get_user(user_id, account_id) data, _status_code, _headers = get_user_with_http_info(user_id, account_id) return data end
Retrieves user information for the user having the given UserId.
@param user_id @param account_id @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 187 def get_user_with_http_info(user_id, account_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user" if user_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.get_user" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Gets a paged-list of Retrieves a paged-list of Company Users in the User's company using the given filter and sort parameters. @param account_id @param DocuSign_Rooms::GetUsersOptions
Options for modifying the behavior of the function. @return [UserSummaryList]
# File lib/docusign_rooms/api/users_api.rb, line 230 def get_users(account_id, options = DocuSign_Rooms::GetUsersOptions.default) data, _status_code, _headers = get_users_with_http_info(account_id, options) return data end
Gets a paged-list of Retrieves a paged-list of Company Users in the User's company using the given filter and sort parameters. @param account_id @param DocuSign_Rooms::GetUsersOptions
Options for modifying the behavior of the function. @return [Array<(UserSummaryList
, Fixnum, Hash)>] UserSummaryList
data, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 240 def get_users_with_http_info(account_id, options = DocuSign_Rooms::GetUsersOptions.default) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.get_users ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.get_users" if account_id.nil? if options.sort && !['FirstNameAsc', 'LastNameAsc', 'EmailAsc', 'FirstNameDesc', 'LastNameDesc', 'EmailDesc'].include?(options.sort) fail ArgumentError, 'invalid value for "sort", must be one of FirstNameAsc, LastNameAsc, EmailAsc, FirstNameDesc, LastNameDesc, EmailDesc' end if options.access_level && !['Contributor', 'Office', 'Region', 'Company', 'Admin'].include?(options.access_level) fail ArgumentError, 'invalid value for "access_level", must be one of Contributor, Office, Region, Company, Admin' end if options.status && !['Active', 'Pending'].include?(options.status) fail ArgumentError, 'invalid value for "status", must be one of Active, Pending' end # resource path local_var_path = "/v2/accounts/{accountId}/users".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} query_params[:'filter'] = options.filter if !options.filter.nil? query_params[:'sort'] = options.sort if !options.sort.nil? query_params[:'defaultOfficeId'] = options.default_office_id if !options.default_office_id.nil? query_params[:'accessLevel'] = options.access_level if !options.access_level.nil? query_params[:'titleId'] = options.title_id if !options.title_id.nil? query_params[:'roleId'] = options.role_id if !options.role_id.nil? query_params[:'status'] = options.status if !options.status.nil? query_params[:'lockedOnly'] = options.locked_only if !options.locked_only.nil? query_params[:'startPosition'] = options.start_position if !options.start_position.nil? query_params[:'count'] = options.count if !options.count.nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserSummaryList') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
CLASSIC COMPANY ONLY. Send an invitation to join the company as an admin.
@param account_id @param body (optional parameter) @return [User]
# File lib/docusign_rooms/api/users_api.rb, line 300 def invite_classic_admin(account_id, body) data, _status_code, _headers = invite_classic_admin_with_http_info(account_id, body) return data end
CLASSIC COMPANY ONLY. Send an invitation to join the company as an admin.
@param account_id @param body (optional parameter) @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 310 def invite_classic_admin_with_http_info(account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.invite_classic_admin ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.invite_classic_admin" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/invite_classic_admin".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] 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 => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#invite_classic_admin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
CLASSIC COMPANY ONLY. Send an invitation to join the company as an agent.
@param account_id @param body (optional parameter) @return [User]
# File lib/docusign_rooms/api/users_api.rb, line 353 def invite_classic_agent(account_id, body) data, _status_code, _headers = invite_classic_agent_with_http_info(account_id, body) return data end
CLASSIC COMPANY ONLY. Send an invitation to join the company as an agent.
@param account_id @param body (optional parameter) @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 363 def invite_classic_agent_with_http_info(account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.invite_classic_agent ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.invite_classic_agent" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/invite_classic_agent".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] 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 => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#invite_classic_agent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
CLASSIC COMPANY ONLY. Send an invitation to join the company as a manager.
@param account_id @param body (optional parameter) @return [User]
# File lib/docusign_rooms/api/users_api.rb, line 406 def invite_classic_manager(account_id, body) data, _status_code, _headers = invite_classic_manager_with_http_info(account_id, body) return data end
CLASSIC COMPANY ONLY. Send an invitation to join the company as a manager.
@param account_id @param body (optional parameter) @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 416 def invite_classic_manager_with_http_info(account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.invite_classic_manager ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.invite_classic_manager" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/invite_classic_manager".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] 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 => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#invite_classic_manager\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
NON-CLASSIC COMPANY ONLY. Send an invitation to the user or non-user having the given email.
@param account_id @param body (optional parameter) @return [User]
# File lib/docusign_rooms/api/users_api.rb, line 459 def invite_user(account_id, body) data, _status_code, _headers = invite_user_with_http_info(account_id, body) return data end
NON-CLASSIC COMPANY ONLY. Send an invitation to the user or non-user having the given email.
@param account_id @param body (optional parameter) @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 469 def invite_user_with_http_info(account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.invite_user ..." end # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.invite_user" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/invite_user".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] 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 => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#invite_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Locks the account of the user.
@param user_id User
Id of the user attempting to be locked. @param account_id @param body (optional parameter) @return [nil]
# File lib/docusign_rooms/api/users_api.rb, line 513 def lock_user(user_id, account_id, body) lock_user_with_http_info(user_id, account_id, body) return nil end
Locks the account of the user.
@param user_id User
Id of the user attempting to be locked. @param account_id @param body (optional parameter) @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 524 def lock_user_with_http_info(user_id, account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.lock_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.lock_user" if user_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.lock_user" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/{userId}/lock".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#lock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Reinvites the pending user with the given userId.
@param user_id @param account_id @return [nil]
# File lib/docusign_rooms/api/users_api.rb, line 568 def reinvite_user(user_id, account_id) reinvite_user_with_http_info(user_id, account_id) return nil end
Reinvites the pending user with the given userId.
@param user_id @param account_id @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 578 def reinvite_user_with_http_info(user_id, account_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.reinvite_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.reinvite_user" if user_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.reinvite_user" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/{userId}/reinvite".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#reinvite_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Removes a user from the company. Removes the user. Will fail if the user owns any Rooms. The rooms will need to be transferred to other agents before removing. @param user_id Id of the user you wish to remove. @param account_id @return [nil]
# File lib/docusign_rooms/api/users_api.rb, line 620 def remove_user(user_id, account_id) remove_user_with_http_info(user_id, account_id) return nil end
Removes the user from the designated office.
@param user_id @param account_id @param body (optional parameter) @return [nil]
# File lib/docusign_rooms/api/users_api.rb, line 673 def remove_user_from_office(user_id, account_id, body) remove_user_from_office_with_http_info(user_id, account_id, body) return nil end
Removes the user from the designated office.
@param user_id @param account_id @param body (optional parameter) @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 684 def remove_user_from_office_with_http_info(user_id, account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.remove_user_from_office ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.remove_user_from_office" if user_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.remove_user_from_office" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/{userId}/remove_from_office".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#remove_user_from_office\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Removes the user from the designated region.
@param user_id @param account_id @param body (optional parameter) @return [nil]
# File lib/docusign_rooms/api/users_api.rb, line 729 def remove_user_from_region(user_id, account_id, body) remove_user_from_region_with_http_info(user_id, account_id, body) return nil end
Removes the user from the designated region.
@param user_id @param account_id @param body (optional parameter) @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 740 def remove_user_from_region_with_http_info(user_id, account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.remove_user_from_region ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.remove_user_from_region" if user_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.remove_user_from_region" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/{userId}/remove_from_region".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#remove_user_from_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Removes a user from the company. Removes the user. Will fail if the user owns any Rooms. The rooms will need to be transferred to other agents before removing. @param user_id Id of the user you wish to remove. @param account_id @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 630 def remove_user_with_http_info(user_id, account_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.remove_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.remove_user" if user_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.remove_user" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#remove_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Unlocks the account of the user.
@param user_id User
Id of the user attempting to be unlocked. @param account_id @return [nil]
# File lib/docusign_rooms/api/users_api.rb, line 784 def unlock_user(user_id, account_id) unlock_user_with_http_info(user_id, account_id) return nil end
Unlocks the account of the user.
@param user_id User
Id of the user attempting to be unlocked. @param account_id @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 794 def unlock_user_with_http_info(user_id, account_id) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.unlock_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.unlock_user" if user_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.unlock_user" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/{userId}/unlock".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#unlock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Updates user information
@param user_id @param account_id @param body (optional parameter) @return [User]
# File lib/docusign_rooms/api/users_api.rb, line 837 def update_user(user_id, account_id, body) data, _status_code, _headers = update_user_with_http_info(user_id, account_id, body) return data end
Updates user information
@param user_id @param account_id @param body (optional parameter) @return [Array<(User
, Fixnum, Hash)>] User
data, response status code and response headers
# File lib/docusign_rooms/api/users_api.rb, line 848 def update_user_with_http_info(user_id, account_id, body) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UsersApi.update_user ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.update_user" if user_id.nil? # verify the required parameter 'account_id' is set fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.update_user" if account_id.nil? # resource path local_var_path = "/v2/accounts/{accountId}/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = [] 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 => 'User') if @api_client.config.debugging @api_client.config.logger.debug "API called: UsersApi#update_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end