Skip to content

Commit aff1232

Browse files
authored
Merge pull request #4 from docusign/1.2.0-v2.1-1.2.0
Version 1.2.0 release
2 parents de1e2a8 + ae5a81f commit aff1232

12 files changed

+1200
-24
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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+
16
## [v1.1.0] - Admin API v2.1-1.1.0 - 2022-04-26
27
### Changed
38
- Added support for version v2.1-1.1.0 of the DocuSign Admin API.

lib/docusign_admin.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,14 @@
4646
require 'docusign_admin/models/group_request'
4747
require 'docusign_admin/models/identity_provider_response'
4848
require 'docusign_admin/models/identity_providers_response'
49+
require 'docusign_admin/models/individual_membership_data_redaction_request'
50+
require 'docusign_admin/models/individual_user_data_redaction_request'
51+
require 'docusign_admin/models/individual_user_data_redaction_response'
4952
require 'docusign_admin/models/link_response'
5053
require 'docusign_admin/models/member_group_response'
5154
require 'docusign_admin/models/member_groups_response'
55+
require 'docusign_admin/models/membership_data_redaction_request'
56+
require 'docusign_admin/models/membership_data_redaction_response'
5257
require 'docusign_admin/models/membership_response'
5358
require 'docusign_admin/models/new_account_user_request'
5459
require 'docusign_admin/models/new_multi_product_user_add_request'
@@ -128,6 +133,7 @@
128133
require 'docusign_admin/api/bulk_imports_api'
129134
require 'docusign_admin/api/ds_groups_api'
130135
require 'docusign_admin/api/identity_providers_api'
136+
require 'docusign_admin/api/organizations_api'
131137
require 'docusign_admin/api/product_permission_profiles_api'
132138
require 'docusign_admin/api/reserved_domains_api'
133139
require 'docusign_admin/api/users_api'

lib/docusign_admin/api/accounts_api.rb

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,60 @@ def get_permissions_with_http_info(organization_id, account_id)
209209
end
210210
return data, status_code, headers
211211
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
212267
end
213268
end

lib/docusign_admin/api/bulk_imports_api.rb

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def initialize(api_client = BulkImportsApi.default)
2424
# Creates a new account settings import request.
2525
# Required scopes: account_write
2626
# @param organization_id The organization ID Guid
27-
# @param file_csv CSV file.
27+
# @param file_csv CSV file.
2828
# @return [OrganizationAccountSettingsImportResponse]
2929
def add_bulk_account_settings_import(organization_id, file_csv)
3030
data, _status_code, _headers = add_bulk_account_settings_import_with_http_info(organization_id, file_csv)
@@ -34,7 +34,7 @@ def add_bulk_account_settings_import(organization_id, file_csv)
3434
# Creates a new account settings import request.
3535
# Required scopes: account_write
3636
# @param organization_id The organization ID Guid
37-
# @param file_csv CSV file.
37+
# @param file_csv CSV file.
3838
# @return [Array<(OrganizationAccountSettingsImportResponse, Fixnum, Hash)>] OrganizationAccountSettingsImportResponse data, response status code and response headers
3939
def add_bulk_account_settings_import_with_http_info(organization_id, file_csv)
4040
if @api_client.config.debugging
@@ -80,7 +80,7 @@ def add_bulk_account_settings_import_with_http_info(organization_id, file_csv)
8080
# Import request for adding users to accounts within the organization.
8181
# Required scopes: user_write
8282
# @param organization_id The organization ID Guid
83-
# @param file_csv CSV file.
83+
# @param file_csv CSV file.
8484
# @return [OrganizationImportResponse]
8585
def create_bulk_import_add_users_request(organization_id, file_csv)
8686
data, _status_code, _headers = create_bulk_import_add_users_request_with_http_info(organization_id, file_csv)
@@ -90,7 +90,7 @@ def create_bulk_import_add_users_request(organization_id, file_csv)
9090
# Import request for adding users to accounts within the organization.
9191
# Required scopes: user_write
9292
# @param organization_id The organization ID Guid
93-
# @param file_csv CSV file.
93+
# @param file_csv CSV file.
9494
# @return [Array<(OrganizationImportResponse, Fixnum, Hash)>] OrganizationImportResponse data, response status code and response headers
9595
def create_bulk_import_add_users_request_with_http_info(organization_id, file_csv)
9696
if @api_client.config.debugging
@@ -136,22 +136,26 @@ def create_bulk_import_add_users_request_with_http_info(organization_id, file_cs
136136
# Closes the Bulk User Import request
137137
# Required scopes: user_write
138138
# @param organization_id The organization ID Guid
139+
# @param file_csv CSV file.
139140
# @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)
142143
return data
143144
end
144145

145146
# Closes the Bulk User Import request
146147
# Required scopes: user_write
147148
# @param organization_id The organization ID Guid
149+
# @param file_csv CSV file.
148150
# @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)
150152
if @api_client.config.debugging
151153
@api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_close_users_request ..."
152154
end
153155
# verify the required parameter 'organization_id' is set
154156
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?
155159
# resource path
156160
local_var_path = "/v2/organizations/{organizationId}/imports/bulk_users/close".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s)
157161

@@ -163,10 +167,11 @@ def create_bulk_import_close_users_request_with_http_info(organization_id)
163167
# HTTP header 'Accept' (if needed)
164168
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
165169
# HTTP header 'Content-Type'
166-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
170+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
167171

168172
# form parameters
169173
form_params = {}
174+
form_params["file.csv"] = file_csv
170175

171176
# http body (model)
172177
post_body = nil
@@ -239,18 +244,20 @@ def create_bulk_import_external_close_users_request_with_http_info(organization_
239244
# Required scopes: user_write
240245
# @param organization_id The organization ID Guid
241246
# @param account_id The account ID Guid
247+
# @param file_csv CSV file.
242248
# @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)
245251
return data
246252
end
247253

248254
# Import request for adding user to a single account within the organization. Allows upload of user information without requiring an AccountId column
249255
# Required scopes: user_write
250256
# @param organization_id The organization ID Guid
251257
# @param account_id The account ID Guid
258+
# @param file_csv CSV file.
252259
# @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)
254261
if @api_client.config.debugging
255262
@api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_single_account_add_users_request ..."
256263
end
@@ -297,18 +304,20 @@ def create_bulk_import_single_account_add_users_request_with_http_info(organizat
297304
# Required scopes: user_write
298305
# @param organization_id The organization ID Guid
299306
# @param account_id The account ID Guid
307+
# @param file_csv CSV file.
300308
# @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)
303311
return data
304312
end
305313

306314
# Import request for updating users for a single account within the organization. Allows upload of user information without requiring an AccountId column
307315
# Required scopes: user_write
308316
# @param organization_id The organization ID Guid
309317
# @param account_id The account ID Guid
318+
# @param file_csv CSV file.
310319
# @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)
312321
if @api_client.config.debugging
313322
@api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_single_account_update_users_request ..."
314323
end
@@ -354,17 +363,19 @@ def create_bulk_import_single_account_update_users_request_with_http_info(organi
354363
# Import request for updating users to accounts within the organization.
355364
# Required scopes: user_write
356365
# @param organization_id The organization ID Guid
366+
# @param file_csv CSV file.
357367
# @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)
360370
return data
361371
end
362372

363373
# Import request for updating users to accounts within the organization.
364374
# Required scopes: user_write
365375
# @param organization_id The organization ID Guid
376+
# @param file_csv CSV file.
366377
# @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)
368379
if @api_client.config.debugging
369380
@api_client.config.logger.debug "Calling API: BulkImportsApi.create_bulk_import_update_users_request ..."
370381
end
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

lib/docusign_admin/client/api_client.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ApiClient
3535
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
3636
def initialize(config = Configuration.default)
3737
@config = config
38-
@user_agent = "Swagger-Codegen/1.1.0/ruby"
38+
@user_agent = "Swagger-Codegen/1.2.0/ruby"
3939
@default_headers = {
4040
'Content-Type' => "application/json",
4141
'User-Agent' => @user_agent
@@ -107,10 +107,6 @@ def build_request(http_method, path, opts = {})
107107
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
108108
_verify_ssl_host = @config.verify_ssl_host ? 2 : 0
109109

110-
if header_params['Content-Type'] == 'multipart/form-data'
111-
header_params['Content-Disposition'] = 'form-data; name=file; filename=file.csv'
112-
end
113-
114110
req_opts = {
115111
:method => http_method,
116112
:headers => header_params,
@@ -285,7 +281,8 @@ def build_request_body(header_params, form_params, body)
285281
# let typhoeus handle File, Array and nil parameters
286282
data[key] = value
287283
else
288-
if key == 'file.csv'
284+
if header_params['Content-Type'] == 'multipart/form-data'
285+
header_params['Content-Disposition'] = 'form-data; name=file; filename=' + key
289286
data = value
290287
else
291288
data[key] = value.to_s

0 commit comments

Comments
 (0)