Skip to content

Commit 98d99b5

Browse files
Version 3.10.0-v2.1-21.1.02.00 release (#114)
Co-authored-by: DevCenter-DocuSign <dcdev@docusign.com>
1 parent c2d8004 commit 98d99b5

File tree

8 files changed

+212
-8
lines changed

8 files changed

+212
-8
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ 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+
## [3.10.0] - eSignature API v2.1-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 `get_dynamic_system_settings`,`get_template_info`,`get_appliance_info`,`get_account`,`get_custom_fields`,`delete_custom_fields_v2`,`get_document_pages`,`get_image`,`get_locale_policy`,`update_page_info`,`create_page_info`,`delete_page_info`,
11+
`update_pdf`,`get_pdf`,`get_pdf_blob`,`update_pdf_blob`,`create_pdf_blob`,`update_recipient_denied_document_copy`,`delete_recipient_denied_document_copy`,`get_signer_attachment`,`delete_signer_attachment`, from Envelopes.
12+
- Removed methods `complete_sign_hash`,`get_user_info`,`health_check`,`sign_hash_session_info`,`update_transaction` from Trust_Service_Providers.
13+
- Removed methods `get_user_list_export` from Users.
14+
### Added
15+
- Added new methods `get_bulk_send_batch_envelopes` to BulkEnvelopes.
16+
- Description in PyPi taken from Readme file.
17+
- Test cases for tab_lists and Form pre-fill data.
18+
### Changed
19+
- Added support for version v2.1-21.1.02.00 of the DocuSign eSignature API.
20+
- Updated the SDK release version.
21+
622
## [3.10.0rc1] - eSignature API v2.1-21.1.02.00 - 2021-05-20
723
### Breaking
824
- 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
@@ -235,6 +235,7 @@
235235
from docusign_esign.models.envelope_documents_result import EnvelopeDocumentsResult
236236
from docusign_esign.models.envelope_event import EnvelopeEvent
237237
from docusign_esign.models.envelope_form_data import EnvelopeFormData
238+
from docusign_esign.models.envelope_form_data_prefill_form_data import EnvelopeFormDataPrefillFormData
238239
from docusign_esign.models.envelope_id import EnvelopeId
239240
from docusign_esign.models.envelope_ids_request import EnvelopeIdsRequest
240241
from docusign_esign.models.envelope_metadata import EnvelopeMetadata

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.1/3.10.0rc1/python3'
93+
self.user_agent = 'Swagger-Codegen/v2.1/3.10.0/python3'
9494
else:
95-
self.user_agent = 'Swagger-Codegen/v2.1/3.10.0rc1/python2'
95+
self.user_agent = 'Swagger-Codegen/v2.1/3.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
@@ -211,6 +211,7 @@
211211
from docusign_esign.models.envelope_documents_result import EnvelopeDocumentsResult
212212
from docusign_esign.models.envelope_event import EnvelopeEvent
213213
from docusign_esign.models.envelope_form_data import EnvelopeFormData
214+
from docusign_esign.models.envelope_form_data_prefill_form_data import EnvelopeFormDataPrefillFormData
214215
from docusign_esign.models.envelope_id import EnvelopeId
215216
from docusign_esign.models.envelope_ids_request import EnvelopeIdsRequest
216217
from docusign_esign.models.envelope_metadata import EnvelopeMetadata

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[FormDataItem]',
37-
'prefill_form_data': 'list[FormDataItem]',
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[FormDataItem]
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[FormDataItem]
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.1
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[FormDataItem]'
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[FormDataItem]
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[FormDataItem]
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 = "3.10.0rc1"
17+
VERSION = "3.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
@@ -645,6 +645,77 @@ def testGetDiagnosticLogs(self):
645645
print("\nException when calling DocuSign API: %s" % e)
646646
assert e is None # make the test case fail in case of an API exception
647647

648+
def testGetFormData(self):
649+
try:
650+
envelopes_api = EnvelopesApi()
651+
652+
form_data = envelopes_api.get_form_data(account_id=self.user_info.accounts[0].account_id,
653+
envelope_id=self.envelope_id)
654+
assert form_data is not None
655+
assert form_data.prefill_form_data is not None
656+
assert form_data.prefill_form_data.form_data[0] is not None
657+
assert form_data.prefill_form_data.form_data[0].name is not None
658+
659+
except ApiException as e:
660+
print("\nException when calling DocuSign API: %s" % e)
661+
assert e is None # make the test case fail in case of an API exception
662+
663+
def testListTabs(self):
664+
# For this the template Role should be manager
665+
template_role_name = 'Manager'
666+
667+
# Set properties and create an envelope later on
668+
email_subject = 'Please Sign my Python SDK Envelope'
669+
email_blurb = 'Hello, Please sign my Python SDK Envelope.'
670+
671+
# assign template information including ID and role(s)
672+
template_id = TemplateId
673+
674+
# create a template role with a valid templateId and roleName and assign signer info
675+
role_name = template_role_name
676+
name = 'Pat Developer'
677+
email = Username
678+
t_role = docusign.TemplateRole(role_name=role_name,
679+
name=name,
680+
email=email)
681+
682+
# create a list of template roles and add our newly created role
683+
# assign template role(s) to the envelope
684+
template_roles = [t_role]
685+
686+
# send the envelope by setting |status| to "sent". To save as a draft set to "created"
687+
status = 'sent'
688+
689+
# create the envelope definition with the properties set
690+
envelope_definition = docusign.EnvelopeDefinition(email_subject=email_subject,
691+
email_blurb=email_blurb,
692+
template_id=template_id,
693+
template_roles=template_roles,
694+
status=status)
695+
try:
696+
envelopes_api = EnvelopesApi()
697+
698+
# Create Envelope with the new role
699+
envelope_summary = envelopes_api.create_envelope(self.user_info.accounts[0].account_id,
700+
envelope_definition=envelope_definition)
701+
# Read the new Envelope
702+
created_envelope = envelopes_api.get_envelope(account_id=self.user_info.accounts[0].account_id,
703+
envelope_id=envelope_summary.envelope_id)
704+
705+
recipients = envelopes_api.list_recipients(account_id=self.user_info.accounts[0].account_id,
706+
envelope_id=created_envelope.envelope_id)
707+
708+
tabs = envelopes_api.list_tabs(account_id=self.user_info.accounts[0].account_id,
709+
envelope_id=created_envelope.envelope_id,
710+
recipient_id=recipients.signers[0].recipient_id)
711+
list_tabs = tabs.list_tabs
712+
713+
assert list_tabs is not None
714+
715+
except ApiException as e:
716+
print("\nException when calling DocuSign API: %s" % e)
717+
assert e is None # make the test case fail in case of an API exception
718+
648719
def testMoveEnvelopes(self):
649720
with open(SignTest1File, 'rb') as sign_file:
650721
file_contents = sign_file.read()

0 commit comments

Comments
 (0)