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.

Parameters:

  • user_id
  • account_id
  • body (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.

Parameters:

  • user_id
  • account_id
  • body (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'])
  # 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

#add_user_to_region(user_id, account_id, body) ⇒ nil

Adds the user to the designated region.

Parameters:

  • user_id
  • account_id
  • body (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.

Parameters:

  • user_id
  • account_id
  • body (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'])
  # 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

#get_user(user_id, account_id) ⇒ User

Retrieves user information for the user having the given UserId.

Parameters:

  • user_id
  • account_id

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.

Parameters:

  • user_id
  • account_id

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
# 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'])

  # 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 Retrieves a paged-list of Company Users in the User’s company using the given filter and sort parameters.

Parameters:

  • account_id
  • DocuSign_Rooms::GetUsersOptions

    Options for modifying the behavior of the function.

Returns:



230
231
232
233
# File 'lib/docusign_rooms/api/users_api.rb', line 230

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 Retrieves a paged-list of Company Users in the User&#39;s company using the given filter and sort parameters.

Parameters:

  • account_id
  • DocuSign_Rooms::GetUsersOptions

    Options for modifying the behavior of the function.

Returns:

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

    UserSummaryList data, response status code and response headers



240
241
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
289
290
291
292
293
# File 'lib/docusign_rooms/api/users_api.rb', line 240

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?
  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' + '}', .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

#invite_classic_admin(account_id, body) ⇒ User

CLASSIC COMPANY ONLY. Send an invitation to join the company as an admin.

Parameters:

  • account_id
  • body (optional parameter)

Returns:



300
301
302
303
# File 'lib/docusign_rooms/api/users_api.rb', line 300

def invite_classic_admin(, body)
  data, _status_code, _headers = invite_classic_admin_with_http_info(,  body)
  return data
end

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

CLASSIC COMPANY ONLY. Send an invitation to join the company as an admin.

Parameters:

  • account_id
  • body (optional parameter)

Returns:

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

    User data, response status code and response headers



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
342
343
344
345
346
# File 'lib/docusign_rooms/api/users_api.rb', line 310

def invite_classic_admin_with_http_info(, 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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/users/invite_classic_admin".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'])
  # 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

#invite_classic_agent(account_id, body) ⇒ User

CLASSIC COMPANY ONLY. Send an invitation to join the company as an agent.

Parameters:

  • account_id
  • body (optional parameter)

Returns:



353
354
355
356
# File 'lib/docusign_rooms/api/users_api.rb', line 353

def invite_classic_agent(, body)
  data, _status_code, _headers = invite_classic_agent_with_http_info(,  body)
  return data
end

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

CLASSIC COMPANY ONLY. Send an invitation to join the company as an agent.

Parameters:

  • account_id
  • body (optional parameter)

Returns:

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

    User data, response status code and response headers



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
398
399
# File 'lib/docusign_rooms/api/users_api.rb', line 363

def invite_classic_agent_with_http_info(, 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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/users/invite_classic_agent".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'])
  # 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

#invite_classic_manager(account_id, body) ⇒ User

CLASSIC COMPANY ONLY. Send an invitation to join the company as a manager.

Parameters:

  • account_id
  • body (optional parameter)

Returns:



406
407
408
409
# File 'lib/docusign_rooms/api/users_api.rb', line 406

def invite_classic_manager(, body)
  data, _status_code, _headers = invite_classic_manager_with_http_info(,  body)
  return data
end

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

CLASSIC COMPANY ONLY. Send an invitation to join the company as a manager.

Parameters:

  • account_id
  • body (optional parameter)

Returns:

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

    User data, response status code and response headers



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
452
# File 'lib/docusign_rooms/api/users_api.rb', line 416

def invite_classic_manager_with_http_info(, 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 .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/users/invite_classic_manager".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'])
  # 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

#invite_user(account_id, body) ⇒ User

NON-CLASSIC COMPANY ONLY. Send an invitation to the user or non-user having the given email.

Parameters:

  • account_id
  • body (optional parameter)

Returns:



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

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.

Parameters:

  • account_id
  • body (optional parameter)

Returns:

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

    User data, response status code and response headers



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 469

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'])
  # 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.

Parameters:

  • user_id

    User Id of the user attempting to be locked.

  • account_id
  • body (optional parameter)

Returns:

  • (nil)


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

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.

Parameters:

  • user_id

    User Id of the user attempting to be locked.

  • account_id
  • body (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 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'])
  # 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.

Parameters:

  • user_id
  • account_id

Returns:

  • (nil)


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

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.

Parameters:

  • user_id
  • account_id

Returns:

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

    nil, response status code and response headers



578
579
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
# File 'lib/docusign_rooms/api/users_api.rb', line 578

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'])

  # 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

Returns:

  • (nil)


620
621
622
623
# File 'lib/docusign_rooms/api/users_api.rb', line 620

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.

Parameters:

  • user_id
  • account_id
  • body (optional parameter)

Returns:

  • (nil)


673
674
675
676
# File 'lib/docusign_rooms/api/users_api.rb', line 673

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.

Parameters:

  • user_id
  • account_id
  • body (optional parameter)

Returns:

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

    nil, response status code and response headers



684
685
686
687
688
689
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
# File 'lib/docusign_rooms/api/users_api.rb', line 684

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'])
  # 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

#remove_user_from_region(user_id, account_id, body) ⇒ nil

Removes the user from the designated region.

Parameters:

  • user_id
  • account_id
  • body (optional parameter)

Returns:

  • (nil)


729
730
731
732
# File 'lib/docusign_rooms/api/users_api.rb', line 729

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.

Parameters:

  • user_id
  • account_id
  • body (optional parameter)

Returns:

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

    nil, response status code and response headers



740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
# File 'lib/docusign_rooms/api/users_api.rb', line 740

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'])
  # 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

#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

Returns:

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

    nil, response status code and response headers



630
631
632
633
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
# File 'lib/docusign_rooms/api/users_api.rb', line 630

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'])

  # 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.

Parameters:

  • user_id

    User Id of the user attempting to be unlocked.

  • account_id

Returns:

  • (nil)


784
785
786
787
# File 'lib/docusign_rooms/api/users_api.rb', line 784

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.

Parameters:

  • user_id

    User Id of the user attempting to be unlocked.

  • account_id

Returns:

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

    nil, response status code and response headers



794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
# File 'lib/docusign_rooms/api/users_api.rb', line 794

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'])

  # 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

Parameters:

  • user_id
  • account_id
  • body (optional parameter)

Returns:



837
838
839
840
# File 'lib/docusign_rooms/api/users_api.rb', line 837

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

Parameters:

  • user_id
  • account_id
  • body (optional parameter)

Returns:

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

    User data, response status code and response headers



848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
# File 'lib/docusign_rooms/api/users_api.rb', line 848

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'])
  # 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