Skip to content

Commit

Permalink
Version 3.25.1 release (#180)
Browse files Browse the repository at this point in the history
* Version 3.25.1-v2.1-23.3.01.02 release

* Update CHANGELOG.md

Signed-off-by: Mudit Garg <[email protected]>

---------

Signed-off-by: Mudit Garg <[email protected]>
Co-authored-by: root <[email protected]>
  • Loading branch information
garg-mudit and root authored Dec 15, 2023
1 parent 27741d3 commit 573d489
Show file tree
Hide file tree
Showing 8 changed files with 1,628 additions and 1,206 deletions.
2 changes: 1 addition & 1 deletion .swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.21-SNAPSHOT
2.4.21
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ 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.

## [v3.25.1] - eSignature API v2.1-23.3.01.02 - 2023-12-14
### Changed
- Added support for version v2.1-23.3.01.02 of the DocuSign ESignature API.
- Updated the SDK release version.
- Updated Date model.
- Updated response.py to fix issue with Envelopes::listStatus endpoint requiring a body.

## [v3.25.0] - eSignature API v2.1-23.3.01.02 - 2023-10-25
### Changed
- Added support for version v2.1-23.3.01.02 of the DocuSign ESignature API.
Expand Down
6 changes: 3 additions & 3 deletions docusign_esign/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@
from docusign_esign.models.custom_fields import CustomFields
from docusign_esign.models.custom_fields_envelope import CustomFieldsEnvelope
from docusign_esign.models.custom_settings_information import CustomSettingsInformation
from docusign_esign.models.date import Date
from docusign_esign.models.date_signed import DateSigned
from docusign_esign.models.date_stamp_properties import DateStampProperties
from docusign_esign.models.decline import Decline
Expand Down Expand Up @@ -344,7 +345,6 @@
from docusign_esign.models.merge_field import MergeField
from docusign_esign.models.mobile_notifier_configuration import MobileNotifierConfiguration
from docusign_esign.models.mobile_notifier_configuration_information import MobileNotifierConfigurationInformation
from docusign_esign.models.model_date import ModelDate
from docusign_esign.models.money import Money
from docusign_esign.models.name_value import NameValue
from docusign_esign.models.new_account_definition import NewAccountDefinition
Expand Down Expand Up @@ -540,6 +540,6 @@
from docusign_esign.models.workspace_user import WorkspaceUser
from docusign_esign.models.workspace_user_authorization import WorkspaceUserAuthorization
from docusign_esign.models.zip import Zip
from docusign_esign.models.date import Date

configuration = Configuration()

configuration = Configuration()
4 changes: 2 additions & 2 deletions docusign_esign/client/api_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def request(self, method, url, query_params=None, headers=None,
if query_params:
url += '?' + urlencode(query_params)
if re.search('json', headers['Content-Type'], re.IGNORECASE):
request_body = None
if body:
request_body = '{}'
if body is not None:
request_body = json.dumps(body)
r = self.pool_manager.request(method, url,
body=request_body,
Expand Down
3 changes: 1 addition & 2 deletions docusign_esign/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
from docusign_esign.models.custom_fields import CustomFields
from docusign_esign.models.custom_fields_envelope import CustomFieldsEnvelope
from docusign_esign.models.custom_settings_information import CustomSettingsInformation
from docusign_esign.models.date import Date
from docusign_esign.models.date_signed import DateSigned
from docusign_esign.models.date_stamp_properties import DateStampProperties
from docusign_esign.models.decline import Decline
Expand Down Expand Up @@ -308,7 +309,6 @@
from docusign_esign.models.merge_field import MergeField
from docusign_esign.models.mobile_notifier_configuration import MobileNotifierConfiguration
from docusign_esign.models.mobile_notifier_configuration_information import MobileNotifierConfigurationInformation
from docusign_esign.models.model_date import ModelDate
from docusign_esign.models.money import Money
from docusign_esign.models.name_value import NameValue
from docusign_esign.models.new_account_definition import NewAccountDefinition
Expand Down Expand Up @@ -504,4 +504,3 @@
from docusign_esign.models.workspace_user import WorkspaceUser
from docusign_esign.models.workspace_user_authorization import WorkspaceUserAuthorization
from docusign_esign.models.zip import Zip
from docusign_esign.models.date import Date
2,661 changes: 1,515 additions & 1,146 deletions docusign_esign/models/date.py

Large diffs are not rendered by default.

96 changes: 48 additions & 48 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# coding: utf-8

# coding: utf-8

"""
DocuSign REST API
Expand All @@ -9,49 +9,49 @@
Contact: [email protected]
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from setuptools import setup, find_packages, Command, os # noqa: H301

NAME = "docusign-esign"
VERSION = "3.25.0"
# To install the library, run the following
#
# python setup.py install
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["urllib3 >= 1.15", "six >= 1.8.0", "certifi >= 14.05.14", "python-dateutil >= 2.5.3", "setuptools >= 21.0.0", "PyJWT>=1.7.1", "cryptography>=2.5", "nose>=1.3.7"]

class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')

this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()


setup(
name=NAME,
version=VERSION,
description="DocuSign REST API",
author_email="[email protected]",
url="",
keywords=["Swagger", "DocuSign REST API"],
install_requires=REQUIRES,
packages=find_packages(),
include_package_data=True,
cmdclass={
'clean': CleanCommand,
},
long_description=long_description,
long_description_content_type='text/markdown'
)


from setuptools import setup, find_packages, Command, os # noqa: H301

NAME = "docusign-esign"
VERSION = "3.25.1"
# To install the library, run the following
#
# python setup.py install
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["urllib3 >= 1.15", "six >= 1.8.0", "certifi >= 14.05.14", "python-dateutil >= 2.5.3", "setuptools >= 21.0.0", "PyJWT>=1.7.1", "cryptography>=2.5", "nose>=1.3.7"]

class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')

this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()


setup(
name=NAME,
version=VERSION,
description="DocuSign REST API",
author_email="[email protected]",
url="",
keywords=["Swagger", "DocuSign REST API"],
install_requires=REQUIRES,
packages=find_packages(),
include_package_data=True,
cmdclass={
'clean': CleanCommand,
},
long_description=long_description,
long_description_content_type='text/markdown'
)
55 changes: 51 additions & 4 deletions test/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
import os
import subprocess
import unittest
from pprint import pprint

from time import sleep
from datetime import datetime

import docusign_esign as docusign
from docusign_esign import AuthenticationApi, EnvelopesApi, TemplatesApi, DiagnosticsApi, FoldersApi, ApiException
from docusign_esign import AuthenticationApi, EnvelopesApi, TemplatesApi, DiagnosticsApi, FoldersApi, ApiException, TemplateSummary

Username = os.environ.get("USER_NAME")
IntegratorKey = os.environ.get("INTEGRATOR_KEY_JWT")
Expand Down Expand Up @@ -340,7 +341,7 @@ def testEmbeddedSigning(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 testCreateTemplate(self):
def testCreateTemplate(self) -> TemplateSummary:
with open(SignTest1File, 'rb') as sign_file:
file_contents = sign_file.read()

Expand Down Expand Up @@ -377,7 +378,23 @@ def testCreateTemplate(self):
scale_value=sign_scale_value)

sign_here_tabs = [sign_here]
tabs = docusign.Tabs(sign_here_tabs=sign_here_tabs)

# Create a date tab somewhere on the document for the signer to know about current date
date_document_id = '1'
date_page_number = '1'
date_x_position = '50'
date_y_position = '50'

current_date_tab = docusign.Date(document_id=date_document_id,
page_number=date_page_number,
recipient_id=recipient_id,
x_position=date_x_position,
y_position=date_y_position,
value=datetime.utcnow().date())
date_tabs = [current_date_tab]

tabs = docusign.Tabs(sign_here_tabs=sign_here_tabs, date_tabs=date_tabs)

signer = docusign.Signer(email=email,
name=name,
recipient_id=recipient_id,
Expand All @@ -403,6 +420,7 @@ def testCreateTemplate(self):
assert template_summary is not None
assert template_summary.template_id is not None

return template_summary
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
Expand Down Expand Up @@ -853,6 +871,35 @@ def testMoveEnvelopes(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 testTemplateDocumentTabsRetrieval(self):

# Create Envelope template
template_summary = self.testCreateTemplate()
template_id = template_summary.template_id

templates_api = TemplatesApi()

# List all documents from the created template to find the documentId
template_documents_list_result = templates_api.list_documents(self.user_info.accounts[0].account_id, template_id)

# Check if there are no documents within the template
has_template_documents = template_documents_list_result is None or template_documents_list_result.template_documents is None or len(template_documents_list_result.template_documents) == 0
assert has_template_documents, 'No document found within created template'

document_id = template_documents_list_result.template_documents[0].document_id

try:
# Get list of various document tabs
document_tabs = templates_api.get_document_tabs(self.user_info.accounts[0].account_id, document_id, template_id)

assert document_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
except Exception 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

if __name__ == '__main__':
unittest.main()

0 comments on commit 573d489

Please sign in to comment.