Skip to content

Commit 950da8a

Browse files
authored
Merge pull request #8 from docusign/1.3.0-v2.1-1.2.0
Version 1.3.0 release
2 parents 8deb5cc + 9d932e7 commit 950da8a

12 files changed

Lines changed: 1011 additions & 1 deletion

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
33

44
See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes.
55

6+
## [v1.3.0] - Admin API v2.1-1.2.0 - 2023-05-10
7+
### Changed
8+
- Added support for version v2.1-1.2.0 of the DocuSign Admin API.
9+
- Updated the SDK release version.
10+
611
## [v1.2.0] - Admin API v2.1-1.1.1 - 2023-03-22
712
### Changed
813
- Added support for version v2.1-1.1.1 of the DocuSign Admin API.

docusign_admin/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .apis.bulk_imports_api import BulkImportsApi
2222
from .apis.ds_groups_api import DSGroupsApi
2323
from .apis.identity_providers_api import IdentityProvidersApi
24+
from .apis.organizations_api import OrganizationsApi
2425
from .apis.product_permission_profiles_api import ProductPermissionProfilesApi
2526
from .apis.reserved_domains_api import ReservedDomainsApi
2627
from .apis.users_api import UsersApi
@@ -64,9 +65,14 @@
6465
from docusign_admin.models.group_request import GroupRequest
6566
from docusign_admin.models.identity_provider_response import IdentityProviderResponse
6667
from docusign_admin.models.identity_providers_response import IdentityProvidersResponse
68+
from docusign_admin.models.individual_membership_data_redaction_request import IndividualMembershipDataRedactionRequest
69+
from docusign_admin.models.individual_user_data_redaction_request import IndividualUserDataRedactionRequest
70+
from docusign_admin.models.individual_user_data_redaction_response import IndividualUserDataRedactionResponse
6771
from docusign_admin.models.link_response import LinkResponse
6872
from docusign_admin.models.member_group_response import MemberGroupResponse
6973
from docusign_admin.models.member_groups_response import MemberGroupsResponse
74+
from docusign_admin.models.membership_data_redaction_request import MembershipDataRedactionRequest
75+
from docusign_admin.models.membership_data_redaction_response import MembershipDataRedactionResponse
7076
from docusign_admin.models.membership_response import MembershipResponse
7177
from docusign_admin.models.new_account_user_request import NewAccountUserRequest
7278
from docusign_admin.models.new_multi_product_user_add_request import NewMultiProductUserAddRequest

docusign_admin/apis/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .bulk_imports_api import BulkImportsApi
99
from .ds_groups_api import DSGroupsApi
1010
from .identity_providers_api import IdentityProvidersApi
11+
from .organizations_api import OrganizationsApi
1112
from .product_permission_profiles_api import ProductPermissionProfilesApi
1213
from .reserved_domains_api import ReservedDomainsApi
1314
from .users_api import UsersApi

docusign_admin/apis/accounts_api.py

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,3 +383,117 @@ def get_permissions_with_http_info(self, organization_id, account_id, **kwargs):
383383
_preload_content=params.get('_preload_content', True),
384384
_request_timeout=params.get('_request_timeout'),
385385
collection_formats=collection_formats)
386+
387+
def redact_individual_membership_data(self, account_id, request_model, **kwargs):
388+
"""
389+
Redacts membership data for users with memberships in an account.
390+
Required scopes: user_data_redact
391+
This method makes a synchronous HTTP request by default. To make an
392+
asynchronous HTTP request, please define a `callback` function
393+
to be invoked when receiving the response.
394+
>>> def callback_function(response):
395+
>>> pprint(response)
396+
>>>
397+
>>> thread = api.redact_individual_membership_data(account_id, request_model, callback=callback_function)
398+
399+
:param callback function: The callback function
400+
for asynchronous request. (optional)
401+
:param str account_id: The account ID Guid (required)
402+
:param IndividualMembershipDataRedactionRequest request_model: The request body describing the membership to be redacted (required)
403+
:return: IndividualUserDataRedactionResponse
404+
If the method is called asynchronously,
405+
returns the request thread.
406+
"""
407+
kwargs['_return_http_data_only'] = True
408+
if kwargs.get('callback'):
409+
return self.redact_individual_membership_data_with_http_info(account_id, request_model, **kwargs)
410+
else:
411+
(data) = self.redact_individual_membership_data_with_http_info(account_id, request_model, **kwargs)
412+
return data
413+
414+
def redact_individual_membership_data_with_http_info(self, account_id, request_model, **kwargs):
415+
"""
416+
Redacts membership data for users with memberships in an account.
417+
Required scopes: user_data_redact
418+
This method makes a synchronous HTTP request by default. To make an
419+
asynchronous HTTP request, please define a `callback` function
420+
to be invoked when receiving the response.
421+
>>> def callback_function(response):
422+
>>> pprint(response)
423+
>>>
424+
>>> thread = api.redact_individual_membership_data_with_http_info(account_id, request_model, callback=callback_function)
425+
426+
:param callback function: The callback function
427+
for asynchronous request. (optional)
428+
:param str account_id: The account ID Guid (required)
429+
:param IndividualMembershipDataRedactionRequest request_model: The request body describing the membership to be redacted (required)
430+
:return: IndividualUserDataRedactionResponse
431+
If the method is called asynchronously,
432+
returns the request thread.
433+
"""
434+
435+
all_params = ['account_id', 'request_model']
436+
all_params.append('callback')
437+
all_params.append('_return_http_data_only')
438+
all_params.append('_preload_content')
439+
all_params.append('_request_timeout')
440+
441+
params = locals()
442+
for key, val in iteritems(params['kwargs']):
443+
if key not in all_params:
444+
raise TypeError(
445+
"Got an unexpected keyword argument '%s'"
446+
" to method redact_individual_membership_data" % key
447+
)
448+
params[key] = val
449+
del params['kwargs']
450+
# verify the required parameter 'account_id' is set
451+
if ('account_id' not in params) or (params['account_id'] is None):
452+
raise ValueError("Missing the required parameter `account_id` when calling `redact_individual_membership_data`")
453+
# verify the required parameter 'request_model' is set
454+
if ('request_model' not in params) or (params['request_model'] is None):
455+
raise ValueError("Missing the required parameter `request_model` when calling `redact_individual_membership_data`")
456+
457+
458+
collection_formats = {}
459+
460+
resource_path = '/v2/data_redaction/accounts/{accountId}/user'.replace('{format}', 'json')
461+
path_params = {}
462+
if 'account_id' in params:
463+
path_params['accountId'] = params['account_id']
464+
465+
query_params = {}
466+
467+
header_params = {}
468+
469+
form_params = []
470+
local_var_files = {}
471+
472+
body_params = None
473+
if 'request_model' in params:
474+
body_params = params['request_model']
475+
# HTTP header `Accept`
476+
header_params['Accept'] = self.api_client.\
477+
select_header_accept(['application/json'])
478+
479+
# HTTP header `Content-Type`
480+
header_params['Content-Type'] = self.api_client.\
481+
select_header_content_type(['application/json'])
482+
483+
# Authentication setting
484+
auth_settings = []
485+
486+
return self.api_client.call_api(resource_path, 'POST',
487+
path_params,
488+
query_params,
489+
header_params,
490+
body=body_params,
491+
post_params=form_params,
492+
files=local_var_files,
493+
response_type='IndividualUserDataRedactionResponse',
494+
auth_settings=auth_settings,
495+
callback=params.get('callback'),
496+
_return_http_data_only=params.get('_return_http_data_only'),
497+
_preload_content=params.get('_preload_content', True),
498+
_request_timeout=params.get('_request_timeout'),
499+
collection_formats=collection_formats)
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# coding: utf-8
2+
3+
"""
4+
DocuSign Admin API
5+
6+
An API for an organization administrator to manage organizations, accounts and users # noqa: E501
7+
8+
OpenAPI spec version: v2.1
9+
Contact: devcenter@docusign.com
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
from __future__ import absolute_import
15+
16+
import sys
17+
import os
18+
import re
19+
20+
# python 2 and python 3 compatibility library
21+
from six import iteritems
22+
23+
from ..client.configuration import Configuration
24+
from ..client.api_client import ApiClient
25+
26+
27+
class OrganizationsApi(object):
28+
"""
29+
NOTE: This class is auto generated by the swagger code generator program.
30+
Do not edit the class manually.
31+
Ref: https://github.com/swagger-api/swagger-codegen
32+
"""
33+
34+
def __init__(self, api_client=None):
35+
config = Configuration()
36+
if api_client:
37+
self.api_client = api_client
38+
else:
39+
if not config.api_client:
40+
config.api_client = ApiClient()
41+
self.api_client = config.api_client
42+
43+
def redact_individual_user_data(self, organization_id, request_model, **kwargs):
44+
"""
45+
Redacts membership and user data for users in an organization.
46+
Required scopes: user_data_redact
47+
This method makes a synchronous HTTP request by default. To make an
48+
asynchronous HTTP request, please define a `callback` function
49+
to be invoked when receiving the response.
50+
>>> def callback_function(response):
51+
>>> pprint(response)
52+
>>>
53+
>>> thread = api.redact_individual_user_data(organization_id, request_model, callback=callback_function)
54+
55+
:param callback function: The callback function
56+
for asynchronous request. (optional)
57+
:param str organization_id: The organization ID Guid (required)
58+
:param IndividualUserDataRedactionRequest request_model: The request body describing the users and memberships to be redacted (required)
59+
:return: IndividualUserDataRedactionResponse
60+
If the method is called asynchronously,
61+
returns the request thread.
62+
"""
63+
kwargs['_return_http_data_only'] = True
64+
if kwargs.get('callback'):
65+
return self.redact_individual_user_data_with_http_info(organization_id, request_model, **kwargs)
66+
else:
67+
(data) = self.redact_individual_user_data_with_http_info(organization_id, request_model, **kwargs)
68+
return data
69+
70+
def redact_individual_user_data_with_http_info(self, organization_id, request_model, **kwargs):
71+
"""
72+
Redacts membership and user data for users in an organization.
73+
Required scopes: user_data_redact
74+
This method makes a synchronous HTTP request by default. To make an
75+
asynchronous HTTP request, please define a `callback` function
76+
to be invoked when receiving the response.
77+
>>> def callback_function(response):
78+
>>> pprint(response)
79+
>>>
80+
>>> thread = api.redact_individual_user_data_with_http_info(organization_id, request_model, callback=callback_function)
81+
82+
:param callback function: The callback function
83+
for asynchronous request. (optional)
84+
:param str organization_id: The organization ID Guid (required)
85+
:param IndividualUserDataRedactionRequest request_model: The request body describing the users and memberships to be redacted (required)
86+
:return: IndividualUserDataRedactionResponse
87+
If the method is called asynchronously,
88+
returns the request thread.
89+
"""
90+
91+
all_params = ['organization_id', 'request_model']
92+
all_params.append('callback')
93+
all_params.append('_return_http_data_only')
94+
all_params.append('_preload_content')
95+
all_params.append('_request_timeout')
96+
97+
params = locals()
98+
for key, val in iteritems(params['kwargs']):
99+
if key not in all_params:
100+
raise TypeError(
101+
"Got an unexpected keyword argument '%s'"
102+
" to method redact_individual_user_data" % key
103+
)
104+
params[key] = val
105+
del params['kwargs']
106+
# verify the required parameter 'organization_id' is set
107+
if ('organization_id' not in params) or (params['organization_id'] is None):
108+
raise ValueError("Missing the required parameter `organization_id` when calling `redact_individual_user_data`")
109+
# verify the required parameter 'request_model' is set
110+
if ('request_model' not in params) or (params['request_model'] is None):
111+
raise ValueError("Missing the required parameter `request_model` when calling `redact_individual_user_data`")
112+
113+
114+
collection_formats = {}
115+
116+
resource_path = '/v2/data_redaction/organizations/{organizationId}/user'.replace('{format}', 'json')
117+
path_params = {}
118+
if 'organization_id' in params:
119+
path_params['organizationId'] = params['organization_id']
120+
121+
query_params = {}
122+
123+
header_params = {}
124+
125+
form_params = []
126+
local_var_files = {}
127+
128+
body_params = None
129+
if 'request_model' in params:
130+
body_params = params['request_model']
131+
# HTTP header `Accept`
132+
header_params['Accept'] = self.api_client.\
133+
select_header_accept(['application/json'])
134+
135+
# HTTP header `Content-Type`
136+
header_params['Content-Type'] = self.api_client.\
137+
select_header_content_type(['application/json'])
138+
139+
# Authentication setting
140+
auth_settings = []
141+
142+
return self.api_client.call_api(resource_path, 'POST',
143+
path_params,
144+
query_params,
145+
header_params,
146+
body=body_params,
147+
post_params=form_params,
148+
files=local_var_files,
149+
response_type='IndividualUserDataRedactionResponse',
150+
auth_settings=auth_settings,
151+
callback=params.get('callback'),
152+
_return_http_data_only=params.get('_return_http_data_only'),
153+
_preload_content=params.get('_preload_content', True),
154+
_request_timeout=params.get('_request_timeout'),
155+
collection_formats=collection_formats)

docusign_admin/models/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,14 @@
4242
from docusign_admin.models.group_request import GroupRequest
4343
from docusign_admin.models.identity_provider_response import IdentityProviderResponse
4444
from docusign_admin.models.identity_providers_response import IdentityProvidersResponse
45+
from docusign_admin.models.individual_membership_data_redaction_request import IndividualMembershipDataRedactionRequest
46+
from docusign_admin.models.individual_user_data_redaction_request import IndividualUserDataRedactionRequest
47+
from docusign_admin.models.individual_user_data_redaction_response import IndividualUserDataRedactionResponse
4548
from docusign_admin.models.link_response import LinkResponse
4649
from docusign_admin.models.member_group_response import MemberGroupResponse
4750
from docusign_admin.models.member_groups_response import MemberGroupsResponse
51+
from docusign_admin.models.membership_data_redaction_request import MembershipDataRedactionRequest
52+
from docusign_admin.models.membership_data_redaction_response import MembershipDataRedactionResponse
4853
from docusign_admin.models.membership_response import MembershipResponse
4954
from docusign_admin.models.new_account_user_request import NewAccountUserRequest
5055
from docusign_admin.models.new_multi_product_user_add_request import NewMultiProductUserAddRequest

0 commit comments

Comments
 (0)