From 71f3ecd531281b2ee07996e7351b0744c51d622e Mon Sep 17 00:00:00 2001 From: Mudit Garg <35302867+garg-mudit@users.noreply.github.com> Date: Wed, 20 Mar 2024 00:44:03 +0530 Subject: [PATCH] Version 3.26.0rc1-v2.1-23.4.02.00 release (#184) Co-authored-by: root --- .swagger-codegen-ignore | 14 +- CHANGELOG.md | 13 +- docusign_esign/__init__.py | 1 + docusign_esign/apis/accounts_api.py | 8 +- docusign_esign/apis/envelopes_api.py | 8 +- docusign_esign/apis/users_api.py | 4 +- docusign_esign/client/__init__.py | 13 + docusign_esign/client/api_client.py | 72 +++--- docusign_esign/client/api_exception.py | 10 +- docusign_esign/client/api_response.py | 232 +++++++++++------- docusign_esign/client/auth/__init__.py | 13 + docusign_esign/client/auth/oauth.py | 6 +- docusign_esign/client/configuration.py | 148 +++++++---- docusign_esign/models/__init__.py | 1 + .../models/account_settings_information.py | 216 ++++++++++++++++ docusign_esign/models/delayed_routing.py | 4 +- docusign_esign/models/doc_gen_form_field.py | 27 ++ .../models/doc_gen_form_field_row_value.py | 124 ++++++++++ docusign_esign/models/group.py | 27 ++ docusign_esign/models/initial_here.py | 4 +- docusign_esign/models/scheduled_sending.py | 4 +- .../models/user_settings_information.py | 54 ++++ requirements.txt | 2 +- setup.py | 4 +- test-requirements.txt | 2 +- 25 files changed, 785 insertions(+), 226 deletions(-) create mode 100644 docusign_esign/models/doc_gen_form_field_row_value.py diff --git a/.swagger-codegen-ignore b/.swagger-codegen-ignore index f840180d..1b676433 100644 --- a/.swagger-codegen-ignore +++ b/.swagger-codegen-ignore @@ -24,25 +24,13 @@ # Swagger and Git files .swagger-codegen-ignore git_push.sh -.gitignore README.md CHANGELOG.md -best_practices.md - # Project files -LICENSE .travis.yml -requirements.txt -test-requirements.txt setup.cfg - # Specific src and test files -tox.ini docs/ -test/ -docusign_esign/client/ -docusign_esign/api_client.py -docusign_esign/configuration.py -docusign_esign/rest.py +test/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 965de280..54ee04ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,17 +3,22 @@ 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.2] - eSignature API v2.1-23.3.01.02 - 2023-12-15 +## [v3.26.0rc1] - eSignature API v2.1-23.4.02.00 - 2024-03-12 ### Changed -- Added support for version v2.1-23.3.01.02 of the DocuSign ESignature API. +- Added support for version v2.1-23.4.02.00 of the DocuSign ESignature API. +- Updated the SDK release version. + +## [v3.26.0a2] - eSignature API v2.1-23.4.02.00 - 2024-03-07 +### Changed +- Revised the logic to determine the `oauth_host_name` based on the `base_path`. +- Adjusted the minimum required `PyJWT` package version to `2.0.0`. +- Added support for version v2.1-23.4.02.00 of the DocuSign ESignature API. - Updated the SDK release version. ## [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 diff --git a/docusign_esign/__init__.py b/docusign_esign/__init__.py index 56946a14..a798c6b7 100644 --- a/docusign_esign/__init__.py +++ b/docusign_esign/__init__.py @@ -229,6 +229,7 @@ from docusign_esign.models.doc_gen_form_field_option import DocGenFormFieldOption from docusign_esign.models.doc_gen_form_field_request import DocGenFormFieldRequest from docusign_esign.models.doc_gen_form_field_response import DocGenFormFieldResponse +from docusign_esign.models.doc_gen_form_field_row_value import DocGenFormFieldRowValue from docusign_esign.models.doc_gen_form_field_validation import DocGenFormFieldValidation from docusign_esign.models.doc_gen_form_fields import DocGenFormFields from docusign_esign.models.doc_gen_syntax_error import DocGenSyntaxError diff --git a/docusign_esign/apis/accounts_api.py b/docusign_esign/apis/accounts_api.py index d2f8959e..b5537a5c 100644 --- a/docusign_esign/apis/accounts_api.py +++ b/docusign_esign/apis/accounts_api.py @@ -3752,7 +3752,7 @@ def get_consumer_disclosure(self, account_id, lang_code, **kwargs): :param callback function: The callback function for asynchronous request. (optional) :param str account_id: The external account number (int) or account ID Guid. (required) - :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) + :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) :return: ConsumerDisclosure If the method is called asynchronously, returns the request thread. @@ -3779,7 +3779,7 @@ def get_consumer_disclosure_with_http_info(self, account_id, lang_code, **kwargs :param callback function: The callback function for asynchronous request. (optional) :param str account_id: The external account number (int) or account ID Guid. (required) - :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) + :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) :return: ConsumerDisclosure If the method is called asynchronously, returns the request thread. @@ -7162,7 +7162,7 @@ def update_consumer_disclosure(self, account_id, lang_code, **kwargs): :param callback function: The callback function for asynchronous request. (optional) :param str account_id: The external account number (int) or account ID Guid. (required) - :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) + :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) :param str include_metadata: :param ConsumerDisclosure consumer_disclosure: :return: ConsumerDisclosure @@ -7191,7 +7191,7 @@ def update_consumer_disclosure_with_http_info(self, account_id, lang_code, **kwa :param callback function: The callback function for asynchronous request. (optional) :param str account_id: The external account number (int) or account ID Guid. (required) - :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) + :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) :param str include_metadata: :param ConsumerDisclosure consumer_disclosure: :return: ConsumerDisclosure diff --git a/docusign_esign/apis/envelopes_api.py b/docusign_esign/apis/envelopes_api.py index 8e67b888..e2378774 100644 --- a/docusign_esign/apis/envelopes_api.py +++ b/docusign_esign/apis/envelopes_api.py @@ -6379,9 +6379,9 @@ def get_consumer_disclosure(self, account_id, envelope_id, lang_code, recipient_ for asynchronous request. (optional) :param str account_id: The external account number (int) or account ID Guid. (required) :param str envelope_id: The envelopeId Guid of the envelope being accessed. (required) - :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) + :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) :param str recipient_id: The ID of the recipient being accessed. (required) - :param str lang_code2: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. + :param str lang_code2: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. :return: ConsumerDisclosure If the method is called asynchronously, returns the request thread. @@ -6409,9 +6409,9 @@ def get_consumer_disclosure_with_http_info(self, account_id, envelope_id, lang_c for asynchronous request. (optional) :param str account_id: The external account number (int) or account ID Guid. (required) :param str envelope_id: The envelopeId Guid of the envelope being accessed. (required) - :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) + :param str lang_code: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. (required) :param str recipient_id: The ID of the recipient being accessed. (required) - :param str lang_code2: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. + :param str lang_code2: The simple type enumeration the language used in the response. The supported languages, with the language value shown in parenthesis, are:Arabic (ar), Armenian (hy), Armenian (hy), Bulgarian (bg), Czech (cs), Chinese Simplified (zh_CN), Chinese Traditional (zh_TW), Croatian (hr), Danish (da), Dutch (nl), English US (en), English UK (en_GB), Estonian (et), Farsi (fa), Finnish (fi), French (fr), French Canada (fr_CA), German (de), Greek (el), Hebrew (he), Hindi (hi), Hungarian (hu), Bahasa Indonesia (id), Italian (it), Japanese (ja), Korean (ko), Latvian (lv), Lithuanian (lt), Bahasa Melayu (ms), Norwegian (no), Polish (pl), Portuguese (pt), Portuguese Brazil (pt_BR), Romanian (ro), Russian (ru), Serbian (sr), Slovak (sk), Slovenian (sl), Spanish (es),Spanish Latin America (es_MX), Swedish (sv), Thai (th), Turkish (tr), Ukrainian (uk) and Vietnamese (vi). Additionally, the value can be set to �browser� to automatically detect the browser language being used by the viewer and display the disclosure in that language. :return: ConsumerDisclosure If the method is called asynchronously, returns the request thread. diff --git a/docusign_esign/apis/users_api.py b/docusign_esign/apis/users_api.py index 28d41f59..8ecd4802 100644 --- a/docusign_esign/apis/users_api.py +++ b/docusign_esign/apis/users_api.py @@ -3062,7 +3062,7 @@ def update_signature_image(self, account_id, image_type, signature_id, user_id, :param str signature_id: The ID of the signature being accessed. (required) :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) :param str transparent_png: - :param str image_bytes: Image content. (required) + :param str image_bytes: Updated image content. (required) :return: UserSignature If the method is called asynchronously, returns the request thread. @@ -3093,7 +3093,7 @@ def update_signature_image_with_http_info(self, account_id, image_type, signatur :param str signature_id: The ID of the signature being accessed. (required) :param str user_id: The user ID of the user being accessed. Generally this is the user ID of the authenticated user, but if the authenticated user is an Admin on the account, this may be another user the Admin user is accessing. (required) :param str transparent_png: - :param str image_bytes: Image content. (required) + :param str image_bytes: Updated image content. (required) :return: UserSignature If the method is called asynchronously, returns the request thread. diff --git a/docusign_esign/client/__init__.py b/docusign_esign/client/__init__.py index a31eace2..8c14976a 100644 --- a/docusign_esign/client/__init__.py +++ b/docusign_esign/client/__init__.py @@ -1,3 +1,16 @@ +# 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.1 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + from __future__ import absolute_import # import auth modules into client package diff --git a/docusign_esign/client/api_client.py b/docusign_esign/client/api_client.py index cdd95dff..44b3c675 100644 --- a/docusign_esign/client/api_client.py +++ b/docusign_esign/client/api_client.py @@ -1,40 +1,43 @@ # 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. + 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 + OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ + from __future__ import absolute_import -import base64 -import json -import math -import mimetypes import os import re +import json +import mimetypes import tempfile import threading +import base64 +import math +import jwt + from datetime import date, datetime from time import time -import jwt # python 2 and python 3 compatibility library from six import PY3, integer_types, iteritems, text_type from six.moves.urllib.parse import quote from docusign_esign import client from docusign_esign import models + from .configuration import Configuration from .api_exception import ApiException, ArgumentException from .api_response import RESTClientObject, RESTResponse from .auth.oauth import OAuthUserInfo, OAuthToken, OAuth, Account, Organization, Link - class ApiClient(object): """ Generic API client for Swagger client library builds. @@ -64,31 +67,32 @@ class ApiClient(object): 'datetime': datetime, 'object': object, } + OAUTH_TYPES = (OAuthToken.__name__, OAuthUserInfo.__name__, Account.__name__, Organization.__name__, Link.__name__) - def __init__(self, host=None, header_name=None, header_value=None, cookie=None, oauth_host_name=None, - base_path=None): + def __init__(self, host=None, header_name=None, header_value=None, cookie=None, oauth_host_name=None, base_path=None): """ Constructor of the class. """ - self.rest_client = RESTClientObject() - self.default_headers = {'X-DocuSign-SDK': 'Python'} + config = Configuration() + self.rest_client = RESTClientObject(configuration=config) + self.default_headers = {'X-DocuSign-SDK': 'Python'} if header_name is not None: self.default_headers[header_name] = header_value - if host is None: - self.host = Configuration().host + self.host = config.host elif host == "": raise ArgumentException("basePath cannot be empty") else: self.host = host self.cookie = cookie - self.oauth_host_name = oauth_host_name self.base_path = base_path + self.set_oauth_host_name(oauth_host_name) + # Set default User-Agent. - self.user_agent = Configuration().user_agent + self.user_agent = config.user_agent @property def user_agent(self): @@ -172,17 +176,18 @@ def __call_api(self, resource_path, method, self.last_response = response_data return_data = response_data - if _preload_content: r = RESTResponse(response_data) + # deserialize response data - if response_type and response_type != "file": + if response_type: # In the python 3, the response.data is bytes. # we need to decode it to string. - if PY3: - r.data = r.data.decode('utf8', 'replace') - return_data = self.deserialize(r, response_type) - elif response_type: + if PY3 and response_type != "file": + try: + r.data = r.data.decode('utf8', 'replace') + except (UnicodeDecodeError, AttributeError): + pass return_data = self.deserialize(r, response_type) else: return_data = None @@ -479,8 +484,8 @@ def prepare_post_parameters(self, post_params=None, files=None): with open(n, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() - mimetype = mimetypes. \ - guess_type(filename)[0] or 'application/octet-stream' + mimetype = mimetypes.\ + guess_type(filename)[0] or 'application/octet-stream' params.append(tuple([k, tuple([filename, filedata, mimetype])])) return params @@ -562,10 +567,9 @@ def __deserialize_file(self, response): content_disposition = response.getheader("Content-Disposition") if content_disposition: - filename = re. \ - search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition). \ + filename = re.\ + search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).\ group(1) - curr_time = datetime.now() formatted_time = curr_time.strftime('%m%d%Y_%H%M%S_%f') filename = "{}_{}".format(formatted_time, filename) @@ -573,6 +577,7 @@ def __deserialize_file(self, response): with open(path, "wb") as f: f.write(response.data) + return path def __deserialize_primitive(self, data, klass): @@ -636,7 +641,7 @@ def __deserialize_datatime(self, string): status=0, reason=( "Failed to parse `{0}` into a datetime object" - .format(string) + .format(string) ) ) @@ -655,8 +660,8 @@ def __deserialize_model(self, data, klass): for attr, attr_type in iteritems(instance.swagger_types): if data is not None \ - and instance.attribute_map[attr] in data \ - and isinstance(data, (list, dict)): + and instance.attribute_map[attr] in data \ + and isinstance(data, (list, dict)): value = data[instance.attribute_map[attr]] setattr(instance, attr, self.__deserialize(value, attr_type)) @@ -804,13 +809,10 @@ def set_oauth_host_name(self, oauth_host_name=None): self.oauth_host_name = oauth_host_name return - if not oauth_host_name: - raise ArgumentException('oAuthBasePath cannot be empty') - # Derive OAuth Base Path if not given - if self.base_path.startswith("https://demo") or self.base_path.startswith("http://demo"): + if self.base_path is None or self.base_path.startswith("https://demo") or self.base_path.startswith("http://demo") or self.base_path.startswith("https://apps-d") or self.base_path.startswith("http://apps-d"): self.oauth_host_name = OAuth.DEMO_OAUTH_BASE_PATH - elif self.base_path.startswith("https://stage") or self.base_path.startswith("http://stage"): + elif self.base_path.startswith("https://stage") or self.base_path.startswith("http://stage") or self.base_path.startswith("https://apps-s") or self.base_path.startswith("http://apps-s"): self.oauth_host_name = OAuth.STAGE_OAUTH_BASE_PATH else: self.oauth_host_name = OAuth.PRODUCTION_OAUTH_BASE_PATH diff --git a/docusign_esign/client/api_exception.py b/docusign_esign/client/api_exception.py index 55c2d19f..0e28c07c 100644 --- a/docusign_esign/client/api_exception.py +++ b/docusign_esign/client/api_exception.py @@ -3,15 +3,15 @@ """ DocuSign REST API - The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. + 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 + OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ -from __future__ import absolute_import +from __future__ import absolute_import class ApiException(Exception): @@ -51,9 +51,9 @@ class ArgumentException(Exception): def __init__(self, *args, **kwargs): if not args: - super(Exception).__init__("argument cannot be empty") + super().__init__("argument cannot be empty") else: - super(Exception).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) class InvalidBasePath(Exception): diff --git a/docusign_esign/client/api_response.py b/docusign_esign/client/api_response.py index d24017e6..e1023d51 100644 --- a/docusign_esign/client/api_response.py +++ b/docusign_esign/client/api_response.py @@ -3,30 +3,36 @@ """ DocuSign REST API - The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. + 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 + OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ + +from __future__ import absolute_import + import io -import certifi -import ssl -import re import json import logging +import re +import ssl -from six import PY3 +import certifi +# python 2 and python 3 compatibility library +import six from six.moves.urllib.parse import urlencode -from .configuration import Configuration + from .api_exception import ApiException +from .configuration import Configuration try: import urllib3 except ImportError: raise ImportError('Swagger python client requires urllib3.') + logger = logging.getLogger(__name__) @@ -39,60 +45,77 @@ def __init__(self, resp): self.data = resp.data def getheaders(self): - """ - Returns a dictionary of the response headers. - """ + """Returns a dictionary of the response headers.""" return self.urllib3_response.getheaders() def getheader(self, name, default=None): - """ - Returns a given response header. - """ + """Returns a given response header.""" return self.urllib3_response.getheader(name, default) class RESTClientObject(object): - def __init__(self, pools_size=4, maxsize=4): + def __init__(self, pools_size=4, maxsize=None, configuration=None): # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 - # maxsize is the number of requests to host that are allowed in parallel - # ca_certs vs cert_file vs key_file - # http://stackoverflow.com/a/23957365/2985775 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + if configuration is None: + configuration = Configuration() # cert_reqs - if Configuration().verify_ssl: + if configuration.verify_ssl: cert_reqs = ssl.CERT_REQUIRED else: cert_reqs = ssl.CERT_NONE # ca_certs - if Configuration().ssl_ca_cert: - ca_certs = Configuration().ssl_ca_cert + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert else: # if not set certificate file, use Mozilla's root certificates. ca_certs = certifi.where() - # cert_file - cert_file = Configuration().cert_file + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - # key file - key_file = Configuration().key_file + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 # https pool manager - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=cert_file, - key_file=key_file - ) + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, _request_timeout=None): - """ + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + :param method: http request method :param url: http request url :param query_params: query parameters in the url @@ -101,13 +124,17 @@ def request(self, method, url, query_params=None, headers=None, :param post_params: request post parameters, `application/x-www-form-urlencoded` and `multipart/form-data` - :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without - reading/decoding response data. Default is True. - :param _request_timeout: timeout setting for this request. If one number provided, it will be total request - timeout. It can also be a pair (tuple) of (connection, read) timeouts. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. """ method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', 'PATCH', 'OPTIONS'] + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] if post_params and body: raise ValueError( @@ -119,10 +146,12 @@ def request(self, method, url, query_params=None, headers=None, timeout = None if _request_timeout: - if isinstance(_request_timeout, (int, ) if PY3 else (int, long)): + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 timeout = urllib3.Timeout(total=_request_timeout) - elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: - timeout = urllib3.Timeout(connect=_request_timeout[0], read=_request_timeout[1]) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) if 'Content-Type' not in headers: headers['Content-Type'] = 'application/json' @@ -136,59 +165,66 @@ def request(self, method, url, query_params=None, headers=None, request_body = '{}' if body is not None: request_body = json.dumps(body) - r = self.pool_manager.request(method, url, - body=request_body, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': - r = self.pool_manager.request(method, url, - fields=post_params, - encode_multipart=False, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct Content-Type - # which generated by urllib3 will be overwritten. + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. del headers['Content-Type'] - is_content_disposition_type = False - if len(post_params): + body = None + fields = post_params + + # Custom handling for 'multipart/form-data' when there's a single file + # The standard approach is not used in this case to avoid overwriting + # the 'Content-Type' and 'Content-Disposition' headers generated by urllib3. + if len(post_params) == 1: [k, v] = post_params[0] [file_name, file_data, mime_type] = v + if isinstance(file_data, bytes): + # If the file data is bytes, customize headers and set body headers['Content-Type'] = mime_type headers['Content-Disposition'] = 'form-data; name="' + k + '"; filename="' + file_name + '"' - is_content_disposition_type = True - - if is_content_disposition_type: - r = self.pool_manager.request(method, url, - body=file_data, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - else: - r = self.pool_manager.request(method, url, - fields=post_params, - encode_multipart=True, - preload_content=_preload_content, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is provided - # in serialized form - elif isinstance(body, str): - request_body = body + body = file_data + fields = None # Clear fields when there is only one file + r = self.pool_manager.request(method, url, - body=request_body, + fields=fields, + body=body, + encode_multipart=True, preload_content=_preload_content, timeout=timeout, headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) else: # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided arguments. - Please check that your arguments match declared content type.""" + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: @@ -204,27 +240,32 @@ def request(self, method, url, query_params=None, headers=None, # log response body logger.debug("response body: %s", r.data) - if r.status not in range(200, 206): + if _preload_content: + r = RESTResponse(r) + + if not 200 <= r.status <= 299: raise ApiException(http_resp=r) return r - def GET(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): return self.request("GET", url, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout, query_params=query_params) - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): return self.request("HEAD", url, headers=headers, _preload_content=_preload_content, _request_timeout=_request_timeout, query_params=query_params) - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, - _request_timeout=None): + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("OPTIONS", url, headers=headers, query_params=query_params, @@ -233,7 +274,8 @@ def OPTIONS(self, url, headers=None, query_params=None, post_params=None, body=N _request_timeout=_request_timeout, body=body) - def DELETE(self, url, headers=None, query_params=None, body=None, _preload_content=True, _request_timeout=None): + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): return self.request("DELETE", url, headers=headers, query_params=query_params, @@ -241,8 +283,8 @@ def DELETE(self, url, headers=None, query_params=None, body=None, _preload_conte _request_timeout=_request_timeout, body=body) - def POST(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, - _request_timeout=None): + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("POST", url, headers=headers, query_params=query_params, @@ -251,8 +293,8 @@ def POST(self, url, headers=None, query_params=None, post_params=None, body=None _request_timeout=_request_timeout, body=body) - def PUT(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, - _request_timeout=None): + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("PUT", url, headers=headers, query_params=query_params, @@ -261,8 +303,8 @@ def PUT(self, url, headers=None, query_params=None, post_params=None, body=None, _request_timeout=_request_timeout, body=body) - def PATCH(self, url, headers=None, query_params=None, post_params=None, body=None, _preload_content=True, - _request_timeout=None): + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): return self.request("PATCH", url, headers=headers, query_params=query_params, diff --git a/docusign_esign/client/auth/__init__.py b/docusign_esign/client/auth/__init__.py index 6224b231..bb9fe4e5 100644 --- a/docusign_esign/client/auth/__init__.py +++ b/docusign_esign/client/auth/__init__.py @@ -1,3 +1,16 @@ +# 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.1 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + from __future__ import absolute_import # import auth modules into client package diff --git a/docusign_esign/client/auth/oauth.py b/docusign_esign/client/auth/oauth.py index 170996f1..7dbdf5ac 100644 --- a/docusign_esign/client/auth/oauth.py +++ b/docusign_esign/client/auth/oauth.py @@ -3,9 +3,9 @@ """ DocuSign REST API - The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. + 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 + OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -570,4 +570,4 @@ def __ne__(self, other): """ Returns true if both objects are not equal """ - return not self == other + return not self == other \ No newline at end of file diff --git a/docusign_esign/client/configuration.py b/docusign_esign/client/configuration.py index add39e8c..6caa794c 100644 --- a/docusign_esign/client/configuration.py +++ b/docusign_esign/client/configuration.py @@ -3,9 +3,9 @@ """ DocuSign REST API - The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. + 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 + OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -13,15 +13,16 @@ from __future__ import absolute_import -import urllib3 - -import sys +import copy import logging +import multiprocessing +import sys +import urllib3 +import platform -from six import iteritems, PY3 +import six from six.moves import http_client as httplib - def singleton(cls, *args, **kw): instances = {} @@ -31,23 +32,29 @@ def _singleton(): return instances[cls] return _singleton - @singleton class Configuration(object): - """ - NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen Do not edit the class manually. """ + _default = None + def __init__(self): - """ - Constructor - """ + """Constructor""" + if self._default: + for key in self._default.__dict__.keys(): + self.__dict__[key] = copy.copy(self._default.__dict__[key]) + return + # Default Base url self.host = "https://www.docusign.net/restapi" + # Default api client self.api_client = None + # Temp file folder for downloading files self.temp_folder_path = None @@ -56,6 +63,8 @@ def __init__(self): self.api_key = {} # dict to store API prefix (e.g. Bearer) self.api_key_prefix = {} + # function to refresh API key if expired + self.refresh_api_key_hook = None # Username for HTTP basic authentication self.username = "" # Password for HTTP basic authentication @@ -80,7 +89,8 @@ def __init__(self): self.debug = False # SSL/TLS verification - # Set this to false to skip verifying SSL certificate when calling API from https server. + # Set this to false to skip verifying SSL certificate when calling API + # from https server. self.verify_ssl = True # Set this to customize the certificate file to verify the peer. self.ssl_ca_cert = None @@ -88,26 +98,54 @@ def __init__(self): self.cert_file = None # client key file self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + # Disable client side validation + self.client_side_validation = True - if PY3: - self.user_agent = 'Swagger-Codegen/v2.1/3.12.0/python3' + python_version = platform.python_version() + + if six.PY3: + self.user_agent = "Swagger-Codegen/v2.1/3.26.0rc1/python3/" + f"{python_version}" else: - self.user_agent = 'Swagger-Codegen/v2.1/3.12.0/python2' + self.user_agent = "Swagger-Codegen/v2.1/3.26.0rc1/python2/" + f"{python_version}" + + + @classmethod + def set_default(cls, default): + cls._default = default @property def logger_file(self): - """ - Gets the logger_file. + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str """ return self.__logger_file @logger_file.setter def logger_file(self, value): - """ - Sets the logger_file. + """The logger file. - If the logger_file is None, then add stream handler and remove file handler. - Otherwise, add file handler and remove stream handler. + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. :param value: The logger_file path. :type: str @@ -118,7 +156,7 @@ def logger_file(self, value): # then add file handler and remove stream handler. self.logger_file_handler = logging.FileHandler(self.__logger_file) self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in iteritems(self.logger): + for _, logger in six.iteritems(self.logger): logger.addHandler(self.logger_file_handler) if self.logger_stream_handler: logger.removeHandler(self.logger_stream_handler) @@ -127,22 +165,23 @@ def logger_file(self, value): # then add stream handler and remove file handler. self.logger_stream_handler = logging.StreamHandler() self.logger_stream_handler.setFormatter(self.logger_formatter) - for _, logger in iteritems(self.logger): + for _, logger in six.iteritems(self.logger): logger.addHandler(self.logger_stream_handler) if self.logger_file_handler: logger.removeHandler(self.logger_file_handler) @property def debug(self): - """ - Gets the debug status. + """Debug status + + :param value: The debug status, True or False. + :type: bool """ return self.__debug @debug.setter def debug(self, value): - """ - Sets the debug status. + """Debug status :param value: The debug status, True or False. :type: bool @@ -150,29 +189,32 @@ def debug(self, value): self.__debug = value if self.__debug: # if debug status is True, turn on debug logging - for _, logger in iteritems(self.logger): + for _, logger in six.iteritems(self.logger): logger.setLevel(logging.DEBUG) # turn on httplib debug httplib.HTTPConnection.debuglevel = 1 else: # if debug status is False, turn off debug logging, # setting log level to default `logging.WARNING` - for _, logger in iteritems(self.logger): + for _, logger in six.iteritems(self.logger): logger.setLevel(logging.WARNING) # turn off httplib debug httplib.HTTPConnection.debuglevel = 0 @property def logger_format(self): - """ - Gets the logger_format. + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str """ return self.__logger_format @logger_format.setter def logger_format(self, value): - """ - Sets the logger_format. + """The logger format. The logger_formatter will be updated when sets logger_format. @@ -183,29 +225,34 @@ def logger_format(self, value): self.logger_formatter = logging.Formatter(self.__logger_format) def get_api_key_with_prefix(self, identifier): - """ - Gets API key (with prefix if set). + """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ - if self.api_key.get(identifier) and self.api_key_prefix.get(identifier): - return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] - elif self.api_key.get(identifier): - return self.api_key[identifier] + + if self.refresh_api_key_hook: + self.refresh_api_key_hook(self) + + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key def get_basic_auth_token(self): - """ - Gets HTTP basic authentication header (string). + """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. """ - return urllib3.util.make_headers(basic_auth=self.username + ':' + self.password)\ - .get('authorization') + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') def auth_settings(self): - """ - Gets Auth Settings dict for api client. + """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ @@ -222,14 +269,13 @@ def auth_settings(self): } def to_debug_report(self): - """ - Gets the essential information for debugging. + """Gets the essential information for debugging. :return: The report for debugging. """ return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v2\n"\ - "SDK Package Version: 1.0.0".\ + "Version of the API: v2.1\n"\ + "SDK Package Version: 3.26.0rc1".\ format(env=sys.platform, pyversion=sys.version) diff --git a/docusign_esign/models/__init__.py b/docusign_esign/models/__init__.py index 5ef0ca2d..270b6e07 100644 --- a/docusign_esign/models/__init__.py +++ b/docusign_esign/models/__init__.py @@ -193,6 +193,7 @@ from docusign_esign.models.doc_gen_form_field_option import DocGenFormFieldOption from docusign_esign.models.doc_gen_form_field_request import DocGenFormFieldRequest from docusign_esign.models.doc_gen_form_field_response import DocGenFormFieldResponse +from docusign_esign.models.doc_gen_form_field_row_value import DocGenFormFieldRowValue from docusign_esign.models.doc_gen_form_field_validation import DocGenFormFieldValidation from docusign_esign.models.doc_gen_form_fields import DocGenFormFields from docusign_esign.models.doc_gen_syntax_error import DocGenSyntaxError diff --git a/docusign_esign/models/account_settings_information.py b/docusign_esign/models/account_settings_information.py index 967e9555..adbd7be3 100644 --- a/docusign_esign/models/account_settings_information.py +++ b/docusign_esign/models/account_settings_information.py @@ -386,6 +386,8 @@ class AccountSettingsInformation(object): 'enable_contact_suggestions_metadata': 'SettingsMetadata', 'enable_customer_satisfaction_metric_tracking': 'str', 'enable_customer_satisfaction_metric_tracking_metadata': 'SettingsMetadata', + 'enable_data_verification_extensions': 'str', + 'enable_data_verification_extensions_metadata': 'SettingsMetadata', 'enable_d_sig_eu_advanced_pens': 'str', 'enable_d_sig_eu_advanced_pens_metadata': 'SettingsMetadata', 'enable_d_sig_express_pens': 'str', @@ -501,8 +503,12 @@ class AccountSettingsInformation(object): 'enable_strike_through_metadata': 'SettingsMetadata', 'enable_transaction_point': 'str', 'enable_transaction_point_metadata': 'SettingsMetadata', + 'enable_unified_repository': 'str', + 'enable_unified_repository_metadata': 'SettingsMetadata', 'enable_vaulting': 'str', 'enable_vaulting_metadata': 'SettingsMetadata', + 'enable_web_forms_runtime_ap_is': 'str', + 'enable_web_forms_runtime_ap_is_metadata': 'SettingsMetadata', 'enable_web_forms_separate_user_permissions': 'str', 'enable_web_forms_separate_user_permissions_metadata': 'SettingsMetadata', 'enable_witnessing': 'str', @@ -536,6 +542,8 @@ class AccountSettingsInformation(object): 'fax_out_enabled_metadata': 'SettingsMetadata', 'finish_reminder': 'str', 'finish_reminder_metadata': 'SettingsMetadata', + 'forbid_adding_user_stamps': 'str', + 'forbid_adding_user_stamps_metadata': 'SettingsMetadata', 'guided_forms_html_allowed': 'str', 'guided_forms_html_allowed_metadata': 'SettingsMetadata', 'guided_forms_html_conversion_policy': 'str', @@ -1117,6 +1125,8 @@ class AccountSettingsInformation(object): 'enable_contact_suggestions_metadata': 'enableContactSuggestionsMetadata', 'enable_customer_satisfaction_metric_tracking': 'enableCustomerSatisfactionMetricTracking', 'enable_customer_satisfaction_metric_tracking_metadata': 'enableCustomerSatisfactionMetricTrackingMetadata', + 'enable_data_verification_extensions': 'enableDataVerificationExtensions', + 'enable_data_verification_extensions_metadata': 'enableDataVerificationExtensionsMetadata', 'enable_d_sig_eu_advanced_pens': 'enableDSigEUAdvancedPens', 'enable_d_sig_eu_advanced_pens_metadata': 'enableDSigEUAdvancedPensMetadata', 'enable_d_sig_express_pens': 'enableDSigExpressPens', @@ -1232,8 +1242,12 @@ class AccountSettingsInformation(object): 'enable_strike_through_metadata': 'enableStrikeThroughMetadata', 'enable_transaction_point': 'enableTransactionPoint', 'enable_transaction_point_metadata': 'enableTransactionPointMetadata', + 'enable_unified_repository': 'enableUnifiedRepository', + 'enable_unified_repository_metadata': 'enableUnifiedRepositoryMetadata', 'enable_vaulting': 'enableVaulting', 'enable_vaulting_metadata': 'enableVaultingMetadata', + 'enable_web_forms_runtime_ap_is': 'enableWebFormsRuntimeAPIs', + 'enable_web_forms_runtime_ap_is_metadata': 'enableWebFormsRuntimeAPIsMetadata', 'enable_web_forms_separate_user_permissions': 'enableWebFormsSeparateUserPermissions', 'enable_web_forms_separate_user_permissions_metadata': 'enableWebFormsSeparateUserPermissionsMetadata', 'enable_witnessing': 'enableWitnessing', @@ -1267,6 +1281,8 @@ class AccountSettingsInformation(object): 'fax_out_enabled_metadata': 'faxOutEnabledMetadata', 'finish_reminder': 'finishReminder', 'finish_reminder_metadata': 'finishReminderMetadata', + 'forbid_adding_user_stamps': 'forbidAddingUserStamps', + 'forbid_adding_user_stamps_metadata': 'forbidAddingUserStampsMetadata', 'guided_forms_html_allowed': 'guidedFormsHtmlAllowed', 'guided_forms_html_allowed_metadata': 'guidedFormsHtmlAllowedMetadata', 'guided_forms_html_conversion_policy': 'guidedFormsHtmlConversionPolicy', @@ -1853,6 +1869,8 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 self._enable_contact_suggestions_metadata = None self._enable_customer_satisfaction_metric_tracking = None self._enable_customer_satisfaction_metric_tracking_metadata = None + self._enable_data_verification_extensions = None + self._enable_data_verification_extensions_metadata = None self._enable_d_sig_eu_advanced_pens = None self._enable_d_sig_eu_advanced_pens_metadata = None self._enable_d_sig_express_pens = None @@ -1968,8 +1986,12 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 self._enable_strike_through_metadata = None self._enable_transaction_point = None self._enable_transaction_point_metadata = None + self._enable_unified_repository = None + self._enable_unified_repository_metadata = None self._enable_vaulting = None self._enable_vaulting_metadata = None + self._enable_web_forms_runtime_ap_is = None + self._enable_web_forms_runtime_ap_is_metadata = None self._enable_web_forms_separate_user_permissions = None self._enable_web_forms_separate_user_permissions_metadata = None self._enable_witnessing = None @@ -2003,6 +2025,8 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 self._fax_out_enabled_metadata = None self._finish_reminder = None self._finish_reminder_metadata = None + self._forbid_adding_user_stamps = None + self._forbid_adding_user_stamps_metadata = None self._guided_forms_html_allowed = None self._guided_forms_html_allowed_metadata = None self._guided_forms_html_conversion_policy = None @@ -2583,6 +2607,8 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 setattr(self, "_{}".format('enable_contact_suggestions_metadata'), kwargs.get('enable_contact_suggestions_metadata', None)) setattr(self, "_{}".format('enable_customer_satisfaction_metric_tracking'), kwargs.get('enable_customer_satisfaction_metric_tracking', None)) setattr(self, "_{}".format('enable_customer_satisfaction_metric_tracking_metadata'), kwargs.get('enable_customer_satisfaction_metric_tracking_metadata', None)) + setattr(self, "_{}".format('enable_data_verification_extensions'), kwargs.get('enable_data_verification_extensions', None)) + setattr(self, "_{}".format('enable_data_verification_extensions_metadata'), kwargs.get('enable_data_verification_extensions_metadata', None)) setattr(self, "_{}".format('enable_d_sig_eu_advanced_pens'), kwargs.get('enable_d_sig_eu_advanced_pens', None)) setattr(self, "_{}".format('enable_d_sig_eu_advanced_pens_metadata'), kwargs.get('enable_d_sig_eu_advanced_pens_metadata', None)) setattr(self, "_{}".format('enable_d_sig_express_pens'), kwargs.get('enable_d_sig_express_pens', None)) @@ -2698,8 +2724,12 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 setattr(self, "_{}".format('enable_strike_through_metadata'), kwargs.get('enable_strike_through_metadata', None)) setattr(self, "_{}".format('enable_transaction_point'), kwargs.get('enable_transaction_point', None)) setattr(self, "_{}".format('enable_transaction_point_metadata'), kwargs.get('enable_transaction_point_metadata', None)) + setattr(self, "_{}".format('enable_unified_repository'), kwargs.get('enable_unified_repository', None)) + setattr(self, "_{}".format('enable_unified_repository_metadata'), kwargs.get('enable_unified_repository_metadata', None)) setattr(self, "_{}".format('enable_vaulting'), kwargs.get('enable_vaulting', None)) setattr(self, "_{}".format('enable_vaulting_metadata'), kwargs.get('enable_vaulting_metadata', None)) + setattr(self, "_{}".format('enable_web_forms_runtime_ap_is'), kwargs.get('enable_web_forms_runtime_ap_is', None)) + setattr(self, "_{}".format('enable_web_forms_runtime_ap_is_metadata'), kwargs.get('enable_web_forms_runtime_ap_is_metadata', None)) setattr(self, "_{}".format('enable_web_forms_separate_user_permissions'), kwargs.get('enable_web_forms_separate_user_permissions', None)) setattr(self, "_{}".format('enable_web_forms_separate_user_permissions_metadata'), kwargs.get('enable_web_forms_separate_user_permissions_metadata', None)) setattr(self, "_{}".format('enable_witnessing'), kwargs.get('enable_witnessing', None)) @@ -2733,6 +2763,8 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 setattr(self, "_{}".format('fax_out_enabled_metadata'), kwargs.get('fax_out_enabled_metadata', None)) setattr(self, "_{}".format('finish_reminder'), kwargs.get('finish_reminder', None)) setattr(self, "_{}".format('finish_reminder_metadata'), kwargs.get('finish_reminder_metadata', None)) + setattr(self, "_{}".format('forbid_adding_user_stamps'), kwargs.get('forbid_adding_user_stamps', None)) + setattr(self, "_{}".format('forbid_adding_user_stamps_metadata'), kwargs.get('forbid_adding_user_stamps_metadata', None)) setattr(self, "_{}".format('guided_forms_html_allowed'), kwargs.get('guided_forms_html_allowed', None)) setattr(self, "_{}".format('guided_forms_html_allowed_metadata'), kwargs.get('guided_forms_html_allowed_metadata', None)) setattr(self, "_{}".format('guided_forms_html_conversion_policy'), kwargs.get('guided_forms_html_conversion_policy', None)) @@ -11078,6 +11110,52 @@ def enable_customer_satisfaction_metric_tracking_metadata(self, enable_customer_ self._enable_customer_satisfaction_metric_tracking_metadata = enable_customer_satisfaction_metric_tracking_metadata + @property + def enable_data_verification_extensions(self): + """Gets the enable_data_verification_extensions of this AccountSettingsInformation. # noqa: E501 + + # noqa: E501 + + :return: The enable_data_verification_extensions of this AccountSettingsInformation. # noqa: E501 + :rtype: str + """ + return self._enable_data_verification_extensions + + @enable_data_verification_extensions.setter + def enable_data_verification_extensions(self, enable_data_verification_extensions): + """Sets the enable_data_verification_extensions of this AccountSettingsInformation. + + # noqa: E501 + + :param enable_data_verification_extensions: The enable_data_verification_extensions of this AccountSettingsInformation. # noqa: E501 + :type: str + """ + + self._enable_data_verification_extensions = enable_data_verification_extensions + + @property + def enable_data_verification_extensions_metadata(self): + """Gets the enable_data_verification_extensions_metadata of this AccountSettingsInformation. # noqa: E501 + + # noqa: E501 + + :return: The enable_data_verification_extensions_metadata of this AccountSettingsInformation. # noqa: E501 + :rtype: SettingsMetadata + """ + return self._enable_data_verification_extensions_metadata + + @enable_data_verification_extensions_metadata.setter + def enable_data_verification_extensions_metadata(self, enable_data_verification_extensions_metadata): + """Sets the enable_data_verification_extensions_metadata of this AccountSettingsInformation. + + # noqa: E501 + + :param enable_data_verification_extensions_metadata: The enable_data_verification_extensions_metadata of this AccountSettingsInformation. # noqa: E501 + :type: SettingsMetadata + """ + + self._enable_data_verification_extensions_metadata = enable_data_verification_extensions_metadata + @property def enable_d_sig_eu_advanced_pens(self): """Gets the enable_d_sig_eu_advanced_pens of this AccountSettingsInformation. # noqa: E501 @@ -13723,6 +13801,52 @@ def enable_transaction_point_metadata(self, enable_transaction_point_metadata): self._enable_transaction_point_metadata = enable_transaction_point_metadata + @property + def enable_unified_repository(self): + """Gets the enable_unified_repository of this AccountSettingsInformation. # noqa: E501 + + # noqa: E501 + + :return: The enable_unified_repository of this AccountSettingsInformation. # noqa: E501 + :rtype: str + """ + return self._enable_unified_repository + + @enable_unified_repository.setter + def enable_unified_repository(self, enable_unified_repository): + """Sets the enable_unified_repository of this AccountSettingsInformation. + + # noqa: E501 + + :param enable_unified_repository: The enable_unified_repository of this AccountSettingsInformation. # noqa: E501 + :type: str + """ + + self._enable_unified_repository = enable_unified_repository + + @property + def enable_unified_repository_metadata(self): + """Gets the enable_unified_repository_metadata of this AccountSettingsInformation. # noqa: E501 + + # noqa: E501 + + :return: The enable_unified_repository_metadata of this AccountSettingsInformation. # noqa: E501 + :rtype: SettingsMetadata + """ + return self._enable_unified_repository_metadata + + @enable_unified_repository_metadata.setter + def enable_unified_repository_metadata(self, enable_unified_repository_metadata): + """Sets the enable_unified_repository_metadata of this AccountSettingsInformation. + + # noqa: E501 + + :param enable_unified_repository_metadata: The enable_unified_repository_metadata of this AccountSettingsInformation. # noqa: E501 + :type: SettingsMetadata + """ + + self._enable_unified_repository_metadata = enable_unified_repository_metadata + @property def enable_vaulting(self): """Gets the enable_vaulting of this AccountSettingsInformation. # noqa: E501 @@ -13769,6 +13893,52 @@ def enable_vaulting_metadata(self, enable_vaulting_metadata): self._enable_vaulting_metadata = enable_vaulting_metadata + @property + def enable_web_forms_runtime_ap_is(self): + """Gets the enable_web_forms_runtime_ap_is of this AccountSettingsInformation. # noqa: E501 + + # noqa: E501 + + :return: The enable_web_forms_runtime_ap_is of this AccountSettingsInformation. # noqa: E501 + :rtype: str + """ + return self._enable_web_forms_runtime_ap_is + + @enable_web_forms_runtime_ap_is.setter + def enable_web_forms_runtime_ap_is(self, enable_web_forms_runtime_ap_is): + """Sets the enable_web_forms_runtime_ap_is of this AccountSettingsInformation. + + # noqa: E501 + + :param enable_web_forms_runtime_ap_is: The enable_web_forms_runtime_ap_is of this AccountSettingsInformation. # noqa: E501 + :type: str + """ + + self._enable_web_forms_runtime_ap_is = enable_web_forms_runtime_ap_is + + @property + def enable_web_forms_runtime_ap_is_metadata(self): + """Gets the enable_web_forms_runtime_ap_is_metadata of this AccountSettingsInformation. # noqa: E501 + + # noqa: E501 + + :return: The enable_web_forms_runtime_ap_is_metadata of this AccountSettingsInformation. # noqa: E501 + :rtype: SettingsMetadata + """ + return self._enable_web_forms_runtime_ap_is_metadata + + @enable_web_forms_runtime_ap_is_metadata.setter + def enable_web_forms_runtime_ap_is_metadata(self, enable_web_forms_runtime_ap_is_metadata): + """Sets the enable_web_forms_runtime_ap_is_metadata of this AccountSettingsInformation. + + # noqa: E501 + + :param enable_web_forms_runtime_ap_is_metadata: The enable_web_forms_runtime_ap_is_metadata of this AccountSettingsInformation. # noqa: E501 + :type: SettingsMetadata + """ + + self._enable_web_forms_runtime_ap_is_metadata = enable_web_forms_runtime_ap_is_metadata + @property def enable_web_forms_separate_user_permissions(self): """Gets the enable_web_forms_separate_user_permissions of this AccountSettingsInformation. # noqa: E501 @@ -14528,6 +14698,52 @@ def finish_reminder_metadata(self, finish_reminder_metadata): self._finish_reminder_metadata = finish_reminder_metadata + @property + def forbid_adding_user_stamps(self): + """Gets the forbid_adding_user_stamps of this AccountSettingsInformation. # noqa: E501 + + # noqa: E501 + + :return: The forbid_adding_user_stamps of this AccountSettingsInformation. # noqa: E501 + :rtype: str + """ + return self._forbid_adding_user_stamps + + @forbid_adding_user_stamps.setter + def forbid_adding_user_stamps(self, forbid_adding_user_stamps): + """Sets the forbid_adding_user_stamps of this AccountSettingsInformation. + + # noqa: E501 + + :param forbid_adding_user_stamps: The forbid_adding_user_stamps of this AccountSettingsInformation. # noqa: E501 + :type: str + """ + + self._forbid_adding_user_stamps = forbid_adding_user_stamps + + @property + def forbid_adding_user_stamps_metadata(self): + """Gets the forbid_adding_user_stamps_metadata of this AccountSettingsInformation. # noqa: E501 + + # noqa: E501 + + :return: The forbid_adding_user_stamps_metadata of this AccountSettingsInformation. # noqa: E501 + :rtype: SettingsMetadata + """ + return self._forbid_adding_user_stamps_metadata + + @forbid_adding_user_stamps_metadata.setter + def forbid_adding_user_stamps_metadata(self, forbid_adding_user_stamps_metadata): + """Sets the forbid_adding_user_stamps_metadata of this AccountSettingsInformation. + + # noqa: E501 + + :param forbid_adding_user_stamps_metadata: The forbid_adding_user_stamps_metadata of this AccountSettingsInformation. # noqa: E501 + :type: SettingsMetadata + """ + + self._forbid_adding_user_stamps_metadata = forbid_adding_user_stamps_metadata + @property def guided_forms_html_allowed(self): """Gets the guided_forms_html_allowed of this AccountSettingsInformation. # noqa: E501 diff --git a/docusign_esign/models/delayed_routing.py b/docusign_esign/models/delayed_routing.py index 603806da..7350b6b1 100644 --- a/docusign_esign/models/delayed_routing.py +++ b/docusign_esign/models/delayed_routing.py @@ -109,7 +109,7 @@ def rules(self, rules): def status(self): """Gets the status of this DelayedRouting. # noqa: E501 - \\\"pending\\\" if the current workflow step has not been reached and the delay has not yet started. \\\"started\\\" if the delay is in progress. \\\"completed\\\" if the delay has elapsed and the envelope has been sent to the current workflow step's recipients. # noqa: E501 + Indicates the envelope status. Valid values are: * sent - The envelope is sent to the recipients. * created - The envelope is saved as a draft and can be modified and sent later. # noqa: E501 :return: The status of this DelayedRouting. # noqa: E501 :rtype: str @@ -120,7 +120,7 @@ def status(self): def status(self, status): """Sets the status of this DelayedRouting. - \\\"pending\\\" if the current workflow step has not been reached and the delay has not yet started. \\\"started\\\" if the delay is in progress. \\\"completed\\\" if the delay has elapsed and the envelope has been sent to the current workflow step's recipients. # noqa: E501 + Indicates the envelope status. Valid values are: * sent - The envelope is sent to the recipients. * created - The envelope is saved as a draft and can be modified and sent later. # noqa: E501 :param status: The status of this DelayedRouting. # noqa: E501 :type: str diff --git a/docusign_esign/models/doc_gen_form_field.py b/docusign_esign/models/doc_gen_form_field.py index d51d21a2..65d63039 100644 --- a/docusign_esign/models/doc_gen_form_field.py +++ b/docusign_esign/models/doc_gen_form_field.py @@ -39,6 +39,7 @@ class DocGenFormField(object): 'options': 'list[DocGenFormFieldOption]', 'predefined_validation': 'str', 'required': 'str', + 'row_values': 'list[DocGenFormFieldRowValue]', 'type': 'str', 'validation': 'DocGenFormFieldValidation', 'value': 'str' @@ -51,6 +52,7 @@ class DocGenFormField(object): 'options': 'options', 'predefined_validation': 'predefinedValidation', 'required': 'required', + 'row_values': 'rowValues', 'type': 'type', 'validation': 'validation', 'value': 'value' @@ -68,6 +70,7 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 self._options = None self._predefined_validation = None self._required = None + self._row_values = None self._type = None self._validation = None self._value = None @@ -79,6 +82,7 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 setattr(self, "_{}".format('options'), kwargs.get('options', None)) setattr(self, "_{}".format('predefined_validation'), kwargs.get('predefined_validation', None)) setattr(self, "_{}".format('required'), kwargs.get('required', None)) + setattr(self, "_{}".format('row_values'), kwargs.get('row_values', None)) setattr(self, "_{}".format('type'), kwargs.get('type', None)) setattr(self, "_{}".format('validation'), kwargs.get('validation', None)) setattr(self, "_{}".format('value'), kwargs.get('value', None)) @@ -221,6 +225,29 @@ def required(self, required): self._required = required + @property + def row_values(self): + """Gets the row_values of this DocGenFormField. # noqa: E501 + + # noqa: E501 + + :return: The row_values of this DocGenFormField. # noqa: E501 + :rtype: list[DocGenFormFieldRowValue] + """ + return self._row_values + + @row_values.setter + def row_values(self, row_values): + """Sets the row_values of this DocGenFormField. + + # noqa: E501 + + :param row_values: The row_values of this DocGenFormField. # noqa: E501 + :type: list[DocGenFormFieldRowValue] + """ + + self._row_values = row_values + @property def type(self): """Gets the type of this DocGenFormField. # noqa: E501 diff --git a/docusign_esign/models/doc_gen_form_field_row_value.py b/docusign_esign/models/doc_gen_form_field_row_value.py new file mode 100644 index 00000000..09a0d8ff --- /dev/null +++ b/docusign_esign/models/doc_gen_form_field_row_value.py @@ -0,0 +1,124 @@ +# 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.1 + Contact: devcenter@docusign.com + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from docusign_esign.client.configuration import Configuration + + +class DocGenFormFieldRowValue(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 = { + 'doc_gen_form_field_list': 'list[DocGenFormField]' + } + + attribute_map = { + 'doc_gen_form_field_list': 'docGenFormFieldList' + } + + def __init__(self, _configuration=None, **kwargs): # noqa: E501 + """DocGenFormFieldRowValue - a model defined in Swagger""" # noqa: E501 + if _configuration is None: + _configuration = Configuration() + self._configuration = _configuration + + self._doc_gen_form_field_list = None + self.discriminator = None + + setattr(self, "_{}".format('doc_gen_form_field_list'), kwargs.get('doc_gen_form_field_list', None)) + + @property + def doc_gen_form_field_list(self): + """Gets the doc_gen_form_field_list of this DocGenFormFieldRowValue. # noqa: E501 + + # noqa: E501 + + :return: The doc_gen_form_field_list of this DocGenFormFieldRowValue. # noqa: E501 + :rtype: list[DocGenFormField] + """ + return self._doc_gen_form_field_list + + @doc_gen_form_field_list.setter + def doc_gen_form_field_list(self, doc_gen_form_field_list): + """Sets the doc_gen_form_field_list of this DocGenFormFieldRowValue. + + # noqa: E501 + + :param doc_gen_form_field_list: The doc_gen_form_field_list of this DocGenFormFieldRowValue. # noqa: E501 + :type: list[DocGenFormField] + """ + + self._doc_gen_form_field_list = doc_gen_form_field_list + + 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(DocGenFormFieldRowValue, 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, DocGenFormFieldRowValue): + return False + + return self.to_dict() == other.to_dict() + + def __ne__(self, other): + """Returns true if both objects are not equal""" + if not isinstance(other, DocGenFormFieldRowValue): + return True + + return self.to_dict() != other.to_dict() diff --git a/docusign_esign/models/group.py b/docusign_esign/models/group.py index ee3d7726..378b370f 100644 --- a/docusign_esign/models/group.py +++ b/docusign_esign/models/group.py @@ -33,6 +33,7 @@ class Group(object): and the value is json key in definition. """ swagger_types = { + 'access_type': 'str', 'ds_group_id': 'str', 'error_details': 'ErrorDetails', 'group_id': 'str', @@ -44,6 +45,7 @@ class Group(object): } attribute_map = { + 'access_type': 'accessType', 'ds_group_id': 'dsGroupId', 'error_details': 'errorDetails', 'group_id': 'groupId', @@ -60,6 +62,7 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 _configuration = Configuration() self._configuration = _configuration + self._access_type = None self._ds_group_id = None self._error_details = None self._group_id = None @@ -70,6 +73,7 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 self._users_count = None self.discriminator = None + setattr(self, "_{}".format('access_type'), kwargs.get('access_type', None)) setattr(self, "_{}".format('ds_group_id'), kwargs.get('ds_group_id', None)) setattr(self, "_{}".format('error_details'), kwargs.get('error_details', None)) setattr(self, "_{}".format('group_id'), kwargs.get('group_id', None)) @@ -79,6 +83,29 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 setattr(self, "_{}".format('users'), kwargs.get('users', None)) setattr(self, "_{}".format('users_count'), kwargs.get('users_count', None)) + @property + def access_type(self): + """Gets the access_type of this Group. # noqa: E501 + + # noqa: E501 + + :return: The access_type of this Group. # noqa: E501 + :rtype: str + """ + return self._access_type + + @access_type.setter + def access_type(self, access_type): + """Sets the access_type of this Group. + + # noqa: E501 + + :param access_type: The access_type of this Group. # noqa: E501 + :type: str + """ + + self._access_type = access_type + @property def ds_group_id(self): """Gets the ds_group_id of this Group. # noqa: E501 diff --git a/docusign_esign/models/initial_here.py b/docusign_esign/models/initial_here.py index fbbb40dd..b2114a74 100644 --- a/docusign_esign/models/initial_here.py +++ b/docusign_esign/models/initial_here.py @@ -1567,7 +1567,7 @@ def recipient_id_metadata(self, recipient_id_metadata): def scale_value(self): """Gets the scale_value of this InitialHere. # noqa: E501 - Sets the size for the InitialHere tab. It can be value from 0.5 to 1.0, where 1.0 represents full size and 0.5 is 50% size. # noqa: E501 + Sets the size for the InitialHere tab. It can be value from 0.5 to 1.0, where 1.0 represents full size and 0.5 is 50% size. # noqa: E501 :return: The scale_value of this InitialHere. # noqa: E501 :rtype: str @@ -1578,7 +1578,7 @@ def scale_value(self): def scale_value(self, scale_value): """Sets the scale_value of this InitialHere. - Sets the size for the InitialHere tab. It can be value from 0.5 to 1.0, where 1.0 represents full size and 0.5 is 50% size. # noqa: E501 + Sets the size for the InitialHere tab. It can be value from 0.5 to 1.0, where 1.0 represents full size and 0.5 is 50% size. # noqa: E501 :param scale_value: The scale_value of this InitialHere. # noqa: E501 :type: str diff --git a/docusign_esign/models/scheduled_sending.py b/docusign_esign/models/scheduled_sending.py index 5754ca35..f46150a7 100644 --- a/docusign_esign/models/scheduled_sending.py +++ b/docusign_esign/models/scheduled_sending.py @@ -136,7 +136,7 @@ def rules(self, rules): def status(self): """Gets the status of this ScheduledSending. # noqa: E501 - \\\"pending\\\" if the envelope has not yet been sent and the scheduled sending delay has not iniaited. \\\"started\\\" if the scheduled sending delay is in progress. \\\"completed\\\" if the scheduled sending delay has elapsed and the envelope has been sent. # noqa: E501 + Indicates the envelope status. Valid values are: * sent - The envelope is sent to the recipients. * created - The envelope is saved as a draft and can be modified and sent later. # noqa: E501 :return: The status of this ScheduledSending. # noqa: E501 :rtype: str @@ -147,7 +147,7 @@ def status(self): def status(self, status): """Sets the status of this ScheduledSending. - \\\"pending\\\" if the envelope has not yet been sent and the scheduled sending delay has not iniaited. \\\"started\\\" if the scheduled sending delay is in progress. \\\"completed\\\" if the scheduled sending delay has elapsed and the envelope has been sent. # noqa: E501 + Indicates the envelope status. Valid values are: * sent - The envelope is sent to the recipients. * created - The envelope is saved as a draft and can be modified and sent later. # noqa: E501 :param status: The status of this ScheduledSending. # noqa: E501 :type: str diff --git a/docusign_esign/models/user_settings_information.py b/docusign_esign/models/user_settings_information.py index b459f21c..708fa398 100644 --- a/docusign_esign/models/user_settings_information.py +++ b/docusign_esign/models/user_settings_information.py @@ -36,6 +36,8 @@ class UserSettingsInformation(object): 'account_management_granular': 'UserAccountManagementGranularInformation', 'admin_only': 'str', 'admin_only_metadata': 'SettingsMetadata', + 'allow_access_to_all_account_agreements': 'str', + 'allow_access_to_all_account_agreements_metadata': 'SettingsMetadata', 'allow_auto_tagging': 'str', 'allowed_orchestration_access': 'str', 'allowed_orchestration_access_metadata': 'SettingsMetadata', @@ -174,6 +176,8 @@ class UserSettingsInformation(object): 'account_management_granular': 'accountManagementGranular', 'admin_only': 'adminOnly', 'admin_only_metadata': 'adminOnlyMetadata', + 'allow_access_to_all_account_agreements': 'allowAccessToAllAccountAgreements', + 'allow_access_to_all_account_agreements_metadata': 'allowAccessToAllAccountAgreementsMetadata', 'allow_auto_tagging': 'allowAutoTagging', 'allowed_orchestration_access': 'allowedOrchestrationAccess', 'allowed_orchestration_access_metadata': 'allowedOrchestrationAccessMetadata', @@ -317,6 +321,8 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 self._account_management_granular = None self._admin_only = None self._admin_only_metadata = None + self._allow_access_to_all_account_agreements = None + self._allow_access_to_all_account_agreements_metadata = None self._allow_auto_tagging = None self._allowed_orchestration_access = None self._allowed_orchestration_access_metadata = None @@ -454,6 +460,8 @@ def __init__(self, _configuration=None, **kwargs): # noqa: E501 setattr(self, "_{}".format('account_management_granular'), kwargs.get('account_management_granular', None)) setattr(self, "_{}".format('admin_only'), kwargs.get('admin_only', None)) setattr(self, "_{}".format('admin_only_metadata'), kwargs.get('admin_only_metadata', None)) + setattr(self, "_{}".format('allow_access_to_all_account_agreements'), kwargs.get('allow_access_to_all_account_agreements', None)) + setattr(self, "_{}".format('allow_access_to_all_account_agreements_metadata'), kwargs.get('allow_access_to_all_account_agreements_metadata', None)) setattr(self, "_{}".format('allow_auto_tagging'), kwargs.get('allow_auto_tagging', None)) setattr(self, "_{}".format('allowed_orchestration_access'), kwargs.get('allowed_orchestration_access', None)) setattr(self, "_{}".format('allowed_orchestration_access_metadata'), kwargs.get('allowed_orchestration_access_metadata', None)) @@ -656,6 +664,52 @@ def admin_only_metadata(self, admin_only_metadata): self._admin_only_metadata = admin_only_metadata + @property + def allow_access_to_all_account_agreements(self): + """Gets the allow_access_to_all_account_agreements of this UserSettingsInformation. # noqa: E501 + + # noqa: E501 + + :return: The allow_access_to_all_account_agreements of this UserSettingsInformation. # noqa: E501 + :rtype: str + """ + return self._allow_access_to_all_account_agreements + + @allow_access_to_all_account_agreements.setter + def allow_access_to_all_account_agreements(self, allow_access_to_all_account_agreements): + """Sets the allow_access_to_all_account_agreements of this UserSettingsInformation. + + # noqa: E501 + + :param allow_access_to_all_account_agreements: The allow_access_to_all_account_agreements of this UserSettingsInformation. # noqa: E501 + :type: str + """ + + self._allow_access_to_all_account_agreements = allow_access_to_all_account_agreements + + @property + def allow_access_to_all_account_agreements_metadata(self): + """Gets the allow_access_to_all_account_agreements_metadata of this UserSettingsInformation. # noqa: E501 + + # noqa: E501 + + :return: The allow_access_to_all_account_agreements_metadata of this UserSettingsInformation. # noqa: E501 + :rtype: SettingsMetadata + """ + return self._allow_access_to_all_account_agreements_metadata + + @allow_access_to_all_account_agreements_metadata.setter + def allow_access_to_all_account_agreements_metadata(self, allow_access_to_all_account_agreements_metadata): + """Sets the allow_access_to_all_account_agreements_metadata of this UserSettingsInformation. + + # noqa: E501 + + :param allow_access_to_all_account_agreements_metadata: The allow_access_to_all_account_agreements_metadata of this UserSettingsInformation. # noqa: E501 + :type: SettingsMetadata + """ + + self._allow_access_to_all_account_agreements_metadata = allow_access_to_all_account_agreements_metadata + @property def allow_auto_tagging(self): """Gets the allow_auto_tagging of this UserSettingsInformation. # noqa: E501 diff --git a/requirements.txt b/requirements.txt index 30a801ab..57db7c46 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,6 @@ six >= 1.8.0 python_dateutil >= 2.5.3 setuptools >= 21.0.0 urllib3 >= 1.15 -PyJWT>=1.7.1 +PyJWT>=2.0.0 cryptography>=2.5 nose>=1.3.7 diff --git a/setup.py b/setup.py index a5f7bc4f..bf80e0d9 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 = "3.25.2" +VERSION = "3.26.0rc1" # To install the library, run the following # # python setup.py install @@ -22,7 +22,7 @@ # 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"] +REQUIRES = ["urllib3 >= 1.15", "six >= 1.8.0", "certifi >= 14.05.14", "python-dateutil >= 2.5.3", "setuptools >= 21.0.0", "PyJWT>=2.0.0", "cryptography>=2.5", "nose>=1.3.7"] class CleanCommand(Command): """Custom clean command to tidy up the project root.""" diff --git a/test-requirements.txt b/test-requirements.txt index 4fb18ac3..4229be96 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,4 +3,4 @@ nose>=1.3.7 pluggy>=0.3.1 py>=1.4.31 randomize>=0.13 -tox +tox \ No newline at end of file