docusign_admin 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/docusign_admin.gemspec +8 -6
- data/lib/docusign_admin/api/product_permission_profiles_api.rb +185 -0
- data/lib/docusign_admin/api/users_api.rb +134 -0
- data/lib/docusign_admin/client/api_client.rb +21 -15
- data/lib/docusign_admin/client/api_error.rb +2 -2
- data/lib/docusign_admin/client/auth/oauth.rb +1 -1
- data/lib/docusign_admin/models/ds_group_users_remove_request.rb +15 -9
- data/lib/docusign_admin/models/remove_user_products_response.rb +222 -0
- data/lib/docusign_admin/models/user_product_permission_profiles_request.rb +204 -0
- data/lib/docusign_admin/models/user_product_profile_delete_request.rb +208 -0
- data/lib/docusign_admin/version.rb +1 -1
- data/lib/docusign_admin.rb +3 -0
- metadata +101 -82
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 72e8a3bb0982ac79a97d50a6d27942c31c41e019174b5cd9944179ab8ac7d082
|
4
|
+
data.tar.gz: fc2398f179d10060c8e1f2737accf37ff3d93d2345ed43380a7f4150fc70b669
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 733199c2ae62f4b164f5431bc353c2602572c8de730805ecfad1b05e63d2fdbc311c5abf55153a00b9af72cefebb93633a41aa2ef3793935599e94a6ce215fa9
|
7
|
+
data.tar.gz: 3cfb640a64e5946d54912cf956f87085f79929c950bfc9745b18d192ecdca257419ada473e6e11c7220b100987f58f20f4af322727fafc5c84d5f1bf279edf6f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## [v1.1.0] - Admin API v2.1-1.1.0 - 2022-04-26
|
2
|
+
### Changed
|
3
|
+
- Added support for version v2.1-1.1.0 of the DocuSign Admin API.
|
4
|
+
- Updated the SDK release version.
|
5
|
+
|
1
6
|
## [1.0.0] - Admin API v2.1-1.0.0 - 2021-09-16
|
2
7
|
### Changed
|
3
8
|
- Added support for version v2.1-1.0.0 of the DocuSign Admin API.
|
data/docusign_admin.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
#An API for an organization administrator to manage organizations, accounts and users
|
7
7
|
|
8
|
-
OpenAPI spec version: v2
|
8
|
+
OpenAPI spec version: v2.1
|
9
9
|
Contact: devcenter@docusign.com
|
10
10
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
11
|
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.name = "docusign_admin"
|
19
19
|
s.version = DocuSign_Admin::VERSION
|
20
20
|
s.platform = Gem::Platform::RUBY
|
21
|
-
s.authors = ["
|
21
|
+
s.authors = ["DocuSign"]
|
22
22
|
s.email = ["devcenter@docusign.com"]
|
23
23
|
s.homepage = "https://github.com/docusign/docusign-admin-ruby-client"
|
24
24
|
s.summary = "DocuSign Admin API Ruby Gem"
|
@@ -31,16 +31,18 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
32
32
|
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
33
33
|
|
34
|
-
s.add_development_dependency 'rspec', '~> 3.
|
34
|
+
s.add_development_dependency 'rspec-mocks', '~> 3.8', '>= 3.8.0'
|
35
|
+
s.add_development_dependency 'rspec-expectations', '~> 3.8', '>= 3.8.0'
|
36
|
+
s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0'
|
35
37
|
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
36
38
|
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
37
39
|
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
38
40
|
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
39
41
|
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
40
|
-
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.
|
42
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.11'
|
41
43
|
|
42
|
-
s.files = `find *`.split("\n").uniq.sort.select
|
44
|
+
s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
|
43
45
|
s.test_files = `find spec/*`.split("\n")
|
44
46
|
s.executables = []
|
45
47
|
s.require_paths = ["lib"]
|
46
|
-
end
|
48
|
+
end
|
@@ -13,6 +13,15 @@ require "uri"
|
|
13
13
|
|
14
14
|
module DocuSign_Admin
|
15
15
|
|
16
|
+
class GetUserProductPermissionProfilesByEmailOptions
|
17
|
+
# Email address of the requested user
|
18
|
+
attr_accessor :email
|
19
|
+
|
20
|
+
def self.default
|
21
|
+
@@default ||= GetUserProductPermissionProfilesByEmailOptions.new
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
16
25
|
|
17
26
|
class ProductPermissionProfilesApi
|
18
27
|
attr_accessor :api_client
|
@@ -84,6 +93,65 @@ module DocuSign_Admin
|
|
84
93
|
return data, status_code, headers
|
85
94
|
end
|
86
95
|
|
96
|
+
# Assign user to permission profiles for one or more products
|
97
|
+
# Required scopes: user_write
|
98
|
+
# @param organization_id The organization ID GUID
|
99
|
+
# @param account_id The account ID GUID
|
100
|
+
# @param user_product_permission_profiles_request Request object
|
101
|
+
# @return [UserProductPermissionProfilesResponse]
|
102
|
+
def add_user_product_permission_profiles_by_email(organization_id, account_id, user_product_permission_profiles_request)
|
103
|
+
data, _status_code, _headers = add_user_product_permission_profiles_by_email_with_http_info(organization_id, account_id, user_product_permission_profiles_request)
|
104
|
+
return data
|
105
|
+
end
|
106
|
+
|
107
|
+
# Assign user to permission profiles for one or more products
|
108
|
+
# Required scopes: user_write
|
109
|
+
# @param organization_id The organization ID GUID
|
110
|
+
# @param account_id The account ID GUID
|
111
|
+
# @param user_product_permission_profiles_request Request object
|
112
|
+
# @return [Array<(UserProductPermissionProfilesResponse, Fixnum, Hash)>] UserProductPermissionProfilesResponse data, response status code and response headers
|
113
|
+
def add_user_product_permission_profiles_by_email_with_http_info(organization_id, account_id, user_product_permission_profiles_request)
|
114
|
+
if @api_client.config.debugging
|
115
|
+
@api_client.config.logger.debug "Calling API: ProductPermissionProfilesApi.add_user_product_permission_profiles_by_email ..."
|
116
|
+
end
|
117
|
+
# verify the required parameter 'organization_id' is set
|
118
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProductPermissionProfilesApi.add_user_product_permission_profiles_by_email" if organization_id.nil?
|
119
|
+
# verify the required parameter 'account_id' is set
|
120
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling ProductPermissionProfilesApi.add_user_product_permission_profiles_by_email" if account_id.nil?
|
121
|
+
# verify the required parameter 'user_product_permission_profiles_request' is set
|
122
|
+
fail ArgumentError, "Missing the required parameter 'user_product_permission_profiles_request' when calling ProductPermissionProfilesApi.add_user_product_permission_profiles_by_email" if user_product_permission_profiles_request.nil?
|
123
|
+
# resource path
|
124
|
+
local_var_path = "/v2.1/organizations/{organizationId}/accounts/{accountId}/products/permission_profiles/users".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
|
125
|
+
|
126
|
+
# query parameters
|
127
|
+
query_params = {}
|
128
|
+
|
129
|
+
# header parameters
|
130
|
+
header_params = {}
|
131
|
+
# HTTP header 'Accept' (if needed)
|
132
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
133
|
+
# HTTP header 'Content-Type'
|
134
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
135
|
+
|
136
|
+
# form parameters
|
137
|
+
form_params = {}
|
138
|
+
|
139
|
+
# http body (model)
|
140
|
+
post_body = @api_client.object_to_http_body(user_product_permission_profiles_request)
|
141
|
+
auth_names = []
|
142
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
143
|
+
:header_params => header_params,
|
144
|
+
:query_params => query_params,
|
145
|
+
:form_params => form_params,
|
146
|
+
:body => post_body,
|
147
|
+
:auth_names => auth_names,
|
148
|
+
:return_type => 'UserProductPermissionProfilesResponse')
|
149
|
+
if @api_client.config.debugging
|
150
|
+
@api_client.config.logger.debug "API called: ProductPermissionProfilesApi#add_user_product_permission_profiles_by_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
151
|
+
end
|
152
|
+
return data, status_code, headers
|
153
|
+
end
|
154
|
+
|
87
155
|
# Get products associated with the account and the available permission profiles
|
88
156
|
# Required scopes: user_read
|
89
157
|
# @param organization_id The organization ID GUID
|
@@ -197,5 +265,122 @@ module DocuSign_Admin
|
|
197
265
|
end
|
198
266
|
return data, status_code, headers
|
199
267
|
end
|
268
|
+
|
269
|
+
# Remove user from permission profiles for one or more products
|
270
|
+
# Required scopes: user_write
|
271
|
+
# @param organization_id The organization ID GUID
|
272
|
+
# @param account_id The account ID GUID
|
273
|
+
# @param DocuSign_Admin::GetUserProductPermissionProfilesByEmailOptions Options for modifying the behavior of the function.
|
274
|
+
# @return [UserProductPermissionProfilesResponse]
|
275
|
+
def get_user_product_permission_profiles_by_email(organization_id, account_id, options = DocuSign_Admin::GetUserProductPermissionProfilesByEmailOptions.default)
|
276
|
+
data, _status_code, _headers = get_user_product_permission_profiles_by_email_with_http_info(organization_id, account_id, options)
|
277
|
+
return data
|
278
|
+
end
|
279
|
+
|
280
|
+
# Remove user from permission profiles for one or more products
|
281
|
+
# Required scopes: user_write
|
282
|
+
# @param organization_id The organization ID GUID
|
283
|
+
# @param account_id The account ID GUID
|
284
|
+
# @param DocuSign_Admin::GetUserProductPermissionProfilesByEmailOptions Options for modifying the behavior of the function.
|
285
|
+
# @return [Array<(UserProductPermissionProfilesResponse, Fixnum, Hash)>] UserProductPermissionProfilesResponse data, response status code and response headers
|
286
|
+
def get_user_product_permission_profiles_by_email_with_http_info(organization_id, account_id, options = DocuSign_Admin::GetUserProductPermissionProfilesByEmailOptions.default)
|
287
|
+
if @api_client.config.debugging
|
288
|
+
@api_client.config.logger.debug "Calling API: ProductPermissionProfilesApi.get_user_product_permission_profiles_by_email ..."
|
289
|
+
end
|
290
|
+
# verify the required parameter 'organization_id' is set
|
291
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProductPermissionProfilesApi.get_user_product_permission_profiles_by_email" if organization_id.nil?
|
292
|
+
# verify the required parameter 'account_id' is set
|
293
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling ProductPermissionProfilesApi.get_user_product_permission_profiles_by_email" if account_id.nil?
|
294
|
+
# resource path
|
295
|
+
local_var_path = "/v2.1/organizations/{organizationId}/accounts/{accountId}/products/permission_profiles/users".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
|
296
|
+
|
297
|
+
# query parameters
|
298
|
+
query_params = {}
|
299
|
+
query_params[:'email'] = options.email if !options.email.nil?
|
300
|
+
|
301
|
+
# header parameters
|
302
|
+
header_params = {}
|
303
|
+
# HTTP header 'Accept' (if needed)
|
304
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
305
|
+
# HTTP header 'Content-Type'
|
306
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
307
|
+
|
308
|
+
# form parameters
|
309
|
+
form_params = {}
|
310
|
+
|
311
|
+
# http body (model)
|
312
|
+
post_body = nil
|
313
|
+
auth_names = []
|
314
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
315
|
+
:header_params => header_params,
|
316
|
+
:query_params => query_params,
|
317
|
+
:form_params => form_params,
|
318
|
+
:body => post_body,
|
319
|
+
:auth_names => auth_names,
|
320
|
+
:return_type => 'UserProductPermissionProfilesResponse')
|
321
|
+
if @api_client.config.debugging
|
322
|
+
@api_client.config.logger.debug "API called: ProductPermissionProfilesApi#get_user_product_permission_profiles_by_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
323
|
+
end
|
324
|
+
return data, status_code, headers
|
325
|
+
end
|
326
|
+
|
327
|
+
# Remove user from permission profiles for one or more products
|
328
|
+
# Required scopes: user_write
|
329
|
+
# @param organization_id The organization ID GUID
|
330
|
+
# @param account_id The account ID GUID
|
331
|
+
# @param user_product_permission_profiles_request Request object
|
332
|
+
# @return [RemoveUserProductsResponse]
|
333
|
+
def remove_user_product_permission(organization_id, account_id, user_product_permission_profiles_request)
|
334
|
+
data, _status_code, _headers = remove_user_product_permission_with_http_info(organization_id, account_id, user_product_permission_profiles_request)
|
335
|
+
return data
|
336
|
+
end
|
337
|
+
|
338
|
+
# Remove user from permission profiles for one or more products
|
339
|
+
# Required scopes: user_write
|
340
|
+
# @param organization_id The organization ID GUID
|
341
|
+
# @param account_id The account ID GUID
|
342
|
+
# @param user_product_permission_profiles_request Request object
|
343
|
+
# @return [Array<(RemoveUserProductsResponse, Fixnum, Hash)>] RemoveUserProductsResponse data, response status code and response headers
|
344
|
+
def remove_user_product_permission_with_http_info(organization_id, account_id, user_product_permission_profiles_request)
|
345
|
+
if @api_client.config.debugging
|
346
|
+
@api_client.config.logger.debug "Calling API: ProductPermissionProfilesApi.remove_user_product_permission ..."
|
347
|
+
end
|
348
|
+
# verify the required parameter 'organization_id' is set
|
349
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling ProductPermissionProfilesApi.remove_user_product_permission" if organization_id.nil?
|
350
|
+
# verify the required parameter 'account_id' is set
|
351
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling ProductPermissionProfilesApi.remove_user_product_permission" if account_id.nil?
|
352
|
+
# verify the required parameter 'user_product_permission_profiles_request' is set
|
353
|
+
fail ArgumentError, "Missing the required parameter 'user_product_permission_profiles_request' when calling ProductPermissionProfilesApi.remove_user_product_permission" if user_product_permission_profiles_request.nil?
|
354
|
+
# resource path
|
355
|
+
local_var_path = "/v2.1/organizations/{organizationId}/accounts/{accountId}/products/users".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
|
356
|
+
|
357
|
+
# query parameters
|
358
|
+
query_params = {}
|
359
|
+
|
360
|
+
# header parameters
|
361
|
+
header_params = {}
|
362
|
+
# HTTP header 'Accept' (if needed)
|
363
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
364
|
+
# HTTP header 'Content-Type'
|
365
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
366
|
+
|
367
|
+
# form parameters
|
368
|
+
form_params = {}
|
369
|
+
|
370
|
+
# http body (model)
|
371
|
+
post_body = @api_client.object_to_http_body(user_product_permission_profiles_request)
|
372
|
+
auth_names = []
|
373
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
374
|
+
:header_params => header_params,
|
375
|
+
:query_params => query_params,
|
376
|
+
:form_params => form_params,
|
377
|
+
:body => post_body,
|
378
|
+
:auth_names => auth_names,
|
379
|
+
:return_type => 'RemoveUserProductsResponse')
|
380
|
+
if @api_client.config.debugging
|
381
|
+
@api_client.config.logger.debug "API called: ProductPermissionProfilesApi#remove_user_product_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
382
|
+
end
|
383
|
+
return data, status_code, headers
|
384
|
+
end
|
200
385
|
end
|
201
386
|
end
|
@@ -13,6 +13,27 @@ require "uri"
|
|
13
13
|
|
14
14
|
module DocuSign_Admin
|
15
15
|
|
16
|
+
class GetUserDSProfileOptions
|
17
|
+
# Sorts user information by account name ascending
|
18
|
+
attr_accessor :sort
|
19
|
+
|
20
|
+
def self.default
|
21
|
+
@@default ||= GetUserDSProfileOptions.new
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
class GetUserDSProfilesByEmailOptions
|
26
|
+
# The email address of the user
|
27
|
+
attr_accessor :email
|
28
|
+
|
29
|
+
# Sorts user information by account name ascending
|
30
|
+
attr_accessor :sort
|
31
|
+
|
32
|
+
def self.default
|
33
|
+
@@default ||= GetUserDSProfilesByEmailOptions.new
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
16
37
|
class GetUserProfilesOptions
|
17
38
|
# The email address
|
18
39
|
attr_accessor :email
|
@@ -420,6 +441,119 @@ module DocuSign_Admin
|
|
420
441
|
return data, status_code, headers
|
421
442
|
end
|
422
443
|
|
444
|
+
# Returns user information using the userId for lookup.
|
445
|
+
# Required scopes: user_read
|
446
|
+
# @param organization_id The organization ID Guid
|
447
|
+
# @param user_id The user ID Guid
|
448
|
+
# @param DocuSign_Admin::GetUserDSProfileOptions Options for modifying the behavior of the function.
|
449
|
+
# @return [UsersDrilldownResponse]
|
450
|
+
def get_user_ds_profile(organization_id, user_id, options = DocuSign_Admin::GetUserDSProfileOptions.default)
|
451
|
+
data, _status_code, _headers = get_user_ds_profile_with_http_info(organization_id, user_id, options)
|
452
|
+
return data
|
453
|
+
end
|
454
|
+
|
455
|
+
# Returns user information using the userId for lookup.
|
456
|
+
# Required scopes: user_read
|
457
|
+
# @param organization_id The organization ID Guid
|
458
|
+
# @param user_id The user ID Guid
|
459
|
+
# @param DocuSign_Admin::GetUserDSProfileOptions Options for modifying the behavior of the function.
|
460
|
+
# @return [Array<(UsersDrilldownResponse, Fixnum, Hash)>] UsersDrilldownResponse data, response status code and response headers
|
461
|
+
def get_user_ds_profile_with_http_info(organization_id, user_id, options = DocuSign_Admin::GetUserDSProfileOptions.default)
|
462
|
+
if @api_client.config.debugging
|
463
|
+
@api_client.config.logger.debug "Calling API: UsersApi.get_user_ds_profile ..."
|
464
|
+
end
|
465
|
+
# verify the required parameter 'organization_id' is set
|
466
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.get_user_ds_profile" if organization_id.nil?
|
467
|
+
# verify the required parameter 'user_id' is set
|
468
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_ds_profile" if user_id.nil?
|
469
|
+
# resource path
|
470
|
+
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)
|
471
|
+
|
472
|
+
# query parameters
|
473
|
+
query_params = {}
|
474
|
+
query_params[:'sort'] = options.sort if !options.sort.nil?
|
475
|
+
|
476
|
+
# header parameters
|
477
|
+
header_params = {}
|
478
|
+
# HTTP header 'Accept' (if needed)
|
479
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
480
|
+
# HTTP header 'Content-Type'
|
481
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
482
|
+
|
483
|
+
# form parameters
|
484
|
+
form_params = {}
|
485
|
+
|
486
|
+
# http body (model)
|
487
|
+
post_body = nil
|
488
|
+
auth_names = []
|
489
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
490
|
+
:header_params => header_params,
|
491
|
+
:query_params => query_params,
|
492
|
+
:form_params => form_params,
|
493
|
+
:body => post_body,
|
494
|
+
:auth_names => auth_names,
|
495
|
+
:return_type => 'UsersDrilldownResponse')
|
496
|
+
if @api_client.config.debugging
|
497
|
+
@api_client.config.logger.debug "API called: UsersApi#get_user_ds_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
498
|
+
end
|
499
|
+
return data, status_code, headers
|
500
|
+
end
|
501
|
+
|
502
|
+
# Returns DS user profile information.
|
503
|
+
# Required scopes: user_read
|
504
|
+
# @param organization_id The organization ID Guid
|
505
|
+
# @param DocuSign_Admin::GetUserDSProfilesByEmailOptions Options for modifying the behavior of the function.
|
506
|
+
# @return [UsersDrilldownResponse]
|
507
|
+
def get_user_ds_profiles_by_email(organization_id, options = DocuSign_Admin::GetUserDSProfilesByEmailOptions.default)
|
508
|
+
data, _status_code, _headers = get_user_ds_profiles_by_email_with_http_info(organization_id, options)
|
509
|
+
return data
|
510
|
+
end
|
511
|
+
|
512
|
+
# Returns DS user profile information.
|
513
|
+
# Required scopes: user_read
|
514
|
+
# @param organization_id The organization ID Guid
|
515
|
+
# @param DocuSign_Admin::GetUserDSProfilesByEmailOptions Options for modifying the behavior of the function.
|
516
|
+
# @return [Array<(UsersDrilldownResponse, Fixnum, Hash)>] UsersDrilldownResponse data, response status code and response headers
|
517
|
+
def get_user_ds_profiles_by_email_with_http_info(organization_id, options = DocuSign_Admin::GetUserDSProfilesByEmailOptions.default)
|
518
|
+
if @api_client.config.debugging
|
519
|
+
@api_client.config.logger.debug "Calling API: UsersApi.get_user_ds_profiles_by_email ..."
|
520
|
+
end
|
521
|
+
# verify the required parameter 'organization_id' is set
|
522
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling UsersApi.get_user_ds_profiles_by_email" if organization_id.nil?
|
523
|
+
# resource path
|
524
|
+
local_var_path = "/v2.1/organizations/{organizationId}/users/dsprofile".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)
|
525
|
+
|
526
|
+
# query parameters
|
527
|
+
query_params = {}
|
528
|
+
query_params[:'email'] = options.email if !options.email.nil?
|
529
|
+
query_params[:'sort'] = options.sort if !options.sort.nil?
|
530
|
+
|
531
|
+
# header parameters
|
532
|
+
header_params = {}
|
533
|
+
# HTTP header 'Accept' (if needed)
|
534
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
535
|
+
# HTTP header 'Content-Type'
|
536
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
537
|
+
|
538
|
+
# form parameters
|
539
|
+
form_params = {}
|
540
|
+
|
541
|
+
# http body (model)
|
542
|
+
post_body = nil
|
543
|
+
auth_names = []
|
544
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
545
|
+
:header_params => header_params,
|
546
|
+
:query_params => query_params,
|
547
|
+
:form_params => form_params,
|
548
|
+
:body => post_body,
|
549
|
+
:auth_names => auth_names,
|
550
|
+
:return_type => 'UsersDrilldownResponse')
|
551
|
+
if @api_client.config.debugging
|
552
|
+
@api_client.config.logger.debug "API called: UsersApi#get_user_ds_profiles_by_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
553
|
+
end
|
554
|
+
return data, status_code, headers
|
555
|
+
end
|
556
|
+
|
423
557
|
# Returns user information.
|
424
558
|
# Required scopes: user_read
|
425
559
|
# @param organization_id The organization ID Guid
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#DocuSign
|
2
|
+
#DocuSign Admin API
|
3
3
|
|
4
|
-
#
|
4
|
+
#An API for an organization administrator to manage organizations, accounts and users
|
5
5
|
|
6
|
-
OpenAPI spec version: v2
|
6
|
+
OpenAPI spec version: v2.1
|
7
7
|
Contact: devcenter@docusign.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -16,6 +16,7 @@ require 'tempfile'
|
|
16
16
|
require 'typhoeus'
|
17
17
|
require 'uri'
|
18
18
|
require 'jwt'
|
19
|
+
require 'addressable/uri'
|
19
20
|
|
20
21
|
module DocuSign_Admin
|
21
22
|
class ApiClient
|
@@ -34,7 +35,7 @@ module DocuSign_Admin
|
|
34
35
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
35
36
|
def initialize(config = Configuration.default)
|
36
37
|
@config = config
|
37
|
-
@user_agent = "Swagger-Codegen
|
38
|
+
@user_agent = "Swagger-Codegen/1.1.0/ruby"
|
38
39
|
@default_headers = {
|
39
40
|
'Content-Type' => "application/json",
|
40
41
|
'User-Agent' => @user_agent
|
@@ -105,7 +106,7 @@ module DocuSign_Admin
|
|
105
106
|
|
106
107
|
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
|
107
108
|
_verify_ssl_host = @config.verify_ssl_host ? 2 : 0
|
108
|
-
|
109
|
+
|
109
110
|
if header_params['Content-Type'] == 'multipart/form-data'
|
110
111
|
header_params['Content-Disposition'] = 'form-data; name=file; filename=file.csv'
|
111
112
|
end
|
@@ -263,8 +264,8 @@ module DocuSign_Admin
|
|
263
264
|
def build_request_url(path, opts)
|
264
265
|
# Add leading and trailing slashes to path
|
265
266
|
path = "/#{path}".gsub(/\/+/, '/')
|
266
|
-
return URI.encode("https://" + self.get_oauth_base_path + path) if opts[:oauth]
|
267
|
-
URI.encode(@config.base_url + path)
|
267
|
+
return Addressable::URI.encode("https://" + self.get_oauth_base_path + path) if opts[:oauth]
|
268
|
+
Addressable::URI.encode(@config.base_url + path)
|
268
269
|
end
|
269
270
|
|
270
271
|
# Builds the HTTP request body
|
@@ -277,7 +278,6 @@ module DocuSign_Admin
|
|
277
278
|
# http form
|
278
279
|
if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
|
279
280
|
header_params['Content-Type'] == 'multipart/form-data'
|
280
|
-
|
281
281
|
data = {}
|
282
282
|
form_params.each do |key, value|
|
283
283
|
case value
|
@@ -400,8 +400,11 @@ module DocuSign_Admin
|
|
400
400
|
# Helper method to set oauth base path
|
401
401
|
# @param [String] oauth_base_path if passed nil it will determined from base_path
|
402
402
|
def set_oauth_base_path(oauth_base_path=nil)
|
403
|
-
|
404
|
-
|
403
|
+
if oauth_base_path
|
404
|
+
raise ArgumentError.new('OAuth base path should only include domain name (without https://)') if oauth_base_path.include? "//"
|
405
|
+
self.oauth_base_path = oauth_base_path
|
406
|
+
return
|
407
|
+
end
|
405
408
|
|
406
409
|
# did we need this check as we can determine it from base path
|
407
410
|
#raise ArgumentError.new('oAuthBasePath cannot be empty') unless oauth_base_path
|
@@ -421,6 +424,7 @@ module DocuSign_Admin
|
|
421
424
|
if !self.oauth_base_path
|
422
425
|
self.set_oauth_base_path()
|
423
426
|
end
|
427
|
+
|
424
428
|
self.oauth_base_path
|
425
429
|
end
|
426
430
|
|
@@ -488,6 +492,7 @@ module DocuSign_Admin
|
|
488
492
|
}
|
489
493
|
data, status_code, headers = self.call_api("POST", "/oauth/token", params)
|
490
494
|
|
495
|
+
|
491
496
|
raise ApiError.new('Some error accrued during process') if data.nil?
|
492
497
|
|
493
498
|
self.set_default_header('Authorization', data.token_type + ' ' + data.access_token)
|
@@ -578,13 +583,14 @@ module DocuSign_Admin
|
|
578
583
|
:return_type => 'OAuth::OAuthToken',
|
579
584
|
:oauth => true
|
580
585
|
}
|
581
|
-
|
582
|
-
|
586
|
+
|
587
|
+
token, status_code, headers = self.call_api("POST", '/oauth/token', params)
|
583
588
|
|
584
|
-
|
589
|
+
if status_code == 200
|
590
|
+
self.default_headers.store('Authorization', "#{token.token_type} #{token.access_token}")
|
585
591
|
|
586
|
-
|
587
|
-
|
592
|
+
token
|
593
|
+
end
|
588
594
|
end
|
589
595
|
|
590
596
|
# Helper method to add default header params
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
|
-
#DocuSign
|
2
|
+
#DocuSign Admin API
|
3
3
|
|
4
4
|
#An API for an organization administrator to manage organizations, accounts and users
|
5
5
|
|
6
|
-
OpenAPI spec version: v2
|
6
|
+
OpenAPI spec version: v2.1
|
7
7
|
Contact: devcenter@docusign.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
|
@@ -15,17 +15,21 @@ module DocuSign_Admin
|
|
15
15
|
class DSGroupUsersRemoveRequest
|
16
16
|
attr_accessor :user_ids
|
17
17
|
|
18
|
+
attr_accessor :user_emails
|
19
|
+
|
18
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
19
21
|
def self.attribute_map
|
20
22
|
{
|
21
|
-
:'user_ids' => :'user_ids'
|
23
|
+
:'user_ids' => :'user_ids',
|
24
|
+
:'user_emails' => :'user_emails'
|
22
25
|
}
|
23
26
|
end
|
24
27
|
|
25
28
|
# Attribute type mapping.
|
26
29
|
def self.swagger_types
|
27
30
|
{
|
28
|
-
:'user_ids' => :'Array<String>'
|
31
|
+
:'user_ids' => :'Array<String>',
|
32
|
+
:'user_emails' => :'Array<String>'
|
29
33
|
}
|
30
34
|
end
|
31
35
|
|
@@ -42,23 +46,24 @@ module DocuSign_Admin
|
|
42
46
|
self.user_ids = value
|
43
47
|
end
|
44
48
|
end
|
49
|
+
|
50
|
+
if attributes.has_key?(:'user_emails')
|
51
|
+
if (value = attributes[:'user_emails']).is_a?(Array)
|
52
|
+
self.user_emails = value
|
53
|
+
end
|
54
|
+
end
|
45
55
|
end
|
46
56
|
|
47
57
|
# Show invalid properties with the reasons. Usually used together with valid?
|
48
58
|
# @return Array for valid properties with the reasons
|
49
59
|
def list_invalid_properties
|
50
60
|
invalid_properties = Array.new
|
51
|
-
if @user_ids.nil?
|
52
|
-
invalid_properties.push('invalid value for "user_ids", user_ids cannot be nil.')
|
53
|
-
end
|
54
|
-
|
55
61
|
invalid_properties
|
56
62
|
end
|
57
63
|
|
58
64
|
# Check to see if the all the properties in the model are valid
|
59
65
|
# @return true if the model is valid
|
60
66
|
def valid?
|
61
|
-
return false if @user_ids.nil?
|
62
67
|
true
|
63
68
|
end
|
64
69
|
|
@@ -67,7 +72,8 @@ module DocuSign_Admin
|
|
67
72
|
def ==(o)
|
68
73
|
return true if self.equal?(o)
|
69
74
|
self.class == o.class &&
|
70
|
-
user_ids == o.user_ids
|
75
|
+
user_ids == o.user_ids &&
|
76
|
+
user_emails == o.user_emails
|
71
77
|
end
|
72
78
|
|
73
79
|
# @see the `==` method
|
@@ -79,7 +85,7 @@ module DocuSign_Admin
|
|
79
85
|
# Calculates hash code according to all attributes.
|
80
86
|
# @return [Fixnum] Hash code
|
81
87
|
def hash
|
82
|
-
[user_ids].hash
|
88
|
+
[user_ids, user_emails].hash
|
83
89
|
end
|
84
90
|
|
85
91
|
# Builds the object from hash
|