Skip to content

Commit 7fca138

Browse files
Version 2.10.0-v2-21.1.02.00 release (#115)
Co-authored-by: DevCenter-DocuSign <dcdev@docusign.com>
1 parent 89499b3 commit 7fca138

File tree

8 files changed

+209
-8
lines changed

8 files changed

+209
-8
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@ 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+
## [2.10.0] - eSignature API v2-21.1.02.00 - 2021-06-08
7+
### Breaking
8+
- Removed methods `get_account_settings_export`,`get_seal_providers` from Accounts.
9+
- Removed methods `create_connect_secret`,`delete_connect_secret`,`generate_connect_secret`,`get_connect_secrets` from Connect.
10+
- Removed methods `complete_sign_hash`,`get_user_info`,`health_check`,`sign_hash_session_info`,`update_transaction` from TrustServiceProviders.
11+
- Removed method `get_user_list_export` from Users.
12+
### Changed
13+
- Added support for version v2-21.1.02.00 of the DocuSign eSignature API.
14+
- Updated the SDK release version.
15+
### Added
16+
- PyPi description is being shown from Readme file.
17+
- Added additional test cases.
18+
619
## [2.10.0rc1] - eSignature API v2-21.1.02.00 - 2021-05-20
720
### Breaking
821
- Removed methods `get_account_settings_export`,`get_seal_providers` from Accounts.

docusign_esign/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@
183183
from docusign_esign.models.envelope_documents_result import EnvelopeDocumentsResult
184184
from docusign_esign.models.envelope_event import EnvelopeEvent
185185
from docusign_esign.models.envelope_form_data import EnvelopeFormData
186+
from docusign_esign.models.envelope_form_data_prefill_form_data import EnvelopeFormDataPrefillFormData
186187
from docusign_esign.models.envelope_id import EnvelopeId
187188
from docusign_esign.models.envelope_ids_request import EnvelopeIdsRequest
188189
from docusign_esign.models.envelope_notification_request import EnvelopeNotificationRequest

docusign_esign/client/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ def __init__(self):
9090
self.key_file = None
9191

9292
if PY3:
93-
self.user_agent = 'Swagger-Codegen/v2/2.10.0rc1/python3'
93+
self.user_agent = 'Swagger-Codegen/v2/2.10.0/python3'
9494
else:
95-
self.user_agent = 'Swagger-Codegen/v2/2.10.0rc1/python2'
95+
self.user_agent = 'Swagger-Codegen/v2/2.10.0/python2'
9696

9797
@property
9898
def logger_file(self):

docusign_esign/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162
from docusign_esign.models.envelope_documents_result import EnvelopeDocumentsResult
163163
from docusign_esign.models.envelope_event import EnvelopeEvent
164164
from docusign_esign.models.envelope_form_data import EnvelopeFormData
165+
from docusign_esign.models.envelope_form_data_prefill_form_data import EnvelopeFormDataPrefillFormData
165166
from docusign_esign.models.envelope_id import EnvelopeId
166167
from docusign_esign.models.envelope_ids_request import EnvelopeIdsRequest
167168
from docusign_esign.models.envelope_notification_request import EnvelopeNotificationRequest

docusign_esign/models/envelope_form_data.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class EnvelopeFormData(object):
3434
'email_subject': 'str',
3535
'envelope_id': 'str',
3636
'form_data': 'list[NameValue]',
37-
'prefill_form_data': 'list[NameValue]',
37+
'prefill_form_data': 'EnvelopeFormDataPrefillFormData',
3838
'recipient_form_data': 'list[RecipientFormData]',
3939
'sent_date_time': 'str',
4040
'status': 'str'
@@ -150,21 +150,19 @@ def form_data(self, form_data):
150150
def prefill_form_data(self):
151151
"""Gets the prefill_form_data of this EnvelopeFormData. # noqa: E501
152152
153-
# noqa: E501
154153
155154
:return: The prefill_form_data of this EnvelopeFormData. # noqa: E501
156-
:rtype: list[NameValue]
155+
:rtype: EnvelopeFormDataPrefillFormData
157156
"""
158157
return self._prefill_form_data
159158

160159
@prefill_form_data.setter
161160
def prefill_form_data(self, prefill_form_data):
162161
"""Sets the prefill_form_data of this EnvelopeFormData.
163162
164-
# noqa: E501
165163
166164
:param prefill_form_data: The prefill_form_data of this EnvelopeFormData. # noqa: E501
167-
:type: list[NameValue]
165+
:type: EnvelopeFormDataPrefillFormData
168166
"""
169167

170168
self._prefill_form_data = prefill_form_data
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# coding: utf-8
2+
3+
"""
4+
DocuSign REST API
5+
6+
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
7+
8+
OpenAPI spec version: v2
9+
Contact: devcenter@docusign.com
10+
Generated by: https://github.com/swagger-api/swagger-codegen.git
11+
"""
12+
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
20+
class EnvelopeFormDataPrefillFormData(object):
21+
"""NOTE: This class is auto generated by the swagger code generator program.
22+
23+
Do not edit the class manually.
24+
"""
25+
26+
"""
27+
Attributes:
28+
swagger_types (dict): The key is attribute name
29+
and the value is attribute type.
30+
attribute_map (dict): The key is attribute name
31+
and the value is json key in definition.
32+
"""
33+
swagger_types = {
34+
'form_data': 'list[NameValue]'
35+
}
36+
37+
attribute_map = {
38+
'form_data': 'formData'
39+
}
40+
41+
def __init__(self, form_data=None): # noqa: E501
42+
"""EnvelopeFormDataPrefillFormData - a model defined in Swagger""" # noqa: E501
43+
44+
self._form_data = None
45+
self.discriminator = None
46+
47+
if form_data is not None:
48+
self.form_data = form_data
49+
50+
@property
51+
def form_data(self):
52+
"""Gets the form_data of this EnvelopeFormDataPrefillFormData. # noqa: E501
53+
54+
# noqa: E501
55+
56+
:return: The form_data of this EnvelopeFormDataPrefillFormData. # noqa: E501
57+
:rtype: list[NameValue]
58+
"""
59+
return self._form_data
60+
61+
@form_data.setter
62+
def form_data(self, form_data):
63+
"""Sets the form_data of this EnvelopeFormDataPrefillFormData.
64+
65+
# noqa: E501
66+
67+
:param form_data: The form_data of this EnvelopeFormDataPrefillFormData. # noqa: E501
68+
:type: list[NameValue]
69+
"""
70+
71+
self._form_data = form_data
72+
73+
def to_dict(self):
74+
"""Returns the model properties as a dict"""
75+
result = {}
76+
77+
for attr, _ in six.iteritems(self.swagger_types):
78+
value = getattr(self, attr)
79+
if isinstance(value, list):
80+
result[attr] = list(map(
81+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
82+
value
83+
))
84+
elif hasattr(value, "to_dict"):
85+
result[attr] = value.to_dict()
86+
elif isinstance(value, dict):
87+
result[attr] = dict(map(
88+
lambda item: (item[0], item[1].to_dict())
89+
if hasattr(item[1], "to_dict") else item,
90+
value.items()
91+
))
92+
else:
93+
result[attr] = value
94+
if issubclass(EnvelopeFormDataPrefillFormData, dict):
95+
for key, value in self.items():
96+
result[key] = value
97+
98+
return result
99+
100+
def to_str(self):
101+
"""Returns the string representation of the model"""
102+
return pprint.pformat(self.to_dict())
103+
104+
def __repr__(self):
105+
"""For `print` and `pprint`"""
106+
return self.to_str()
107+
108+
def __eq__(self, other):
109+
"""Returns true if both objects are equal"""
110+
if not isinstance(other, EnvelopeFormDataPrefillFormData):
111+
return False
112+
113+
return self.__dict__ == other.__dict__
114+
115+
def __ne__(self, other):
116+
"""Returns true if both objects are not equal"""
117+
return not self == other

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from setuptools import setup, find_packages, Command, os # noqa: H301
1515

1616
NAME = "docusign-esign"
17-
VERSION = "2.10.0rc1"
17+
VERSION = "2.10.0"
1818
# To install the library, run the following
1919
#
2020
# python setup.py install

test/unit_tests.py

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,77 @@ def testGetDiagnosticLogs(self):
617617
print("\nException when calling DocuSign API: %s" % e)
618618
assert e is None # make the test case fail in case of an API exception
619619

620+
def testGetFormData(self):
621+
try:
622+
envelopes_api = EnvelopesApi()
623+
624+
form_data = envelopes_api.get_form_data(account_id=self.user_info.accounts[0].account_id,
625+
envelope_id=self.envelope_id)
626+
assert form_data is not None
627+
assert form_data.prefill_form_data is not None
628+
assert form_data.prefill_form_data.form_data[0] is not None
629+
assert form_data.prefill_form_data.form_data[0].name is not None
630+
631+
except ApiException as e:
632+
print("\nException when calling DocuSign API: %s" % e)
633+
assert e is None # make the test case fail in case of an API exception
634+
635+
def testListTabs(self):
636+
# For this the template Role should be manager
637+
template_role_name = 'Manager'
638+
639+
# Set properties and create an envelope later on
640+
email_subject = 'Please Sign my Python SDK Envelope'
641+
email_blurb = 'Hello, Please sign my Python SDK Envelope.'
642+
643+
# assign template information including ID and role(s)
644+
template_id = TemplateId
645+
646+
# create a template role with a valid templateId and roleName and assign signer info
647+
role_name = template_role_name
648+
name = 'Pat Developer'
649+
email = Username
650+
t_role = docusign.TemplateRole(role_name=role_name,
651+
name=name,
652+
email=email)
653+
654+
# create a list of template roles and add our newly created role
655+
# assign template role(s) to the envelope
656+
template_roles = [t_role]
657+
658+
# send the envelope by setting |status| to "sent". To save as a draft set to "created"
659+
status = 'sent'
660+
661+
# create the envelope definition with the properties set
662+
envelope_definition = docusign.EnvelopeDefinition(email_subject=email_subject,
663+
email_blurb=email_blurb,
664+
template_id=template_id,
665+
template_roles=template_roles,
666+
status=status)
667+
try:
668+
envelopes_api = EnvelopesApi()
669+
670+
# Create Envelope with the new role
671+
envelope_summary = envelopes_api.create_envelope(self.user_info.accounts[0].account_id,
672+
envelope_definition=envelope_definition)
673+
# Read the new Envelope
674+
created_envelope = envelopes_api.get_envelope(account_id=self.user_info.accounts[0].account_id,
675+
envelope_id=envelope_summary.envelope_id)
676+
677+
recipients = envelopes_api.list_recipients(account_id=self.user_info.accounts[0].account_id,
678+
envelope_id=created_envelope.envelope_id)
679+
680+
tabs = envelopes_api.list_tabs(account_id=self.user_info.accounts[0].account_id,
681+
envelope_id=created_envelope.envelope_id,
682+
recipient_id=recipients.signers[0].recipient_id)
683+
list_tabs = tabs.list_tabs
684+
685+
assert list_tabs is not None
686+
687+
except ApiException as e:
688+
print("\nException when calling DocuSign API: %s" % e)
689+
assert e is None # make the test case fail in case of an API exception
690+
620691
def testMoveEnvelopes(self):
621692
with open(SignTest1File, 'rb') as sign_file:
622693
file_contents = sign_file.read()

0 commit comments

Comments
 (0)