diff --git a/CHANGELOG.md b/CHANGELOG.md index 43346660..f46a25ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,19 @@ 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. +## [2.10.0] - eSignature API v2-21.1.02.00 - 2021-06-08 +### Breaking +- Removed methods `get_account_settings_export`,`get_seal_providers` from Accounts. +- Removed methods `create_connect_secret`,`delete_connect_secret`,`generate_connect_secret`,`get_connect_secrets` from Connect. +- Removed methods `complete_sign_hash`,`get_user_info`,`health_check`,`sign_hash_session_info`,`update_transaction` from TrustServiceProviders. +- Removed method `get_user_list_export` from Users. +### Changed +- Added support for version v2-21.1.02.00 of the DocuSign eSignature API. +- Updated the SDK release version. +### Added +- PyPi description is being shown from Readme file. +- Added additional test cases. + ## [2.10.0rc1] - eSignature API v2-21.1.02.00 - 2021-05-20 ### Breaking - Removed methods `get_account_settings_export`,`get_seal_providers` from Accounts. diff --git a/docusign_esign/__init__.py b/docusign_esign/__init__.py index 24724f98..cce54077 100644 --- a/docusign_esign/__init__.py +++ b/docusign_esign/__init__.py @@ -183,6 +183,7 @@ from docusign_esign.models.envelope_documents_result import EnvelopeDocumentsResult from docusign_esign.models.envelope_event import EnvelopeEvent from docusign_esign.models.envelope_form_data import EnvelopeFormData +from docusign_esign.models.envelope_form_data_prefill_form_data import EnvelopeFormDataPrefillFormData from docusign_esign.models.envelope_id import EnvelopeId from docusign_esign.models.envelope_ids_request import EnvelopeIdsRequest from docusign_esign.models.envelope_notification_request import EnvelopeNotificationRequest diff --git a/docusign_esign/client/configuration.py b/docusign_esign/client/configuration.py index 91237dd8..c40c81a0 100644 --- a/docusign_esign/client/configuration.py +++ b/docusign_esign/client/configuration.py @@ -90,9 +90,9 @@ def __init__(self): self.key_file = None if PY3: - self.user_agent = 'Swagger-Codegen/v2/2.10.0rc1/python3' + self.user_agent = 'Swagger-Codegen/v2/2.10.0/python3' else: - self.user_agent = 'Swagger-Codegen/v2/2.10.0rc1/python2' + self.user_agent = 'Swagger-Codegen/v2/2.10.0/python2' @property def logger_file(self): diff --git a/docusign_esign/models/__init__.py b/docusign_esign/models/__init__.py index 04224508..092202ca 100644 --- a/docusign_esign/models/__init__.py +++ b/docusign_esign/models/__init__.py @@ -162,6 +162,7 @@ from docusign_esign.models.envelope_documents_result import EnvelopeDocumentsResult from docusign_esign.models.envelope_event import EnvelopeEvent from docusign_esign.models.envelope_form_data import EnvelopeFormData +from docusign_esign.models.envelope_form_data_prefill_form_data import EnvelopeFormDataPrefillFormData from docusign_esign.models.envelope_id import EnvelopeId from docusign_esign.models.envelope_ids_request import EnvelopeIdsRequest from docusign_esign.models.envelope_notification_request import EnvelopeNotificationRequest diff --git a/docusign_esign/models/envelope_form_data.py b/docusign_esign/models/envelope_form_data.py index a84ef34a..88d16aa9 100644 --- a/docusign_esign/models/envelope_form_data.py +++ b/docusign_esign/models/envelope_form_data.py @@ -34,7 +34,7 @@ class EnvelopeFormData(object): 'email_subject': 'str', 'envelope_id': 'str', 'form_data': 'list[NameValue]', - 'prefill_form_data': 'list[NameValue]', + 'prefill_form_data': 'EnvelopeFormDataPrefillFormData', 'recipient_form_data': 'list[RecipientFormData]', 'sent_date_time': 'str', 'status': 'str' @@ -150,10 +150,9 @@ def form_data(self, form_data): def prefill_form_data(self): """Gets the prefill_form_data of this EnvelopeFormData. # noqa: E501 - # noqa: E501 :return: The prefill_form_data of this EnvelopeFormData. # noqa: E501 - :rtype: list[NameValue] + :rtype: EnvelopeFormDataPrefillFormData """ return self._prefill_form_data @@ -161,10 +160,9 @@ def prefill_form_data(self): def prefill_form_data(self, prefill_form_data): """Sets the prefill_form_data of this EnvelopeFormData. - # noqa: E501 :param prefill_form_data: The prefill_form_data of this EnvelopeFormData. # noqa: E501 - :type: list[NameValue] + :type: EnvelopeFormDataPrefillFormData """ self._prefill_form_data = prefill_form_data diff --git a/docusign_esign/models/envelope_form_data_prefill_form_data.py b/docusign_esign/models/envelope_form_data_prefill_form_data.py new file mode 100644 index 00000000..1688303c --- /dev/null +++ b/docusign_esign/models/envelope_form_data_prefill_form_data.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + DocuSign REST API + + The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 + + OpenAPI spec version: v2 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EnvelopeFormDataPrefillFormData(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 = { + 'form_data': 'list[NameValue]' + } + + attribute_map = { + 'form_data': 'formData' + } + + def __init__(self, form_data=None): # noqa: E501 + """EnvelopeFormDataPrefillFormData - a model defined in Swagger""" # noqa: E501 + + self._form_data = None + self.discriminator = None + + if form_data is not None: + self.form_data = form_data + + @property + def form_data(self): + """Gets the form_data of this EnvelopeFormDataPrefillFormData. # noqa: E501 + + # noqa: E501 + + :return: The form_data of this EnvelopeFormDataPrefillFormData. # noqa: E501 + :rtype: list[NameValue] + """ + return self._form_data + + @form_data.setter + def form_data(self, form_data): + """Sets the form_data of this EnvelopeFormDataPrefillFormData. + + # noqa: E501 + + :param form_data: The form_data of this EnvelopeFormDataPrefillFormData. # noqa: E501 + :type: list[NameValue] + """ + + self._form_data = form_data + + 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(EnvelopeFormDataPrefillFormData, 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, EnvelopeFormDataPrefillFormData): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/setup.py b/setup.py index 84e69764..d4858331 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages, Command, os # noqa: H301 NAME = "docusign-esign" -VERSION = "2.10.0rc1" +VERSION = "2.10.0" # To install the library, run the following # # python setup.py install diff --git a/test/unit_tests.py b/test/unit_tests.py index b77788a3..54ead8b1 100644 --- a/test/unit_tests.py +++ b/test/unit_tests.py @@ -617,6 +617,77 @@ def testGetDiagnosticLogs(self): print("\nException when calling DocuSign API: %s" % e) assert e is None # make the test case fail in case of an API exception + def testGetFormData(self): + try: + envelopes_api = EnvelopesApi() + + form_data = envelopes_api.get_form_data(account_id=self.user_info.accounts[0].account_id, + envelope_id=self.envelope_id) + assert form_data is not None + assert form_data.prefill_form_data is not None + assert form_data.prefill_form_data.form_data[0] is not None + assert form_data.prefill_form_data.form_data[0].name is not None + + except ApiException as e: + print("\nException when calling DocuSign API: %s" % e) + assert e is None # make the test case fail in case of an API exception + + def testListTabs(self): + # For this the template Role should be manager + template_role_name = 'Manager' + + # Set properties and create an envelope later on + email_subject = 'Please Sign my Python SDK Envelope' + email_blurb = 'Hello, Please sign my Python SDK Envelope.' + + # assign template information including ID and role(s) + template_id = TemplateId + + # create a template role with a valid templateId and roleName and assign signer info + role_name = template_role_name + name = 'Pat Developer' + email = Username + t_role = docusign.TemplateRole(role_name=role_name, + name=name, + email=email) + + # create a list of template roles and add our newly created role + # assign template role(s) to the envelope + template_roles = [t_role] + + # send the envelope by setting |status| to "sent". To save as a draft set to "created" + status = 'sent' + + # create the envelope definition with the properties set + envelope_definition = docusign.EnvelopeDefinition(email_subject=email_subject, + email_blurb=email_blurb, + template_id=template_id, + template_roles=template_roles, + status=status) + try: + envelopes_api = EnvelopesApi() + + # Create Envelope with the new role + envelope_summary = envelopes_api.create_envelope(self.user_info.accounts[0].account_id, + envelope_definition=envelope_definition) + # Read the new Envelope + created_envelope = envelopes_api.get_envelope(account_id=self.user_info.accounts[0].account_id, + envelope_id=envelope_summary.envelope_id) + + recipients = envelopes_api.list_recipients(account_id=self.user_info.accounts[0].account_id, + envelope_id=created_envelope.envelope_id) + + tabs = envelopes_api.list_tabs(account_id=self.user_info.accounts[0].account_id, + envelope_id=created_envelope.envelope_id, + recipient_id=recipients.signers[0].recipient_id) + list_tabs = tabs.list_tabs + + assert list_tabs is not None + + except ApiException as e: + print("\nException when calling DocuSign API: %s" % e) + assert e is None # make the test case fail in case of an API exception + def testMoveEnvelopes(self): with open(SignTest1File, 'rb') as sign_file: file_contents = sign_file.read()