Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.

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

## [v1.3.0] - Admin API v2.1-1.2.0 - 2023-05-10
### Changed
- Added support for version v2.1-1.2.0 of the DocuSign Admin API.
- Updated the SDK release version.

## [v1.2.0] - Admin API v2.1-1.1.1 - 2023-03-22
### Changed
- Added support for version v2.1-1.1.1 of the DocuSign Admin API.
Expand Down
6 changes: 6 additions & 0 deletions docusign_admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from .apis.bulk_imports_api import BulkImportsApi
from .apis.ds_groups_api import DSGroupsApi
from .apis.identity_providers_api import IdentityProvidersApi
from .apis.organizations_api import OrganizationsApi
from .apis.product_permission_profiles_api import ProductPermissionProfilesApi
from .apis.reserved_domains_api import ReservedDomainsApi
from .apis.users_api import UsersApi
Expand Down Expand Up @@ -64,9 +65,14 @@
from docusign_admin.models.group_request import GroupRequest
from docusign_admin.models.identity_provider_response import IdentityProviderResponse
from docusign_admin.models.identity_providers_response import IdentityProvidersResponse
from docusign_admin.models.individual_membership_data_redaction_request import IndividualMembershipDataRedactionRequest
from docusign_admin.models.individual_user_data_redaction_request import IndividualUserDataRedactionRequest
from docusign_admin.models.individual_user_data_redaction_response import IndividualUserDataRedactionResponse
from docusign_admin.models.link_response import LinkResponse
from docusign_admin.models.member_group_response import MemberGroupResponse
from docusign_admin.models.member_groups_response import MemberGroupsResponse
from docusign_admin.models.membership_data_redaction_request import MembershipDataRedactionRequest
from docusign_admin.models.membership_data_redaction_response import MembershipDataRedactionResponse
from docusign_admin.models.membership_response import MembershipResponse
from docusign_admin.models.new_account_user_request import NewAccountUserRequest
from docusign_admin.models.new_multi_product_user_add_request import NewMultiProductUserAddRequest
Expand Down
1 change: 1 addition & 0 deletions docusign_admin/apis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .bulk_imports_api import BulkImportsApi
from .ds_groups_api import DSGroupsApi
from .identity_providers_api import IdentityProvidersApi
from .organizations_api import OrganizationsApi
from .product_permission_profiles_api import ProductPermissionProfilesApi
from .reserved_domains_api import ReservedDomainsApi
from .users_api import UsersApi
114 changes: 114 additions & 0 deletions docusign_admin/apis/accounts_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,117 @@ def get_permissions_with_http_info(self, organization_id, account_id, **kwargs):
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def redact_individual_membership_data(self, account_id, request_model, **kwargs):
"""
Redacts membership data for users with memberships in an account.
Required scopes: user_data_redact
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.redact_individual_membership_data(account_id, request_model, callback=callback_function)

:param callback function: The callback function
for asynchronous request. (optional)
:param str account_id: The account ID Guid (required)
:param IndividualMembershipDataRedactionRequest request_model: The request body describing the membership to be redacted (required)
:return: IndividualUserDataRedactionResponse
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.redact_individual_membership_data_with_http_info(account_id, request_model, **kwargs)
else:
(data) = self.redact_individual_membership_data_with_http_info(account_id, request_model, **kwargs)
return data

def redact_individual_membership_data_with_http_info(self, account_id, request_model, **kwargs):
"""
Redacts membership data for users with memberships in an account.
Required scopes: user_data_redact
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.redact_individual_membership_data_with_http_info(account_id, request_model, callback=callback_function)

:param callback function: The callback function
for asynchronous request. (optional)
:param str account_id: The account ID Guid (required)
:param IndividualMembershipDataRedactionRequest request_model: The request body describing the membership to be redacted (required)
:return: IndividualUserDataRedactionResponse
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['account_id', 'request_model']
all_params.append('callback')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method redact_individual_membership_data" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'account_id' is set
if ('account_id' not in params) or (params['account_id'] is None):
raise ValueError("Missing the required parameter `account_id` when calling `redact_individual_membership_data`")
# verify the required parameter 'request_model' is set
if ('request_model' not in params) or (params['request_model'] is None):
raise ValueError("Missing the required parameter `request_model` when calling `redact_individual_membership_data`")


collection_formats = {}

resource_path = '/v2/data_redaction/accounts/{accountId}/user'.replace('{format}', 'json')
path_params = {}
if 'account_id' in params:
path_params['accountId'] = params['account_id']

query_params = {}

header_params = {}

form_params = []
local_var_files = {}

body_params = None
if 'request_model' in params:
body_params = params['request_model']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])

# Authentication setting
auth_settings = []

return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='IndividualUserDataRedactionResponse',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
155 changes: 155 additions & 0 deletions docusign_admin/apis/organizations_api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# coding: utf-8

"""
DocuSign Admin API

An API for an organization administrator to manage organizations, accounts and users # noqa: E501

OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..client.configuration import Configuration
from ..client.api_client import ApiClient


class OrganizationsApi(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""

def __init__(self, api_client=None):
config = Configuration()
if api_client:
self.api_client = api_client
else:
if not config.api_client:
config.api_client = ApiClient()
self.api_client = config.api_client

def redact_individual_user_data(self, organization_id, request_model, **kwargs):
"""
Redacts membership and user data for users in an organization.
Required scopes: user_data_redact
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.redact_individual_user_data(organization_id, request_model, callback=callback_function)

:param callback function: The callback function
for asynchronous request. (optional)
:param str organization_id: The organization ID Guid (required)
:param IndividualUserDataRedactionRequest request_model: The request body describing the users and memberships to be redacted (required)
:return: IndividualUserDataRedactionResponse
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('callback'):
return self.redact_individual_user_data_with_http_info(organization_id, request_model, **kwargs)
else:
(data) = self.redact_individual_user_data_with_http_info(organization_id, request_model, **kwargs)
return data

def redact_individual_user_data_with_http_info(self, organization_id, request_model, **kwargs):
"""
Redacts membership and user data for users in an organization.
Required scopes: user_data_redact
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please define a `callback` function
to be invoked when receiving the response.
>>> def callback_function(response):
>>> pprint(response)
>>>
>>> thread = api.redact_individual_user_data_with_http_info(organization_id, request_model, callback=callback_function)

:param callback function: The callback function
for asynchronous request. (optional)
:param str organization_id: The organization ID Guid (required)
:param IndividualUserDataRedactionRequest request_model: The request body describing the users and memberships to be redacted (required)
:return: IndividualUserDataRedactionResponse
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['organization_id', 'request_model']
all_params.append('callback')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method redact_individual_user_data" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'organization_id' is set
if ('organization_id' not in params) or (params['organization_id'] is None):
raise ValueError("Missing the required parameter `organization_id` when calling `redact_individual_user_data`")
# verify the required parameter 'request_model' is set
if ('request_model' not in params) or (params['request_model'] is None):
raise ValueError("Missing the required parameter `request_model` when calling `redact_individual_user_data`")


collection_formats = {}

resource_path = '/v2/data_redaction/organizations/{organizationId}/user'.replace('{format}', 'json')
path_params = {}
if 'organization_id' in params:
path_params['organizationId'] = params['organization_id']

query_params = {}

header_params = {}

form_params = []
local_var_files = {}

body_params = None
if 'request_model' in params:
body_params = params['request_model']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.\
select_header_accept(['application/json'])

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.\
select_header_content_type(['application/json'])

# Authentication setting
auth_settings = []

return self.api_client.call_api(resource_path, 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='IndividualUserDataRedactionResponse',
auth_settings=auth_settings,
callback=params.get('callback'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
5 changes: 5 additions & 0 deletions docusign_admin/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,14 @@
from docusign_admin.models.group_request import GroupRequest
from docusign_admin.models.identity_provider_response import IdentityProviderResponse
from docusign_admin.models.identity_providers_response import IdentityProvidersResponse
from docusign_admin.models.individual_membership_data_redaction_request import IndividualMembershipDataRedactionRequest
from docusign_admin.models.individual_user_data_redaction_request import IndividualUserDataRedactionRequest
from docusign_admin.models.individual_user_data_redaction_response import IndividualUserDataRedactionResponse
from docusign_admin.models.link_response import LinkResponse
from docusign_admin.models.member_group_response import MemberGroupResponse
from docusign_admin.models.member_groups_response import MemberGroupsResponse
from docusign_admin.models.membership_data_redaction_request import MembershipDataRedactionRequest
from docusign_admin.models.membership_data_redaction_response import MembershipDataRedactionResponse
from docusign_admin.models.membership_response import MembershipResponse
from docusign_admin.models.new_account_user_request import NewAccountUserRequest
from docusign_admin.models.new_multi_product_user_add_request import NewMultiProductUserAddRequest
Expand Down
Loading