diff --git a/CHANGELOG.md b/CHANGELOG.md index d5ae7d4..bf3ded2 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/docusign_admin/__init__.py b/docusign_admin/__init__.py index a70e41f..4638094 100644 --- a/docusign_admin/__init__.py +++ b/docusign_admin/__init__.py @@ -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 @@ -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 diff --git a/docusign_admin/apis/__init__.py b/docusign_admin/apis/__init__.py index d1cce0e..368ee33 100644 --- a/docusign_admin/apis/__init__.py +++ b/docusign_admin/apis/__init__.py @@ -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 diff --git a/docusign_admin/apis/accounts_api.py b/docusign_admin/apis/accounts_api.py index bcf54e5..7169030 100644 --- a/docusign_admin/apis/accounts_api.py +++ b/docusign_admin/apis/accounts_api.py @@ -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) diff --git a/docusign_admin/apis/organizations_api.py b/docusign_admin/apis/organizations_api.py new file mode 100644 index 0000000..4fdacdc --- /dev/null +++ b/docusign_admin/apis/organizations_api.py @@ -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) diff --git a/docusign_admin/models/__init__.py b/docusign_admin/models/__init__.py index c663687..838e199 100644 --- a/docusign_admin/models/__init__.py +++ b/docusign_admin/models/__init__.py @@ -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 diff --git a/docusign_admin/models/individual_membership_data_redaction_request.py b/docusign_admin/models/individual_membership_data_redaction_request.py new file mode 100644 index 0000000..cb21f22 --- /dev/null +++ b/docusign_admin/models/individual_membership_data_redaction_request.py @@ -0,0 +1,122 @@ +# 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 +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_admin.client.configuration import Configuration + + +class IndividualMembershipDataRedactionRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user_id': 'str' + } + + attribute_map = { + 'user_id': 'user_id' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """IndividualMembershipDataRedactionRequest - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._user_id = None + self.discriminator = None + + setattr(self, "_{}".format('user_id'), kwargs.get('user_id', None)) + + @property + def user_id(self): + """Gets the user_id of this IndividualMembershipDataRedactionRequest. # noqa: E501 + + + :return: The user_id of this IndividualMembershipDataRedactionRequest. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this IndividualMembershipDataRedactionRequest. + + + :param user_id: The user_id of this IndividualMembershipDataRedactionRequest. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(IndividualMembershipDataRedactionRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IndividualMembershipDataRedactionRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IndividualMembershipDataRedactionRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_admin/models/individual_user_data_redaction_request.py b/docusign_admin/models/individual_user_data_redaction_request.py new file mode 100644 index 0000000..c2f42c6 --- /dev/null +++ b/docusign_admin/models/individual_user_data_redaction_request.py @@ -0,0 +1,147 @@ +# 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 +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_admin.client.configuration import Configuration + + +class IndividualUserDataRedactionRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user_id': 'str', + 'memberships': 'list[MembershipDataRedactionRequest]' + } + + attribute_map = { + 'user_id': 'user_id', + 'memberships': 'memberships' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """IndividualUserDataRedactionRequest - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._user_id = None + self._memberships = None + self.discriminator = None + + setattr(self, "_{}".format('user_id'), kwargs.get('user_id', None)) + setattr(self, "_{}".format('memberships'), kwargs.get('memberships', None)) + + @property + def user_id(self): + """Gets the user_id of this IndividualUserDataRedactionRequest. # noqa: E501 + + + :return: The user_id of this IndividualUserDataRedactionRequest. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this IndividualUserDataRedactionRequest. + + + :param user_id: The user_id of this IndividualUserDataRedactionRequest. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def memberships(self): + """Gets the memberships of this IndividualUserDataRedactionRequest. # noqa: E501 + + + :return: The memberships of this IndividualUserDataRedactionRequest. # noqa: E501 + :rtype: list[MembershipDataRedactionRequest] + """ + return self._memberships + + @memberships.setter + def memberships(self, memberships): + """Sets the memberships of this IndividualUserDataRedactionRequest. + + + :param memberships: The memberships of this IndividualUserDataRedactionRequest. # noqa: E501 + :type: list[MembershipDataRedactionRequest] + """ + + self._memberships = memberships + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(IndividualUserDataRedactionRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IndividualUserDataRedactionRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IndividualUserDataRedactionRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_admin/models/individual_user_data_redaction_response.py b/docusign_admin/models/individual_user_data_redaction_response.py new file mode 100644 index 0000000..1feb3f6 --- /dev/null +++ b/docusign_admin/models/individual_user_data_redaction_response.py @@ -0,0 +1,179 @@ +# 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 +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_admin.client.configuration import Configuration + + +class IndividualUserDataRedactionResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user_id': 'str', + 'status': 'str', + 'membership_results': 'list[MembershipDataRedactionResponse]' + } + + attribute_map = { + 'user_id': 'user_id', + 'status': 'status', + 'membership_results': 'membership_results' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """IndividualUserDataRedactionResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._user_id = None + self._status = None + self._membership_results = None + self.discriminator = None + + setattr(self, "_{}".format('user_id'), kwargs.get('user_id', None)) + setattr(self, "_{}".format('status'), kwargs.get('status', None)) + setattr(self, "_{}".format('membership_results'), kwargs.get('membership_results', None)) + + @property + def user_id(self): + """Gets the user_id of this IndividualUserDataRedactionResponse. # noqa: E501 + + + :return: The user_id of this IndividualUserDataRedactionResponse. # noqa: E501 + :rtype: str + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this IndividualUserDataRedactionResponse. + + + :param user_id: The user_id of this IndividualUserDataRedactionResponse. # noqa: E501 + :type: str + """ + + self._user_id = user_id + + @property + def status(self): + """Gets the status of this IndividualUserDataRedactionResponse. # noqa: E501 + + + :return: The status of this IndividualUserDataRedactionResponse. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this IndividualUserDataRedactionResponse. + + + :param status: The status of this IndividualUserDataRedactionResponse. # noqa: E501 + :type: str + """ + allowed_values = ["unknown", "pending", "failure", "success", "already_redacted"] # noqa: E501 + if (self._configuration.client_side_validation and + status not in allowed_values): + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + @property + def membership_results(self): + """Gets the membership_results of this IndividualUserDataRedactionResponse. # noqa: E501 + + + :return: The membership_results of this IndividualUserDataRedactionResponse. # noqa: E501 + :rtype: list[MembershipDataRedactionResponse] + """ + return self._membership_results + + @membership_results.setter + def membership_results(self, membership_results): + """Sets the membership_results of this IndividualUserDataRedactionResponse. + + + :param membership_results: The membership_results of this IndividualUserDataRedactionResponse. # noqa: E501 + :type: list[MembershipDataRedactionResponse] + """ + + self._membership_results = membership_results + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(IndividualUserDataRedactionResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, IndividualUserDataRedactionResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, IndividualUserDataRedactionResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_admin/models/membership_data_redaction_request.py b/docusign_admin/models/membership_data_redaction_request.py new file mode 100644 index 0000000..d819942 --- /dev/null +++ b/docusign_admin/models/membership_data_redaction_request.py @@ -0,0 +1,122 @@ +# 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 +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_admin.client.configuration import Configuration + + +class MembershipDataRedactionRequest(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'account_id': 'str' + } + + attribute_map = { + 'account_id': 'account_id' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """MembershipDataRedactionRequest - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._account_id = None + self.discriminator = None + + setattr(self, "_{}".format('account_id'), kwargs.get('account_id', None)) + + @property + def account_id(self): + """Gets the account_id of this MembershipDataRedactionRequest. # noqa: E501 + + + :return: The account_id of this MembershipDataRedactionRequest. # noqa: E501 + :rtype: str + """ + return self._account_id + + @account_id.setter + def account_id(self, account_id): + """Sets the account_id of this MembershipDataRedactionRequest. + + + :param account_id: The account_id of this MembershipDataRedactionRequest. # noqa: E501 + :type: str + """ + + self._account_id = account_id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(MembershipDataRedactionRequest, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MembershipDataRedactionRequest): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MembershipDataRedactionRequest): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_admin/models/membership_data_redaction_response.py b/docusign_admin/models/membership_data_redaction_response.py new file mode 100644 index 0000000..335e7b1 --- /dev/null +++ b/docusign_admin/models/membership_data_redaction_response.py @@ -0,0 +1,154 @@ +# 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 +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_admin.client.configuration import Configuration + + +class MembershipDataRedactionResponse(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'account_id': 'str', + 'status': 'str' + } + + attribute_map = { + 'account_id': 'account_id', + 'status': 'status' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """MembershipDataRedactionResponse - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._account_id = None + self._status = None + self.discriminator = None + + setattr(self, "_{}".format('account_id'), kwargs.get('account_id', None)) + setattr(self, "_{}".format('status'), kwargs.get('status', None)) + + @property + def account_id(self): + """Gets the account_id of this MembershipDataRedactionResponse. # noqa: E501 + + + :return: The account_id of this MembershipDataRedactionResponse. # noqa: E501 + :rtype: str + """ + return self._account_id + + @account_id.setter + def account_id(self, account_id): + """Sets the account_id of this MembershipDataRedactionResponse. + + + :param account_id: The account_id of this MembershipDataRedactionResponse. # noqa: E501 + :type: str + """ + + self._account_id = account_id + + @property + def status(self): + """Gets the status of this MembershipDataRedactionResponse. # noqa: E501 + + + :return: The status of this MembershipDataRedactionResponse. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this MembershipDataRedactionResponse. + + + :param status: The status of this MembershipDataRedactionResponse. # noqa: E501 + :type: str + """ + allowed_values = ["unknown", "pending", "failure", "success", "already_redacted"] # noqa: E501 + if (self._configuration.client_side_validation and + status not in allowed_values): + raise ValueError( + "Invalid value for `status` ({0}), must be one of {1}" # noqa: E501 + .format(status, allowed_values) + ) + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(MembershipDataRedactionResponse, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, MembershipDataRedactionResponse): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, MembershipDataRedactionResponse): + return True + + return self.to_dict() != other.to_dict() diff --git a/setup.py b/setup.py index 8d469c5..4a5ebab 100755 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages, Command, os # noqa: H301 NAME = "docusign-admin" -VERSION = "1.2.0" +VERSION = "1.3.0" # To install the library, run the following # # python setup.py install