Class: DocuSign_Rooms::UsersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_rooms/api/users_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = UsersApi.default) ⇒ UsersApi

Returns a new instance of UsersApi.



56
57
58
# File 'lib/docusign_rooms/api/users_api.rb', line 56

def initialize(api_client = UsersApi.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



54
55
56
# File 'lib/docusign_rooms/api/users_api.rb', line 54

def api_client
  @api_client
end

Instance Method Details

#add_user_to_office(user_id, account_id, body) ⇒ nil

Adds the user to the designated office. Adds the user to the designated office.

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Details of the office that the user will be added to (optional parameter)

Returns:

  • (nil)


66
67
68
69
# File 'lib/docusign_rooms/api/users_api.rb', line 66

def add_user_to_office(user_id, , body)
  add_user_to_office_with_http_info(user_id, ,  body)
  return nil
end

#add_user_to_office_with_http_info(user_id, account_id, body) ⇒ Array<(nil, Fixnum, Hash)>

Adds the user to the designated office. Adds the user to the designated office.

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Details of the office that the user will be added to (optional parameter)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/docusign_rooms/api/users_api.rb', line 77

def add_user_to_office_with_http_info(user_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 .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' + '}', .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', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml'])

  # 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

#add_user_to_region(user_id, account_id, body) ⇒ nil

Adds the user to the designated region. Adds the user to the designated region.

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Region that given user will be added to (optional parameter)

Returns:

  • (nil)


122
123
124
125
# File 'lib/docusign_rooms/api/users_api.rb', line 122

def add_user_to_region(user_id, , body)
  add_user_to_region_with_http_info(user_id, ,  body)
  return nil
end

#add_user_to_region_with_http_info(user_id, account_id, body) ⇒ Array<(nil, Fixnum, Hash)>

Adds the user to the designated region. Adds the user to the designated region.

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Region that given user will be added to (optional parameter)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/docusign_rooms/api/users_api.rb', line 133

def add_user_to_region_with_http_info(user_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 .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' + '}', .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', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml'])

  # 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

#get_user(user_id, account_id) ⇒ User

Retrieves user information for the user having the given UserId. Retrieves user information for the user having the given UserId.

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:



177
178
179
180
# File 'lib/docusign_rooms/api/users_api.rb', line 177

def get_user(user_id, )
  data, _status_code, _headers = get_user_with_http_info(user_id, )
  return data
end

#get_user_with_http_info(user_id, account_id) ⇒ Array<(User, Fixnum, Hash)>

Retrieves user information for the user having the given UserId. Retrieves user information for the user having the given UserId.

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (Array<(User, Fixnum, Hash)>)

    User data, response status code and response headers



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
# File 'lib/docusign_rooms/api/users_api.rb', line 187

def get_user_with_http_info(user_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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # 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 = 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

#get_users(account_id, options = DocuSign_Rooms::GetUsersOptions.default) ⇒ UserSummaryList

Gets a paged-list of users. Retrieves a paged-list of Company Users in the User’s company using the given filter and sort parameters.

Parameters:

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • DocuSign_Rooms::GetUsersOptions

    Options for modifying the behavior of the function.

Returns:



232
233
234
235
# File 'lib/docusign_rooms/api/users_api.rb', line 232

def get_users(, options = DocuSign_Rooms::GetUsersOptions.default)
  data, _status_code, _headers = get_users_with_http_info(, options)
  return data
end

#get_users_with_http_info(account_id, options = DocuSign_Rooms::GetUsersOptions.default) ⇒ Array<(UserSummaryList, Fixnum, Hash)>

Gets a paged-list of users. Retrieves a paged-list of Company Users in the User&#39;s company using the given filter and sort parameters.

Parameters:

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • DocuSign_Rooms::GetUsersOptions

    Options for modifying the behavior of the function.

Returns:

  • (Array<(UserSummaryList, Fixnum, Hash)>)

    UserSummaryList data, response status code and response headers



242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# File 'lib/docusign_rooms/api/users_api.rb', line 242

def get_users_with_http_info(, 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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/users".sub('{format}','json').sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # 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 = 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

#invite_user(account_id, body) ⇒ User

NON-CLASSIC COMPANY ONLY. Send an invitation to the user or non-user having the given email. Invites a new user to join a company account on Rooms Version 6.

Parameters:

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Invitee information (optional parameter)

Returns:



295
296
297
298
# File 'lib/docusign_rooms/api/users_api.rb', line 295

def invite_user(, body)
  data, _status_code, _headers = invite_user_with_http_info(,  body)
  return data
end

#invite_user_with_http_info(account_id, body) ⇒ Array<(User, Fixnum, Hash)>

NON-CLASSIC COMPANY ONLY. Send an invitation to the user or non-user having the given email. Invites a new user to join a company account on Rooms Version 6.

Parameters:

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Invitee information (optional parameter)

Returns:

  • (Array<(User, Fixnum, Hash)>)

    User data, response status code and response headers



305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/docusign_rooms/api/users_api.rb', line 305

def invite_user_with_http_info(, 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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/users/invite_user".sub('{format}','json').sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # 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

#lock_user(user_id, account_id, body) ⇒ nil

Locks the account of the user. Locks the account of the user.

Parameters:

  • user_id

    User Id of the user attempting to be locked.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Details containing the reason the user is being locked out (optional parameter)

Returns:

  • (nil)


349
350
351
352
# File 'lib/docusign_rooms/api/users_api.rb', line 349

def lock_user(user_id, , body)
  lock_user_with_http_info(user_id, ,  body)
  return nil
end

#lock_user_with_http_info(user_id, account_id, body) ⇒ Array<(nil, Fixnum, Hash)>

Locks the account of the user. Locks the account of the user.

Parameters:

  • user_id

    User Id of the user attempting to be locked.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Details containing the reason the user is being locked out (optional parameter)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# File 'lib/docusign_rooms/api/users_api.rb', line 360

def lock_user_with_http_info(user_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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/users/{userId}/lock".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # 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

#reinvite_user(user_id, account_id) ⇒ nil

Reinvites the pending user with the given userId. Reinvites an unactivated user to join a company account. You can use this method with either Rooms Version 5 or Rooms Version 6.

Parameters:

  • user_id

    ID of the user to be invited

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (nil)


404
405
406
407
# File 'lib/docusign_rooms/api/users_api.rb', line 404

def reinvite_user(user_id, )
  reinvite_user_with_http_info(user_id, )
  return nil
end

#reinvite_user_with_http_info(user_id, account_id) ⇒ Array<(nil, Fixnum, Hash)>

Reinvites the pending user with the given userId. Reinvites an unactivated user to join a company account. You can use this method with either Rooms Version 5 or Rooms Version 6.

Parameters:

  • user_id

    ID of the user to be invited

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
# File 'lib/docusign_rooms/api/users_api.rb', line 414

def reinvite_user_with_http_info(user_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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/users/{userId}/reinvite".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # 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 = 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

#remove_user(user_id, account_id) ⇒ nil

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.

Parameters:

  • user_id

    Id of the user you wish to remove.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (nil)


458
459
460
461
# File 'lib/docusign_rooms/api/users_api.rb', line 458

def remove_user(user_id, )
  remove_user_with_http_info(user_id, )
  return nil
end

#remove_user_from_office(user_id, account_id, body) ⇒ nil

Removes the user from the designated office. Removes the user from the designated office.

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Details of the office that the user will be removed from (optional parameter)

Returns:

  • (nil)


513
514
515
516
# File 'lib/docusign_rooms/api/users_api.rb', line 513

def remove_user_from_office(user_id, , body)
  remove_user_from_office_with_http_info(user_id, ,  body)
  return nil
end

#remove_user_from_office_with_http_info(user_id, account_id, body) ⇒ Array<(nil, Fixnum, Hash)>

Removes the user from the designated office. Removes the user from the designated office.

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Details of the office that the user will be removed from (optional parameter)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
# File 'lib/docusign_rooms/api/users_api.rb', line 524

def remove_user_from_office_with_http_info(user_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 .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' + '}', .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', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml'])

  # 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

#remove_user_from_region(user_id, account_id, body) ⇒ nil

Removes the user from the designated region. Removes the user from the designated region.

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Region that given user will be removed from (optional parameter)

Returns:

  • (nil)


569
570
571
572
# File 'lib/docusign_rooms/api/users_api.rb', line 569

def remove_user_from_region(user_id, , body)
  remove_user_from_region_with_http_info(user_id, ,  body)
  return nil
end

#remove_user_from_region_with_http_info(user_id, account_id, body) ⇒ Array<(nil, Fixnum, Hash)>

Removes the user from the designated region. Removes the user from the designated region.

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Region that given user will be removed from (optional parameter)

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
# File 'lib/docusign_rooms/api/users_api.rb', line 580

def remove_user_from_region_with_http_info(user_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 .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' + '}', .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', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml'])

  # 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

#remove_user_with_http_info(user_id, account_id) ⇒ Array<(nil, Fixnum, Hash)>

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.

Parameters:

  • user_id

    Id of the user you wish to remove.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
# File 'lib/docusign_rooms/api/users_api.rb', line 468

def remove_user_with_http_info(user_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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # 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 = 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

#unlock_user(user_id, account_id) ⇒ nil

Unlocks the account of the user. Unlocks the account of the user.

Parameters:

  • user_id

    User Id of the user attempting to be unlocked.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (nil)


624
625
626
627
# File 'lib/docusign_rooms/api/users_api.rb', line 624

def unlock_user(user_id, )
  unlock_user_with_http_info(user_id, )
  return nil
end

#unlock_user_with_http_info(user_id, account_id) ⇒ Array<(nil, Fixnum, Hash)>

Unlocks the account of the user. Unlocks the account of the user.

Parameters:

  • user_id

    User Id of the user attempting to be unlocked.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
# File 'lib/docusign_rooms/api/users_api.rb', line 634

def unlock_user_with_http_info(user_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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/users/{userId}/unlock".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # 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 = 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

#update_user(user_id, account_id, body) ⇒ User

Updates user information Updates user information

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Request body to update the user (optional parameter)

Returns:



679
680
681
682
# File 'lib/docusign_rooms/api/users_api.rb', line 679

def update_user(user_id, , body)
  data, _status_code, _headers = update_user_with_http_info(user_id, ,  body)
  return data
end

#update_user_with_http_info(user_id, account_id, body) ⇒ Array<(User, Fixnum, Hash)>

Updates user information Updates user information

Parameters:

  • user_id

    The id of the user.

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Request body to update the user (optional parameter)

Returns:

  • (Array<(User, Fixnum, Hash)>)

    User data, response status code and response headers



690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
# File 'lib/docusign_rooms/api/users_api.rb', line 690

def update_user_with_http_info(user_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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/users/{userId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'accountId' + '}', .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', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml'])

  # 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