docusign_admin 1.0.0 → 1.2.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 +10 -0
- data/docusign_admin.gemspec +8 -6
- data/lib/docusign_admin/api/accounts_api.rb +55 -0
- data/lib/docusign_admin/api/bulk_imports_api.rb +28 -17
- data/lib/docusign_admin/api/organizations_api.rb +79 -0
- 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 +23 -20
- 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/individual_membership_data_redaction_request.rb +183 -0
- data/lib/docusign_admin/models/individual_user_data_redaction_request.rb +194 -0
- data/lib/docusign_admin/models/individual_user_data_redaction_response.rb +237 -0
- data/lib/docusign_admin/models/membership_data_redaction_request.rb +183 -0
- data/lib/docusign_admin/models/membership_data_redaction_response.rb +226 -0
- 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 +9 -0
- metadata +107 -82
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6c062d94ed05bf441d92c28560111f91530e246efb42a032232152d1234f4afd
|
4
|
+
data.tar.gz: 76ce3cb71f7b81a786b8572ede1f476c547c4cb933d9f05eb57d5be73e1876a9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7e3a312d159e247e9477ad8413f1e0e1205caeb38abd3d4d6f65506cc43f720ea4446875402b39ef430b7a92b95717d653d675346403ada36f41666b7b1084f4
|
7
|
+
data.tar.gz: 5e69fa3cdc7157565ff3e829dd52c587483986b054188f5d752cd9cccbd07e657da52841d68d465a3d32a372d2029bb46967cdf7c3058fd013d33bde727a13cf
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## [v1.2.0] - Admin API v2.1-1.2.0 - 2023-05-21
|
2
|
+
### Changed
|
3
|
+
- Added support for version v2.1-1.2.0 of the DocuSign Admin API.
|
4
|
+
- Updated the SDK release version.
|
5
|
+
|
6
|
+
## [v1.1.0] - Admin API v2.1-1.1.0 - 2022-04-26
|
7
|
+
### Changed
|
8
|
+
- Added support for version v2.1-1.1.0 of the DocuSign Admin API.
|
9
|
+
- Updated the SDK release version.
|
10
|
+
|
1
11
|
## [1.0.0] - Admin API v2.1-1.0.0 - 2021-09-16
|
2
12
|
### Changed
|
3
13
|
- 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
|
@@ -209,5 +209,60 @@ module DocuSign_Admin
|
|
209
209
|
end
|
210
210
|
return data, status_code, headers
|
211
211
|
end
|
212
|
+
|
213
|
+
# Redacts membership data for users with memberships in an account.
|
214
|
+
# Required scopes: user_data_redact
|
215
|
+
# @param account_id The account ID Guid
|
216
|
+
# @param request_model The request body describing the membership to be redacted
|
217
|
+
# @return [IndividualUserDataRedactionResponse]
|
218
|
+
def redact_individual_membership_data(account_id, request_model)
|
219
|
+
data, _status_code, _headers = redact_individual_membership_data_with_http_info(account_id, request_model)
|
220
|
+
return data
|
221
|
+
end
|
222
|
+
|
223
|
+
# Redacts membership data for users with memberships in an account.
|
224
|
+
# Required scopes: user_data_redact
|
225
|
+
# @param account_id The account ID Guid
|
226
|
+
# @param request_model The request body describing the membership to be redacted
|
227
|
+
# @return [Array<(IndividualUserDataRedactionResponse, Fixnum, Hash)>] IndividualUserDataRedactionResponse data, response status code and response headers
|
228
|
+
def redact_individual_membership_data_with_http_info(account_id, request_model)
|
229
|
+
if @api_client.config.debugging
|
230
|
+
@api_client.config.logger.debug "Calling API: AccountsApi.redact_individual_membership_data ..."
|
231
|
+
end
|
232
|
+
# verify the required parameter 'account_id' is set
|
233
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.redact_individual_membership_data" if account_id.nil?
|
234
|
+
# verify the required parameter 'request_model' is set
|
235
|
+
fail ArgumentError, "Missing the required parameter 'request_model' when calling AccountsApi.redact_individual_membership_data" if request_model.nil?
|
236
|
+
# resource path
|
237
|
+
local_var_path = "/v2/data_redaction/accounts/{accountId}/user".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)
|
238
|
+
|
239
|
+
# query parameters
|
240
|
+
query_params = {}
|
241
|
+
|
242
|
+
# header parameters
|
243
|
+
header_params = {}
|
244
|
+
# HTTP header 'Accept' (if needed)
|
245
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
246
|
+
# HTTP header 'Content-Type'
|
247
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
248
|
+
|
249
|
+
# form parameters
|
250
|
+
form_params = {}
|
251
|
+
|
252
|
+
# http body (model)
|
253
|
+
post_body = @api_client.object_to_http_body(request_model)
|
254
|
+
auth_names = []
|
255
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
256
|
+
:header_params => header_params,
|
257
|
+
:query_params => query_params,
|
258
|
+
:form_params => form_params,
|
259
|
+
:body => post_body,
|
260
|
+
:auth_names => auth_names,
|
261
|
+
:return_type => 'IndividualUserDataRedactionResponse')
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "API called: AccountsApi#redact_individual_membership_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
212
267
|
end
|
213
268
|
end
|
@@ -24,7 +24,7 @@ module DocuSign_Admin
|
|
24
24
|
# Creates a new account settings import request.
|
25
25
|
# Required scopes: account_write
|
26
26
|
# @param organization_id The organization ID Guid
|
27
|
-
# @param file_csv CSV file.
|
27
|
+
# @param file_csv CSV file.
|
28
28
|
# @return [OrganizationAccountSettingsImportResponse]
|
29
29
|
def add_bulk_account_settings_import(organization_id, file_csv)
|
30
30
|
data, _status_code, _headers = add_bulk_account_settings_import_with_http_info(organization_id, file_csv)
|
@@ -34,7 +34,7 @@ module DocuSign_Admin
|
|
34
34
|
# Creates a new account settings import request.
|
35
35
|
# Required scopes: account_write
|
36
36
|
# @param organization_id The organization ID Guid
|
37
|
-
# @param file_csv CSV file.
|
37
|
+
# @param file_csv CSV file.
|
38
38
|
# @return [Array<(OrganizationAccountSettingsImportResponse, Fixnum, Hash)>] OrganizationAccountSettingsImportResponse data, response status code and response headers
|
39
39
|
def add_bulk_account_settings_import_with_http_info(organization_id, file_csv)
|
40
40
|
if @api_client.config.debugging
|
@@ -80,7 +80,7 @@ module DocuSign_Admin
|
|
80
80
|
# Import request for adding users to accounts within the organization.
|
81
81
|
# Required scopes: user_write
|
82
82
|
# @param organization_id The organization ID Guid
|
83
|
-
# @param file_csv CSV file.
|
83
|
+
# @param file_csv CSV file.
|
84
84
|
# @return [OrganizationImportResponse]
|
85
85
|
def create_bulk_import_add_users_request(organization_id, file_csv)
|
86
86
|
data, _status_code, _headers = create_bulk_import_add_users_request_with_http_info(organization_id, file_csv)
|
@@ -90,7 +90,7 @@ module DocuSign_Admin
|
|
90
90
|
# Import request for adding users to accounts within the organization.
|
91
91
|
# Required scopes: user_write
|
92
92
|
# @param organization_id The organization ID Guid
|
93
|
-
# @param file_csv CSV file.
|
93
|
+
# @param file_csv CSV file.
|
94
94
|
# @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers
|
95
95
|
def create_bulk_import_add_users_request_with_http_info(organization_id, file_csv)
|
96
96
|
if @api_client.config.debugging
|
@@ -136,22 +136,26 @@ module DocuSign_Admin
|
|
136
136
|
# Closes the Bulk User Import request
|
137
137
|
# Required scopes: user_write
|
138
138
|
# @param organization_id The organization ID Guid
|
139
|
+
# @param file_csv CSV file.
|
139
140
|
# @return [OrganizationImportResponse]
|
140
|
-
def create_bulk_import_close_users_request(organization_id)
|
141
|
-
data, _status_code, _headers = create_bulk_import_close_users_request_with_http_info(organization_id)
|
141
|
+
def create_bulk_import_close_users_request(organization_id, file_csv)
|
142
|
+
data, _status_code, _headers = create_bulk_import_close_users_request_with_http_info(organization_id, file_csv)
|
142
143
|
return data
|
143
144
|
end
|
144
145
|
|
145
146
|
# Closes the Bulk User Import request
|
146
147
|
# Required scopes: user_write
|
147
148
|
# @param organization_id The organization ID Guid
|
149
|
+
# @param file_csv CSV file.
|
148
150
|
# @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers
|
149
|
-
def create_bulk_import_close_users_request_with_http_info(organization_id)
|
151
|
+
def create_bulk_import_close_users_request_with_http_info(organization_id, file_csv)
|
150
152
|
if @api_client.config.debugging
|
151
153
|
@api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_close_users_request ..."
|
152
154
|
end
|
153
155
|
# verify the required parameter 'organization_id' is set
|
154
156
|
fail ArgumentError, "Missing the required parameter 'organization_id' when calling BulkImportsApi.create_bulk_import_close_users_request" if organization_id.nil?
|
157
|
+
# verify the required parameter 'file_csv' is set
|
158
|
+
fail ArgumentError, "Missing the required parameter 'file_csv' when calling BulkImportsApi.create_bulk_import_close_users_request" if file_csv.nil?
|
155
159
|
# resource path
|
156
160
|
local_var_path = "/v2/organizations/{organizationId}/imports/bulk_users/close".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)
|
157
161
|
|
@@ -163,10 +167,11 @@ module DocuSign_Admin
|
|
163
167
|
# HTTP header 'Accept' (if needed)
|
164
168
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
165
169
|
# HTTP header 'Content-Type'
|
166
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['
|
170
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
167
171
|
|
168
172
|
# form parameters
|
169
173
|
form_params = {}
|
174
|
+
form_params["file.csv"] = file_csv
|
170
175
|
|
171
176
|
# http body (model)
|
172
177
|
post_body = nil
|
@@ -239,9 +244,10 @@ module DocuSign_Admin
|
|
239
244
|
# Required scopes: user_write
|
240
245
|
# @param organization_id The organization ID Guid
|
241
246
|
# @param account_id The account ID Guid
|
247
|
+
# @param file_csv CSV file.
|
242
248
|
# @return [OrganizationImportResponse]
|
243
|
-
def create_bulk_import_single_account_add_users_request(organization_id, account_id)
|
244
|
-
data, _status_code, _headers = create_bulk_import_single_account_add_users_request_with_http_info(organization_id, account_id)
|
249
|
+
def create_bulk_import_single_account_add_users_request(organization_id, account_id, file_csv)
|
250
|
+
data, _status_code, _headers = create_bulk_import_single_account_add_users_request_with_http_info(organization_id, account_id, file_csv)
|
245
251
|
return data
|
246
252
|
end
|
247
253
|
|
@@ -249,8 +255,9 @@ module DocuSign_Admin
|
|
249
255
|
# Required scopes: user_write
|
250
256
|
# @param organization_id The organization ID Guid
|
251
257
|
# @param account_id The account ID Guid
|
258
|
+
# @param file_csv CSV file.
|
252
259
|
# @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers
|
253
|
-
def create_bulk_import_single_account_add_users_request_with_http_info(organization_id, account_id)
|
260
|
+
def create_bulk_import_single_account_add_users_request_with_http_info(organization_id, account_id, file_csv)
|
254
261
|
if @api_client.config.debugging
|
255
262
|
@api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_single_account_add_users_request ..."
|
256
263
|
end
|
@@ -297,9 +304,10 @@ module DocuSign_Admin
|
|
297
304
|
# Required scopes: user_write
|
298
305
|
# @param organization_id The organization ID Guid
|
299
306
|
# @param account_id The account ID Guid
|
307
|
+
# @param file_csv CSV file.
|
300
308
|
# @return [OrganizationImportResponse]
|
301
|
-
def create_bulk_import_single_account_update_users_request(organization_id, account_id)
|
302
|
-
data, _status_code, _headers = create_bulk_import_single_account_update_users_request_with_http_info(organization_id, account_id)
|
309
|
+
def create_bulk_import_single_account_update_users_request(organization_id, account_id, file_csv)
|
310
|
+
data, _status_code, _headers = create_bulk_import_single_account_update_users_request_with_http_info(organization_id, account_id, file_csv)
|
303
311
|
return data
|
304
312
|
end
|
305
313
|
|
@@ -307,8 +315,9 @@ module DocuSign_Admin
|
|
307
315
|
# Required scopes: user_write
|
308
316
|
# @param organization_id The organization ID Guid
|
309
317
|
# @param account_id The account ID Guid
|
318
|
+
# @param file_csv CSV file.
|
310
319
|
# @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers
|
311
|
-
def create_bulk_import_single_account_update_users_request_with_http_info(organization_id, account_id)
|
320
|
+
def create_bulk_import_single_account_update_users_request_with_http_info(organization_id, account_id, file_csv)
|
312
321
|
if @api_client.config.debugging
|
313
322
|
@api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_single_account_update_users_request ..."
|
314
323
|
end
|
@@ -354,17 +363,19 @@ module DocuSign_Admin
|
|
354
363
|
# Import request for updating users to accounts within the organization.
|
355
364
|
# Required scopes: user_write
|
356
365
|
# @param organization_id The organization ID Guid
|
366
|
+
# @param file_csv CSV file.
|
357
367
|
# @return [OrganizationImportResponse]
|
358
|
-
def create_bulk_import_update_users_request(organization_id)
|
359
|
-
data, _status_code, _headers = create_bulk_import_update_users_request_with_http_info(organization_id)
|
368
|
+
def create_bulk_import_update_users_request(organization_id, file_csv)
|
369
|
+
data, _status_code, _headers = create_bulk_import_update_users_request_with_http_info(organization_id, file_csv)
|
360
370
|
return data
|
361
371
|
end
|
362
372
|
|
363
373
|
# Import request for updating users to accounts within the organization.
|
364
374
|
# Required scopes: user_write
|
365
375
|
# @param organization_id The organization ID Guid
|
376
|
+
# @param file_csv CSV file.
|
366
377
|
# @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers
|
367
|
-
def create_bulk_import_update_users_request_with_http_info(organization_id)
|
378
|
+
def create_bulk_import_update_users_request_with_http_info(organization_id, file_csv)
|
368
379
|
if @api_client.config.debugging
|
369
380
|
@api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_update_users_request ..."
|
370
381
|
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
=begin
|
2
|
+
#DocuSign Admin API
|
3
|
+
|
4
|
+
#An API for an organization administrator to manage organizations, accounts and users
|
5
|
+
|
6
|
+
OpenAPI spec version: v2.1
|
7
|
+
Contact: devcenter@docusign.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require "uri"
|
13
|
+
|
14
|
+
module DocuSign_Admin
|
15
|
+
|
16
|
+
|
17
|
+
class OrganizationsApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client = OrganizationsApi.default)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
|
24
|
+
# Redacts membership and user data for users in an organization.
|
25
|
+
# Required scopes: user_data_redact
|
26
|
+
# @param organization_id The organization ID Guid
|
27
|
+
# @param request_model The request body describing the users and memberships to be redacted
|
28
|
+
# @return [IndividualUserDataRedactionResponse]
|
29
|
+
def redact_individual_user_data(organization_id, request_model)
|
30
|
+
data, _status_code, _headers = redact_individual_user_data_with_http_info(organization_id, request_model)
|
31
|
+
return data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Redacts membership and user data for users in an organization.
|
35
|
+
# Required scopes: user_data_redact
|
36
|
+
# @param organization_id The organization ID Guid
|
37
|
+
# @param request_model The request body describing the users and memberships to be redacted
|
38
|
+
# @return [Array<(IndividualUserDataRedactionResponse, Fixnum, Hash)>] IndividualUserDataRedactionResponse data, response status code and response headers
|
39
|
+
def redact_individual_user_data_with_http_info(organization_id, request_model)
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug "Calling API: OrganizationsApi.redact_individual_user_data ..."
|
42
|
+
end
|
43
|
+
# verify the required parameter 'organization_id' is set
|
44
|
+
fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.redact_individual_user_data" if organization_id.nil?
|
45
|
+
# verify the required parameter 'request_model' is set
|
46
|
+
fail ArgumentError, "Missing the required parameter 'request_model' when calling OrganizationsApi.redact_individual_user_data" if request_model.nil?
|
47
|
+
# resource path
|
48
|
+
local_var_path = "/v2/data_redaction/organizations/{organizationId}/user".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = {}
|
52
|
+
|
53
|
+
# header parameters
|
54
|
+
header_params = {}
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
57
|
+
# HTTP header 'Content-Type'
|
58
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
59
|
+
|
60
|
+
# form parameters
|
61
|
+
form_params = {}
|
62
|
+
|
63
|
+
# http body (model)
|
64
|
+
post_body = @api_client.object_to_http_body(request_model)
|
65
|
+
auth_names = []
|
66
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
67
|
+
:header_params => header_params,
|
68
|
+
:query_params => query_params,
|
69
|
+
:form_params => form_params,
|
70
|
+
:body => post_body,
|
71
|
+
:auth_names => auth_names,
|
72
|
+
:return_type => 'IndividualUserDataRedactionResponse')
|
73
|
+
if @api_client.config.debugging
|
74
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#redact_individual_user_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
+
end
|
76
|
+
return data, status_code, headers
|
77
|
+
end
|
78
|
+
end
|
79
|
+
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
|