Skip to content

Commit

Permalink
Version 2.10.0-v2-21.1.02.00 release (#115)
Browse files Browse the repository at this point in the history
Co-authored-by: DevCenter-DocuSign <[email protected]>
  • Loading branch information
harsharahul and DevCenter-DocuSign authored Jun 8, 2021
1 parent 89499b3 commit 7fca138
Show file tree
Hide file tree
Showing 8 changed files with 209 additions and 8 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions docusign_esign/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docusign_esign/client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 1 addition & 0 deletions docusign_esign/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions docusign_esign/models/envelope_form_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -150,21 +150,19 @@ 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

@prefill_form_data.setter
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
Expand Down
117 changes: 117 additions & 0 deletions docusign_esign/models/envelope_form_data_prefill_form_data.py
Original file line number Diff line number Diff line change
@@ -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: [email protected]
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
71 changes: 71 additions & 0 deletions test/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 7fca138

Please sign in to comment.