Class: DocuSign_Admin::UsersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_admin/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.



110
111
112
# File 'lib/docusign_admin/api/users_api.rb', line 110

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



108
109
110
# File 'lib/docusign_admin/api/users_api.rb', line 108

def api_client
  @api_client
end

Instance Method Details

#activate_membership(organization_id, user_id, membership_id, request) ⇒ UpdateResponse

Activates user memberships Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • user_id

    The user ID Guid

  • membership_id

    The membership ID Guid

  • request

    Additional details about the user’s membership

Returns:



121
122
123
124
# File 'lib/docusign_admin/api/users_api.rb', line 121

def activate_membership(organization_id, user_id, membership_id, request)
  data, _status_code, _headers = activate_membership_with_http_info(organization_id, user_id, membership_id,  request)
  return data
end

#activate_membership_with_http_info(organization_id, user_id, membership_id, request) ⇒ Array<(UpdateResponse, Fixnum, Hash)>

Activates user memberships Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • user_id

    The user ID Guid

  • membership_id

    The membership ID Guid

  • request

    Additional details about the user’s membership

Returns:

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

    UpdateResponse data, 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
171
172
173
174
175
# File 'lib/docusign_admin/api/users_api.rb', line 133

def activate_membership_with_http_info(organization_id, user_id, membership_id, request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.activate_membership ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.activate_membership" if organization_id.nil?
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.activate_membership" if user_id.nil?
  # verify the required parameter 'membership_id' is set
  fail ArgumentError, "Missing the required parameter 'membership_id' when calling UsersApi.activate_membership" if membership_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling UsersApi.activate_membership" if request.nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/users/{userId}/memberships/{membershipId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'membershipId' + '}', membership_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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 => 'UpdateResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#activate_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#add_or_update_user(organization_id, account_id, request) ⇒ AddUserResponse

Creates and updates a multi-product user Required scopes: user_write

Parameters:

  • organization_id

    The organization ID GUID

  • account_id

    The account ID GUID

  • request

    The request object

Returns:



183
184
185
186
# File 'lib/docusign_admin/api/users_api.rb', line 183

def add_or_update_user(organization_id, , request)
  data, _status_code, _headers = add_or_update_user_with_http_info(organization_id, ,  request)
  return data
end

#add_or_update_user_with_http_info(organization_id, account_id, request) ⇒ Array<(AddUserResponse, Fixnum, Hash)>

Creates and updates a multi-product user Required scopes: user_write

Parameters:

  • organization_id

    The organization ID GUID

  • account_id

    The account ID GUID

  • request

    The request object

Returns:

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

    AddUserResponse data, response status code and response headers



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
226
227
228
229
230
231
232
233
234
# File 'lib/docusign_admin/api/users_api.rb', line 194

def add_or_update_user_with_http_info(organization_id, , request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.add_or_update_user ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.add_or_update_user" if organization_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.add_or_update_user" if .nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling UsersApi.add_or_update_user" if request.nil?
  # resource path
  local_var_path = "/v2.1/organizations/{organizationId}/accounts/{accountId}/users".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_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(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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 => 'AddUserResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#add_or_update_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#add_users(organization_id, account_id, request) ⇒ NewUserResponse

Adds users to an account. Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • account_id

    The account ID Guid

  • request

    The details for the users to add to the account

Returns:



242
243
244
245
# File 'lib/docusign_admin/api/users_api.rb', line 242

def add_users(organization_id, , request)
  data, _status_code, _headers = add_users_with_http_info(organization_id, ,  request)
  return data
end

#add_users_with_http_info(organization_id, account_id, request) ⇒ Array<(NewUserResponse, Fixnum, Hash)>

Adds users to an account. Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • account_id

    The account ID Guid

  • request

    The details for the users to add to the account

Returns:

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

    NewUserResponse data, response status code and response headers



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_admin/api/users_api.rb', line 253

def add_users_with_http_info(organization_id, , request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.add_users ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.add_users" if organization_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling UsersApi.add_users" if .nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling UsersApi.add_users" if request.nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/accounts/{accountId}/users".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_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(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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 => 'NewUserResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#add_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#close_memberships(organization_id, user_id, request) ⇒ DeleteMembershipsResponse

Closes a user’s memberships. Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • user_id

    The user ID Guid

  • request

    The details about which membership to close

Returns:



301
302
303
304
# File 'lib/docusign_admin/api/users_api.rb', line 301

def close_memberships(organization_id, user_id, request)
  data, _status_code, _headers = close_memberships_with_http_info(organization_id, user_id,  request)
  return data
end

#close_memberships_with_http_info(organization_id, user_id, request) ⇒ Array<(DeleteMembershipsResponse, Fixnum, Hash)>

Closes a user&#39;s memberships. Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • user_id

    The user ID Guid

  • request

    The details about which membership to close

Returns:

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

    DeleteMembershipsResponse data, response status code and response headers



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
347
348
349
350
351
352
# File 'lib/docusign_admin/api/users_api.rb', line 312

def close_memberships_with_http_info(organization_id, user_id, request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.close_memberships ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.close_memberships" if organization_id.nil?
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.close_memberships" if user_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling UsersApi.close_memberships" if request.nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/users/{userId}/accounts".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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,
    :return_type => 'DeleteMembershipsResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#close_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_user(organization_id, request) ⇒ NewUserResponse

Creates a new user Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • request

    Details about the user to be added

Returns:



359
360
361
362
# File 'lib/docusign_admin/api/users_api.rb', line 359

def create_user(organization_id, request)
  data, _status_code, _headers = create_user_with_http_info(organization_id,  request)
  return data
end

#create_user_with_http_info(organization_id, request) ⇒ Array<(NewUserResponse, Fixnum, Hash)>

Creates a new user Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • request

    Details about the user to be added

Returns:

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

    NewUserResponse data, response status code and response headers



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
400
401
402
403
404
405
406
407
# File 'lib/docusign_admin/api/users_api.rb', line 369

def create_user_with_http_info(organization_id, request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.create_user ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.create_user" if organization_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling UsersApi.create_user" if request.nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/users".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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 => 'NewUserResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#create_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_identities(organization_id, user_id, request_model) ⇒ DeleteResponse

Deletes user identities. Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • user_id

    The user ID Guid

  • request_model

    The details for the user identities to be deleted

Returns:



415
416
417
418
# File 'lib/docusign_admin/api/users_api.rb', line 415

def delete_identities(organization_id, user_id, request_model)
  data, _status_code, _headers = delete_identities_with_http_info(organization_id, user_id,  request_model)
  return data
end

#delete_identities_with_http_info(organization_id, user_id, request_model) ⇒ Array<(DeleteResponse, Fixnum, Hash)>

Deletes user identities. Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • user_id

    The user ID Guid

  • request_model

    The details for the user identities to be deleted

Returns:

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

    DeleteResponse data, response status code and response headers



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
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# File 'lib/docusign_admin/api/users_api.rb', line 426

def delete_identities_with_http_info(organization_id, user_id, request_model)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.delete_identities ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.delete_identities" if organization_id.nil?
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.delete_identities" if user_id.nil?
  # verify the required parameter 'request_model' is set
  fail ArgumentError, "Missing the required parameter 'request_model' when calling UsersApi.delete_identities" if request_model.nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/users/{userId}/identities".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request_model)
  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,
    :return_type => 'DeleteResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#delete_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_ds_profile(organization_id, user_id, options = DocuSign_Admin::GetUserDSProfileOptions.default) ⇒ UsersDrilldownResponse

Returns user information using the userId for lookup. Required scopes: user_read

Parameters:

  • organization_id

    The organization ID Guid

  • user_id

    The user ID Guid

  • DocuSign_Admin::GetUserDSProfileOptions

    Options for modifying the behavior of the function.

Returns:



474
475
476
477
# File 'lib/docusign_admin/api/users_api.rb', line 474

def get_user_ds_profile(organization_id, user_id, options = DocuSign_Admin::GetUserDSProfileOptions.default)
  data, _status_code, _headers = get_user_ds_profile_with_http_info(organization_id, user_id, options)
  return data
end

#get_user_ds_profile_with_http_info(organization_id, user_id, options = DocuSign_Admin::GetUserDSProfileOptions.default) ⇒ Array<(UsersDrilldownResponse, Fixnum, Hash)>

Returns user information using the userId for lookup. Required scopes: user_read

Parameters:

  • organization_id

    The organization ID Guid

  • user_id

    The user ID Guid

  • DocuSign_Admin::GetUserDSProfileOptions

    Options for modifying the behavior of the function.

Returns:

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

    UsersDrilldownResponse data, response status code and response headers



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
# File 'lib/docusign_admin/api/users_api.rb', line 485

def get_user_ds_profile_with_http_info(organization_id, user_id, options = DocuSign_Admin::GetUserDSProfileOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.get_user_ds_profile ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.get_user_ds_profile" if organization_id.nil?
  # verify the required parameter 'user_id' is set
  fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_ds_profile" if user_id.nil?
  # resource path
  local_var_path = "/v2.1/organizations/{organizationId}/users/{userId}/dsprofile".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'sort'] = options.sort if !options.sort.nil?
  query_params[:'include_license'] = options.include_license if !options.include_license.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['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 => 'UsersDrilldownResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_ds_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_ds_profiles_by_email(organization_id, options = DocuSign_Admin::GetUserDSProfilesByEmailOptions.default) ⇒ UsersDrilldownResponse

Returns DS user profile information. Required scopes: user_read

Parameters:

  • organization_id

    The organization ID Guid

  • DocuSign_Admin::GetUserDSProfilesByEmailOptions

    Options for modifying the behavior of the function.

Returns:



532
533
534
535
# File 'lib/docusign_admin/api/users_api.rb', line 532

def get_user_ds_profiles_by_email(organization_id, options = DocuSign_Admin::GetUserDSProfilesByEmailOptions.default)
  data, _status_code, _headers = get_user_ds_profiles_by_email_with_http_info(organization_id, options)
  return data
end

#get_user_ds_profiles_by_email_with_http_info(organization_id, options = DocuSign_Admin::GetUserDSProfilesByEmailOptions.default) ⇒ Array<(UsersDrilldownResponse, Fixnum, Hash)>

Returns DS user profile information. Required scopes: user_read

Parameters:

  • organization_id

    The organization ID Guid

  • DocuSign_Admin::GetUserDSProfilesByEmailOptions

    Options for modifying the behavior of the function.

Returns:

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

    UsersDrilldownResponse data, response status code and response headers



542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
# File 'lib/docusign_admin/api/users_api.rb', line 542

def get_user_ds_profiles_by_email_with_http_info(organization_id, options = DocuSign_Admin::GetUserDSProfilesByEmailOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.get_user_ds_profiles_by_email ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.get_user_ds_profiles_by_email" if organization_id.nil?
  # resource path
  local_var_path = "/v2.1/organizations/{organizationId}/users/dsprofile".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'email'] = options.email if !options.email.nil?
  query_params[:'sort'] = options.sort if !options.sort.nil?
  query_params[:'include_license'] = options.include_license if !options.include_license.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['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 => 'UsersDrilldownResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_ds_profiles_by_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_user_profiles(organization_id, options = DocuSign_Admin::GetUserProfilesOptions.default) ⇒ UsersDrilldownResponse

Returns user information. Required scopes: user_read

Parameters:

  • organization_id

    The organization ID Guid

  • DocuSign_Admin::GetUserProfilesOptions

    Options for modifying the behavior of the function.

Returns:



588
589
590
591
# File 'lib/docusign_admin/api/users_api.rb', line 588

def get_user_profiles(organization_id, options = DocuSign_Admin::GetUserProfilesOptions.default)
  data, _status_code, _headers = get_user_profiles_with_http_info(organization_id, options)
  return data
end

#get_user_profiles_with_http_info(organization_id, options = DocuSign_Admin::GetUserProfilesOptions.default) ⇒ Array<(UsersDrilldownResponse, Fixnum, Hash)>

Returns user information. Required scopes: user_read

Parameters:

  • organization_id

    The organization ID Guid

  • DocuSign_Admin::GetUserProfilesOptions

    Options for modifying the behavior of the function.

Returns:

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

    UsersDrilldownResponse data, response status code and response headers



598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
# File 'lib/docusign_admin/api/users_api.rb', line 598

def get_user_profiles_with_http_info(organization_id, options = DocuSign_Admin::GetUserProfilesOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.get_user_profiles ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.get_user_profiles" if organization_id.nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/users/profile".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'email'] = options.email if !options.email.nil?
  query_params[:'include_license'] = options.include_license if !options.include_license.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['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 => 'UsersDrilldownResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#get_user_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_users(organization_id, options = DocuSign_Admin::GetUsersOptions.default) ⇒ OrganizationUsersResponse

Returns information about the users in the organization Required scopes: user_read

Parameters:

  • organization_id

    The organization ID Guid

  • DocuSign_Admin::GetUsersOptions

    Options for modifying the behavior of the function.

Returns:



643
644
645
646
# File 'lib/docusign_admin/api/users_api.rb', line 643

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

#get_users_with_http_info(organization_id, options = DocuSign_Admin::GetUsersOptions.default) ⇒ Array<(OrganizationUsersResponse, Fixnum, Hash)>

Returns information about the users in the organization Required scopes: user_read

Parameters:

  • organization_id

    The organization ID Guid

  • DocuSign_Admin::GetUsersOptions

    Options for modifying the behavior of the function.

Returns:

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

    OrganizationUsersResponse data, response status code and response headers



653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
# File 'lib/docusign_admin/api/users_api.rb', line 653

def get_users_with_http_info(organization_id, options = DocuSign_Admin::GetUsersOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.get_users ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.get_users" if organization_id.nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/users".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'start'] = options.start if !options.start.nil?
  query_params[:'take'] = options.take if !options.take.nil?
  query_params[:'end'] = options._end if !options._end.nil?
  query_params[:'email'] = options.email if !options.email.nil?
  query_params[:'email_user_name_like'] = options.email_user_name_like if !options.email_user_name_like.nil?
  query_params[:'status'] = options.status if !options.status.nil?
  query_params[:'membership_status'] = options.membership_status if !options.membership_status.nil?
  query_params[:'account_id'] = options. if !options..nil?
  query_params[:'organization_reserved_domain_id'] = options.organization_reserved_domain_id if !options.organization_reserved_domain_id.nil?
  query_params[:'last_modified_since'] = options.last_modified_since if !options.last_modified_since.nil?
  query_params[:'include_ds_groups'] = options.include_ds_groups if !options.include_ds_groups.nil?
  query_params[:'include_license'] = options.include_license if !options.include_license.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['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 => 'OrganizationUsersResponse')
  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

#update_email_address(organization_id, request) ⇒ UsersUpdateResponse

Updates a user’s email address. Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • request

    The details about which email addresses to update

Returns:



708
709
710
711
# File 'lib/docusign_admin/api/users_api.rb', line 708

def update_email_address(organization_id, request)
  data, _status_code, _headers = update_email_address_with_http_info(organization_id,  request)
  return data
end

#update_email_address_with_http_info(organization_id, request) ⇒ Array<(UsersUpdateResponse, Fixnum, Hash)>

Updates a user&#39;s email address. Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • request

    The details about which email addresses to update

Returns:

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

    UsersUpdateResponse data, response status code and response headers



718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
# File 'lib/docusign_admin/api/users_api.rb', line 718

def update_email_address_with_http_info(organization_id, request)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.update_email_address ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.update_email_address" if organization_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling UsersApi.update_email_address" if request.nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/users/email_addresses".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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 => 'UsersUpdateResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UsersApi#update_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_user(organization_id, request, options = DocuSign_Admin::UpdateUserOptions.default) ⇒ UsersUpdateResponse

Updates a user. Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • request

    The user details to update

  • DocuSign_Admin::UpdateUserOptions

    Options for modifying the behavior of the function.

Returns:



764
765
766
767
# File 'lib/docusign_admin/api/users_api.rb', line 764

def update_user(organization_id, request, options = DocuSign_Admin::UpdateUserOptions.default)
  data, _status_code, _headers = update_user_with_http_info(organization_id,  request, options)
  return data
end

#update_user_with_http_info(organization_id, request, options = DocuSign_Admin::UpdateUserOptions.default) ⇒ Array<(UsersUpdateResponse, Fixnum, Hash)>

Updates a user. Required scopes: user_write

Parameters:

  • organization_id

    The organization ID Guid

  • request

    The user details to update

  • DocuSign_Admin::UpdateUserOptions

    Options for modifying the behavior of the function.

Returns:

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

    UsersUpdateResponse data, response status code and response headers



775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
# File 'lib/docusign_admin/api/users_api.rb', line 775

def update_user_with_http_info(organization_id, request, options = DocuSign_Admin::UpdateUserOptions.default)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: UsersApi.update_user ..."
  end
  # verify the required parameter 'organization_id' is set
  fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.update_user" if organization_id.nil?
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling UsersApi.update_user" if request.nil?
  # resource path
  local_var_path = "/v2/organizations/{organizationId}/users/profiles".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'apply_license_override'] = options.apply_license_override if !options.apply_license_override.nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  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 => 'UsersUpdateResponse')
  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