diff --git a/examples/AccountCreate.py b/examples/AccountCreate.py index 35775247b..6bdaebb21 100644 --- a/examples/AccountCreate.py +++ b/examples/AccountCreate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/AccountGet.py b/examples/AccountGet.py index afc647dda..659cb62bf 100644 --- a/examples/AccountGet.py +++ b/examples/AccountGet.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/AccountUpdate.py b/examples/AccountUpdate.py index 6d9967d8a..d1cf4a496 100644 --- a/examples/AccountUpdate.py +++ b/examples/AccountUpdate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/AccountVerify.py b/examples/AccountVerify.py index 8f82c9bb9..0e95fa2e4 100644 --- a/examples/AccountVerify.py +++ b/examples/AccountVerify.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/ApiAppCreate.py b/examples/ApiAppCreate.py index 8faa028ce..634057b35 100644 --- a/examples/ApiAppCreate.py +++ b/examples/ApiAppCreate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -24,7 +22,7 @@ primary_button_text_color="#ffffff", ) - custom_logo_file = open('./CustomLogoFile.png', 'rb') + custom_logo_file = open("./CustomLogoFile.png", "rb") data = models.ApiAppCreateRequest( name="My Production App", diff --git a/examples/ApiAppDelete.py b/examples/ApiAppDelete.py index fea1e0204..3733306cf 100644 --- a/examples/ApiAppDelete.py +++ b/examples/ApiAppDelete.py @@ -1,10 +1,8 @@ -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/ApiAppGet.py b/examples/ApiAppGet.py index 184701491..07330bf35 100644 --- a/examples/ApiAppGet.py +++ b/examples/ApiAppGet.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/ApiAppList.py b/examples/ApiAppList.py index 07f042ab7..6c6ada0c8 100644 --- a/examples/ApiAppList.py +++ b/examples/ApiAppList.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/ApiAppUpdate.py b/examples/ApiAppUpdate.py index 6085d2f63..97ea06561 100644 --- a/examples/ApiAppUpdate.py +++ b/examples/ApiAppUpdate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -19,7 +17,7 @@ primary_button_text_color="#ffffff", ) - custom_logo_file = open('./CustomLogoFile.png', 'rb') + custom_logo_file = open("./CustomLogoFile.png", "rb") data = models.ApiAppUpdateRequest( name="New Name", diff --git a/examples/BulkSendJobGet.py b/examples/BulkSendJobGet.py index 7095a3f9e..ed92e9751 100644 --- a/examples/BulkSendJobGet.py +++ b/examples/BulkSendJobGet.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/BulkSendJobList.py b/examples/BulkSendJobList.py index 1652ae04f..61bf5117f 100644 --- a/examples/BulkSendJobList.py +++ b/examples/BulkSendJobList.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/EmbeddedEditUrl.py b/examples/EmbeddedEditUrl.py index f46169918..dd657233d 100644 --- a/examples/EmbeddedEditUrl.py +++ b/examples/EmbeddedEditUrl.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/EmbeddedSignUrl.py b/examples/EmbeddedSignUrl.py index 0360eb373..64d5c20e1 100644 --- a/examples/EmbeddedSignUrl.py +++ b/examples/EmbeddedSignUrl.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/FaxLineAddUser.py b/examples/FaxLineAddUser.py index 49d362ccb..cf5eceaab 100644 --- a/examples/FaxLineAddUser.py +++ b/examples/FaxLineAddUser.py @@ -1,7 +1,6 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key diff --git a/examples/FaxLineAreaCodeGet.py b/examples/FaxLineAreaCodeGet.py index 8a4637352..f001c0267 100644 --- a/examples/FaxLineAreaCodeGet.py +++ b/examples/FaxLineAreaCodeGet.py @@ -1,7 +1,6 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key diff --git a/examples/FaxLineCreate.py b/examples/FaxLineCreate.py index 14ef9c97c..bcbd585ea 100644 --- a/examples/FaxLineCreate.py +++ b/examples/FaxLineCreate.py @@ -1,7 +1,6 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key diff --git a/examples/FaxLineDelete.py b/examples/FaxLineDelete.py index 7b828b01f..060303934 100644 --- a/examples/FaxLineDelete.py +++ b/examples/FaxLineDelete.py @@ -1,7 +1,6 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key diff --git a/examples/FaxLineGet.py b/examples/FaxLineGet.py index 3f66de9e7..f550474fa 100644 --- a/examples/FaxLineGet.py +++ b/examples/FaxLineGet.py @@ -1,7 +1,6 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key diff --git a/examples/FaxLineList.py b/examples/FaxLineList.py index 49cf69a59..f868cd43c 100644 --- a/examples/FaxLineList.py +++ b/examples/FaxLineList.py @@ -1,7 +1,6 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key diff --git a/examples/FaxLineRemoveUser.py b/examples/FaxLineRemoveUser.py index 4d8c19668..d6929502b 100644 --- a/examples/FaxLineRemoveUser.py +++ b/examples/FaxLineRemoveUser.py @@ -1,7 +1,6 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key diff --git a/examples/OauthTokenGenerate.py b/examples/OauthTokenGenerate.py index c8fd0bdd0..abe76c7e0 100644 --- a/examples/OauthTokenGenerate.py +++ b/examples/OauthTokenGenerate.py @@ -1,7 +1,6 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration() diff --git a/examples/OauthTokenRefresh.py b/examples/OauthTokenRefresh.py index 832bbafa0..fb6d5e36d 100644 --- a/examples/OauthTokenRefresh.py +++ b/examples/OauthTokenRefresh.py @@ -1,7 +1,6 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration() diff --git a/examples/ReportCreate.py b/examples/ReportCreate.py index 6a0cf7197..e736c4a77 100644 --- a/examples/ReportCreate.py +++ b/examples/ReportCreate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py index f898f9140..71bcd0bb5 100644 --- a/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py +++ b/examples/SignatureRequestBulkCreateEmbeddedWithTemplate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -64,7 +62,11 @@ ) try: - response = signature_request_api.signature_request_bulk_create_embedded_with_template(data) + response = ( + signature_request_api.signature_request_bulk_create_embedded_with_template( + data + ) + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestBulkSendWithTemplate.py b/examples/SignatureRequestBulkSendWithTemplate.py index 99a1262d9..f1206792d 100644 --- a/examples/SignatureRequestBulkSendWithTemplate.py +++ b/examples/SignatureRequestBulkSendWithTemplate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/SignatureRequestCancel.py b/examples/SignatureRequestCancel.py index d3dd551b0..5330623b6 100644 --- a/examples/SignatureRequestCancel.py +++ b/examples/SignatureRequestCancel.py @@ -1,10 +1,8 @@ -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/SignatureRequestCreateEmbedded.py b/examples/SignatureRequestCreateEmbedded.py index 4af3ec2c8..d35615c96 100644 --- a/examples/SignatureRequestCreateEmbedded.py +++ b/examples/SignatureRequestCreateEmbedded.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/SignatureRequestCreateEmbeddedWithTemplate.py b/examples/SignatureRequestCreateEmbeddedWithTemplate.py index 968326764..1b60db43c 100644 --- a/examples/SignatureRequestCreateEmbeddedWithTemplate.py +++ b/examples/SignatureRequestCreateEmbeddedWithTemplate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -39,7 +37,9 @@ ) try: - response = signature_request_api.signature_request_create_embedded_with_template(data) + response = ( + signature_request_api.signature_request_create_embedded_with_template(data) + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestEdit.py b/examples/SignatureRequestEdit.py index 6eb42cdf0..213bed8b4 100644 --- a/examples/SignatureRequestEdit.py +++ b/examples/SignatureRequestEdit.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -60,7 +58,9 @@ signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" try: - response = signature_request_api.signature_request_edit(signature_request_id, data) + response = signature_request_api.signature_request_edit( + signature_request_id, data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestEditEmbedded.py b/examples/SignatureRequestEditEmbedded.py index e8946066d..1bbac3c2e 100644 --- a/examples/SignatureRequestEditEmbedded.py +++ b/examples/SignatureRequestEditEmbedded.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -49,7 +47,9 @@ signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" try: - response = signature_request_api.signature_request_edit_embedded(signature_request_id, data) + response = signature_request_api.signature_request_edit_embedded( + signature_request_id, data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestEditEmbeddedWithTemplate.py b/examples/SignatureRequestEditEmbeddedWithTemplate.py index 55e147cf1..2e0be015e 100644 --- a/examples/SignatureRequestEditEmbeddedWithTemplate.py +++ b/examples/SignatureRequestEditEmbeddedWithTemplate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -41,7 +39,9 @@ signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" try: - response = signature_request_api.signature_request_edit_embedded_with_template(signature_request_id, data) + response = signature_request_api.signature_request_edit_embedded_with_template( + signature_request_id, data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestEditWithTemplate.py b/examples/SignatureRequestEditWithTemplate.py index d3ff4755a..399b51697 100644 --- a/examples/SignatureRequestEditWithTemplate.py +++ b/examples/SignatureRequestEditWithTemplate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -54,7 +52,9 @@ signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" try: - response = signature_request_api.signature_request_edit_with_template(signature_request_id, data) + response = signature_request_api.signature_request_edit_with_template( + signature_request_id, data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestFiles.py b/examples/SignatureRequestFiles.py index 800b2b098..1c32d32c4 100644 --- a/examples/SignatureRequestFiles.py +++ b/examples/SignatureRequestFiles.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -17,7 +15,9 @@ signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" try: - response = signature_request_api.signature_request_files(signature_request_id, file_type="pdf") - open('file_response.pdf', 'wb').write(response.read()) + response = signature_request_api.signature_request_files( + signature_request_id, file_type="pdf" + ) + open("file_response.pdf", "wb").write(response.read()) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestFilesAsDataUri.py b/examples/SignatureRequestFilesAsDataUri.py index 074a5494c..46bb01562 100644 --- a/examples/SignatureRequestFilesAsDataUri.py +++ b/examples/SignatureRequestFilesAsDataUri.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -17,7 +15,9 @@ signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" try: - response = signature_request_api.signature_request_files_as_data_uri(signature_request_id) + response = signature_request_api.signature_request_files_as_data_uri( + signature_request_id + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestFilesAsFileUrl.py b/examples/SignatureRequestFilesAsFileUrl.py index a9b778c0b..9c6a5da4f 100644 --- a/examples/SignatureRequestFilesAsFileUrl.py +++ b/examples/SignatureRequestFilesAsFileUrl.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -17,7 +15,9 @@ signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" try: - response = signature_request_api.signature_request_files_as_file_url(signature_request_id) + response = signature_request_api.signature_request_files_as_file_url( + signature_request_id + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestGet.py b/examples/SignatureRequestGet.py index f2c94978a..50d34099e 100644 --- a/examples/SignatureRequestGet.py +++ b/examples/SignatureRequestGet.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/SignatureRequestList.py b/examples/SignatureRequestList.py index 5a7a3987e..b35f92b06 100644 --- a/examples/SignatureRequestList.py +++ b/examples/SignatureRequestList.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/SignatureRequestReleaseHold.py b/examples/SignatureRequestReleaseHold.py index 23b4a94e2..4f6b26a0b 100644 --- a/examples/SignatureRequestReleaseHold.py +++ b/examples/SignatureRequestReleaseHold.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -17,7 +15,9 @@ signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" try: - response = signature_request_api.signature_request_release_hold(signature_request_id) + response = signature_request_api.signature_request_release_hold( + signature_request_id + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestRemind.py b/examples/SignatureRequestRemind.py index 2e70beb29..52d093fe8 100644 --- a/examples/SignatureRequestRemind.py +++ b/examples/SignatureRequestRemind.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -21,7 +19,9 @@ signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" try: - response = signature_request_api.signature_request_remind(signature_request_id, data) + response = signature_request_api.signature_request_remind( + signature_request_id, data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/SignatureRequestRemove.py b/examples/SignatureRequestRemove.py index 4bec2189c..0663bf869 100644 --- a/examples/SignatureRequestRemove.py +++ b/examples/SignatureRequestRemove.py @@ -1,10 +1,8 @@ -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/SignatureRequestSend.py b/examples/SignatureRequestSend.py index 8486f03ca..74a624e5d 100644 --- a/examples/SignatureRequestSend.py +++ b/examples/SignatureRequestSend.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/SignatureRequestSendWithTemplate.py b/examples/SignatureRequestSendWithTemplate.py index 8e18e8660..239036605 100644 --- a/examples/SignatureRequestSendWithTemplate.py +++ b/examples/SignatureRequestSendWithTemplate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/SignatureRequestUpdate.py b/examples/SignatureRequestUpdate.py index 856cfeecc..369000092 100644 --- a/examples/SignatureRequestUpdate.py +++ b/examples/SignatureRequestUpdate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -15,14 +13,16 @@ signature_request_api = apis.SignatureRequestApi(api_client) data = models.SignatureRequestUpdateRequest( - email_address = "john@example.com", - signature_id = "78caf2a1d01cd39cea2bc1cbb340dac3", + email_address="john@example.com", + signature_id="78caf2a1d01cd39cea2bc1cbb340dac3", ) signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" try: - response = signature_request_api.signature_request_update(signature_request_id, data) + response = signature_request_api.signature_request_update( + signature_request_id, data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TeamAddMember.py b/examples/TeamAddMember.py index f06cba705..67900f458 100644 --- a/examples/TeamAddMember.py +++ b/examples/TeamAddMember.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TeamCreate.py b/examples/TeamCreate.py index 6c5c4d8ba..4c1384681 100644 --- a/examples/TeamCreate.py +++ b/examples/TeamCreate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TeamDelete.py b/examples/TeamDelete.py index 3c2d46415..9548749c7 100644 --- a/examples/TeamDelete.py +++ b/examples/TeamDelete.py @@ -1,10 +1,8 @@ -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TeamGet.py b/examples/TeamGet.py index 6b268a4c0..7272e46f3 100644 --- a/examples/TeamGet.py +++ b/examples/TeamGet.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TeamInfo.py b/examples/TeamInfo.py index 78bcfe4d9..fe54802bc 100644 --- a/examples/TeamInfo.py +++ b/examples/TeamInfo.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TeamInvites.py b/examples/TeamInvites.py index ffc5ede80..898e64187 100644 --- a/examples/TeamInvites.py +++ b/examples/TeamInvites.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TeamMembers.py b/examples/TeamMembers.py index d2e4ae060..ed27ca884 100644 --- a/examples/TeamMembers.py +++ b/examples/TeamMembers.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TeamRemoveMember.py b/examples/TeamRemoveMember.py index 236e44dee..5dfe5b0bf 100644 --- a/examples/TeamRemoveMember.py +++ b/examples/TeamRemoveMember.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TeamSubTeams.py b/examples/TeamSubTeams.py index 02ea1680f..d6f7dc183 100644 --- a/examples/TeamSubTeams.py +++ b/examples/TeamSubTeams.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TeamUpdate.py b/examples/TeamUpdate.py index 4e4221b01..b89ef1135 100644 --- a/examples/TeamUpdate.py +++ b/examples/TeamUpdate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TemplateAddUser.py b/examples/TemplateAddUser.py index 165e8253d..5476f8e8b 100644 --- a/examples/TemplateAddUser.py +++ b/examples/TemplateAddUser.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TemplateCreate.py b/examples/TemplateCreate.py index f9eaedd02..cb7b60e51 100644 --- a/examples/TemplateCreate.py +++ b/examples/TemplateCreate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TemplateCreateEmbeddedDraft.py b/examples/TemplateCreateEmbeddedDraft.py index 6e4655bf8..9b49f037c 100644 --- a/examples/TemplateCreateEmbeddedDraft.py +++ b/examples/TemplateCreateEmbeddedDraft.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TemplateDelete.py b/examples/TemplateDelete.py index b09138120..c87622efa 100644 --- a/examples/TemplateDelete.py +++ b/examples/TemplateDelete.py @@ -1,10 +1,8 @@ -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TemplateFiles.py b/examples/TemplateFiles.py index 9ce1a3c5b..59874bc61 100644 --- a/examples/TemplateFiles.py +++ b/examples/TemplateFiles.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -18,6 +16,6 @@ try: response = template_api.template_files(template_id, file_type="pdf") - open('file_response.pdf', 'wb').write(response.read()) + open("file_response.pdf", "wb").write(response.read()) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/TemplateFilesAsDataUri.py b/examples/TemplateFilesAsDataUri.py index 4aa7755ce..9dbc44e4a 100644 --- a/examples/TemplateFilesAsDataUri.py +++ b/examples/TemplateFilesAsDataUri.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TemplateFilesAsFileUrl.py b/examples/TemplateFilesAsFileUrl.py index 595fe4041..c1a8da3a7 100644 --- a/examples/TemplateFilesAsFileUrl.py +++ b/examples/TemplateFilesAsFileUrl.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TemplateGet.py b/examples/TemplateGet.py index 93f05f5ee..1c41b3649 100644 --- a/examples/TemplateGet.py +++ b/examples/TemplateGet.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TemplateList.py b/examples/TemplateList.py index 1f30e615d..4ce779ffe 100644 --- a/examples/TemplateList.py +++ b/examples/TemplateList.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TemplateRemoveUser.py b/examples/TemplateRemoveUser.py index 492325468..c16c4b001 100644 --- a/examples/TemplateRemoveUser.py +++ b/examples/TemplateRemoveUser.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/TemplateUpdateFiles.py b/examples/TemplateUpdateFiles.py index 0612af3e7..341af5020 100644 --- a/examples/TemplateUpdateFiles.py +++ b/examples/TemplateUpdateFiles.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/UnclaimedDraftCreate.py b/examples/UnclaimedDraftCreate.py index f631246b1..3ae301624 100644 --- a/examples/UnclaimedDraftCreate.py +++ b/examples/UnclaimedDraftCreate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/UnclaimedDraftCreateEmbedded.py b/examples/UnclaimedDraftCreateEmbedded.py index 3cb545469..a5f260c23 100644 --- a/examples/UnclaimedDraftCreateEmbedded.py +++ b/examples/UnclaimedDraftCreateEmbedded.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.py b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.py index f7810b31c..c4122b185 100644 --- a/examples/UnclaimedDraftCreateEmbeddedWithTemplate.py +++ b/examples/UnclaimedDraftCreateEmbeddedWithTemplate.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -35,7 +33,9 @@ ) try: - response = unclaimed_draft_api.unclaimed_draft_create_embedded_with_template(data) + response = unclaimed_draft_api.unclaimed_draft_create_embedded_with_template( + data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/examples/UnclaimedDraftEditAndResend.py b/examples/UnclaimedDraftEditAndResend.py index d08a3ccb9..bbcad88ff 100644 --- a/examples/UnclaimedDraftEditAndResend.py +++ b/examples/UnclaimedDraftEditAndResend.py @@ -1,12 +1,10 @@ from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -22,7 +20,9 @@ signature_request_id = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f" try: - response = unclaimed_draft_api.unclaimed_draft_edit_and_resend(signature_request_id, data) + response = unclaimed_draft_api.unclaimed_draft_edit_and_resend( + signature_request_id, data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/sdks/python/README.md b/sdks/python/README.md index 8d7552d8c..15be18ce8 100644 --- a/sdks/python/README.md +++ b/sdks/python/README.md @@ -71,13 +71,11 @@ Please follow the [installation procedure](#installation--usage) and then run th ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/sdks/python/docs/AccountApi.md b/sdks/python/docs/AccountApi.md index 77358441b..ce6cc0f36 100644 --- a/sdks/python/docs/AccountApi.md +++ b/sdks/python/docs/AccountApi.md @@ -25,13 +25,11 @@ Creates a new Dropbox Sign Account that is associated with the specified `email_ ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -94,13 +92,11 @@ Returns the properties and settings of your Account. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -160,13 +156,11 @@ Updates the properties and settings of your Account. Currently only allows for u ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -229,13 +223,11 @@ Verifies whether an Dropbox Sign Account exists for the given email address. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/sdks/python/docs/ApiAppApi.md b/sdks/python/docs/ApiAppApi.md index 024551288..9b982da37 100644 --- a/sdks/python/docs/ApiAppApi.md +++ b/sdks/python/docs/ApiAppApi.md @@ -26,13 +26,11 @@ Creates a new API App. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -50,7 +48,7 @@ with ApiClient(configuration) as api_client: primary_button_text_color="#ffffff", ) - custom_logo_file = open('./CustomLogoFile.png', 'rb') + custom_logo_file = open("./CustomLogoFile.png", "rb") data = models.ApiAppCreateRequest( name="My Production App", @@ -109,13 +107,11 @@ Deletes an API App. Can only be invoked for apps you own. * Bearer (JWT) Authentication (oauth2): ```python -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -175,13 +171,11 @@ Returns an object with information about an API App. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -242,13 +236,11 @@ Returns a list of API Apps that are accessible by you. If you are on a team with ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -314,13 +306,11 @@ Updates an existing API App. Can only be invoked for apps you own. Only the fiel ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -333,7 +323,7 @@ with ApiClient(configuration) as api_client: primary_button_text_color="#ffffff", ) - custom_logo_file = open('./CustomLogoFile.png', 'rb') + custom_logo_file = open("./CustomLogoFile.png", "rb") data = models.ApiAppUpdateRequest( name="New Name", diff --git a/sdks/python/docs/BulkSendJobApi.md b/sdks/python/docs/BulkSendJobApi.md index fce689b6a..cfff86e43 100644 --- a/sdks/python/docs/BulkSendJobApi.md +++ b/sdks/python/docs/BulkSendJobApi.md @@ -23,13 +23,11 @@ Returns the status of the BulkSendJob and its SignatureRequests specified by the ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -92,13 +90,11 @@ Returns a list of BulkSendJob that you can access. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/sdks/python/docs/EmbeddedApi.md b/sdks/python/docs/EmbeddedApi.md index c581d1470..9de8a573e 100644 --- a/sdks/python/docs/EmbeddedApi.md +++ b/sdks/python/docs/EmbeddedApi.md @@ -23,13 +23,11 @@ Retrieves an embedded object containing a template url that can be opened in an ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -96,13 +94,11 @@ Retrieves an embedded object containing a signature url that can be opened in an ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/sdks/python/docs/FaxLineApi.md b/sdks/python/docs/FaxLineApi.md index e9260af67..27ec4d08b 100644 --- a/sdks/python/docs/FaxLineApi.md +++ b/sdks/python/docs/FaxLineApi.md @@ -27,8 +27,7 @@ Grants a user access to the specified Fax Line. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key @@ -93,8 +92,7 @@ Returns a response with the area codes available for a given state/provice and c ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key @@ -157,8 +155,7 @@ Purchases a new Fax Line. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key @@ -223,8 +220,7 @@ Deletes the specified Fax Line from the subscription. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key @@ -287,8 +283,7 @@ Returns the properties and settings of a Fax Line. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key @@ -348,8 +343,7 @@ Returns the properties and settings of multiple Fax Lines. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key @@ -412,8 +406,7 @@ Removes a user's access to the specified Fax Line. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key diff --git a/sdks/python/docs/OAuthApi.md b/sdks/python/docs/OAuthApi.md index 2f0dcee0c..969109c45 100644 --- a/sdks/python/docs/OAuthApi.md +++ b/sdks/python/docs/OAuthApi.md @@ -21,8 +21,7 @@ Once you have retrieved the code from the user callback, you will need to exchan ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration() @@ -84,8 +83,7 @@ Access tokens are only valid for a given period of time (typically one hour) for ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration() diff --git a/sdks/python/docs/ReportApi.md b/sdks/python/docs/ReportApi.md index 66643f8db..022e0c32b 100644 --- a/sdks/python/docs/ReportApi.md +++ b/sdks/python/docs/ReportApi.md @@ -21,13 +21,11 @@ Request the creation of one or more report(s). When the report(s) have been gen ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/sdks/python/docs/SignatureRequestApi.md b/sdks/python/docs/SignatureRequestApi.md index fc770bc72..a4554ef44 100644 --- a/sdks/python/docs/SignatureRequestApi.md +++ b/sdks/python/docs/SignatureRequestApi.md @@ -36,13 +36,11 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -100,7 +98,11 @@ with ApiClient(configuration) as api_client: ) try: - response = signature_request_api.signature_request_bulk_create_embedded_with_template(data) + response = ( + signature_request_api.signature_request_bulk_create_embedded_with_template( + data + ) + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) @@ -150,13 +152,11 @@ Creates BulkSendJob which sends up to 250 SignatureRequests in bulk based off of ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -261,13 +261,11 @@ Cancels an incomplete signature request. This action is **not reversible**. The * Bearer (JWT) Authentication (oauth2): ```python -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -327,13 +325,11 @@ Creates a new SignatureRequest with the submitted documents to be signed in an e ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -424,13 +420,11 @@ Creates a new SignatureRequest based on the given Template(s) to be signed in an ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -463,7 +457,9 @@ with ApiClient(configuration) as api_client: ) try: - response = signature_request_api.signature_request_create_embedded_with_template(data) + response = ( + signature_request_api.signature_request_create_embedded_with_template(data) + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) @@ -513,13 +509,11 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -530,8 +524,10 @@ with ApiClient(configuration) as api_client: signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" try: - response = signature_request_api.signature_request_files(signature_request_id, file_type="pdf") - open('file_response.pdf', 'wb').write(response.read()) + response = signature_request_api.signature_request_files( + signature_request_id, file_type="pdf" + ) + open("file_response.pdf", "wb").write(response.read()) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) @@ -581,13 +577,11 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -598,7 +592,9 @@ with ApiClient(configuration) as api_client: signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" try: - response = signature_request_api.signature_request_files_as_data_uri(signature_request_id) + response = signature_request_api.signature_request_files_as_data_uri( + signature_request_id + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) @@ -648,13 +644,11 @@ Obtain a copy of the current documents specified by the `signature_request_id` p ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -665,7 +659,9 @@ with ApiClient(configuration) as api_client: signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" try: - response = signature_request_api.signature_request_files_as_file_url(signature_request_id) + response = signature_request_api.signature_request_files_as_file_url( + signature_request_id + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) @@ -716,13 +712,11 @@ Returns the status of the SignatureRequest specified by the `signature_request_i ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -783,13 +777,11 @@ Returns a list of SignatureRequests that you can access. This includes Signature ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -857,13 +849,11 @@ Releases a held SignatureRequest that was claimed and prepared from an [Unclaime ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -874,7 +864,9 @@ with ApiClient(configuration) as api_client: signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" try: - response = signature_request_api.signature_request_release_hold(signature_request_id) + response = signature_request_api.signature_request_release_hold( + signature_request_id + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) @@ -924,13 +916,11 @@ Sends an email to the signer reminding them to sign the signature request. You c ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -945,7 +935,9 @@ with ApiClient(configuration) as api_client: signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" try: - response = signature_request_api.signature_request_remind(signature_request_id, data) + response = signature_request_api.signature_request_remind( + signature_request_id, data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) @@ -993,13 +985,11 @@ Removes your access to a completed signature request. This action is **not rever * Basic Authentication (api_key): ```python -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -1059,13 +1049,11 @@ Creates and sends a new SignatureRequest with the submitted documents. If `form_ ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -1167,13 +1155,11 @@ Creates and sends a new SignatureRequest based off of the Template(s) specified ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -1269,13 +1255,11 @@ Updates the email address and/or the name for a given signer on a signature requ ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -1284,14 +1268,16 @@ with ApiClient(configuration) as api_client: signature_request_api = apis.SignatureRequestApi(api_client) data = models.SignatureRequestUpdateRequest( - email_address = "john@example.com", - signature_id = "78caf2a1d01cd39cea2bc1cbb340dac3", + email_address="john@example.com", + signature_id="78caf2a1d01cd39cea2bc1cbb340dac3", ) signature_request_id = "2f9781e1a8e2045224d808c153c2e1d3df6f8f2f" try: - response = signature_request_api.signature_request_update(signature_request_id, data) + response = signature_request_api.signature_request_update( + signature_request_id, data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/sdks/python/docs/TeamApi.md b/sdks/python/docs/TeamApi.md index d2cda32fa..34b61523a 100644 --- a/sdks/python/docs/TeamApi.md +++ b/sdks/python/docs/TeamApi.md @@ -31,13 +31,11 @@ Invites a user (specified using the `email_address` parameter) to your Team. If ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -101,13 +99,11 @@ Creates a new Team and makes you a member. You must not currently belong to a Te ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -168,13 +164,11 @@ Deletes your Team. Can only be invoked when you have a Team with only one member * Bearer (JWT) Authentication (oauth2): ```python -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -230,13 +224,11 @@ Returns information about your Team as well as a list of its members. If you do ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -293,13 +285,11 @@ Provides information about a team. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -358,13 +348,11 @@ Provides a list of team invites (and their roles). ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -425,13 +413,11 @@ Provides a paginated list of members (and their roles) that belong to a given te ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -494,13 +480,11 @@ Removes the provided user Account from your Team. If the Account had an outstand ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -564,13 +548,11 @@ Provides a paginated list of sub teams that belong to a given team. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -633,13 +615,11 @@ Updates the name of your Team. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/sdks/python/docs/TemplateApi.md b/sdks/python/docs/TemplateApi.md index 787b5ef55..9adb98a8a 100644 --- a/sdks/python/docs/TemplateApi.md +++ b/sdks/python/docs/TemplateApi.md @@ -32,13 +32,11 @@ Gives the specified Account access to the specified Template. The specified Acco ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -104,13 +102,11 @@ Creates a template that can then be used. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -206,13 +202,11 @@ The first step in an embedded template workflow. Creates a draft template that c ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -306,13 +300,11 @@ Completely deletes the template specified from the account. * Bearer (JWT) Authentication (oauth2): ```python -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -372,13 +364,11 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -390,7 +380,7 @@ with ApiClient(configuration) as api_client: try: response = template_api.template_files(template_id, file_type="pdf") - open('file_response.pdf', 'wb').write(response.read()) + open("file_response.pdf", "wb").write(response.read()) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) @@ -440,13 +430,11 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -507,13 +495,11 @@ Obtain a copy of the current documents specified by the `template_id` parameter. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -575,13 +561,11 @@ Returns the Template specified by the `template_id` parameter. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -642,13 +626,11 @@ Returns a list of the Templates that are accessible by you. Take a look at our ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis +from dropbox_sign import ApiClient, ApiException, Configuration, apis configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -714,13 +696,11 @@ Removes the specified Account's access to the specified Template. ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -786,13 +766,11 @@ Overlays a new file with the overlay of an existing template. The new file(s) mu ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) diff --git a/sdks/python/docs/UnclaimedDraftApi.md b/sdks/python/docs/UnclaimedDraftApi.md index 03e8228fb..4ed79a34d 100644 --- a/sdks/python/docs/UnclaimedDraftApi.md +++ b/sdks/python/docs/UnclaimedDraftApi.md @@ -25,13 +25,11 @@ Creates a new Draft that can be claimed using the claim URL. The first authentic ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -133,13 +131,11 @@ Creates a new Draft that can be claimed and used in an embedded iFrame. The firs ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -205,13 +201,11 @@ Creates a new Draft with a previously saved template(s) that can be claimed and ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -240,7 +234,9 @@ with ApiClient(configuration) as api_client: ) try: - response = unclaimed_draft_api.unclaimed_draft_create_embedded_with_template(data) + response = unclaimed_draft_api.unclaimed_draft_create_embedded_with_template( + data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) @@ -290,13 +286,11 @@ Creates a new signature request from an embedded request that can be edited prio ```python from pprint import pprint -from dropbox_sign import \ - ApiClient, ApiException, Configuration, apis, models +from dropbox_sign import ApiClient, ApiException, Configuration, apis, models configuration = Configuration( # Configure HTTP basic authorization: api_key username="YOUR_API_KEY", - # or, configure Bearer (JWT) authorization: oauth2 # access_token="YOUR_ACCESS_TOKEN", ) @@ -312,7 +306,9 @@ with ApiClient(configuration) as api_client: signature_request_id = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f" try: - response = unclaimed_draft_api.unclaimed_draft_edit_and_resend(signature_request_id, data) + response = unclaimed_draft_api.unclaimed_draft_edit_and_resend( + signature_request_id, data + ) pprint(response) except ApiException as e: print("Exception when calling Dropbox Sign API: %s\n" % e) diff --git a/sdks/python/dropbox_sign/__init__.py b/sdks/python/dropbox_sign/__init__.py index c8eb4dc5d..15adf1c8d 100644 --- a/sdks/python/dropbox_sign/__init__.py +++ b/sdks/python/dropbox_sign/__init__.py @@ -41,36 +41,58 @@ from dropbox_sign.models.account_update_request import AccountUpdateRequest from dropbox_sign.models.account_verify_request import AccountVerifyRequest from dropbox_sign.models.account_verify_response import AccountVerifyResponse -from dropbox_sign.models.account_verify_response_account import AccountVerifyResponseAccount +from dropbox_sign.models.account_verify_response_account import ( + AccountVerifyResponseAccount, +) from dropbox_sign.models.api_app_create_request import ApiAppCreateRequest from dropbox_sign.models.api_app_get_response import ApiAppGetResponse from dropbox_sign.models.api_app_list_response import ApiAppListResponse from dropbox_sign.models.api_app_response import ApiAppResponse from dropbox_sign.models.api_app_response_o_auth import ApiAppResponseOAuth from dropbox_sign.models.api_app_response_options import ApiAppResponseOptions -from dropbox_sign.models.api_app_response_owner_account import ApiAppResponseOwnerAccount -from dropbox_sign.models.api_app_response_white_labeling_options import ApiAppResponseWhiteLabelingOptions +from dropbox_sign.models.api_app_response_owner_account import ( + ApiAppResponseOwnerAccount, +) +from dropbox_sign.models.api_app_response_white_labeling_options import ( + ApiAppResponseWhiteLabelingOptions, +) from dropbox_sign.models.api_app_update_request import ApiAppUpdateRequest from dropbox_sign.models.bulk_send_job_get_response import BulkSendJobGetResponse -from dropbox_sign.models.bulk_send_job_get_response_signature_requests import BulkSendJobGetResponseSignatureRequests +from dropbox_sign.models.bulk_send_job_get_response_signature_requests import ( + BulkSendJobGetResponseSignatureRequests, +) from dropbox_sign.models.bulk_send_job_list_response import BulkSendJobListResponse from dropbox_sign.models.bulk_send_job_response import BulkSendJobResponse from dropbox_sign.models.bulk_send_job_send_response import BulkSendJobSendResponse from dropbox_sign.models.embedded_edit_url_request import EmbeddedEditUrlRequest from dropbox_sign.models.embedded_edit_url_response import EmbeddedEditUrlResponse -from dropbox_sign.models.embedded_edit_url_response_embedded import EmbeddedEditUrlResponseEmbedded +from dropbox_sign.models.embedded_edit_url_response_embedded import ( + EmbeddedEditUrlResponseEmbedded, +) from dropbox_sign.models.embedded_sign_url_response import EmbeddedSignUrlResponse -from dropbox_sign.models.embedded_sign_url_response_embedded import EmbeddedSignUrlResponseEmbedded +from dropbox_sign.models.embedded_sign_url_response_embedded import ( + EmbeddedSignUrlResponseEmbedded, +) from dropbox_sign.models.error_response import ErrorResponse from dropbox_sign.models.error_response_error import ErrorResponseError from dropbox_sign.models.event_callback_request import EventCallbackRequest from dropbox_sign.models.event_callback_request_event import EventCallbackRequestEvent -from dropbox_sign.models.event_callback_request_event_metadata import EventCallbackRequestEventMetadata +from dropbox_sign.models.event_callback_request_event_metadata import ( + EventCallbackRequestEventMetadata, +) from dropbox_sign.models.fax_line_add_user_request import FaxLineAddUserRequest -from dropbox_sign.models.fax_line_area_code_get_country_enum import FaxLineAreaCodeGetCountryEnum -from dropbox_sign.models.fax_line_area_code_get_province_enum import FaxLineAreaCodeGetProvinceEnum -from dropbox_sign.models.fax_line_area_code_get_response import FaxLineAreaCodeGetResponse -from dropbox_sign.models.fax_line_area_code_get_state_enum import FaxLineAreaCodeGetStateEnum +from dropbox_sign.models.fax_line_area_code_get_country_enum import ( + FaxLineAreaCodeGetCountryEnum, +) +from dropbox_sign.models.fax_line_area_code_get_province_enum import ( + FaxLineAreaCodeGetProvinceEnum, +) +from dropbox_sign.models.fax_line_area_code_get_response import ( + FaxLineAreaCodeGetResponse, +) +from dropbox_sign.models.fax_line_area_code_get_state_enum import ( + FaxLineAreaCodeGetStateEnum, +) from dropbox_sign.models.fax_line_create_request import FaxLineCreateRequest from dropbox_sign.models.fax_line_delete_request import FaxLineDeleteRequest from dropbox_sign.models.fax_line_list_response import FaxLineListResponse @@ -86,37 +108,93 @@ from dropbox_sign.models.report_create_request import ReportCreateRequest from dropbox_sign.models.report_create_response import ReportCreateResponse from dropbox_sign.models.report_response import ReportResponse -from dropbox_sign.models.signature_request_bulk_create_embedded_with_template_request import SignatureRequestBulkCreateEmbeddedWithTemplateRequest -from dropbox_sign.models.signature_request_bulk_send_with_template_request import SignatureRequestBulkSendWithTemplateRequest -from dropbox_sign.models.signature_request_create_embedded_request import SignatureRequestCreateEmbeddedRequest -from dropbox_sign.models.signature_request_create_embedded_with_template_request import SignatureRequestCreateEmbeddedWithTemplateRequest -from dropbox_sign.models.signature_request_get_response import SignatureRequestGetResponse -from dropbox_sign.models.signature_request_list_response import SignatureRequestListResponse -from dropbox_sign.models.signature_request_remind_request import SignatureRequestRemindRequest +from dropbox_sign.models.signature_request_bulk_create_embedded_with_template_request import ( + SignatureRequestBulkCreateEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.signature_request_bulk_send_with_template_request import ( + SignatureRequestBulkSendWithTemplateRequest, +) +from dropbox_sign.models.signature_request_create_embedded_request import ( + SignatureRequestCreateEmbeddedRequest, +) +from dropbox_sign.models.signature_request_create_embedded_with_template_request import ( + SignatureRequestCreateEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.signature_request_get_response import ( + SignatureRequestGetResponse, +) +from dropbox_sign.models.signature_request_list_response import ( + SignatureRequestListResponse, +) +from dropbox_sign.models.signature_request_remind_request import ( + SignatureRequestRemindRequest, +) from dropbox_sign.models.signature_request_response import SignatureRequestResponse -from dropbox_sign.models.signature_request_response_attachment import SignatureRequestResponseAttachment -from dropbox_sign.models.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase -from dropbox_sign.models.signature_request_response_custom_field_checkbox import SignatureRequestResponseCustomFieldCheckbox -from dropbox_sign.models.signature_request_response_custom_field_text import SignatureRequestResponseCustomFieldText -from dropbox_sign.models.signature_request_response_custom_field_type_enum import SignatureRequestResponseCustomFieldTypeEnum -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase -from dropbox_sign.models.signature_request_response_data_type_enum import SignatureRequestResponseDataTypeEnum -from dropbox_sign.models.signature_request_response_data_value_checkbox import SignatureRequestResponseDataValueCheckbox -from dropbox_sign.models.signature_request_response_data_value_checkbox_merge import SignatureRequestResponseDataValueCheckboxMerge -from dropbox_sign.models.signature_request_response_data_value_date_signed import SignatureRequestResponseDataValueDateSigned -from dropbox_sign.models.signature_request_response_data_value_dropdown import SignatureRequestResponseDataValueDropdown -from dropbox_sign.models.signature_request_response_data_value_initials import SignatureRequestResponseDataValueInitials -from dropbox_sign.models.signature_request_response_data_value_radio import SignatureRequestResponseDataValueRadio -from dropbox_sign.models.signature_request_response_data_value_signature import SignatureRequestResponseDataValueSignature -from dropbox_sign.models.signature_request_response_data_value_text import SignatureRequestResponseDataValueText -from dropbox_sign.models.signature_request_response_data_value_text_merge import SignatureRequestResponseDataValueTextMerge -from dropbox_sign.models.signature_request_response_signatures import SignatureRequestResponseSignatures -from dropbox_sign.models.signature_request_send_request import SignatureRequestSendRequest -from dropbox_sign.models.signature_request_send_with_template_request import SignatureRequestSendWithTemplateRequest -from dropbox_sign.models.signature_request_update_request import SignatureRequestUpdateRequest +from dropbox_sign.models.signature_request_response_attachment import ( + SignatureRequestResponseAttachment, +) +from dropbox_sign.models.signature_request_response_custom_field_base import ( + SignatureRequestResponseCustomFieldBase, +) +from dropbox_sign.models.signature_request_response_custom_field_checkbox import ( + SignatureRequestResponseCustomFieldCheckbox, +) +from dropbox_sign.models.signature_request_response_custom_field_text import ( + SignatureRequestResponseCustomFieldText, +) +from dropbox_sign.models.signature_request_response_custom_field_type_enum import ( + SignatureRequestResponseCustomFieldTypeEnum, +) +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) +from dropbox_sign.models.signature_request_response_data_type_enum import ( + SignatureRequestResponseDataTypeEnum, +) +from dropbox_sign.models.signature_request_response_data_value_checkbox import ( + SignatureRequestResponseDataValueCheckbox, +) +from dropbox_sign.models.signature_request_response_data_value_checkbox_merge import ( + SignatureRequestResponseDataValueCheckboxMerge, +) +from dropbox_sign.models.signature_request_response_data_value_date_signed import ( + SignatureRequestResponseDataValueDateSigned, +) +from dropbox_sign.models.signature_request_response_data_value_dropdown import ( + SignatureRequestResponseDataValueDropdown, +) +from dropbox_sign.models.signature_request_response_data_value_initials import ( + SignatureRequestResponseDataValueInitials, +) +from dropbox_sign.models.signature_request_response_data_value_radio import ( + SignatureRequestResponseDataValueRadio, +) +from dropbox_sign.models.signature_request_response_data_value_signature import ( + SignatureRequestResponseDataValueSignature, +) +from dropbox_sign.models.signature_request_response_data_value_text import ( + SignatureRequestResponseDataValueText, +) +from dropbox_sign.models.signature_request_response_data_value_text_merge import ( + SignatureRequestResponseDataValueTextMerge, +) +from dropbox_sign.models.signature_request_response_signatures import ( + SignatureRequestResponseSignatures, +) +from dropbox_sign.models.signature_request_send_request import ( + SignatureRequestSendRequest, +) +from dropbox_sign.models.signature_request_send_with_template_request import ( + SignatureRequestSendWithTemplateRequest, +) +from dropbox_sign.models.signature_request_update_request import ( + SignatureRequestUpdateRequest, +) from dropbox_sign.models.sub_attachment import SubAttachment from dropbox_sign.models.sub_bulk_signer_list import SubBulkSignerList -from dropbox_sign.models.sub_bulk_signer_list_custom_field import SubBulkSignerListCustomField +from dropbox_sign.models.sub_bulk_signer_list_custom_field import ( + SubBulkSignerListCustomField, +) from dropbox_sign.models.sub_cc import SubCC from dropbox_sign.models.sub_custom_field import SubCustomField from dropbox_sign.models.sub_editor_options import SubEditorOptions @@ -125,30 +203,62 @@ from dropbox_sign.models.sub_form_field_rule import SubFormFieldRule from dropbox_sign.models.sub_form_field_rule_action import SubFormFieldRuleAction from dropbox_sign.models.sub_form_field_rule_trigger import SubFormFieldRuleTrigger -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase -from dropbox_sign.models.sub_form_fields_per_document_checkbox import SubFormFieldsPerDocumentCheckbox -from dropbox_sign.models.sub_form_fields_per_document_checkbox_merge import SubFormFieldsPerDocumentCheckboxMerge -from dropbox_sign.models.sub_form_fields_per_document_date_signed import SubFormFieldsPerDocumentDateSigned -from dropbox_sign.models.sub_form_fields_per_document_dropdown import SubFormFieldsPerDocumentDropdown -from dropbox_sign.models.sub_form_fields_per_document_font_enum import SubFormFieldsPerDocumentFontEnum -from dropbox_sign.models.sub_form_fields_per_document_hyperlink import SubFormFieldsPerDocumentHyperlink -from dropbox_sign.models.sub_form_fields_per_document_initials import SubFormFieldsPerDocumentInitials -from dropbox_sign.models.sub_form_fields_per_document_radio import SubFormFieldsPerDocumentRadio -from dropbox_sign.models.sub_form_fields_per_document_signature import SubFormFieldsPerDocumentSignature -from dropbox_sign.models.sub_form_fields_per_document_text import SubFormFieldsPerDocumentText -from dropbox_sign.models.sub_form_fields_per_document_text_merge import SubFormFieldsPerDocumentTextMerge -from dropbox_sign.models.sub_form_fields_per_document_type_enum import SubFormFieldsPerDocumentTypeEnum +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) +from dropbox_sign.models.sub_form_fields_per_document_checkbox import ( + SubFormFieldsPerDocumentCheckbox, +) +from dropbox_sign.models.sub_form_fields_per_document_checkbox_merge import ( + SubFormFieldsPerDocumentCheckboxMerge, +) +from dropbox_sign.models.sub_form_fields_per_document_date_signed import ( + SubFormFieldsPerDocumentDateSigned, +) +from dropbox_sign.models.sub_form_fields_per_document_dropdown import ( + SubFormFieldsPerDocumentDropdown, +) +from dropbox_sign.models.sub_form_fields_per_document_font_enum import ( + SubFormFieldsPerDocumentFontEnum, +) +from dropbox_sign.models.sub_form_fields_per_document_hyperlink import ( + SubFormFieldsPerDocumentHyperlink, +) +from dropbox_sign.models.sub_form_fields_per_document_initials import ( + SubFormFieldsPerDocumentInitials, +) +from dropbox_sign.models.sub_form_fields_per_document_radio import ( + SubFormFieldsPerDocumentRadio, +) +from dropbox_sign.models.sub_form_fields_per_document_signature import ( + SubFormFieldsPerDocumentSignature, +) +from dropbox_sign.models.sub_form_fields_per_document_text import ( + SubFormFieldsPerDocumentText, +) +from dropbox_sign.models.sub_form_fields_per_document_text_merge import ( + SubFormFieldsPerDocumentTextMerge, +) +from dropbox_sign.models.sub_form_fields_per_document_type_enum import ( + SubFormFieldsPerDocumentTypeEnum, +) from dropbox_sign.models.sub_merge_field import SubMergeField from dropbox_sign.models.sub_o_auth import SubOAuth from dropbox_sign.models.sub_options import SubOptions -from dropbox_sign.models.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners +from dropbox_sign.models.sub_signature_request_grouped_signers import ( + SubSignatureRequestGroupedSigners, +) from dropbox_sign.models.sub_signature_request_signer import SubSignatureRequestSigner -from dropbox_sign.models.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner +from dropbox_sign.models.sub_signature_request_template_signer import ( + SubSignatureRequestTemplateSigner, +) from dropbox_sign.models.sub_signing_options import SubSigningOptions from dropbox_sign.models.sub_team_response import SubTeamResponse from dropbox_sign.models.sub_template_role import SubTemplateRole from dropbox_sign.models.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner -from dropbox_sign.models.sub_unclaimed_draft_template_signer import SubUnclaimedDraftTemplateSigner +from dropbox_sign.models.sub_unclaimed_draft_template_signer import ( + SubUnclaimedDraftTemplateSigner, +) from dropbox_sign.models.sub_white_labeling_options import SubWhiteLabelingOptions from dropbox_sign.models.team_add_member_request import TeamAddMemberRequest from dropbox_sign.models.team_create_request import TeamCreateRequest @@ -165,54 +275,126 @@ from dropbox_sign.models.team_sub_teams_response import TeamSubTeamsResponse from dropbox_sign.models.team_update_request import TeamUpdateRequest from dropbox_sign.models.template_add_user_request import TemplateAddUserRequest -from dropbox_sign.models.template_create_embedded_draft_request import TemplateCreateEmbeddedDraftRequest -from dropbox_sign.models.template_create_embedded_draft_response import TemplateCreateEmbeddedDraftResponse -from dropbox_sign.models.template_create_embedded_draft_response_template import TemplateCreateEmbeddedDraftResponseTemplate +from dropbox_sign.models.template_create_embedded_draft_request import ( + TemplateCreateEmbeddedDraftRequest, +) +from dropbox_sign.models.template_create_embedded_draft_response import ( + TemplateCreateEmbeddedDraftResponse, +) +from dropbox_sign.models.template_create_embedded_draft_response_template import ( + TemplateCreateEmbeddedDraftResponseTemplate, +) from dropbox_sign.models.template_create_request import TemplateCreateRequest from dropbox_sign.models.template_create_response import TemplateCreateResponse -from dropbox_sign.models.template_create_response_template import TemplateCreateResponseTemplate +from dropbox_sign.models.template_create_response_template import ( + TemplateCreateResponseTemplate, +) from dropbox_sign.models.template_edit_response import TemplateEditResponse from dropbox_sign.models.template_get_response import TemplateGetResponse from dropbox_sign.models.template_list_response import TemplateListResponse from dropbox_sign.models.template_remove_user_request import TemplateRemoveUserRequest from dropbox_sign.models.template_response import TemplateResponse from dropbox_sign.models.template_response_account import TemplateResponseAccount -from dropbox_sign.models.template_response_account_quota import TemplateResponseAccountQuota +from dropbox_sign.models.template_response_account_quota import ( + TemplateResponseAccountQuota, +) from dropbox_sign.models.template_response_cc_role import TemplateResponseCCRole from dropbox_sign.models.template_response_document import TemplateResponseDocument -from dropbox_sign.models.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase -from dropbox_sign.models.template_response_document_custom_field_checkbox import TemplateResponseDocumentCustomFieldCheckbox -from dropbox_sign.models.template_response_document_custom_field_text import TemplateResponseDocumentCustomFieldText -from dropbox_sign.models.template_response_document_field_group import TemplateResponseDocumentFieldGroup -from dropbox_sign.models.template_response_document_field_group_rule import TemplateResponseDocumentFieldGroupRule -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase -from dropbox_sign.models.template_response_document_form_field_checkbox import TemplateResponseDocumentFormFieldCheckbox -from dropbox_sign.models.template_response_document_form_field_date_signed import TemplateResponseDocumentFormFieldDateSigned -from dropbox_sign.models.template_response_document_form_field_dropdown import TemplateResponseDocumentFormFieldDropdown -from dropbox_sign.models.template_response_document_form_field_hyperlink import TemplateResponseDocumentFormFieldHyperlink -from dropbox_sign.models.template_response_document_form_field_initials import TemplateResponseDocumentFormFieldInitials -from dropbox_sign.models.template_response_document_form_field_radio import TemplateResponseDocumentFormFieldRadio -from dropbox_sign.models.template_response_document_form_field_signature import TemplateResponseDocumentFormFieldSignature -from dropbox_sign.models.template_response_document_form_field_text import TemplateResponseDocumentFormFieldText -from dropbox_sign.models.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase -from dropbox_sign.models.template_response_document_static_field_checkbox import TemplateResponseDocumentStaticFieldCheckbox -from dropbox_sign.models.template_response_document_static_field_date_signed import TemplateResponseDocumentStaticFieldDateSigned -from dropbox_sign.models.template_response_document_static_field_dropdown import TemplateResponseDocumentStaticFieldDropdown -from dropbox_sign.models.template_response_document_static_field_hyperlink import TemplateResponseDocumentStaticFieldHyperlink -from dropbox_sign.models.template_response_document_static_field_initials import TemplateResponseDocumentStaticFieldInitials -from dropbox_sign.models.template_response_document_static_field_radio import TemplateResponseDocumentStaticFieldRadio -from dropbox_sign.models.template_response_document_static_field_signature import TemplateResponseDocumentStaticFieldSignature -from dropbox_sign.models.template_response_document_static_field_text import TemplateResponseDocumentStaticFieldText -from dropbox_sign.models.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength +from dropbox_sign.models.template_response_document_custom_field_base import ( + TemplateResponseDocumentCustomFieldBase, +) +from dropbox_sign.models.template_response_document_custom_field_checkbox import ( + TemplateResponseDocumentCustomFieldCheckbox, +) +from dropbox_sign.models.template_response_document_custom_field_text import ( + TemplateResponseDocumentCustomFieldText, +) +from dropbox_sign.models.template_response_document_field_group import ( + TemplateResponseDocumentFieldGroup, +) +from dropbox_sign.models.template_response_document_field_group_rule import ( + TemplateResponseDocumentFieldGroupRule, +) +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) +from dropbox_sign.models.template_response_document_form_field_checkbox import ( + TemplateResponseDocumentFormFieldCheckbox, +) +from dropbox_sign.models.template_response_document_form_field_date_signed import ( + TemplateResponseDocumentFormFieldDateSigned, +) +from dropbox_sign.models.template_response_document_form_field_dropdown import ( + TemplateResponseDocumentFormFieldDropdown, +) +from dropbox_sign.models.template_response_document_form_field_hyperlink import ( + TemplateResponseDocumentFormFieldHyperlink, +) +from dropbox_sign.models.template_response_document_form_field_initials import ( + TemplateResponseDocumentFormFieldInitials, +) +from dropbox_sign.models.template_response_document_form_field_radio import ( + TemplateResponseDocumentFormFieldRadio, +) +from dropbox_sign.models.template_response_document_form_field_signature import ( + TemplateResponseDocumentFormFieldSignature, +) +from dropbox_sign.models.template_response_document_form_field_text import ( + TemplateResponseDocumentFormFieldText, +) +from dropbox_sign.models.template_response_document_static_field_base import ( + TemplateResponseDocumentStaticFieldBase, +) +from dropbox_sign.models.template_response_document_static_field_checkbox import ( + TemplateResponseDocumentStaticFieldCheckbox, +) +from dropbox_sign.models.template_response_document_static_field_date_signed import ( + TemplateResponseDocumentStaticFieldDateSigned, +) +from dropbox_sign.models.template_response_document_static_field_dropdown import ( + TemplateResponseDocumentStaticFieldDropdown, +) +from dropbox_sign.models.template_response_document_static_field_hyperlink import ( + TemplateResponseDocumentStaticFieldHyperlink, +) +from dropbox_sign.models.template_response_document_static_field_initials import ( + TemplateResponseDocumentStaticFieldInitials, +) +from dropbox_sign.models.template_response_document_static_field_radio import ( + TemplateResponseDocumentStaticFieldRadio, +) +from dropbox_sign.models.template_response_document_static_field_signature import ( + TemplateResponseDocumentStaticFieldSignature, +) +from dropbox_sign.models.template_response_document_static_field_text import ( + TemplateResponseDocumentStaticFieldText, +) +from dropbox_sign.models.template_response_field_avg_text_length import ( + TemplateResponseFieldAvgTextLength, +) from dropbox_sign.models.template_response_signer_role import TemplateResponseSignerRole from dropbox_sign.models.template_update_files_request import TemplateUpdateFilesRequest -from dropbox_sign.models.template_update_files_response import TemplateUpdateFilesResponse -from dropbox_sign.models.template_update_files_response_template import TemplateUpdateFilesResponseTemplate -from dropbox_sign.models.unclaimed_draft_create_embedded_request import UnclaimedDraftCreateEmbeddedRequest -from dropbox_sign.models.unclaimed_draft_create_embedded_with_template_request import UnclaimedDraftCreateEmbeddedWithTemplateRequest -from dropbox_sign.models.unclaimed_draft_create_request import UnclaimedDraftCreateRequest -from dropbox_sign.models.unclaimed_draft_create_response import UnclaimedDraftCreateResponse -from dropbox_sign.models.unclaimed_draft_edit_and_resend_request import UnclaimedDraftEditAndResendRequest +from dropbox_sign.models.template_update_files_response import ( + TemplateUpdateFilesResponse, +) +from dropbox_sign.models.template_update_files_response_template import ( + TemplateUpdateFilesResponseTemplate, +) +from dropbox_sign.models.unclaimed_draft_create_embedded_request import ( + UnclaimedDraftCreateEmbeddedRequest, +) +from dropbox_sign.models.unclaimed_draft_create_embedded_with_template_request import ( + UnclaimedDraftCreateEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.unclaimed_draft_create_request import ( + UnclaimedDraftCreateRequest, +) +from dropbox_sign.models.unclaimed_draft_create_response import ( + UnclaimedDraftCreateResponse, +) +from dropbox_sign.models.unclaimed_draft_edit_and_resend_request import ( + UnclaimedDraftEditAndResendRequest, +) from dropbox_sign.models.unclaimed_draft_response import UnclaimedDraftResponse from dropbox_sign.models.warning_response import WarningResponse from dropbox_sign.event_callback_helper import EventCallbackHelper diff --git a/sdks/python/dropbox_sign/api/__init__.py b/sdks/python/dropbox_sign/api/__init__.py index 05f20926a..c861b688e 100644 --- a/sdks/python/dropbox_sign/api/__init__.py +++ b/sdks/python/dropbox_sign/api/__init__.py @@ -12,4 +12,3 @@ from dropbox_sign.api.team_api import TeamApi from dropbox_sign.api.template_api import TemplateApi from dropbox_sign.api.unclaimed_draft_api import UnclaimedDraftApi - diff --git a/sdks/python/dropbox_sign/api/account_api.py b/sdks/python/dropbox_sign/api/account_api.py index f4cb4dca5..b3e5ce952 100644 --- a/sdks/python/dropbox_sign/api/account_api.py +++ b/sdks/python/dropbox_sign/api/account_api.py @@ -45,7 +45,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def account_create( self, @@ -54,9 +53,8 @@ def account_create( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -89,23 +87,22 @@ def account_create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_create_serialize( account_create_request=account_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountCreateResponse", - '4XX': "ErrorResponse", + "200": "AccountCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -113,7 +110,6 @@ def account_create( response_types_map=_response_types_map, ).data - @validate_call def account_create_with_http_info( self, @@ -122,9 +118,8 @@ def account_create_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -157,23 +152,22 @@ def account_create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_create_serialize( account_create_request=account_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountCreateResponse", - '4XX': "ErrorResponse", + "200": "AccountCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -181,7 +175,6 @@ def account_create_with_http_info( response_types_map=_response_types_map, ) - @validate_call def account_create_without_preload_content( self, @@ -190,9 +183,8 @@ def account_create_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -225,27 +217,25 @@ def account_create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_create_serialize( account_create_request=account_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountCreateResponse", - '4XX': "ErrorResponse", + "200": "AccountCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _account_create_serialize( self, account_create_request, @@ -257,8 +247,7 @@ def _account_create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -282,7 +271,7 @@ def _account_create_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -297,38 +286,28 @@ def _account_create_serialize( if account_create_request is not None and has_files is False: _body_params = account_create_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/account/create', + method="POST", + resource_path="/account/create", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -338,24 +317,30 @@ def _account_create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def account_get( self, - account_id: Annotated[Optional[StrictStr], Field(description="`account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account.")] = None, - email_address: Annotated[Optional[StrictStr], Field(description="`account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account.")] = None, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="`account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account." + ), + ] = None, + email_address: Annotated[ + Optional[StrictStr], + Field( + description="`account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -390,7 +375,7 @@ def account_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_get_serialize( account_id=account_id, @@ -398,16 +383,15 @@ def account_get( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountGetResponse", - '4XX': "ErrorResponse", + "200": "AccountGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -415,19 +399,27 @@ def account_get( response_types_map=_response_types_map, ).data - @validate_call def account_get_with_http_info( self, - account_id: Annotated[Optional[StrictStr], Field(description="`account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account.")] = None, - email_address: Annotated[Optional[StrictStr], Field(description="`account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account.")] = None, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="`account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account." + ), + ] = None, + email_address: Annotated[ + Optional[StrictStr], + Field( + description="`account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -462,7 +454,7 @@ def account_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_get_serialize( account_id=account_id, @@ -470,16 +462,15 @@ def account_get_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountGetResponse", - '4XX': "ErrorResponse", + "200": "AccountGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -487,19 +478,27 @@ def account_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def account_get_without_preload_content( self, - account_id: Annotated[Optional[StrictStr], Field(description="`account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account.")] = None, - email_address: Annotated[Optional[StrictStr], Field(description="`account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account.")] = None, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="`account_id` or `email_address` is required. If both are provided, the account id prevails. The ID of the Account." + ), + ] = None, + email_address: Annotated[ + Optional[StrictStr], + Field( + description="`account_id` or `email_address` is required, If both are provided, the account id prevails. The email address of the Account." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -534,7 +533,7 @@ def account_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_get_serialize( account_id=account_id, @@ -542,20 +541,18 @@ def account_get_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountGetResponse", - '4XX': "ErrorResponse", + "200": "AccountGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _account_get_serialize( self, account_id, @@ -568,8 +565,7 @@ def _account_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -581,36 +577,29 @@ def _account_get_serialize( # process the path parameters # process the query parameters if account_id is not None: - - _query_params.append(('account_id', account_id)) - + + _query_params.append(("account_id", account_id)) + if email_address is not None: - - _query_params.append(('email_address', email_address)) - + + _query_params.append(("email_address", email_address)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/account', + method="GET", + resource_path="/account", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -620,12 +609,9 @@ def _account_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def account_update( self, @@ -634,9 +620,8 @@ def account_update( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -669,23 +654,22 @@ def account_update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_update_serialize( account_update_request=account_update_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountGetResponse", - '4XX': "ErrorResponse", + "200": "AccountGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -693,7 +677,6 @@ def account_update( response_types_map=_response_types_map, ).data - @validate_call def account_update_with_http_info( self, @@ -702,9 +685,8 @@ def account_update_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -737,23 +719,22 @@ def account_update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_update_serialize( account_update_request=account_update_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountGetResponse", - '4XX': "ErrorResponse", + "200": "AccountGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -761,7 +742,6 @@ def account_update_with_http_info( response_types_map=_response_types_map, ) - @validate_call def account_update_without_preload_content( self, @@ -770,9 +750,8 @@ def account_update_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -805,27 +784,25 @@ def account_update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_update_serialize( account_update_request=account_update_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountGetResponse", - '4XX': "ErrorResponse", + "200": "AccountGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _account_update_serialize( self, account_update_request, @@ -837,8 +814,7 @@ def _account_update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -862,7 +838,7 @@ def _account_update_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -877,38 +853,28 @@ def _account_update_serialize( if account_update_request is not None and has_files is False: _body_params = account_update_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='PUT', - resource_path='/account', + method="PUT", + resource_path="/account", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -918,12 +884,9 @@ def _account_update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def account_verify( self, @@ -932,9 +895,8 @@ def account_verify( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -967,23 +929,22 @@ def account_verify( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_verify_serialize( account_verify_request=account_verify_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountVerifyResponse", - '4XX': "ErrorResponse", + "200": "AccountVerifyResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -991,7 +952,6 @@ def account_verify( response_types_map=_response_types_map, ).data - @validate_call def account_verify_with_http_info( self, @@ -1000,9 +960,8 @@ def account_verify_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1035,23 +994,22 @@ def account_verify_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_verify_serialize( account_verify_request=account_verify_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountVerifyResponse", - '4XX': "ErrorResponse", + "200": "AccountVerifyResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1059,7 +1017,6 @@ def account_verify_with_http_info( response_types_map=_response_types_map, ) - @validate_call def account_verify_without_preload_content( self, @@ -1068,9 +1025,8 @@ def account_verify_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1103,27 +1059,25 @@ def account_verify_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._account_verify_serialize( account_verify_request=account_verify_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountVerifyResponse", - '4XX': "ErrorResponse", + "200": "AccountVerifyResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _account_verify_serialize( self, account_verify_request, @@ -1135,8 +1089,7 @@ def _account_verify_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1160,7 +1113,7 @@ def _account_verify_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -1175,38 +1128,28 @@ def _account_verify_serialize( if account_verify_request is not None and has_files is False: _body_params = account_verify_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/account/verify', + method="POST", + resource_path="/account/verify", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1216,7 +1159,5 @@ def _account_verify_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/sdks/python/dropbox_sign/api/api_app_api.py b/sdks/python/dropbox_sign/api/api_app_api.py index ab502c58b..93752b164 100644 --- a/sdks/python/dropbox_sign/api/api_app_api.py +++ b/sdks/python/dropbox_sign/api/api_app_api.py @@ -43,7 +43,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def api_app_create( self, @@ -52,9 +51,8 @@ def api_app_create( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -87,23 +85,22 @@ def api_app_create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_create_serialize( api_app_create_request=api_app_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiAppGetResponse", - '4XX': "ErrorResponse", + "201": "ApiAppGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -111,7 +108,6 @@ def api_app_create( response_types_map=_response_types_map, ).data - @validate_call def api_app_create_with_http_info( self, @@ -120,9 +116,8 @@ def api_app_create_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -155,23 +150,22 @@ def api_app_create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_create_serialize( api_app_create_request=api_app_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiAppGetResponse", - '4XX': "ErrorResponse", + "201": "ApiAppGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -179,7 +173,6 @@ def api_app_create_with_http_info( response_types_map=_response_types_map, ) - @validate_call def api_app_create_without_preload_content( self, @@ -188,9 +181,8 @@ def api_app_create_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -223,27 +215,25 @@ def api_app_create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_create_serialize( api_app_create_request=api_app_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "ApiAppGetResponse", - '4XX': "ErrorResponse", + "201": "ApiAppGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _api_app_create_serialize( self, api_app_create_request, @@ -255,8 +245,7 @@ def _api_app_create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -280,7 +269,7 @@ def _api_app_create_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -295,39 +284,28 @@ def _api_app_create_serialize( if api_app_create_request is not None and has_files is False: _body_params = api_app_create_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/api_app', + method="POST", + resource_path="/api_app", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -337,23 +315,21 @@ def _api_app_create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def api_app_delete( self, - client_id: Annotated[StrictStr, Field(description="The client id of the API App to delete.")], + client_id: Annotated[ + StrictStr, Field(description="The client id of the API App to delete.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -386,23 +362,22 @@ def api_app_delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_delete_serialize( client_id=client_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '4XX': "ErrorResponse", + "204": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -410,18 +385,18 @@ def api_app_delete( response_types_map=_response_types_map, ).data - @validate_call def api_app_delete_with_http_info( self, - client_id: Annotated[StrictStr, Field(description="The client id of the API App to delete.")], + client_id: Annotated[ + StrictStr, Field(description="The client id of the API App to delete.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -454,23 +429,22 @@ def api_app_delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_delete_serialize( client_id=client_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '4XX': "ErrorResponse", + "204": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -478,18 +452,18 @@ def api_app_delete_with_http_info( response_types_map=_response_types_map, ) - @validate_call def api_app_delete_without_preload_content( self, - client_id: Annotated[StrictStr, Field(description="The client id of the API App to delete.")], + client_id: Annotated[ + StrictStr, Field(description="The client id of the API App to delete.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -522,27 +496,25 @@ def api_app_delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_delete_serialize( client_id=client_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '4XX': "ErrorResponse", + "204": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _api_app_delete_serialize( self, client_id, @@ -554,8 +526,7 @@ def _api_app_delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -566,31 +537,24 @@ def _api_app_delete_serialize( # process the path parameters if client_id is not None: - _path_params['client_id'] = client_id + _path_params["client_id"] = client_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/api_app/{client_id}', + method="DELETE", + resource_path="/api_app/{client_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -600,23 +564,21 @@ def _api_app_delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def api_app_get( self, - client_id: Annotated[StrictStr, Field(description="The client id of the API App to retrieve.")], + client_id: Annotated[ + StrictStr, Field(description="The client id of the API App to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -649,23 +611,22 @@ def api_app_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_get_serialize( client_id=client_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiAppGetResponse", - '4XX': "ErrorResponse", + "200": "ApiAppGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -673,18 +634,18 @@ def api_app_get( response_types_map=_response_types_map, ).data - @validate_call def api_app_get_with_http_info( self, - client_id: Annotated[StrictStr, Field(description="The client id of the API App to retrieve.")], + client_id: Annotated[ + StrictStr, Field(description="The client id of the API App to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -717,23 +678,22 @@ def api_app_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_get_serialize( client_id=client_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiAppGetResponse", - '4XX': "ErrorResponse", + "200": "ApiAppGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -741,18 +701,18 @@ def api_app_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def api_app_get_without_preload_content( self, - client_id: Annotated[StrictStr, Field(description="The client id of the API App to retrieve.")], + client_id: Annotated[ + StrictStr, Field(description="The client id of the API App to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -785,27 +745,25 @@ def api_app_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_get_serialize( client_id=client_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiAppGetResponse", - '4XX': "ErrorResponse", + "200": "ApiAppGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _api_app_get_serialize( self, client_id, @@ -817,8 +775,7 @@ def _api_app_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -829,31 +786,24 @@ def _api_app_get_serialize( # process the path parameters if client_id is not None: - _path_params['client_id'] = client_id + _path_params["client_id"] = client_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/api_app/{client_id}', + method="GET", + resource_path="/api_app/{client_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -863,24 +813,30 @@ def _api_app_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def api_app_list( self, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the API App List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the API App List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -915,7 +871,7 @@ def api_app_list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_list_serialize( page=page, @@ -923,16 +879,15 @@ def api_app_list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiAppListResponse", - '4XX': "ErrorResponse", + "200": "ApiAppListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -940,19 +895,27 @@ def api_app_list( response_types_map=_response_types_map, ).data - @validate_call def api_app_list_with_http_info( self, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the API App List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the API App List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -987,7 +950,7 @@ def api_app_list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_list_serialize( page=page, @@ -995,16 +958,15 @@ def api_app_list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiAppListResponse", - '4XX': "ErrorResponse", + "200": "ApiAppListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1012,19 +974,27 @@ def api_app_list_with_http_info( response_types_map=_response_types_map, ) - @validate_call def api_app_list_without_preload_content( self, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the API App List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the API App List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1059,7 +1029,7 @@ def api_app_list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_list_serialize( page=page, @@ -1067,20 +1037,18 @@ def api_app_list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiAppListResponse", - '4XX': "ErrorResponse", + "200": "ApiAppListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _api_app_list_serialize( self, page, @@ -1093,8 +1061,7 @@ def _api_app_list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1106,36 +1073,29 @@ def _api_app_list_serialize( # process the path parameters # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/api_app/list', + method="GET", + resource_path="/api_app/list", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1145,24 +1105,22 @@ def _api_app_list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def api_app_update( self, - client_id: Annotated[StrictStr, Field(description="The client id of the API App to update.")], + client_id: Annotated[ + StrictStr, Field(description="The client id of the API App to update.") + ], api_app_update_request: ApiAppUpdateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1197,7 +1155,7 @@ def api_app_update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_update_serialize( client_id=client_id, @@ -1205,16 +1163,15 @@ def api_app_update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiAppGetResponse", - '4XX': "ErrorResponse", + "200": "ApiAppGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1222,19 +1179,19 @@ def api_app_update( response_types_map=_response_types_map, ).data - @validate_call def api_app_update_with_http_info( self, - client_id: Annotated[StrictStr, Field(description="The client id of the API App to update.")], + client_id: Annotated[ + StrictStr, Field(description="The client id of the API App to update.") + ], api_app_update_request: ApiAppUpdateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1269,7 +1226,7 @@ def api_app_update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_update_serialize( client_id=client_id, @@ -1277,16 +1234,15 @@ def api_app_update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiAppGetResponse", - '4XX': "ErrorResponse", + "200": "ApiAppGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1294,19 +1250,19 @@ def api_app_update_with_http_info( response_types_map=_response_types_map, ) - @validate_call def api_app_update_without_preload_content( self, - client_id: Annotated[StrictStr, Field(description="The client id of the API App to update.")], + client_id: Annotated[ + StrictStr, Field(description="The client id of the API App to update.") + ], api_app_update_request: ApiAppUpdateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1341,7 +1297,7 @@ def api_app_update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._api_app_update_serialize( client_id=client_id, @@ -1349,20 +1305,18 @@ def api_app_update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ApiAppGetResponse", - '4XX': "ErrorResponse", + "200": "ApiAppGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _api_app_update_serialize( self, client_id, @@ -1375,8 +1329,7 @@ def _api_app_update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1400,7 +1353,7 @@ def _api_app_update_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -1409,7 +1362,7 @@ def _api_app_update_serialize( # process the path parameters if client_id is not None: - _path_params['client_id'] = client_id + _path_params["client_id"] = client_id # process the query parameters # process the header parameters # process the form parameters @@ -1417,39 +1370,28 @@ def _api_app_update_serialize( if api_app_update_request is not None and has_files is False: _body_params = api_app_update_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='PUT', - resource_path='/api_app/{client_id}', + method="PUT", + resource_path="/api_app/{client_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1459,7 +1401,5 @@ def _api_app_update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/sdks/python/dropbox_sign/api/bulk_send_job_api.py b/sdks/python/dropbox_sign/api/bulk_send_job_api.py index 8bb2a4386..e53401b86 100644 --- a/sdks/python/dropbox_sign/api/bulk_send_job_api.py +++ b/sdks/python/dropbox_sign/api/bulk_send_job_api.py @@ -41,20 +41,30 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def bulk_send_job_get( self, - bulk_send_job_id: Annotated[StrictStr, Field(description="The id of the BulkSendJob to retrieve.")], - page: Annotated[Optional[StrictInt], Field(description="Which page number of the BulkSendJob list to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20.")] = None, + bulk_send_job_id: Annotated[ + StrictStr, Field(description="The id of the BulkSendJob to retrieve.") + ], + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the BulkSendJob list to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -91,7 +101,7 @@ def bulk_send_job_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._bulk_send_job_get_serialize( bulk_send_job_id=bulk_send_job_id, @@ -100,16 +110,15 @@ def bulk_send_job_get( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobGetResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -117,20 +126,30 @@ def bulk_send_job_get( response_types_map=_response_types_map, ).data - @validate_call def bulk_send_job_get_with_http_info( self, - bulk_send_job_id: Annotated[StrictStr, Field(description="The id of the BulkSendJob to retrieve.")], - page: Annotated[Optional[StrictInt], Field(description="Which page number of the BulkSendJob list to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20.")] = None, + bulk_send_job_id: Annotated[ + StrictStr, Field(description="The id of the BulkSendJob to retrieve.") + ], + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the BulkSendJob list to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -167,7 +186,7 @@ def bulk_send_job_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._bulk_send_job_get_serialize( bulk_send_job_id=bulk_send_job_id, @@ -176,16 +195,15 @@ def bulk_send_job_get_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobGetResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -193,20 +211,30 @@ def bulk_send_job_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def bulk_send_job_get_without_preload_content( self, - bulk_send_job_id: Annotated[StrictStr, Field(description="The id of the BulkSendJob to retrieve.")], - page: Annotated[Optional[StrictInt], Field(description="Which page number of the BulkSendJob list to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20.")] = None, + bulk_send_job_id: Annotated[ + StrictStr, Field(description="The id of the BulkSendJob to retrieve.") + ], + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the BulkSendJob list to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -243,7 +271,7 @@ def bulk_send_job_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._bulk_send_job_get_serialize( bulk_send_job_id=bulk_send_job_id, @@ -252,20 +280,18 @@ def bulk_send_job_get_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobGetResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _bulk_send_job_get_serialize( self, bulk_send_job_id, @@ -279,8 +305,7 @@ def _bulk_send_job_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -291,39 +316,32 @@ def _bulk_send_job_get_serialize( # process the path parameters if bulk_send_job_id is not None: - _path_params['bulk_send_job_id'] = bulk_send_job_id + _path_params["bulk_send_job_id"] = bulk_send_job_id # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/bulk_send_job/{bulk_send_job_id}', + method="GET", + resource_path="/bulk_send_job/{bulk_send_job_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -333,24 +351,30 @@ def _bulk_send_job_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def bulk_send_job_list( self, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the BulkSendJob List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20.")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the BulkSendJob List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -385,7 +409,7 @@ def bulk_send_job_list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._bulk_send_job_list_serialize( page=page, @@ -393,16 +417,15 @@ def bulk_send_job_list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobListResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -410,19 +433,27 @@ def bulk_send_job_list( response_types_map=_response_types_map, ).data - @validate_call def bulk_send_job_list_with_http_info( self, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the BulkSendJob List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20.")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the BulkSendJob List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -457,7 +488,7 @@ def bulk_send_job_list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._bulk_send_job_list_serialize( page=page, @@ -465,16 +496,15 @@ def bulk_send_job_list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobListResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -482,19 +512,27 @@ def bulk_send_job_list_with_http_info( response_types_map=_response_types_map, ) - @validate_call def bulk_send_job_list_without_preload_content( self, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the BulkSendJob List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20.")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the BulkSendJob List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is 20." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -529,7 +567,7 @@ def bulk_send_job_list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._bulk_send_job_list_serialize( page=page, @@ -537,20 +575,18 @@ def bulk_send_job_list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobListResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _bulk_send_job_list_serialize( self, page, @@ -563,8 +599,7 @@ def _bulk_send_job_list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -576,36 +611,29 @@ def _bulk_send_job_list_serialize( # process the path parameters # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/bulk_send_job/list', + method="GET", + resource_path="/bulk_send_job/list", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -615,7 +643,5 @@ def _bulk_send_job_list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/sdks/python/dropbox_sign/api/embedded_api.py b/sdks/python/dropbox_sign/api/embedded_api.py index 8d9f6237e..fcb839f34 100644 --- a/sdks/python/dropbox_sign/api/embedded_api.py +++ b/sdks/python/dropbox_sign/api/embedded_api.py @@ -41,19 +41,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def embedded_edit_url( self, - template_id: Annotated[StrictStr, Field(description="The id of the template to edit.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the template to edit.") + ], embedded_edit_url_request: EmbeddedEditUrlRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -88,7 +88,7 @@ def embedded_edit_url( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._embedded_edit_url_serialize( template_id=template_id, @@ -96,16 +96,15 @@ def embedded_edit_url( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EmbeddedEditUrlResponse", - '4XX': "ErrorResponse", + "200": "EmbeddedEditUrlResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -113,19 +112,19 @@ def embedded_edit_url( response_types_map=_response_types_map, ).data - @validate_call def embedded_edit_url_with_http_info( self, - template_id: Annotated[StrictStr, Field(description="The id of the template to edit.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the template to edit.") + ], embedded_edit_url_request: EmbeddedEditUrlRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -160,7 +159,7 @@ def embedded_edit_url_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._embedded_edit_url_serialize( template_id=template_id, @@ -168,16 +167,15 @@ def embedded_edit_url_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EmbeddedEditUrlResponse", - '4XX': "ErrorResponse", + "200": "EmbeddedEditUrlResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -185,19 +183,19 @@ def embedded_edit_url_with_http_info( response_types_map=_response_types_map, ) - @validate_call def embedded_edit_url_without_preload_content( self, - template_id: Annotated[StrictStr, Field(description="The id of the template to edit.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the template to edit.") + ], embedded_edit_url_request: EmbeddedEditUrlRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -232,7 +230,7 @@ def embedded_edit_url_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._embedded_edit_url_serialize( template_id=template_id, @@ -240,20 +238,18 @@ def embedded_edit_url_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EmbeddedEditUrlResponse", - '4XX': "ErrorResponse", + "200": "EmbeddedEditUrlResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _embedded_edit_url_serialize( self, template_id, @@ -266,8 +262,7 @@ def _embedded_edit_url_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -291,7 +286,7 @@ def _embedded_edit_url_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -300,7 +295,7 @@ def _embedded_edit_url_serialize( # process the path parameters if template_id is not None: - _path_params['template_id'] = template_id + _path_params["template_id"] = template_id # process the query parameters # process the header parameters # process the form parameters @@ -308,38 +303,28 @@ def _embedded_edit_url_serialize( if embedded_edit_url_request is not None and has_files is False: _body_params = embedded_edit_url_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/embedded/edit_url/{template_id}', + method="POST", + resource_path="/embedded/edit_url/{template_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -349,23 +334,22 @@ def _embedded_edit_url_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def embedded_sign_url( self, - signature_id: Annotated[StrictStr, Field(description="The id of the signature to get a signature url for.")], + signature_id: Annotated[ + StrictStr, + Field(description="The id of the signature to get a signature url for."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -398,23 +382,22 @@ def embedded_sign_url( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._embedded_sign_url_serialize( signature_id=signature_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EmbeddedSignUrlResponse", - '4XX': "ErrorResponse", + "200": "EmbeddedSignUrlResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -422,18 +405,19 @@ def embedded_sign_url( response_types_map=_response_types_map, ).data - @validate_call def embedded_sign_url_with_http_info( self, - signature_id: Annotated[StrictStr, Field(description="The id of the signature to get a signature url for.")], + signature_id: Annotated[ + StrictStr, + Field(description="The id of the signature to get a signature url for."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -466,23 +450,22 @@ def embedded_sign_url_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._embedded_sign_url_serialize( signature_id=signature_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EmbeddedSignUrlResponse", - '4XX': "ErrorResponse", + "200": "EmbeddedSignUrlResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -490,18 +473,19 @@ def embedded_sign_url_with_http_info( response_types_map=_response_types_map, ) - @validate_call def embedded_sign_url_without_preload_content( self, - signature_id: Annotated[StrictStr, Field(description="The id of the signature to get a signature url for.")], + signature_id: Annotated[ + StrictStr, + Field(description="The id of the signature to get a signature url for."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -534,27 +518,25 @@ def embedded_sign_url_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._embedded_sign_url_serialize( signature_id=signature_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "EmbeddedSignUrlResponse", - '4XX': "ErrorResponse", + "200": "EmbeddedSignUrlResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _embedded_sign_url_serialize( self, signature_id, @@ -566,8 +548,7 @@ def _embedded_sign_url_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -578,31 +559,24 @@ def _embedded_sign_url_serialize( # process the path parameters if signature_id is not None: - _path_params['signature_id'] = signature_id + _path_params["signature_id"] = signature_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/embedded/sign_url/{signature_id}', + method="GET", + resource_path="/embedded/sign_url/{signature_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -612,7 +586,5 @@ def _embedded_sign_url_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/sdks/python/dropbox_sign/api/fax_line_api.py b/sdks/python/dropbox_sign/api/fax_line_api.py index 5d9aa8809..2fbb5ac99 100644 --- a/sdks/python/dropbox_sign/api/fax_line_api.py +++ b/sdks/python/dropbox_sign/api/fax_line_api.py @@ -21,7 +21,9 @@ from typing import Optional from typing_extensions import Annotated from dropbox_sign.models.fax_line_add_user_request import FaxLineAddUserRequest -from dropbox_sign.models.fax_line_area_code_get_response import FaxLineAreaCodeGetResponse +from dropbox_sign.models.fax_line_area_code_get_response import ( + FaxLineAreaCodeGetResponse, +) from dropbox_sign.models.fax_line_create_request import FaxLineCreateRequest from dropbox_sign.models.fax_line_delete_request import FaxLineDeleteRequest from dropbox_sign.models.fax_line_list_response import FaxLineListResponse @@ -46,7 +48,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def fax_line_add_user( self, @@ -55,9 +56,8 @@ def fax_line_add_user( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -90,23 +90,22 @@ def fax_line_add_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_add_user_serialize( fax_line_add_user_request=fax_line_add_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -114,7 +113,6 @@ def fax_line_add_user( response_types_map=_response_types_map, ).data - @validate_call def fax_line_add_user_with_http_info( self, @@ -123,9 +121,8 @@ def fax_line_add_user_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -158,23 +155,22 @@ def fax_line_add_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_add_user_serialize( fax_line_add_user_request=fax_line_add_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -182,7 +178,6 @@ def fax_line_add_user_with_http_info( response_types_map=_response_types_map, ) - @validate_call def fax_line_add_user_without_preload_content( self, @@ -191,9 +186,8 @@ def fax_line_add_user_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -226,27 +220,25 @@ def fax_line_add_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_add_user_serialize( fax_line_add_user_request=fax_line_add_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _fax_line_add_user_serialize( self, fax_line_add_user_request, @@ -258,8 +250,7 @@ def _fax_line_add_user_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -283,7 +274,7 @@ def _fax_line_add_user_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -298,37 +289,28 @@ def _fax_line_add_user_serialize( if fax_line_add_user_request is not None and has_files is False: _body_params = fax_line_add_user_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key' - ] + _auth_settings: List[str] = ["api_key"] return self.api_client.param_serialize( - method='PUT', - resource_path='/fax_line/add_user', + method="PUT", + resource_path="/fax_line/add_user", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -338,26 +320,30 @@ def _fax_line_add_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def fax_line_area_code_get( self, - country: Annotated[StrictStr, Field(description="Filter area codes by country.")], - state: Annotated[Optional[StrictStr], Field(description="Filter area codes by state.")] = None, - province: Annotated[Optional[StrictStr], Field(description="Filter area codes by province.")] = None, - city: Annotated[Optional[StrictStr], Field(description="Filter area codes by city.")] = None, + country: Annotated[ + StrictStr, Field(description="Filter area codes by country.") + ], + state: Annotated[ + Optional[StrictStr], Field(description="Filter area codes by state.") + ] = None, + province: Annotated[ + Optional[StrictStr], Field(description="Filter area codes by province.") + ] = None, + city: Annotated[ + Optional[StrictStr], Field(description="Filter area codes by city.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -396,7 +382,7 @@ def fax_line_area_code_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_area_code_get_serialize( country=country, @@ -406,16 +392,15 @@ def fax_line_area_code_get( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineAreaCodeGetResponse", - '4XX': "ErrorResponse", + "200": "FaxLineAreaCodeGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -423,21 +408,27 @@ def fax_line_area_code_get( response_types_map=_response_types_map, ).data - @validate_call def fax_line_area_code_get_with_http_info( self, - country: Annotated[StrictStr, Field(description="Filter area codes by country.")], - state: Annotated[Optional[StrictStr], Field(description="Filter area codes by state.")] = None, - province: Annotated[Optional[StrictStr], Field(description="Filter area codes by province.")] = None, - city: Annotated[Optional[StrictStr], Field(description="Filter area codes by city.")] = None, + country: Annotated[ + StrictStr, Field(description="Filter area codes by country.") + ], + state: Annotated[ + Optional[StrictStr], Field(description="Filter area codes by state.") + ] = None, + province: Annotated[ + Optional[StrictStr], Field(description="Filter area codes by province.") + ] = None, + city: Annotated[ + Optional[StrictStr], Field(description="Filter area codes by city.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -476,7 +467,7 @@ def fax_line_area_code_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_area_code_get_serialize( country=country, @@ -486,16 +477,15 @@ def fax_line_area_code_get_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineAreaCodeGetResponse", - '4XX': "ErrorResponse", + "200": "FaxLineAreaCodeGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -503,21 +493,27 @@ def fax_line_area_code_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def fax_line_area_code_get_without_preload_content( self, - country: Annotated[StrictStr, Field(description="Filter area codes by country.")], - state: Annotated[Optional[StrictStr], Field(description="Filter area codes by state.")] = None, - province: Annotated[Optional[StrictStr], Field(description="Filter area codes by province.")] = None, - city: Annotated[Optional[StrictStr], Field(description="Filter area codes by city.")] = None, + country: Annotated[ + StrictStr, Field(description="Filter area codes by country.") + ], + state: Annotated[ + Optional[StrictStr], Field(description="Filter area codes by state.") + ] = None, + province: Annotated[ + Optional[StrictStr], Field(description="Filter area codes by province.") + ] = None, + city: Annotated[ + Optional[StrictStr], Field(description="Filter area codes by city.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -556,7 +552,7 @@ def fax_line_area_code_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_area_code_get_serialize( country=country, @@ -566,20 +562,18 @@ def fax_line_area_code_get_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineAreaCodeGetResponse", - '4XX': "ErrorResponse", + "200": "FaxLineAreaCodeGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _fax_line_area_code_get_serialize( self, country, @@ -594,8 +588,7 @@ def _fax_line_area_code_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -607,43 +600,37 @@ def _fax_line_area_code_get_serialize( # process the path parameters # process the query parameters if country is not None: - - _query_params.append(('country', country)) - + + _query_params.append(("country", country)) + if state is not None: - - _query_params.append(('state', state)) - + + _query_params.append(("state", state)) + if province is not None: - - _query_params.append(('province', province)) - + + _query_params.append(("province", province)) + if city is not None: - - _query_params.append(('city', city)) - + + _query_params.append(("city", city)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key' - ] + _auth_settings: List[str] = ["api_key"] return self.api_client.param_serialize( - method='GET', - resource_path='/fax_line/area_codes', + method="GET", + resource_path="/fax_line/area_codes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -653,12 +640,9 @@ def _fax_line_area_code_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def fax_line_create( self, @@ -667,9 +651,8 @@ def fax_line_create( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -702,23 +685,22 @@ def fax_line_create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_create_serialize( fax_line_create_request=fax_line_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -726,7 +708,6 @@ def fax_line_create( response_types_map=_response_types_map, ).data - @validate_call def fax_line_create_with_http_info( self, @@ -735,9 +716,8 @@ def fax_line_create_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -770,23 +750,22 @@ def fax_line_create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_create_serialize( fax_line_create_request=fax_line_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -794,7 +773,6 @@ def fax_line_create_with_http_info( response_types_map=_response_types_map, ) - @validate_call def fax_line_create_without_preload_content( self, @@ -803,9 +781,8 @@ def fax_line_create_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -838,27 +815,25 @@ def fax_line_create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_create_serialize( fax_line_create_request=fax_line_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _fax_line_create_serialize( self, fax_line_create_request, @@ -870,8 +845,7 @@ def _fax_line_create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -895,7 +869,7 @@ def _fax_line_create_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -910,37 +884,28 @@ def _fax_line_create_serialize( if fax_line_create_request is not None and has_files is False: _body_params = fax_line_create_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key' - ] + _auth_settings: List[str] = ["api_key"] return self.api_client.param_serialize( - method='POST', - resource_path='/fax_line/create', + method="POST", + resource_path="/fax_line/create", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -950,12 +915,9 @@ def _fax_line_create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def fax_line_delete( self, @@ -964,9 +926,8 @@ def fax_line_delete( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -999,23 +960,22 @@ def fax_line_delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_delete_serialize( fax_line_delete_request=fax_line_delete_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1023,7 +983,6 @@ def fax_line_delete( response_types_map=_response_types_map, ).data - @validate_call def fax_line_delete_with_http_info( self, @@ -1032,9 +991,8 @@ def fax_line_delete_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1067,23 +1025,22 @@ def fax_line_delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_delete_serialize( fax_line_delete_request=fax_line_delete_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1091,7 +1048,6 @@ def fax_line_delete_with_http_info( response_types_map=_response_types_map, ) - @validate_call def fax_line_delete_without_preload_content( self, @@ -1100,9 +1056,8 @@ def fax_line_delete_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1135,27 +1090,25 @@ def fax_line_delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_delete_serialize( fax_line_delete_request=fax_line_delete_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _fax_line_delete_serialize( self, fax_line_delete_request, @@ -1167,8 +1120,7 @@ def _fax_line_delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1192,7 +1144,7 @@ def _fax_line_delete_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -1207,37 +1159,28 @@ def _fax_line_delete_serialize( if fax_line_delete_request is not None and has_files is False: _body_params = fax_line_delete_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key' - ] + _auth_settings: List[str] = ["api_key"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/fax_line', + method="DELETE", + resource_path="/fax_line", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1247,12 +1190,9 @@ def _fax_line_delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def fax_line_get( self, @@ -1261,9 +1201,8 @@ def fax_line_get( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1296,23 +1235,22 @@ def fax_line_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_get_serialize( number=number, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1320,7 +1258,6 @@ def fax_line_get( response_types_map=_response_types_map, ).data - @validate_call def fax_line_get_with_http_info( self, @@ -1329,9 +1266,8 @@ def fax_line_get_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1364,23 +1300,22 @@ def fax_line_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_get_serialize( number=number, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1388,7 +1323,6 @@ def fax_line_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def fax_line_get_without_preload_content( self, @@ -1397,9 +1331,8 @@ def fax_line_get_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1432,27 +1365,25 @@ def fax_line_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_get_serialize( number=number, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _fax_line_get_serialize( self, number, @@ -1464,8 +1395,7 @@ def _fax_line_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1477,31 +1407,25 @@ def _fax_line_get_serialize( # process the path parameters # process the query parameters if number is not None: - - _query_params.append(('number', number)) - + + _query_params.append(("number", number)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key' - ] + _auth_settings: List[str] = ["api_key"] return self.api_client.param_serialize( - method='GET', - resource_path='/fax_line', + method="GET", + resource_path="/fax_line", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1511,26 +1435,28 @@ def _fax_line_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def fax_line_list( self, - account_id: Annotated[Optional[StrictStr], Field(description="Account ID")] = None, + account_id: Annotated[ + Optional[StrictStr], Field(description="Account ID") + ] = None, page: Annotated[Optional[StrictInt], Field(description="Page")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Page size")] = None, - show_team_lines: Annotated[Optional[StrictBool], Field(description="Show team lines")] = None, + page_size: Annotated[ + Optional[StrictInt], Field(description="Page size") + ] = None, + show_team_lines: Annotated[ + Optional[StrictBool], Field(description="Show team lines") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1569,7 +1495,7 @@ def fax_line_list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_list_serialize( account_id=account_id, @@ -1579,16 +1505,15 @@ def fax_line_list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineListResponse", - '4XX': "ErrorResponse", + "200": "FaxLineListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1596,21 +1521,25 @@ def fax_line_list( response_types_map=_response_types_map, ).data - @validate_call def fax_line_list_with_http_info( self, - account_id: Annotated[Optional[StrictStr], Field(description="Account ID")] = None, + account_id: Annotated[ + Optional[StrictStr], Field(description="Account ID") + ] = None, page: Annotated[Optional[StrictInt], Field(description="Page")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Page size")] = None, - show_team_lines: Annotated[Optional[StrictBool], Field(description="Show team lines")] = None, + page_size: Annotated[ + Optional[StrictInt], Field(description="Page size") + ] = None, + show_team_lines: Annotated[ + Optional[StrictBool], Field(description="Show team lines") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1649,7 +1578,7 @@ def fax_line_list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_list_serialize( account_id=account_id, @@ -1659,16 +1588,15 @@ def fax_line_list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineListResponse", - '4XX': "ErrorResponse", + "200": "FaxLineListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1676,21 +1604,25 @@ def fax_line_list_with_http_info( response_types_map=_response_types_map, ) - @validate_call def fax_line_list_without_preload_content( self, - account_id: Annotated[Optional[StrictStr], Field(description="Account ID")] = None, + account_id: Annotated[ + Optional[StrictStr], Field(description="Account ID") + ] = None, page: Annotated[Optional[StrictInt], Field(description="Page")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Page size")] = None, - show_team_lines: Annotated[Optional[StrictBool], Field(description="Show team lines")] = None, + page_size: Annotated[ + Optional[StrictInt], Field(description="Page size") + ] = None, + show_team_lines: Annotated[ + Optional[StrictBool], Field(description="Show team lines") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1729,7 +1661,7 @@ def fax_line_list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_list_serialize( account_id=account_id, @@ -1739,20 +1671,18 @@ def fax_line_list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineListResponse", - '4XX': "ErrorResponse", + "200": "FaxLineListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _fax_line_list_serialize( self, account_id, @@ -1767,8 +1697,7 @@ def _fax_line_list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1780,43 +1709,37 @@ def _fax_line_list_serialize( # process the path parameters # process the query parameters if account_id is not None: - - _query_params.append(('account_id', account_id)) - + + _query_params.append(("account_id", account_id)) + if page is not None: - - _query_params.append(('page', page)) - + + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if show_team_lines is not None: - - _query_params.append(('show_team_lines', show_team_lines)) - + + _query_params.append(("show_team_lines", show_team_lines)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key' - ] + _auth_settings: List[str] = ["api_key"] return self.api_client.param_serialize( - method='GET', - resource_path='/fax_line/list', + method="GET", + resource_path="/fax_line/list", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1826,12 +1749,9 @@ def _fax_line_list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def fax_line_remove_user( self, @@ -1840,9 +1760,8 @@ def fax_line_remove_user( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1875,23 +1794,22 @@ def fax_line_remove_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_remove_user_serialize( fax_line_remove_user_request=fax_line_remove_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1899,7 +1817,6 @@ def fax_line_remove_user( response_types_map=_response_types_map, ).data - @validate_call def fax_line_remove_user_with_http_info( self, @@ -1908,9 +1825,8 @@ def fax_line_remove_user_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1943,23 +1859,22 @@ def fax_line_remove_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_remove_user_serialize( fax_line_remove_user_request=fax_line_remove_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1967,7 +1882,6 @@ def fax_line_remove_user_with_http_info( response_types_map=_response_types_map, ) - @validate_call def fax_line_remove_user_without_preload_content( self, @@ -1976,9 +1890,8 @@ def fax_line_remove_user_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2011,27 +1924,25 @@ def fax_line_remove_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._fax_line_remove_user_serialize( fax_line_remove_user_request=fax_line_remove_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FaxLineResponse", - '4XX': "ErrorResponse", + "200": "FaxLineResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _fax_line_remove_user_serialize( self, fax_line_remove_user_request, @@ -2043,8 +1954,7 @@ def _fax_line_remove_user_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2068,7 +1978,7 @@ def _fax_line_remove_user_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -2083,37 +1993,28 @@ def _fax_line_remove_user_serialize( if fax_line_remove_user_request is not None and has_files is False: _body_params = fax_line_remove_user_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key' - ] + _auth_settings: List[str] = ["api_key"] return self.api_client.param_serialize( - method='PUT', - resource_path='/fax_line/remove_user', + method="PUT", + resource_path="/fax_line/remove_user", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2123,7 +2024,5 @@ def _fax_line_remove_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/sdks/python/dropbox_sign/api/o_auth_api.py b/sdks/python/dropbox_sign/api/o_auth_api.py index 12165fcbc..d5035a186 100644 --- a/sdks/python/dropbox_sign/api/o_auth_api.py +++ b/sdks/python/dropbox_sign/api/o_auth_api.py @@ -39,7 +39,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def oauth_token_generate( self, @@ -48,9 +47,8 @@ def oauth_token_generate( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -83,22 +81,21 @@ def oauth_token_generate( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._oauth_token_generate_serialize( o_auth_token_generate_request=o_auth_token_generate_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OAuthTokenResponse", + "200": "OAuthTokenResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -106,7 +103,6 @@ def oauth_token_generate( response_types_map=_response_types_map, ).data - @validate_call def oauth_token_generate_with_http_info( self, @@ -115,9 +111,8 @@ def oauth_token_generate_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -150,22 +145,21 @@ def oauth_token_generate_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._oauth_token_generate_serialize( o_auth_token_generate_request=o_auth_token_generate_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OAuthTokenResponse", + "200": "OAuthTokenResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -173,7 +167,6 @@ def oauth_token_generate_with_http_info( response_types_map=_response_types_map, ) - @validate_call def oauth_token_generate_without_preload_content( self, @@ -182,9 +175,8 @@ def oauth_token_generate_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -217,26 +209,24 @@ def oauth_token_generate_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._oauth_token_generate_serialize( o_auth_token_generate_request=o_auth_token_generate_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OAuthTokenResponse", + "200": "OAuthTokenResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _oauth_token_generate_serialize( self, o_auth_token_generate_request, @@ -246,13 +236,10 @@ def _oauth_token_generate_serialize( _host_index, ) -> RequestSerialized: - _hosts = [ - 'https://app.hellosign.com' - ] + _hosts = ["https://app.hellosign.com"] _host = _hosts[_host_index] - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -276,7 +263,7 @@ def _oauth_token_generate_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -291,36 +278,28 @@ def _oauth_token_generate_serialize( if o_auth_token_generate_request is not None and has_files is False: _body_params = o_auth_token_generate_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - ] + _auth_settings: List[str] = [] return self.api_client.param_serialize( - method='POST', - resource_path='/oauth/token', + method="POST", + resource_path="/oauth/token", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -330,12 +309,9 @@ def _oauth_token_generate_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def oauth_token_refresh( self, @@ -344,9 +320,8 @@ def oauth_token_refresh( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -379,22 +354,21 @@ def oauth_token_refresh( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._oauth_token_refresh_serialize( o_auth_token_refresh_request=o_auth_token_refresh_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OAuthTokenResponse", + "200": "OAuthTokenResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -402,7 +376,6 @@ def oauth_token_refresh( response_types_map=_response_types_map, ).data - @validate_call def oauth_token_refresh_with_http_info( self, @@ -411,9 +384,8 @@ def oauth_token_refresh_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -446,22 +418,21 @@ def oauth_token_refresh_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._oauth_token_refresh_serialize( o_auth_token_refresh_request=o_auth_token_refresh_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OAuthTokenResponse", + "200": "OAuthTokenResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -469,7 +440,6 @@ def oauth_token_refresh_with_http_info( response_types_map=_response_types_map, ) - @validate_call def oauth_token_refresh_without_preload_content( self, @@ -478,9 +448,8 @@ def oauth_token_refresh_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -513,26 +482,24 @@ def oauth_token_refresh_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._oauth_token_refresh_serialize( o_auth_token_refresh_request=o_auth_token_refresh_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OAuthTokenResponse", + "200": "OAuthTokenResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _oauth_token_refresh_serialize( self, o_auth_token_refresh_request, @@ -542,13 +509,10 @@ def _oauth_token_refresh_serialize( _host_index, ) -> RequestSerialized: - _hosts = [ - 'https://app.hellosign.com' - ] + _hosts = ["https://app.hellosign.com"] _host = _hosts[_host_index] - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -572,7 +536,7 @@ def _oauth_token_refresh_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -587,36 +551,28 @@ def _oauth_token_refresh_serialize( if o_auth_token_refresh_request is not None and has_files is False: _body_params = o_auth_token_refresh_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - ] + _auth_settings: List[str] = [] return self.api_client.param_serialize( - method='POST', - resource_path='/oauth/token?refresh', + method="POST", + resource_path="/oauth/token?refresh", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -626,7 +582,5 @@ def _oauth_token_refresh_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/sdks/python/dropbox_sign/api/report_api.py b/sdks/python/dropbox_sign/api/report_api.py index 8ce80c120..a31ee01f5 100644 --- a/sdks/python/dropbox_sign/api/report_api.py +++ b/sdks/python/dropbox_sign/api/report_api.py @@ -38,7 +38,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def report_create( self, @@ -47,9 +46,8 @@ def report_create( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -82,23 +80,22 @@ def report_create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._report_create_serialize( report_create_request=report_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ReportCreateResponse", - '4XX': "ErrorResponse", + "200": "ReportCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -106,7 +103,6 @@ def report_create( response_types_map=_response_types_map, ).data - @validate_call def report_create_with_http_info( self, @@ -115,9 +111,8 @@ def report_create_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -150,23 +145,22 @@ def report_create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._report_create_serialize( report_create_request=report_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ReportCreateResponse", - '4XX': "ErrorResponse", + "200": "ReportCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -174,7 +168,6 @@ def report_create_with_http_info( response_types_map=_response_types_map, ) - @validate_call def report_create_without_preload_content( self, @@ -183,9 +176,8 @@ def report_create_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -218,27 +210,25 @@ def report_create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._report_create_serialize( report_create_request=report_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ReportCreateResponse", - '4XX': "ErrorResponse", + "200": "ReportCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _report_create_serialize( self, report_create_request, @@ -250,8 +240,7 @@ def _report_create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -275,7 +264,7 @@ def _report_create_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -290,37 +279,28 @@ def _report_create_serialize( if report_create_request is not None and has_files is False: _body_params = report_create_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key' - ] + _auth_settings: List[str] = ["api_key"] return self.api_client.param_serialize( - method='POST', - resource_path='/report/create', + method="POST", + resource_path="/report/create", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -330,7 +310,5 @@ def _report_create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/sdks/python/dropbox_sign/api/signature_request_api.py b/sdks/python/dropbox_sign/api/signature_request_api.py index d95641f60..4298079c1 100644 --- a/sdks/python/dropbox_sign/api/signature_request_api.py +++ b/sdks/python/dropbox_sign/api/signature_request_api.py @@ -23,16 +23,36 @@ from dropbox_sign.models.bulk_send_job_send_response import BulkSendJobSendResponse from dropbox_sign.models.file_response import FileResponse from dropbox_sign.models.file_response_data_uri import FileResponseDataUri -from dropbox_sign.models.signature_request_bulk_create_embedded_with_template_request import SignatureRequestBulkCreateEmbeddedWithTemplateRequest -from dropbox_sign.models.signature_request_bulk_send_with_template_request import SignatureRequestBulkSendWithTemplateRequest -from dropbox_sign.models.signature_request_create_embedded_request import SignatureRequestCreateEmbeddedRequest -from dropbox_sign.models.signature_request_create_embedded_with_template_request import SignatureRequestCreateEmbeddedWithTemplateRequest -from dropbox_sign.models.signature_request_get_response import SignatureRequestGetResponse -from dropbox_sign.models.signature_request_list_response import SignatureRequestListResponse -from dropbox_sign.models.signature_request_remind_request import SignatureRequestRemindRequest -from dropbox_sign.models.signature_request_send_request import SignatureRequestSendRequest -from dropbox_sign.models.signature_request_send_with_template_request import SignatureRequestSendWithTemplateRequest -from dropbox_sign.models.signature_request_update_request import SignatureRequestUpdateRequest +from dropbox_sign.models.signature_request_bulk_create_embedded_with_template_request import ( + SignatureRequestBulkCreateEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.signature_request_bulk_send_with_template_request import ( + SignatureRequestBulkSendWithTemplateRequest, +) +from dropbox_sign.models.signature_request_create_embedded_request import ( + SignatureRequestCreateEmbeddedRequest, +) +from dropbox_sign.models.signature_request_create_embedded_with_template_request import ( + SignatureRequestCreateEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.signature_request_get_response import ( + SignatureRequestGetResponse, +) +from dropbox_sign.models.signature_request_list_response import ( + SignatureRequestListResponse, +) +from dropbox_sign.models.signature_request_remind_request import ( + SignatureRequestRemindRequest, +) +from dropbox_sign.models.signature_request_send_request import ( + SignatureRequestSendRequest, +) +from dropbox_sign.models.signature_request_send_with_template_request import ( + SignatureRequestSendWithTemplateRequest, +) +from dropbox_sign.models.signature_request_update_request import ( + SignatureRequestUpdateRequest, +) from dropbox_sign.api_client import ApiClient, RequestSerialized from dropbox_sign.api_response import ApiResponse @@ -52,7 +72,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def signature_request_bulk_create_embedded_with_template( self, @@ -61,9 +80,8 @@ def signature_request_bulk_create_embedded_with_template( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -96,23 +114,22 @@ def signature_request_bulk_create_embedded_with_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_bulk_create_embedded_with_template_serialize( signature_request_bulk_create_embedded_with_template_request=signature_request_bulk_create_embedded_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobSendResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobSendResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -120,7 +137,6 @@ def signature_request_bulk_create_embedded_with_template( response_types_map=_response_types_map, ).data - @validate_call def signature_request_bulk_create_embedded_with_template_with_http_info( self, @@ -129,9 +145,8 @@ def signature_request_bulk_create_embedded_with_template_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -164,23 +179,22 @@ def signature_request_bulk_create_embedded_with_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_bulk_create_embedded_with_template_serialize( signature_request_bulk_create_embedded_with_template_request=signature_request_bulk_create_embedded_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobSendResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobSendResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -188,7 +202,6 @@ def signature_request_bulk_create_embedded_with_template_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_bulk_create_embedded_with_template_without_preload_content( self, @@ -197,9 +210,8 @@ def signature_request_bulk_create_embedded_with_template_without_preload_content None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -232,27 +244,25 @@ def signature_request_bulk_create_embedded_with_template_without_preload_content in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_bulk_create_embedded_with_template_serialize( signature_request_bulk_create_embedded_with_template_request=signature_request_bulk_create_embedded_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobSendResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobSendResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_bulk_create_embedded_with_template_serialize( self, signature_request_bulk_create_embedded_with_template_request, @@ -264,8 +274,7 @@ def _signature_request_bulk_create_embedded_with_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -289,7 +298,7 @@ def _signature_request_bulk_create_embedded_with_template_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -301,41 +310,34 @@ def _signature_request_bulk_create_embedded_with_template_serialize( # process the header parameters # process the form parameters # process the body parameter - if signature_request_bulk_create_embedded_with_template_request is not None and has_files is False: + if ( + signature_request_bulk_create_embedded_with_template_request is not None + and has_files is False + ): _body_params = signature_request_bulk_create_embedded_with_template_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key' - ] + _auth_settings: List[str] = ["api_key"] return self.api_client.param_serialize( - method='POST', - resource_path='/signature_request/bulk_create_embedded_with_template', + method="POST", + resource_path="/signature_request/bulk_create_embedded_with_template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -345,12 +347,9 @@ def _signature_request_bulk_create_embedded_with_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_bulk_send_with_template( self, @@ -359,9 +358,8 @@ def signature_request_bulk_send_with_template( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -394,23 +392,22 @@ def signature_request_bulk_send_with_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_bulk_send_with_template_serialize( signature_request_bulk_send_with_template_request=signature_request_bulk_send_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobSendResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobSendResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -418,7 +415,6 @@ def signature_request_bulk_send_with_template( response_types_map=_response_types_map, ).data - @validate_call def signature_request_bulk_send_with_template_with_http_info( self, @@ -427,9 +423,8 @@ def signature_request_bulk_send_with_template_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -462,23 +457,22 @@ def signature_request_bulk_send_with_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_bulk_send_with_template_serialize( signature_request_bulk_send_with_template_request=signature_request_bulk_send_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobSendResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobSendResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -486,7 +480,6 @@ def signature_request_bulk_send_with_template_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_bulk_send_with_template_without_preload_content( self, @@ -495,9 +488,8 @@ def signature_request_bulk_send_with_template_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -530,27 +522,25 @@ def signature_request_bulk_send_with_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_bulk_send_with_template_serialize( signature_request_bulk_send_with_template_request=signature_request_bulk_send_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BulkSendJobSendResponse", - '4XX': "ErrorResponse", + "200": "BulkSendJobSendResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_bulk_send_with_template_serialize( self, signature_request_bulk_send_with_template_request, @@ -562,8 +552,7 @@ def _signature_request_bulk_send_with_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -587,7 +576,7 @@ def _signature_request_bulk_send_with_template_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -599,42 +588,34 @@ def _signature_request_bulk_send_with_template_serialize( # process the header parameters # process the form parameters # process the body parameter - if signature_request_bulk_send_with_template_request is not None and has_files is False: + if ( + signature_request_bulk_send_with_template_request is not None + and has_files is False + ): _body_params = signature_request_bulk_send_with_template_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/signature_request/bulk_send_with_template', + method="POST", + resource_path="/signature_request/bulk_send_with_template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -644,23 +625,22 @@ def _signature_request_bulk_send_with_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_cancel( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the incomplete SignatureRequest to cancel.")], + signature_request_id: Annotated[ + StrictStr, + Field(description="The id of the incomplete SignatureRequest to cancel."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -693,23 +673,22 @@ def signature_request_cancel( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_cancel_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -717,18 +696,19 @@ def signature_request_cancel( response_types_map=_response_types_map, ).data - @validate_call def signature_request_cancel_with_http_info( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the incomplete SignatureRequest to cancel.")], + signature_request_id: Annotated[ + StrictStr, + Field(description="The id of the incomplete SignatureRequest to cancel."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -761,23 +741,22 @@ def signature_request_cancel_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_cancel_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -785,18 +764,19 @@ def signature_request_cancel_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_cancel_without_preload_content( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the incomplete SignatureRequest to cancel.")], + signature_request_id: Annotated[ + StrictStr, + Field(description="The id of the incomplete SignatureRequest to cancel."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -829,27 +809,25 @@ def signature_request_cancel_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_cancel_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_cancel_serialize( self, signature_request_id, @@ -861,8 +839,7 @@ def _signature_request_cancel_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -873,31 +850,24 @@ def _signature_request_cancel_serialize( # process the path parameters if signature_request_id is not None: - _path_params['signature_request_id'] = signature_request_id + _path_params["signature_request_id"] = signature_request_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/signature_request/cancel/{signature_request_id}', + method="POST", + resource_path="/signature_request/cancel/{signature_request_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -907,12 +877,9 @@ def _signature_request_cancel_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_create_embedded( self, @@ -921,9 +888,8 @@ def signature_request_create_embedded( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -956,23 +922,22 @@ def signature_request_create_embedded( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_create_embedded_serialize( signature_request_create_embedded_request=signature_request_create_embedded_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -980,7 +945,6 @@ def signature_request_create_embedded( response_types_map=_response_types_map, ).data - @validate_call def signature_request_create_embedded_with_http_info( self, @@ -989,9 +953,8 @@ def signature_request_create_embedded_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1024,23 +987,22 @@ def signature_request_create_embedded_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_create_embedded_serialize( signature_request_create_embedded_request=signature_request_create_embedded_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1048,7 +1010,6 @@ def signature_request_create_embedded_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_create_embedded_without_preload_content( self, @@ -1057,9 +1018,8 @@ def signature_request_create_embedded_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1092,27 +1052,25 @@ def signature_request_create_embedded_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_create_embedded_serialize( signature_request_create_embedded_request=signature_request_create_embedded_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_create_embedded_serialize( self, signature_request_create_embedded_request, @@ -1124,8 +1082,7 @@ def _signature_request_create_embedded_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1149,7 +1106,7 @@ def _signature_request_create_embedded_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -1164,39 +1121,28 @@ def _signature_request_create_embedded_serialize( if signature_request_create_embedded_request is not None and has_files is False: _body_params = signature_request_create_embedded_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/signature_request/create_embedded', + method="POST", + resource_path="/signature_request/create_embedded", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1206,12 +1152,9 @@ def _signature_request_create_embedded_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_create_embedded_with_template( self, @@ -1220,9 +1163,8 @@ def signature_request_create_embedded_with_template( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1255,23 +1197,22 @@ def signature_request_create_embedded_with_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_create_embedded_with_template_serialize( signature_request_create_embedded_with_template_request=signature_request_create_embedded_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1279,7 +1220,6 @@ def signature_request_create_embedded_with_template( response_types_map=_response_types_map, ).data - @validate_call def signature_request_create_embedded_with_template_with_http_info( self, @@ -1288,9 +1228,8 @@ def signature_request_create_embedded_with_template_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1323,23 +1262,22 @@ def signature_request_create_embedded_with_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_create_embedded_with_template_serialize( signature_request_create_embedded_with_template_request=signature_request_create_embedded_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1347,7 +1285,6 @@ def signature_request_create_embedded_with_template_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_create_embedded_with_template_without_preload_content( self, @@ -1356,9 +1293,8 @@ def signature_request_create_embedded_with_template_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1391,27 +1327,25 @@ def signature_request_create_embedded_with_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_create_embedded_with_template_serialize( signature_request_create_embedded_with_template_request=signature_request_create_embedded_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_create_embedded_with_template_serialize( self, signature_request_create_embedded_with_template_request, @@ -1423,8 +1357,7 @@ def _signature_request_create_embedded_with_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1448,7 +1381,7 @@ def _signature_request_create_embedded_with_template_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -1460,42 +1393,34 @@ def _signature_request_create_embedded_with_template_serialize( # process the header parameters # process the form parameters # process the body parameter - if signature_request_create_embedded_with_template_request is not None and has_files is False: + if ( + signature_request_create_embedded_with_template_request is not None + and has_files is False + ): _body_params = signature_request_create_embedded_with_template_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/signature_request/create_embedded_with_template', + method="POST", + resource_path="/signature_request/create_embedded_with_template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1505,24 +1430,27 @@ def _signature_request_create_embedded_with_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_files( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], - file_type: Annotated[Optional[StrictStr], Field(description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents.")] = None, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], + file_type: Annotated[ + Optional[StrictStr], + Field( + description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1557,7 +1485,7 @@ def signature_request_files( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_files_serialize( signature_request_id=signature_request_id, @@ -1565,16 +1493,15 @@ def signature_request_files( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "io.IOBase", - '4XX': "ErrorResponse", + "200": "io.IOBase", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1582,19 +1509,24 @@ def signature_request_files( response_types_map=_response_types_map, ).data - @validate_call def signature_request_files_with_http_info( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], - file_type: Annotated[Optional[StrictStr], Field(description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents.")] = None, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], + file_type: Annotated[ + Optional[StrictStr], + Field( + description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1629,7 +1561,7 @@ def signature_request_files_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_files_serialize( signature_request_id=signature_request_id, @@ -1637,16 +1569,15 @@ def signature_request_files_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "io.IOBase", - '4XX': "ErrorResponse", + "200": "io.IOBase", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1654,19 +1585,24 @@ def signature_request_files_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_files_without_preload_content( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], - file_type: Annotated[Optional[StrictStr], Field(description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents.")] = None, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], + file_type: Annotated[ + Optional[StrictStr], + Field( + description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1701,7 +1637,7 @@ def signature_request_files_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_files_serialize( signature_request_id=signature_request_id, @@ -1709,20 +1645,18 @@ def signature_request_files_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "io.IOBase", - '4XX': "ErrorResponse", + "200": "io.IOBase", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_files_serialize( self, signature_request_id, @@ -1735,8 +1669,7 @@ def _signature_request_files_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1747,37 +1680,28 @@ def _signature_request_files_serialize( # process the path parameters if signature_request_id is not None: - _path_params['signature_request_id'] = signature_request_id + _path_params["signature_request_id"] = signature_request_id # process the query parameters if file_type is not None: - - _query_params.append(('file_type', file_type)) - + + _query_params.append(("file_type", file_type)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/pdf', - 'application/zip', - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/pdf", "application/zip", "application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/signature_request/files/{signature_request_id}', + method="GET", + resource_path="/signature_request/files/{signature_request_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1787,23 +1711,21 @@ def _signature_request_files_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_files_as_data_uri( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1836,23 +1758,22 @@ def signature_request_files_as_data_uri( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_files_as_data_uri_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponseDataUri", - '4XX': "ErrorResponse", + "200": "FileResponseDataUri", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1860,18 +1781,18 @@ def signature_request_files_as_data_uri( response_types_map=_response_types_map, ).data - @validate_call def signature_request_files_as_data_uri_with_http_info( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1904,23 +1825,22 @@ def signature_request_files_as_data_uri_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_files_as_data_uri_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponseDataUri", - '4XX': "ErrorResponse", + "200": "FileResponseDataUri", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1928,18 +1848,18 @@ def signature_request_files_as_data_uri_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_files_as_data_uri_without_preload_content( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1972,27 +1892,25 @@ def signature_request_files_as_data_uri_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_files_as_data_uri_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponseDataUri", - '4XX': "ErrorResponse", + "200": "FileResponseDataUri", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_files_as_data_uri_serialize( self, signature_request_id, @@ -2004,8 +1922,7 @@ def _signature_request_files_as_data_uri_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2016,31 +1933,24 @@ def _signature_request_files_as_data_uri_serialize( # process the path parameters if signature_request_id is not None: - _path_params['signature_request_id'] = signature_request_id + _path_params["signature_request_id"] = signature_request_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/signature_request/files_as_data_uri/{signature_request_id}', + method="GET", + resource_path="/signature_request/files_as_data_uri/{signature_request_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2050,24 +1960,27 @@ def _signature_request_files_as_data_uri_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_files_as_file_url( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], - force_download: Annotated[Optional[StrictInt], Field(description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.")] = None, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], + force_download: Annotated[ + Optional[StrictInt], + Field( + description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2102,7 +2015,7 @@ def signature_request_files_as_file_url( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_files_as_file_url_serialize( signature_request_id=signature_request_id, @@ -2110,16 +2023,15 @@ def signature_request_files_as_file_url( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponse", - '4XX': "ErrorResponse", + "200": "FileResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2127,19 +2039,24 @@ def signature_request_files_as_file_url( response_types_map=_response_types_map, ).data - @validate_call def signature_request_files_as_file_url_with_http_info( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], - force_download: Annotated[Optional[StrictInt], Field(description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.")] = None, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], + force_download: Annotated[ + Optional[StrictInt], + Field( + description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2174,7 +2091,7 @@ def signature_request_files_as_file_url_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_files_as_file_url_serialize( signature_request_id=signature_request_id, @@ -2182,16 +2099,15 @@ def signature_request_files_as_file_url_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponse", - '4XX': "ErrorResponse", + "200": "FileResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2199,19 +2115,24 @@ def signature_request_files_as_file_url_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_files_as_file_url_without_preload_content( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], - force_download: Annotated[Optional[StrictInt], Field(description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.")] = None, + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], + force_download: Annotated[ + Optional[StrictInt], + Field( + description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2246,7 +2167,7 @@ def signature_request_files_as_file_url_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_files_as_file_url_serialize( signature_request_id=signature_request_id, @@ -2254,20 +2175,18 @@ def signature_request_files_as_file_url_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponse", - '4XX': "ErrorResponse", + "200": "FileResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_files_as_file_url_serialize( self, signature_request_id, @@ -2280,8 +2199,7 @@ def _signature_request_files_as_file_url_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2292,35 +2210,28 @@ def _signature_request_files_as_file_url_serialize( # process the path parameters if signature_request_id is not None: - _path_params['signature_request_id'] = signature_request_id + _path_params["signature_request_id"] = signature_request_id # process the query parameters if force_download is not None: - - _query_params.append(('force_download', force_download)) - + + _query_params.append(("force_download", force_download)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/signature_request/files_as_file_url/{signature_request_id}', + method="GET", + resource_path="/signature_request/files_as_file_url/{signature_request_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2330,23 +2241,21 @@ def _signature_request_files_as_file_url_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_get( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2379,23 +2288,22 @@ def signature_request_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_get_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2403,18 +2311,18 @@ def signature_request_get( response_types_map=_response_types_map, ).data - @validate_call def signature_request_get_with_http_info( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2447,23 +2355,22 @@ def signature_request_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_get_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2471,18 +2378,18 @@ def signature_request_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_get_without_preload_content( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to retrieve.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2515,27 +2422,25 @@ def signature_request_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_get_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_get_serialize( self, signature_request_id, @@ -2547,8 +2452,7 @@ def _signature_request_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2559,31 +2463,24 @@ def _signature_request_get_serialize( # process the path parameters if signature_request_id is not None: - _path_params['signature_request_id'] = signature_request_id + _path_params["signature_request_id"] = signature_request_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/signature_request/{signature_request_id}', + method="GET", + resource_path="/signature_request/{signature_request_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2593,26 +2490,42 @@ def _signature_request_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_list( self, - account_id: Annotated[Optional[StrictStr], Field(description="Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.")] = None, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the SignatureRequest List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, - query: Annotated[Optional[StrictStr], Field(description="String that includes search terms and/or fields to be used to filter the SignatureRequest objects.")] = None, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account." + ), + ] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the SignatureRequest List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, + query: Annotated[ + Optional[StrictStr], + Field( + description="String that includes search terms and/or fields to be used to filter the SignatureRequest objects." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2651,7 +2564,7 @@ def signature_request_list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_list_serialize( account_id=account_id, @@ -2661,16 +2574,15 @@ def signature_request_list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestListResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2678,21 +2590,39 @@ def signature_request_list( response_types_map=_response_types_map, ).data - @validate_call def signature_request_list_with_http_info( self, - account_id: Annotated[Optional[StrictStr], Field(description="Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.")] = None, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the SignatureRequest List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, - query: Annotated[Optional[StrictStr], Field(description="String that includes search terms and/or fields to be used to filter the SignatureRequest objects.")] = None, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account." + ), + ] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the SignatureRequest List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, + query: Annotated[ + Optional[StrictStr], + Field( + description="String that includes search terms and/or fields to be used to filter the SignatureRequest objects." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2731,7 +2661,7 @@ def signature_request_list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_list_serialize( account_id=account_id, @@ -2741,16 +2671,15 @@ def signature_request_list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestListResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2758,21 +2687,39 @@ def signature_request_list_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_list_without_preload_content( self, - account_id: Annotated[Optional[StrictStr], Field(description="Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.")] = None, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the SignatureRequest List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, - query: Annotated[Optional[StrictStr], Field(description="String that includes search terms and/or fields to be used to filter the SignatureRequest objects.")] = None, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Which account to return SignatureRequests for. Must be a team member. Use `all` to indicate all team members. Defaults to your account." + ), + ] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the SignatureRequest List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, + query: Annotated[ + Optional[StrictStr], + Field( + description="String that includes search terms and/or fields to be used to filter the SignatureRequest objects." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2811,7 +2758,7 @@ def signature_request_list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_list_serialize( account_id=account_id, @@ -2821,20 +2768,18 @@ def signature_request_list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestListResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_list_serialize( self, account_id, @@ -2849,8 +2794,7 @@ def _signature_request_list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2862,44 +2806,37 @@ def _signature_request_list_serialize( # process the path parameters # process the query parameters if account_id is not None: - - _query_params.append(('account_id', account_id)) - + + _query_params.append(("account_id", account_id)) + if page is not None: - - _query_params.append(('page', page)) - + + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if query is not None: - - _query_params.append(('query', query)) - + + _query_params.append(("query", query)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/signature_request/list', + method="GET", + resource_path="/signature_request/list", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2909,23 +2846,21 @@ def _signature_request_list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_release_hold( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to release.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to release.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2958,23 +2893,22 @@ def signature_request_release_hold( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_release_hold_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2982,18 +2916,18 @@ def signature_request_release_hold( response_types_map=_response_types_map, ).data - @validate_call def signature_request_release_hold_with_http_info( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to release.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to release.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3026,23 +2960,22 @@ def signature_request_release_hold_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_release_hold_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3050,18 +2983,18 @@ def signature_request_release_hold_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_release_hold_without_preload_content( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to release.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to release.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3094,27 +3027,25 @@ def signature_request_release_hold_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_release_hold_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_release_hold_serialize( self, signature_request_id, @@ -3126,8 +3057,7 @@ def _signature_request_release_hold_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3138,31 +3068,24 @@ def _signature_request_release_hold_serialize( # process the path parameters if signature_request_id is not None: - _path_params['signature_request_id'] = signature_request_id + _path_params["signature_request_id"] = signature_request_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/signature_request/release_hold/{signature_request_id}', + method="POST", + resource_path="/signature_request/release_hold/{signature_request_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3172,24 +3095,23 @@ def _signature_request_release_hold_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_remind( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to send a reminder for.")], + signature_request_id: Annotated[ + StrictStr, + Field(description="The id of the SignatureRequest to send a reminder for."), + ], signature_request_remind_request: SignatureRequestRemindRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3224,7 +3146,7 @@ def signature_request_remind( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_remind_serialize( signature_request_id=signature_request_id, @@ -3232,16 +3154,15 @@ def signature_request_remind( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3249,19 +3170,20 @@ def signature_request_remind( response_types_map=_response_types_map, ).data - @validate_call def signature_request_remind_with_http_info( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to send a reminder for.")], + signature_request_id: Annotated[ + StrictStr, + Field(description="The id of the SignatureRequest to send a reminder for."), + ], signature_request_remind_request: SignatureRequestRemindRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3296,7 +3218,7 @@ def signature_request_remind_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_remind_serialize( signature_request_id=signature_request_id, @@ -3304,16 +3226,15 @@ def signature_request_remind_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3321,19 +3242,20 @@ def signature_request_remind_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_remind_without_preload_content( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to send a reminder for.")], + signature_request_id: Annotated[ + StrictStr, + Field(description="The id of the SignatureRequest to send a reminder for."), + ], signature_request_remind_request: SignatureRequestRemindRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3368,7 +3290,7 @@ def signature_request_remind_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_remind_serialize( signature_request_id=signature_request_id, @@ -3376,20 +3298,18 @@ def signature_request_remind_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_remind_serialize( self, signature_request_id, @@ -3402,8 +3322,7 @@ def _signature_request_remind_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3427,7 +3346,7 @@ def _signature_request_remind_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -3436,7 +3355,7 @@ def _signature_request_remind_serialize( # process the path parameters if signature_request_id is not None: - _path_params['signature_request_id'] = signature_request_id + _path_params["signature_request_id"] = signature_request_id # process the query parameters # process the header parameters # process the form parameters @@ -3444,38 +3363,28 @@ def _signature_request_remind_serialize( if signature_request_remind_request is not None and has_files is False: _body_params = signature_request_remind_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/signature_request/remind/{signature_request_id}', + method="POST", + resource_path="/signature_request/remind/{signature_request_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3485,23 +3394,21 @@ def _signature_request_remind_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_remove( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to remove.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to remove.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3534,23 +3441,22 @@ def signature_request_remove( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_remove_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3558,18 +3464,18 @@ def signature_request_remove( response_types_map=_response_types_map, ).data - @validate_call def signature_request_remove_with_http_info( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to remove.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to remove.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3602,23 +3508,22 @@ def signature_request_remove_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_remove_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3626,18 +3531,18 @@ def signature_request_remove_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_remove_without_preload_content( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to remove.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to remove.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3670,27 +3575,25 @@ def signature_request_remove_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_remove_serialize( signature_request_id=signature_request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_remove_serialize( self, signature_request_id, @@ -3702,8 +3605,7 @@ def _signature_request_remove_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3714,30 +3616,24 @@ def _signature_request_remove_serialize( # process the path parameters if signature_request_id is not None: - _path_params['signature_request_id'] = signature_request_id + _path_params["signature_request_id"] = signature_request_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key' - ] + _auth_settings: List[str] = ["api_key"] return self.api_client.param_serialize( - method='POST', - resource_path='/signature_request/remove/{signature_request_id}', + method="POST", + resource_path="/signature_request/remove/{signature_request_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3747,12 +3643,9 @@ def _signature_request_remove_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_send( self, @@ -3761,9 +3654,8 @@ def signature_request_send( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3796,23 +3688,22 @@ def signature_request_send( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_send_serialize( signature_request_send_request=signature_request_send_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3820,7 +3711,6 @@ def signature_request_send( response_types_map=_response_types_map, ).data - @validate_call def signature_request_send_with_http_info( self, @@ -3829,9 +3719,8 @@ def signature_request_send_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3864,23 +3753,22 @@ def signature_request_send_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_send_serialize( signature_request_send_request=signature_request_send_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3888,7 +3776,6 @@ def signature_request_send_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_send_without_preload_content( self, @@ -3897,9 +3784,8 @@ def signature_request_send_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3932,27 +3818,25 @@ def signature_request_send_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_send_serialize( signature_request_send_request=signature_request_send_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_send_serialize( self, signature_request_send_request, @@ -3964,8 +3848,7 @@ def _signature_request_send_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3989,7 +3872,7 @@ def _signature_request_send_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -4004,39 +3887,28 @@ def _signature_request_send_serialize( if signature_request_send_request is not None and has_files is False: _body_params = signature_request_send_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/signature_request/send', + method="POST", + resource_path="/signature_request/send", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4046,12 +3918,9 @@ def _signature_request_send_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_send_with_template( self, @@ -4060,9 +3929,8 @@ def signature_request_send_with_template( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4095,23 +3963,22 @@ def signature_request_send_with_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_send_with_template_serialize( signature_request_send_with_template_request=signature_request_send_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4119,7 +3986,6 @@ def signature_request_send_with_template( response_types_map=_response_types_map, ).data - @validate_call def signature_request_send_with_template_with_http_info( self, @@ -4128,9 +3994,8 @@ def signature_request_send_with_template_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4163,23 +4028,22 @@ def signature_request_send_with_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_send_with_template_serialize( signature_request_send_with_template_request=signature_request_send_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4187,7 +4051,6 @@ def signature_request_send_with_template_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_send_with_template_without_preload_content( self, @@ -4196,9 +4059,8 @@ def signature_request_send_with_template_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4231,27 +4093,25 @@ def signature_request_send_with_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_send_with_template_serialize( signature_request_send_with_template_request=signature_request_send_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_send_with_template_serialize( self, signature_request_send_with_template_request, @@ -4263,8 +4123,7 @@ def _signature_request_send_with_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4288,7 +4147,7 @@ def _signature_request_send_with_template_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -4300,42 +4159,34 @@ def _signature_request_send_with_template_serialize( # process the header parameters # process the form parameters # process the body parameter - if signature_request_send_with_template_request is not None and has_files is False: + if ( + signature_request_send_with_template_request is not None + and has_files is False + ): _body_params = signature_request_send_with_template_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/signature_request/send_with_template', + method="POST", + resource_path="/signature_request/send_with_template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4345,24 +4196,22 @@ def _signature_request_send_with_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def signature_request_update( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to update.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to update.") + ], signature_request_update_request: SignatureRequestUpdateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4397,7 +4246,7 @@ def signature_request_update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_update_serialize( signature_request_id=signature_request_id, @@ -4405,16 +4254,15 @@ def signature_request_update( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4422,19 +4270,19 @@ def signature_request_update( response_types_map=_response_types_map, ).data - @validate_call def signature_request_update_with_http_info( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to update.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to update.") + ], signature_request_update_request: SignatureRequestUpdateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4469,7 +4317,7 @@ def signature_request_update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_update_serialize( signature_request_id=signature_request_id, @@ -4477,16 +4325,15 @@ def signature_request_update_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4494,19 +4341,19 @@ def signature_request_update_with_http_info( response_types_map=_response_types_map, ) - @validate_call def signature_request_update_without_preload_content( self, - signature_request_id: Annotated[StrictStr, Field(description="The id of the SignatureRequest to update.")], + signature_request_id: Annotated[ + StrictStr, Field(description="The id of the SignatureRequest to update.") + ], signature_request_update_request: SignatureRequestUpdateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4541,7 +4388,7 @@ def signature_request_update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signature_request_update_serialize( signature_request_id=signature_request_id, @@ -4549,20 +4396,18 @@ def signature_request_update_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SignatureRequestGetResponse", - '4XX': "ErrorResponse", + "200": "SignatureRequestGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _signature_request_update_serialize( self, signature_request_id, @@ -4575,8 +4420,7 @@ def _signature_request_update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4600,7 +4444,7 @@ def _signature_request_update_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -4609,7 +4453,7 @@ def _signature_request_update_serialize( # process the path parameters if signature_request_id is not None: - _path_params['signature_request_id'] = signature_request_id + _path_params["signature_request_id"] = signature_request_id # process the query parameters # process the header parameters # process the form parameters @@ -4617,38 +4461,28 @@ def _signature_request_update_serialize( if signature_request_update_request is not None and has_files is False: _body_params = signature_request_update_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/signature_request/update/{signature_request_id}', + method="POST", + resource_path="/signature_request/update/{signature_request_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4658,7 +4492,5 @@ def _signature_request_update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/sdks/python/dropbox_sign/api/team_api.py b/sdks/python/dropbox_sign/api/team_api.py index a4c5db66a..142d890c8 100644 --- a/sdks/python/dropbox_sign/api/team_api.py +++ b/sdks/python/dropbox_sign/api/team_api.py @@ -48,19 +48,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def team_add_member( self, team_add_member_request: TeamAddMemberRequest, - team_id: Annotated[Optional[StrictStr], Field(description="The id of the team.")] = None, + team_id: Annotated[ + Optional[StrictStr], Field(description="The id of the team.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -95,7 +95,7 @@ def team_add_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_add_member_serialize( team_add_member_request=team_add_member_request, @@ -103,16 +103,15 @@ def team_add_member( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -120,19 +119,19 @@ def team_add_member( response_types_map=_response_types_map, ).data - @validate_call def team_add_member_with_http_info( self, team_add_member_request: TeamAddMemberRequest, - team_id: Annotated[Optional[StrictStr], Field(description="The id of the team.")] = None, + team_id: Annotated[ + Optional[StrictStr], Field(description="The id of the team.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -167,7 +166,7 @@ def team_add_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_add_member_serialize( team_add_member_request=team_add_member_request, @@ -175,16 +174,15 @@ def team_add_member_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -192,19 +190,19 @@ def team_add_member_with_http_info( response_types_map=_response_types_map, ) - @validate_call def team_add_member_without_preload_content( self, team_add_member_request: TeamAddMemberRequest, - team_id: Annotated[Optional[StrictStr], Field(description="The id of the team.")] = None, + team_id: Annotated[ + Optional[StrictStr], Field(description="The id of the team.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -239,7 +237,7 @@ def team_add_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_add_member_serialize( team_add_member_request=team_add_member_request, @@ -247,20 +245,18 @@ def team_add_member_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _team_add_member_serialize( self, team_add_member_request, @@ -273,8 +269,7 @@ def _team_add_member_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -298,7 +293,7 @@ def _team_add_member_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -308,47 +303,37 @@ def _team_add_member_serialize( # process the path parameters # process the query parameters if team_id is not None: - - _query_params.append(('team_id', team_id)) - + + _query_params.append(("team_id", team_id)) + # process the header parameters # process the form parameters # process the body parameter if team_add_member_request is not None and has_files is False: _body_params = team_add_member_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='PUT', - resource_path='/team/add_member', + method="PUT", + resource_path="/team/add_member", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -358,12 +343,9 @@ def _team_add_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def team_create( self, @@ -372,9 +354,8 @@ def team_create( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -407,23 +388,22 @@ def team_create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_create_serialize( team_create_request=team_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -431,7 +411,6 @@ def team_create( response_types_map=_response_types_map, ).data - @validate_call def team_create_with_http_info( self, @@ -440,9 +419,8 @@ def team_create_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -475,23 +453,22 @@ def team_create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_create_serialize( team_create_request=team_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -499,7 +476,6 @@ def team_create_with_http_info( response_types_map=_response_types_map, ) - @validate_call def team_create_without_preload_content( self, @@ -508,9 +484,8 @@ def team_create_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -543,27 +518,25 @@ def team_create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_create_serialize( team_create_request=team_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _team_create_serialize( self, team_create_request, @@ -575,8 +548,7 @@ def _team_create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -600,7 +572,7 @@ def _team_create_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -615,38 +587,28 @@ def _team_create_serialize( if team_create_request is not None and has_files is False: _body_params = team_create_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/team/create', + method="POST", + resource_path="/team/create", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -656,12 +618,9 @@ def _team_create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def team_delete( self, @@ -669,9 +628,8 @@ def team_delete( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -702,22 +660,21 @@ def team_delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_delete_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -725,7 +682,6 @@ def team_delete( response_types_map=_response_types_map, ).data - @validate_call def team_delete_with_http_info( self, @@ -733,9 +689,8 @@ def team_delete_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -766,22 +721,21 @@ def team_delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_delete_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -789,7 +743,6 @@ def team_delete_with_http_info( response_types_map=_response_types_map, ) - @validate_call def team_delete_without_preload_content( self, @@ -797,9 +750,8 @@ def team_delete_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -830,26 +782,24 @@ def team_delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_delete_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _team_delete_serialize( self, _request_auth, @@ -860,8 +810,7 @@ def _team_delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -876,25 +825,18 @@ def _team_delete_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='DELETE', - resource_path='/team/destroy', + method="DELETE", + resource_path="/team/destroy", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -904,12 +846,9 @@ def _team_delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def team_get( self, @@ -917,9 +856,8 @@ def team_get( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -950,22 +888,21 @@ def team_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -973,7 +910,6 @@ def team_get( response_types_map=_response_types_map, ).data - @validate_call def team_get_with_http_info( self, @@ -981,9 +917,8 @@ def team_get_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1014,22 +949,21 @@ def team_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1037,7 +971,6 @@ def team_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def team_get_without_preload_content( self, @@ -1045,9 +978,8 @@ def team_get_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1078,26 +1010,24 @@ def team_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_get_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _team_get_serialize( self, _request_auth, @@ -1108,8 +1038,7 @@ def _team_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1124,25 +1053,18 @@ def _team_get_serialize( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/team', + method="GET", + resource_path="/team", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1152,23 +1074,21 @@ def _team_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def team_info( self, - team_id: Annotated[Optional[StrictStr], Field(description="The id of the team.")] = None, + team_id: Annotated[ + Optional[StrictStr], Field(description="The id of the team.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1201,23 +1121,22 @@ def team_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_info_serialize( team_id=team_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetInfoResponse", - '4XX': "ErrorResponse", + "200": "TeamGetInfoResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1225,18 +1144,18 @@ def team_info( response_types_map=_response_types_map, ).data - @validate_call def team_info_with_http_info( self, - team_id: Annotated[Optional[StrictStr], Field(description="The id of the team.")] = None, + team_id: Annotated[ + Optional[StrictStr], Field(description="The id of the team.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1269,23 +1188,22 @@ def team_info_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_info_serialize( team_id=team_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetInfoResponse", - '4XX': "ErrorResponse", + "200": "TeamGetInfoResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1293,18 +1211,18 @@ def team_info_with_http_info( response_types_map=_response_types_map, ) - @validate_call def team_info_without_preload_content( self, - team_id: Annotated[Optional[StrictStr], Field(description="The id of the team.")] = None, + team_id: Annotated[ + Optional[StrictStr], Field(description="The id of the team.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1337,27 +1255,25 @@ def team_info_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_info_serialize( team_id=team_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetInfoResponse", - '4XX': "ErrorResponse", + "200": "TeamGetInfoResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _team_info_serialize( self, team_id, @@ -1369,8 +1285,7 @@ def _team_info_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1382,32 +1297,25 @@ def _team_info_serialize( # process the path parameters # process the query parameters if team_id is not None: - - _query_params.append(('team_id', team_id)) - + + _query_params.append(("team_id", team_id)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/team/info', + method="GET", + resource_path="/team/info", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1417,23 +1325,24 @@ def _team_info_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def team_invites( self, - email_address: Annotated[Optional[StrictStr], Field(description="The email address for which to display the team invites.")] = None, + email_address: Annotated[ + Optional[StrictStr], + Field( + description="The email address for which to display the team invites." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1466,23 +1375,22 @@ def team_invites( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_invites_serialize( email_address=email_address, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamInvitesResponse", - '4XX': "ErrorResponse", + "200": "TeamInvitesResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1490,18 +1398,21 @@ def team_invites( response_types_map=_response_types_map, ).data - @validate_call def team_invites_with_http_info( self, - email_address: Annotated[Optional[StrictStr], Field(description="The email address for which to display the team invites.")] = None, + email_address: Annotated[ + Optional[StrictStr], + Field( + description="The email address for which to display the team invites." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1534,23 +1445,22 @@ def team_invites_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_invites_serialize( email_address=email_address, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamInvitesResponse", - '4XX': "ErrorResponse", + "200": "TeamInvitesResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1558,18 +1468,21 @@ def team_invites_with_http_info( response_types_map=_response_types_map, ) - @validate_call def team_invites_without_preload_content( self, - email_address: Annotated[Optional[StrictStr], Field(description="The email address for which to display the team invites.")] = None, + email_address: Annotated[ + Optional[StrictStr], + Field( + description="The email address for which to display the team invites." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1602,27 +1515,25 @@ def team_invites_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_invites_serialize( email_address=email_address, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamInvitesResponse", - '4XX': "ErrorResponse", + "200": "TeamInvitesResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _team_invites_serialize( self, email_address, @@ -1634,8 +1545,7 @@ def _team_invites_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1647,32 +1557,25 @@ def _team_invites_serialize( # process the path parameters # process the query parameters if email_address is not None: - - _query_params.append(('email_address', email_address)) - + + _query_params.append(("email_address", email_address)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/team/invites', + method="GET", + resource_path="/team/invites", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1682,25 +1585,36 @@ def _team_invites_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def team_members( self, - team_id: Annotated[StrictStr, Field(description="The id of the team that a member list is being requested from.")], - page: Annotated[Optional[StrictInt], Field(description="Which page number of the team member list to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, + team_id: Annotated[ + StrictStr, + Field( + description="The id of the team that a member list is being requested from." + ), + ], + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the team member list to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1737,7 +1651,7 @@ def team_members( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_members_serialize( team_id=team_id, @@ -1746,16 +1660,15 @@ def team_members( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamMembersResponse", - '4XX': "ErrorResponse", + "200": "TeamMembersResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1763,20 +1676,33 @@ def team_members( response_types_map=_response_types_map, ).data - @validate_call def team_members_with_http_info( self, - team_id: Annotated[StrictStr, Field(description="The id of the team that a member list is being requested from.")], - page: Annotated[Optional[StrictInt], Field(description="Which page number of the team member list to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, + team_id: Annotated[ + StrictStr, + Field( + description="The id of the team that a member list is being requested from." + ), + ], + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the team member list to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1813,7 +1739,7 @@ def team_members_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_members_serialize( team_id=team_id, @@ -1822,16 +1748,15 @@ def team_members_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamMembersResponse", - '4XX': "ErrorResponse", + "200": "TeamMembersResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1839,20 +1764,33 @@ def team_members_with_http_info( response_types_map=_response_types_map, ) - @validate_call def team_members_without_preload_content( self, - team_id: Annotated[StrictStr, Field(description="The id of the team that a member list is being requested from.")], - page: Annotated[Optional[StrictInt], Field(description="Which page number of the team member list to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, + team_id: Annotated[ + StrictStr, + Field( + description="The id of the team that a member list is being requested from." + ), + ], + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the team member list to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1889,7 +1827,7 @@ def team_members_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_members_serialize( team_id=team_id, @@ -1898,20 +1836,18 @@ def team_members_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamMembersResponse", - '4XX': "ErrorResponse", + "200": "TeamMembersResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _team_members_serialize( self, team_id, @@ -1925,8 +1861,7 @@ def _team_members_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1937,39 +1872,32 @@ def _team_members_serialize( # process the path parameters if team_id is not None: - _path_params['team_id'] = team_id + _path_params["team_id"] = team_id # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/team/members/{team_id}', + method="GET", + resource_path="/team/members/{team_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1979,12 +1907,9 @@ def _team_members_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def team_remove_member( self, @@ -1993,9 +1918,8 @@ def team_remove_member( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2028,23 +1952,22 @@ def team_remove_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_remove_member_serialize( team_remove_member_request=team_remove_member_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "TeamGetResponse", - '4XX': "ErrorResponse", + "201": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2052,7 +1975,6 @@ def team_remove_member( response_types_map=_response_types_map, ).data - @validate_call def team_remove_member_with_http_info( self, @@ -2061,9 +1983,8 @@ def team_remove_member_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2096,23 +2017,22 @@ def team_remove_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_remove_member_serialize( team_remove_member_request=team_remove_member_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "TeamGetResponse", - '4XX': "ErrorResponse", + "201": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2120,7 +2040,6 @@ def team_remove_member_with_http_info( response_types_map=_response_types_map, ) - @validate_call def team_remove_member_without_preload_content( self, @@ -2129,9 +2048,8 @@ def team_remove_member_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2164,27 +2082,25 @@ def team_remove_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_remove_member_serialize( team_remove_member_request=team_remove_member_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '201': "TeamGetResponse", - '4XX': "ErrorResponse", + "201": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _team_remove_member_serialize( self, team_remove_member_request, @@ -2196,8 +2112,7 @@ def _team_remove_member_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2221,7 +2136,7 @@ def _team_remove_member_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -2236,38 +2151,28 @@ def _team_remove_member_serialize( if team_remove_member_request is not None and has_files is False: _body_params = team_remove_member_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/team/remove_member', + method="POST", + resource_path="/team/remove_member", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2277,25 +2182,31 @@ def _team_remove_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def team_sub_teams( self, team_id: Annotated[StrictStr, Field(description="The id of the parent Team.")], - page: Annotated[Optional[StrictInt], Field(description="Which page number of the SubTeam List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the SubTeam List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2332,7 +2243,7 @@ def team_sub_teams( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_sub_teams_serialize( team_id=team_id, @@ -2341,16 +2252,15 @@ def team_sub_teams( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamSubTeamsResponse", - '4XX': "ErrorResponse", + "200": "TeamSubTeamsResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2358,20 +2268,28 @@ def team_sub_teams( response_types_map=_response_types_map, ).data - @validate_call def team_sub_teams_with_http_info( self, team_id: Annotated[StrictStr, Field(description="The id of the parent Team.")], - page: Annotated[Optional[StrictInt], Field(description="Which page number of the SubTeam List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the SubTeam List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2408,7 +2326,7 @@ def team_sub_teams_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_sub_teams_serialize( team_id=team_id, @@ -2417,16 +2335,15 @@ def team_sub_teams_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamSubTeamsResponse", - '4XX': "ErrorResponse", + "200": "TeamSubTeamsResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2434,20 +2351,28 @@ def team_sub_teams_with_http_info( response_types_map=_response_types_map, ) - @validate_call def team_sub_teams_without_preload_content( self, team_id: Annotated[StrictStr, Field(description="The id of the parent Team.")], - page: Annotated[Optional[StrictInt], Field(description="Which page number of the SubTeam List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the SubTeam List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2484,7 +2409,7 @@ def team_sub_teams_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_sub_teams_serialize( team_id=team_id, @@ -2493,20 +2418,18 @@ def team_sub_teams_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamSubTeamsResponse", - '4XX': "ErrorResponse", + "200": "TeamSubTeamsResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _team_sub_teams_serialize( self, team_id, @@ -2520,8 +2443,7 @@ def _team_sub_teams_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2532,39 +2454,32 @@ def _team_sub_teams_serialize( # process the path parameters if team_id is not None: - _path_params['team_id'] = team_id + _path_params["team_id"] = team_id # process the query parameters if page is not None: - - _query_params.append(('page', page)) - + + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/team/sub_teams/{team_id}', + method="GET", + resource_path="/team/sub_teams/{team_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2574,12 +2489,9 @@ def _team_sub_teams_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def team_update( self, @@ -2588,9 +2500,8 @@ def team_update( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2623,23 +2534,22 @@ def team_update( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_update_serialize( team_update_request=team_update_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2647,7 +2557,6 @@ def team_update( response_types_map=_response_types_map, ).data - @validate_call def team_update_with_http_info( self, @@ -2656,9 +2565,8 @@ def team_update_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2691,23 +2599,22 @@ def team_update_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_update_serialize( team_update_request=team_update_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2715,7 +2622,6 @@ def team_update_with_http_info( response_types_map=_response_types_map, ) - @validate_call def team_update_without_preload_content( self, @@ -2724,9 +2630,8 @@ def team_update_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2759,27 +2664,25 @@ def team_update_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._team_update_serialize( team_update_request=team_update_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TeamGetResponse", - '4XX': "ErrorResponse", + "200": "TeamGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _team_update_serialize( self, team_update_request, @@ -2791,8 +2694,7 @@ def _team_update_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2816,7 +2718,7 @@ def _team_update_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -2831,38 +2733,28 @@ def _team_update_serialize( if team_update_request is not None and has_files is False: _body_params = team_update_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='PUT', - resource_path='/team', + method="PUT", + resource_path="/team", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2872,7 +2764,5 @@ def _team_update_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/sdks/python/dropbox_sign/api/template_api.py b/sdks/python/dropbox_sign/api/template_api.py index 459469f5e..9f87978ee 100644 --- a/sdks/python/dropbox_sign/api/template_api.py +++ b/sdks/python/dropbox_sign/api/template_api.py @@ -23,15 +23,21 @@ from dropbox_sign.models.file_response import FileResponse from dropbox_sign.models.file_response_data_uri import FileResponseDataUri from dropbox_sign.models.template_add_user_request import TemplateAddUserRequest -from dropbox_sign.models.template_create_embedded_draft_request import TemplateCreateEmbeddedDraftRequest -from dropbox_sign.models.template_create_embedded_draft_response import TemplateCreateEmbeddedDraftResponse +from dropbox_sign.models.template_create_embedded_draft_request import ( + TemplateCreateEmbeddedDraftRequest, +) +from dropbox_sign.models.template_create_embedded_draft_response import ( + TemplateCreateEmbeddedDraftResponse, +) from dropbox_sign.models.template_create_request import TemplateCreateRequest from dropbox_sign.models.template_create_response import TemplateCreateResponse from dropbox_sign.models.template_get_response import TemplateGetResponse from dropbox_sign.models.template_list_response import TemplateListResponse from dropbox_sign.models.template_remove_user_request import TemplateRemoveUserRequest from dropbox_sign.models.template_update_files_request import TemplateUpdateFilesRequest -from dropbox_sign.models.template_update_files_response import TemplateUpdateFilesResponse +from dropbox_sign.models.template_update_files_response import ( + TemplateUpdateFilesResponse, +) from dropbox_sign.api_client import ApiClient, RequestSerialized from dropbox_sign.api_response import ApiResponse @@ -51,19 +57,20 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def template_add_user( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to give the Account access to.")], + template_id: Annotated[ + StrictStr, + Field(description="The id of the Template to give the Account access to."), + ], template_add_user_request: TemplateAddUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -98,7 +105,7 @@ def template_add_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_add_user_serialize( template_id=template_id, @@ -106,16 +113,15 @@ def template_add_user( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateGetResponse", - '4XX': "ErrorResponse", + "200": "TemplateGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -123,19 +129,20 @@ def template_add_user( response_types_map=_response_types_map, ).data - @validate_call def template_add_user_with_http_info( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to give the Account access to.")], + template_id: Annotated[ + StrictStr, + Field(description="The id of the Template to give the Account access to."), + ], template_add_user_request: TemplateAddUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -170,7 +177,7 @@ def template_add_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_add_user_serialize( template_id=template_id, @@ -178,16 +185,15 @@ def template_add_user_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateGetResponse", - '4XX': "ErrorResponse", + "200": "TemplateGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -195,19 +201,20 @@ def template_add_user_with_http_info( response_types_map=_response_types_map, ) - @validate_call def template_add_user_without_preload_content( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to give the Account access to.")], + template_id: Annotated[ + StrictStr, + Field(description="The id of the Template to give the Account access to."), + ], template_add_user_request: TemplateAddUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -242,7 +249,7 @@ def template_add_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_add_user_serialize( template_id=template_id, @@ -250,20 +257,18 @@ def template_add_user_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateGetResponse", - '4XX': "ErrorResponse", + "200": "TemplateGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _template_add_user_serialize( self, template_id, @@ -276,8 +281,7 @@ def _template_add_user_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -301,7 +305,7 @@ def _template_add_user_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -310,7 +314,7 @@ def _template_add_user_serialize( # process the path parameters if template_id is not None: - _path_params['template_id'] = template_id + _path_params["template_id"] = template_id # process the query parameters # process the header parameters # process the form parameters @@ -318,38 +322,28 @@ def _template_add_user_serialize( if template_add_user_request is not None and has_files is False: _body_params = template_add_user_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/template/add_user/{template_id}', + method="POST", + resource_path="/template/add_user/{template_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -359,12 +353,9 @@ def _template_add_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def template_create( self, @@ -373,9 +364,8 @@ def template_create( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -408,23 +398,22 @@ def template_create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_create_serialize( template_create_request=template_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateCreateResponse", - '4XX': "ErrorResponse", + "200": "TemplateCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -432,7 +421,6 @@ def template_create( response_types_map=_response_types_map, ).data - @validate_call def template_create_with_http_info( self, @@ -441,9 +429,8 @@ def template_create_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -476,23 +463,22 @@ def template_create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_create_serialize( template_create_request=template_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateCreateResponse", - '4XX': "ErrorResponse", + "200": "TemplateCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -500,7 +486,6 @@ def template_create_with_http_info( response_types_map=_response_types_map, ) - @validate_call def template_create_without_preload_content( self, @@ -509,9 +494,8 @@ def template_create_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -544,27 +528,25 @@ def template_create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_create_serialize( template_create_request=template_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateCreateResponse", - '4XX': "ErrorResponse", + "200": "TemplateCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _template_create_serialize( self, template_create_request, @@ -576,8 +558,7 @@ def _template_create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -601,7 +582,7 @@ def _template_create_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -616,39 +597,28 @@ def _template_create_serialize( if template_create_request is not None and has_files is False: _body_params = template_create_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/template/create', + method="POST", + resource_path="/template/create", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -658,12 +628,9 @@ def _template_create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def template_create_embedded_draft( self, @@ -672,9 +639,8 @@ def template_create_embedded_draft( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -707,23 +673,22 @@ def template_create_embedded_draft( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_create_embedded_draft_serialize( template_create_embedded_draft_request=template_create_embedded_draft_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateCreateEmbeddedDraftResponse", - '4XX': "ErrorResponse", + "200": "TemplateCreateEmbeddedDraftResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -731,7 +696,6 @@ def template_create_embedded_draft( response_types_map=_response_types_map, ).data - @validate_call def template_create_embedded_draft_with_http_info( self, @@ -740,9 +704,8 @@ def template_create_embedded_draft_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -775,23 +738,22 @@ def template_create_embedded_draft_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_create_embedded_draft_serialize( template_create_embedded_draft_request=template_create_embedded_draft_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateCreateEmbeddedDraftResponse", - '4XX': "ErrorResponse", + "200": "TemplateCreateEmbeddedDraftResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -799,7 +761,6 @@ def template_create_embedded_draft_with_http_info( response_types_map=_response_types_map, ) - @validate_call def template_create_embedded_draft_without_preload_content( self, @@ -808,9 +769,8 @@ def template_create_embedded_draft_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -843,27 +803,25 @@ def template_create_embedded_draft_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_create_embedded_draft_serialize( template_create_embedded_draft_request=template_create_embedded_draft_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateCreateEmbeddedDraftResponse", - '4XX': "ErrorResponse", + "200": "TemplateCreateEmbeddedDraftResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _template_create_embedded_draft_serialize( self, template_create_embedded_draft_request, @@ -875,8 +833,7 @@ def _template_create_embedded_draft_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -900,7 +857,7 @@ def _template_create_embedded_draft_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -915,39 +872,28 @@ def _template_create_embedded_draft_serialize( if template_create_embedded_draft_request is not None and has_files is False: _body_params = template_create_embedded_draft_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/template/create_embedded_draft', + method="POST", + resource_path="/template/create_embedded_draft", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -957,23 +903,21 @@ def _template_create_embedded_draft_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def template_delete( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to delete.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the Template to delete.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1006,23 +950,22 @@ def template_delete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_delete_serialize( template_id=template_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1030,18 +973,18 @@ def template_delete( response_types_map=_response_types_map, ).data - @validate_call def template_delete_with_http_info( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to delete.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the Template to delete.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1074,23 +1017,22 @@ def template_delete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_delete_serialize( template_id=template_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1098,18 +1040,18 @@ def template_delete_with_http_info( response_types_map=_response_types_map, ) - @validate_call def template_delete_without_preload_content( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to delete.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the Template to delete.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1142,27 +1084,25 @@ def template_delete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_delete_serialize( template_id=template_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, - '4XX': "ErrorResponse", + "200": None, + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _template_delete_serialize( self, template_id, @@ -1174,8 +1114,7 @@ def _template_delete_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1186,31 +1125,24 @@ def _template_delete_serialize( # process the path parameters if template_id is not None: - _path_params['template_id'] = template_id + _path_params["template_id"] = template_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/template/delete/{template_id}', + method="POST", + resource_path="/template/delete/{template_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1220,24 +1152,27 @@ def _template_delete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def template_files( self, - template_id: Annotated[StrictStr, Field(description="The id of the template files to retrieve.")], - file_type: Annotated[Optional[StrictStr], Field(description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents.")] = None, + template_id: Annotated[ + StrictStr, Field(description="The id of the template files to retrieve.") + ], + file_type: Annotated[ + Optional[StrictStr], + Field( + description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1272,7 +1207,7 @@ def template_files( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_files_serialize( template_id=template_id, @@ -1280,16 +1215,15 @@ def template_files( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "io.IOBase", - '4XX': "ErrorResponse", + "200": "io.IOBase", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1297,19 +1231,24 @@ def template_files( response_types_map=_response_types_map, ).data - @validate_call def template_files_with_http_info( self, - template_id: Annotated[StrictStr, Field(description="The id of the template files to retrieve.")], - file_type: Annotated[Optional[StrictStr], Field(description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents.")] = None, + template_id: Annotated[ + StrictStr, Field(description="The id of the template files to retrieve.") + ], + file_type: Annotated[ + Optional[StrictStr], + Field( + description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1344,7 +1283,7 @@ def template_files_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_files_serialize( template_id=template_id, @@ -1352,16 +1291,15 @@ def template_files_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "io.IOBase", - '4XX': "ErrorResponse", + "200": "io.IOBase", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1369,19 +1307,24 @@ def template_files_with_http_info( response_types_map=_response_types_map, ) - @validate_call def template_files_without_preload_content( self, - template_id: Annotated[StrictStr, Field(description="The id of the template files to retrieve.")], - file_type: Annotated[Optional[StrictStr], Field(description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents.")] = None, + template_id: Annotated[ + StrictStr, Field(description="The id of the template files to retrieve.") + ], + file_type: Annotated[ + Optional[StrictStr], + Field( + description="Set to `pdf` for a single merged document or `zip` for a collection of individual documents." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1416,7 +1359,7 @@ def template_files_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_files_serialize( template_id=template_id, @@ -1424,20 +1367,18 @@ def template_files_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "io.IOBase", - '4XX': "ErrorResponse", + "200": "io.IOBase", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _template_files_serialize( self, template_id, @@ -1450,8 +1391,7 @@ def _template_files_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1462,37 +1402,28 @@ def _template_files_serialize( # process the path parameters if template_id is not None: - _path_params['template_id'] = template_id + _path_params["template_id"] = template_id # process the query parameters if file_type is not None: - - _query_params.append(('file_type', file_type)) - + + _query_params.append(("file_type", file_type)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/pdf', - 'application/zip', - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/pdf", "application/zip", "application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/template/files/{template_id}', + method="GET", + resource_path="/template/files/{template_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1502,23 +1433,21 @@ def _template_files_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def template_files_as_data_uri( self, - template_id: Annotated[StrictStr, Field(description="The id of the template files to retrieve.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the template files to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1551,23 +1480,22 @@ def template_files_as_data_uri( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_files_as_data_uri_serialize( template_id=template_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponseDataUri", - '4XX': "ErrorResponse", + "200": "FileResponseDataUri", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1575,18 +1503,18 @@ def template_files_as_data_uri( response_types_map=_response_types_map, ).data - @validate_call def template_files_as_data_uri_with_http_info( self, - template_id: Annotated[StrictStr, Field(description="The id of the template files to retrieve.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the template files to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1619,23 +1547,22 @@ def template_files_as_data_uri_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_files_as_data_uri_serialize( template_id=template_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponseDataUri", - '4XX': "ErrorResponse", + "200": "FileResponseDataUri", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1643,18 +1570,18 @@ def template_files_as_data_uri_with_http_info( response_types_map=_response_types_map, ) - @validate_call def template_files_as_data_uri_without_preload_content( self, - template_id: Annotated[StrictStr, Field(description="The id of the template files to retrieve.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the template files to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1687,27 +1614,25 @@ def template_files_as_data_uri_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_files_as_data_uri_serialize( template_id=template_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponseDataUri", - '4XX': "ErrorResponse", + "200": "FileResponseDataUri", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _template_files_as_data_uri_serialize( self, template_id, @@ -1719,8 +1644,7 @@ def _template_files_as_data_uri_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1731,31 +1655,24 @@ def _template_files_as_data_uri_serialize( # process the path parameters if template_id is not None: - _path_params['template_id'] = template_id + _path_params["template_id"] = template_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/template/files_as_data_uri/{template_id}', + method="GET", + resource_path="/template/files_as_data_uri/{template_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1765,24 +1682,27 @@ def _template_files_as_data_uri_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def template_files_as_file_url( self, - template_id: Annotated[StrictStr, Field(description="The id of the template files to retrieve.")], - force_download: Annotated[Optional[StrictInt], Field(description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.")] = None, + template_id: Annotated[ + StrictStr, Field(description="The id of the template files to retrieve.") + ], + force_download: Annotated[ + Optional[StrictInt], + Field( + description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1817,7 +1737,7 @@ def template_files_as_file_url( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_files_as_file_url_serialize( template_id=template_id, @@ -1825,16 +1745,15 @@ def template_files_as_file_url( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponse", - '4XX': "ErrorResponse", + "200": "FileResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1842,19 +1761,24 @@ def template_files_as_file_url( response_types_map=_response_types_map, ).data - @validate_call def template_files_as_file_url_with_http_info( self, - template_id: Annotated[StrictStr, Field(description="The id of the template files to retrieve.")], - force_download: Annotated[Optional[StrictInt], Field(description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.")] = None, + template_id: Annotated[ + StrictStr, Field(description="The id of the template files to retrieve.") + ], + force_download: Annotated[ + Optional[StrictInt], + Field( + description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1889,7 +1813,7 @@ def template_files_as_file_url_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_files_as_file_url_serialize( template_id=template_id, @@ -1897,16 +1821,15 @@ def template_files_as_file_url_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponse", - '4XX': "ErrorResponse", + "200": "FileResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1914,19 +1837,24 @@ def template_files_as_file_url_with_http_info( response_types_map=_response_types_map, ) - @validate_call def template_files_as_file_url_without_preload_content( self, - template_id: Annotated[StrictStr, Field(description="The id of the template files to retrieve.")], - force_download: Annotated[Optional[StrictInt], Field(description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser.")] = None, + template_id: Annotated[ + StrictStr, Field(description="The id of the template files to retrieve.") + ], + force_download: Annotated[ + Optional[StrictInt], + Field( + description="By default when opening the `file_url` a browser will download the PDF and save it locally. When set to `0` the PDF file will be displayed in the browser." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1961,7 +1889,7 @@ def template_files_as_file_url_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_files_as_file_url_serialize( template_id=template_id, @@ -1969,20 +1897,18 @@ def template_files_as_file_url_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FileResponse", - '4XX': "ErrorResponse", + "200": "FileResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _template_files_as_file_url_serialize( self, template_id, @@ -1995,8 +1921,7 @@ def _template_files_as_file_url_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2007,35 +1932,28 @@ def _template_files_as_file_url_serialize( # process the path parameters if template_id is not None: - _path_params['template_id'] = template_id + _path_params["template_id"] = template_id # process the query parameters if force_download is not None: - - _query_params.append(('force_download', force_download)) - + + _query_params.append(("force_download", force_download)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/template/files_as_file_url/{template_id}', + method="GET", + resource_path="/template/files_as_file_url/{template_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2045,23 +1963,21 @@ def _template_files_as_file_url_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def template_get( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to retrieve.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the Template to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2094,23 +2010,22 @@ def template_get( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_get_serialize( template_id=template_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateGetResponse", - '4XX': "ErrorResponse", + "200": "TemplateGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2118,18 +2033,18 @@ def template_get( response_types_map=_response_types_map, ).data - @validate_call def template_get_with_http_info( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to retrieve.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the Template to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2162,23 +2077,22 @@ def template_get_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_get_serialize( template_id=template_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateGetResponse", - '4XX': "ErrorResponse", + "200": "TemplateGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2186,18 +2100,18 @@ def template_get_with_http_info( response_types_map=_response_types_map, ) - @validate_call def template_get_without_preload_content( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to retrieve.")], + template_id: Annotated[ + StrictStr, Field(description="The id of the Template to retrieve.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2230,27 +2144,25 @@ def template_get_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_get_serialize( template_id=template_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateGetResponse", - '4XX': "ErrorResponse", + "200": "TemplateGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _template_get_serialize( self, template_id, @@ -2262,8 +2174,7 @@ def _template_get_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2274,31 +2185,24 @@ def _template_get_serialize( # process the path parameters if template_id is not None: - _path_params['template_id'] = template_id + _path_params["template_id"] = template_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/template/{template_id}', + method="GET", + resource_path="/template/{template_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2308,26 +2212,42 @@ def _template_get_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def template_list( self, - account_id: Annotated[Optional[StrictStr], Field(description="Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.")] = None, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the Template List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, - query: Annotated[Optional[StrictStr], Field(description="String that includes search terms and/or fields to be used to filter the Template objects.")] = None, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account." + ), + ] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the Template List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, + query: Annotated[ + Optional[StrictStr], + Field( + description="String that includes search terms and/or fields to be used to filter the Template objects." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2366,7 +2286,7 @@ def template_list( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_list_serialize( account_id=account_id, @@ -2376,16 +2296,15 @@ def template_list( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateListResponse", - '4XX': "ErrorResponse", + "200": "TemplateListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2393,21 +2312,39 @@ def template_list( response_types_map=_response_types_map, ).data - @validate_call def template_list_with_http_info( self, - account_id: Annotated[Optional[StrictStr], Field(description="Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.")] = None, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the Template List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, - query: Annotated[Optional[StrictStr], Field(description="String that includes search terms and/or fields to be used to filter the Template objects.")] = None, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account." + ), + ] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the Template List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, + query: Annotated[ + Optional[StrictStr], + Field( + description="String that includes search terms and/or fields to be used to filter the Template objects." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2446,7 +2383,7 @@ def template_list_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_list_serialize( account_id=account_id, @@ -2456,16 +2393,15 @@ def template_list_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateListResponse", - '4XX': "ErrorResponse", + "200": "TemplateListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2473,21 +2409,39 @@ def template_list_with_http_info( response_types_map=_response_types_map, ) - @validate_call def template_list_without_preload_content( self, - account_id: Annotated[Optional[StrictStr], Field(description="Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account.")] = None, - page: Annotated[Optional[StrictInt], Field(description="Which page number of the Template List to return. Defaults to `1`.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], Field(description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`.")] = None, - query: Annotated[Optional[StrictStr], Field(description="String that includes search terms and/or fields to be used to filter the Template objects.")] = None, + account_id: Annotated[ + Optional[StrictStr], + Field( + description="Which account to return Templates for. Must be a team member. Use `all` to indicate all team members. Defaults to your account." + ), + ] = None, + page: Annotated[ + Optional[StrictInt], + Field( + description="Which page number of the Template List to return. Defaults to `1`." + ), + ] = None, + page_size: Annotated[ + Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], + Field( + description="Number of objects to be returned per page. Must be between `1` and `100`. Default is `20`." + ), + ] = None, + query: Annotated[ + Optional[StrictStr], + Field( + description="String that includes search terms and/or fields to be used to filter the Template objects." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2526,7 +2480,7 @@ def template_list_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_list_serialize( account_id=account_id, @@ -2536,20 +2490,18 @@ def template_list_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateListResponse", - '4XX': "ErrorResponse", + "200": "TemplateListResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _template_list_serialize( self, account_id, @@ -2564,8 +2516,7 @@ def _template_list_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2577,44 +2528,37 @@ def _template_list_serialize( # process the path parameters # process the query parameters if account_id is not None: - - _query_params.append(('account_id', account_id)) - + + _query_params.append(("account_id", account_id)) + if page is not None: - - _query_params.append(('page', page)) - + + _query_params.append(("page", page)) + if page_size is not None: - - _query_params.append(('page_size', page_size)) - + + _query_params.append(("page_size", page_size)) + if query is not None: - - _query_params.append(('query', query)) - + + _query_params.append(("query", query)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) - # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='GET', - resource_path='/template/list', + method="GET", + resource_path="/template/list", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2624,24 +2568,25 @@ def _template_list_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def template_remove_user( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to remove the Account's access to.")], + template_id: Annotated[ + StrictStr, + Field( + description="The id of the Template to remove the Account's access to." + ), + ], template_remove_user_request: TemplateRemoveUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2676,7 +2621,7 @@ def template_remove_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_remove_user_serialize( template_id=template_id, @@ -2684,16 +2629,15 @@ def template_remove_user( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateGetResponse", - '4XX': "ErrorResponse", + "200": "TemplateGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2701,19 +2645,22 @@ def template_remove_user( response_types_map=_response_types_map, ).data - @validate_call def template_remove_user_with_http_info( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to remove the Account's access to.")], + template_id: Annotated[ + StrictStr, + Field( + description="The id of the Template to remove the Account's access to." + ), + ], template_remove_user_request: TemplateRemoveUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2748,7 +2695,7 @@ def template_remove_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_remove_user_serialize( template_id=template_id, @@ -2756,16 +2703,15 @@ def template_remove_user_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateGetResponse", - '4XX': "ErrorResponse", + "200": "TemplateGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2773,19 +2719,22 @@ def template_remove_user_with_http_info( response_types_map=_response_types_map, ) - @validate_call def template_remove_user_without_preload_content( self, - template_id: Annotated[StrictStr, Field(description="The id of the Template to remove the Account's access to.")], + template_id: Annotated[ + StrictStr, + Field( + description="The id of the Template to remove the Account's access to." + ), + ], template_remove_user_request: TemplateRemoveUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2820,7 +2769,7 @@ def template_remove_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_remove_user_serialize( template_id=template_id, @@ -2828,20 +2777,18 @@ def template_remove_user_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateGetResponse", - '4XX': "ErrorResponse", + "200": "TemplateGetResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _template_remove_user_serialize( self, template_id, @@ -2854,8 +2801,7 @@ def _template_remove_user_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2879,7 +2825,7 @@ def _template_remove_user_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -2888,7 +2834,7 @@ def _template_remove_user_serialize( # process the path parameters if template_id is not None: - _path_params['template_id'] = template_id + _path_params["template_id"] = template_id # process the query parameters # process the header parameters # process the form parameters @@ -2896,38 +2842,28 @@ def _template_remove_user_serialize( if template_remove_user_request is not None and has_files is False: _body_params = template_remove_user_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/template/remove_user/{template_id}', + method="POST", + resource_path="/template/remove_user/{template_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2937,24 +2873,23 @@ def _template_remove_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def template_update_files( self, - template_id: Annotated[StrictStr, Field(description="The ID of the template whose files to update.")], + template_id: Annotated[ + StrictStr, + Field(description="The ID of the template whose files to update."), + ], template_update_files_request: TemplateUpdateFilesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2989,7 +2924,7 @@ def template_update_files( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_update_files_serialize( template_id=template_id, @@ -2997,16 +2932,15 @@ def template_update_files( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateUpdateFilesResponse", - '4XX': "ErrorResponse", + "200": "TemplateUpdateFilesResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3014,19 +2948,20 @@ def template_update_files( response_types_map=_response_types_map, ).data - @validate_call def template_update_files_with_http_info( self, - template_id: Annotated[StrictStr, Field(description="The ID of the template whose files to update.")], + template_id: Annotated[ + StrictStr, + Field(description="The ID of the template whose files to update."), + ], template_update_files_request: TemplateUpdateFilesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3061,7 +2996,7 @@ def template_update_files_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_update_files_serialize( template_id=template_id, @@ -3069,16 +3004,15 @@ def template_update_files_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateUpdateFilesResponse", - '4XX': "ErrorResponse", + "200": "TemplateUpdateFilesResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3086,19 +3020,20 @@ def template_update_files_with_http_info( response_types_map=_response_types_map, ) - @validate_call def template_update_files_without_preload_content( self, - template_id: Annotated[StrictStr, Field(description="The ID of the template whose files to update.")], + template_id: Annotated[ + StrictStr, + Field(description="The ID of the template whose files to update."), + ], template_update_files_request: TemplateUpdateFilesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3133,7 +3068,7 @@ def template_update_files_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._template_update_files_serialize( template_id=template_id, @@ -3141,20 +3076,18 @@ def template_update_files_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "TemplateUpdateFilesResponse", - '4XX': "ErrorResponse", + "200": "TemplateUpdateFilesResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _template_update_files_serialize( self, template_id, @@ -3167,8 +3100,7 @@ def _template_update_files_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3192,7 +3124,7 @@ def _template_update_files_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -3201,7 +3133,7 @@ def _template_update_files_serialize( # process the path parameters if template_id is not None: - _path_params['template_id'] = template_id + _path_params["template_id"] = template_id # process the query parameters # process the header parameters # process the form parameters @@ -3209,39 +3141,28 @@ def _template_update_files_serialize( if template_update_files_request is not None and has_files is False: _body_params = template_update_files_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/template/update_files/{template_id}', + method="POST", + resource_path="/template/update_files/{template_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3251,7 +3172,5 @@ def _template_update_files_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/sdks/python/dropbox_sign/api/unclaimed_draft_api.py b/sdks/python/dropbox_sign/api/unclaimed_draft_api.py index 24580c554..620a71e90 100644 --- a/sdks/python/dropbox_sign/api/unclaimed_draft_api.py +++ b/sdks/python/dropbox_sign/api/unclaimed_draft_api.py @@ -19,11 +19,21 @@ from pydantic import Field, StrictStr from typing_extensions import Annotated -from dropbox_sign.models.unclaimed_draft_create_embedded_request import UnclaimedDraftCreateEmbeddedRequest -from dropbox_sign.models.unclaimed_draft_create_embedded_with_template_request import UnclaimedDraftCreateEmbeddedWithTemplateRequest -from dropbox_sign.models.unclaimed_draft_create_request import UnclaimedDraftCreateRequest -from dropbox_sign.models.unclaimed_draft_create_response import UnclaimedDraftCreateResponse -from dropbox_sign.models.unclaimed_draft_edit_and_resend_request import UnclaimedDraftEditAndResendRequest +from dropbox_sign.models.unclaimed_draft_create_embedded_request import ( + UnclaimedDraftCreateEmbeddedRequest, +) +from dropbox_sign.models.unclaimed_draft_create_embedded_with_template_request import ( + UnclaimedDraftCreateEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.unclaimed_draft_create_request import ( + UnclaimedDraftCreateRequest, +) +from dropbox_sign.models.unclaimed_draft_create_response import ( + UnclaimedDraftCreateResponse, +) +from dropbox_sign.models.unclaimed_draft_edit_and_resend_request import ( + UnclaimedDraftEditAndResendRequest, +) from dropbox_sign.api_client import ApiClient, RequestSerialized from dropbox_sign.api_response import ApiResponse @@ -43,7 +53,6 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client - @validate_call def unclaimed_draft_create( self, @@ -52,9 +61,8 @@ def unclaimed_draft_create( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -87,23 +95,22 @@ def unclaimed_draft_create( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_create_serialize( unclaimed_draft_create_request=unclaimed_draft_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -111,7 +118,6 @@ def unclaimed_draft_create( response_types_map=_response_types_map, ).data - @validate_call def unclaimed_draft_create_with_http_info( self, @@ -120,9 +126,8 @@ def unclaimed_draft_create_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -155,23 +160,22 @@ def unclaimed_draft_create_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_create_serialize( unclaimed_draft_create_request=unclaimed_draft_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -179,7 +183,6 @@ def unclaimed_draft_create_with_http_info( response_types_map=_response_types_map, ) - @validate_call def unclaimed_draft_create_without_preload_content( self, @@ -188,9 +191,8 @@ def unclaimed_draft_create_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -223,27 +225,25 @@ def unclaimed_draft_create_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_create_serialize( unclaimed_draft_create_request=unclaimed_draft_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _unclaimed_draft_create_serialize( self, unclaimed_draft_create_request, @@ -255,8 +255,7 @@ def _unclaimed_draft_create_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -280,7 +279,7 @@ def _unclaimed_draft_create_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -295,39 +294,28 @@ def _unclaimed_draft_create_serialize( if unclaimed_draft_create_request is not None and has_files is False: _body_params = unclaimed_draft_create_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/unclaimed_draft/create', + method="POST", + resource_path="/unclaimed_draft/create", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -337,12 +325,9 @@ def _unclaimed_draft_create_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def unclaimed_draft_create_embedded( self, @@ -351,9 +336,8 @@ def unclaimed_draft_create_embedded( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -386,23 +370,22 @@ def unclaimed_draft_create_embedded( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_create_embedded_serialize( unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -410,7 +393,6 @@ def unclaimed_draft_create_embedded( response_types_map=_response_types_map, ).data - @validate_call def unclaimed_draft_create_embedded_with_http_info( self, @@ -419,9 +401,8 @@ def unclaimed_draft_create_embedded_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -454,23 +435,22 @@ def unclaimed_draft_create_embedded_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_create_embedded_serialize( unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -478,7 +458,6 @@ def unclaimed_draft_create_embedded_with_http_info( response_types_map=_response_types_map, ) - @validate_call def unclaimed_draft_create_embedded_without_preload_content( self, @@ -487,9 +466,8 @@ def unclaimed_draft_create_embedded_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -522,27 +500,25 @@ def unclaimed_draft_create_embedded_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_create_embedded_serialize( unclaimed_draft_create_embedded_request=unclaimed_draft_create_embedded_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _unclaimed_draft_create_embedded_serialize( self, unclaimed_draft_create_embedded_request, @@ -554,8 +530,7 @@ def _unclaimed_draft_create_embedded_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -579,7 +554,7 @@ def _unclaimed_draft_create_embedded_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -594,39 +569,28 @@ def _unclaimed_draft_create_embedded_serialize( if unclaimed_draft_create_embedded_request is not None and has_files is False: _body_params = unclaimed_draft_create_embedded_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/unclaimed_draft/create_embedded', + method="POST", + resource_path="/unclaimed_draft/create_embedded", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -636,12 +600,9 @@ def _unclaimed_draft_create_embedded_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def unclaimed_draft_create_embedded_with_template( self, @@ -650,9 +611,8 @@ def unclaimed_draft_create_embedded_with_template( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -685,23 +645,22 @@ def unclaimed_draft_create_embedded_with_template( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_create_embedded_with_template_serialize( unclaimed_draft_create_embedded_with_template_request=unclaimed_draft_create_embedded_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -709,7 +668,6 @@ def unclaimed_draft_create_embedded_with_template( response_types_map=_response_types_map, ).data - @validate_call def unclaimed_draft_create_embedded_with_template_with_http_info( self, @@ -718,9 +676,8 @@ def unclaimed_draft_create_embedded_with_template_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -753,23 +710,22 @@ def unclaimed_draft_create_embedded_with_template_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_create_embedded_with_template_serialize( unclaimed_draft_create_embedded_with_template_request=unclaimed_draft_create_embedded_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -777,7 +733,6 @@ def unclaimed_draft_create_embedded_with_template_with_http_info( response_types_map=_response_types_map, ) - @validate_call def unclaimed_draft_create_embedded_with_template_without_preload_content( self, @@ -786,9 +741,8 @@ def unclaimed_draft_create_embedded_with_template_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -821,27 +775,25 @@ def unclaimed_draft_create_embedded_with_template_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_create_embedded_with_template_serialize( unclaimed_draft_create_embedded_with_template_request=unclaimed_draft_create_embedded_with_template_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _unclaimed_draft_create_embedded_with_template_serialize( self, unclaimed_draft_create_embedded_with_template_request, @@ -853,8 +805,7 @@ def _unclaimed_draft_create_embedded_with_template_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -878,7 +829,7 @@ def _unclaimed_draft_create_embedded_with_template_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -890,42 +841,34 @@ def _unclaimed_draft_create_embedded_with_template_serialize( # process the header parameters # process the form parameters # process the body parameter - if unclaimed_draft_create_embedded_with_template_request is not None and has_files is False: + if ( + unclaimed_draft_create_embedded_with_template_request is not None + and has_files is False + ): _body_params = unclaimed_draft_create_embedded_with_template_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json', - 'multipart/form-data' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json", "multipart/form-data"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/unclaimed_draft/create_embedded_with_template', + method="POST", + resource_path="/unclaimed_draft/create_embedded_with_template", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -935,24 +878,23 @@ def _unclaimed_draft_create_embedded_with_template_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - - @validate_call def unclaimed_draft_edit_and_resend( self, - signature_request_id: Annotated[StrictStr, Field(description="The ID of the signature request to edit and resend.")], + signature_request_id: Annotated[ + StrictStr, + Field(description="The ID of the signature request to edit and resend."), + ], unclaimed_draft_edit_and_resend_request: UnclaimedDraftEditAndResendRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -987,7 +929,7 @@ def unclaimed_draft_edit_and_resend( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_edit_and_resend_serialize( signature_request_id=signature_request_id, @@ -995,16 +937,15 @@ def unclaimed_draft_edit_and_resend( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1012,19 +953,20 @@ def unclaimed_draft_edit_and_resend( response_types_map=_response_types_map, ).data - @validate_call def unclaimed_draft_edit_and_resend_with_http_info( self, - signature_request_id: Annotated[StrictStr, Field(description="The ID of the signature request to edit and resend.")], + signature_request_id: Annotated[ + StrictStr, + Field(description="The ID of the signature request to edit and resend."), + ], unclaimed_draft_edit_and_resend_request: UnclaimedDraftEditAndResendRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1059,7 +1001,7 @@ def unclaimed_draft_edit_and_resend_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_edit_and_resend_serialize( signature_request_id=signature_request_id, @@ -1067,16 +1009,15 @@ def unclaimed_draft_edit_and_resend_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1084,19 +1025,20 @@ def unclaimed_draft_edit_and_resend_with_http_info( response_types_map=_response_types_map, ) - @validate_call def unclaimed_draft_edit_and_resend_without_preload_content( self, - signature_request_id: Annotated[StrictStr, Field(description="The ID of the signature request to edit and resend.")], + signature_request_id: Annotated[ + StrictStr, + Field(description="The ID of the signature request to edit and resend."), + ], unclaimed_draft_edit_and_resend_request: UnclaimedDraftEditAndResendRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1131,7 +1073,7 @@ def unclaimed_draft_edit_and_resend_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unclaimed_draft_edit_and_resend_serialize( signature_request_id=signature_request_id, @@ -1139,20 +1081,18 @@ def unclaimed_draft_edit_and_resend_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UnclaimedDraftCreateResponse", - '4XX': "ErrorResponse", + "200": "UnclaimedDraftCreateResponse", + "4XX": "ErrorResponse", } response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + *_param, _request_timeout=_request_timeout ) return response_data.response - def _unclaimed_draft_edit_and_resend_serialize( self, signature_request_id, @@ -1165,8 +1105,7 @@ def _unclaimed_draft_edit_and_resend_serialize( _host = None - _collection_formats: Dict[str, str] = { - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1190,7 +1129,7 @@ def _unclaimed_draft_edit_and_resend_serialize( if isinstance(param_value, list): for index, item in enumerate(param_value): - _files[f'{param_name}[{index}]'] = item + _files[f"{param_name}[{index}]"] = item else: _files[param_name] = param_value @@ -1199,7 +1138,7 @@ def _unclaimed_draft_edit_and_resend_serialize( # process the path parameters if signature_request_id is not None: - _path_params['signature_request_id'] = signature_request_id + _path_params["signature_request_id"] = signature_request_id # process the query parameters # process the header parameters # process the form parameters @@ -1207,38 +1146,28 @@ def _unclaimed_draft_edit_and_resend_serialize( if unclaimed_draft_edit_and_resend_request is not None and has_files is False: _body_params = unclaimed_draft_edit_and_resend_request - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] ) # set the HTTP header `Content-Type` if _content_type: - _header_params['Content-Type'] = _content_type + _header_params["Content-Type"] = _content_type else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) + _default_content_type = self.api_client.select_header_content_type( + ["application/json"] ) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'api_key', - 'oauth2' - ] + _auth_settings: List[str] = ["api_key", "oauth2"] return self.api_client.param_serialize( - method='POST', - resource_path='/unclaimed_draft/edit_and_resend/{signature_request_id}', + method="POST", + resource_path="/unclaimed_draft/edit_and_resend/{signature_request_id}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1248,7 +1177,5 @@ def _unclaimed_draft_edit_and_resend_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth + _request_auth=_request_auth, ) - - diff --git a/sdks/python/dropbox_sign/api_client.py b/sdks/python/dropbox_sign/api_client.py index 9916d6995..3442861b9 100644 --- a/sdks/python/dropbox_sign/api_client.py +++ b/sdks/python/dropbox_sign/api_client.py @@ -39,11 +39,12 @@ UnauthorizedException, ForbiddenException, NotFoundException, - ServiceException + ServiceException, ) RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + class ApiClient: """Generic API client for OpenAPI client library builds. @@ -62,24 +63,20 @@ class ApiClient: PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'object': object, + "int": int, + "long": int, # TODO remove as only py3 is supported? + "float": float, + "str": str, + "bool": bool, + "date": datetime.date, + "datetime": datetime.datetime, + "decimal": decimal.Decimal, + "object": object, } _pool = None def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None + self, configuration=None, header_name=None, header_value=None, cookie=None ) -> None: # use default configuration if none is provided if configuration is None: @@ -92,7 +89,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.6-dev/python' + self.user_agent = "OpenAPI-Generator/1.6-dev/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): @@ -104,16 +101,15 @@ def __exit__(self, exc_type, exc_value, traceback): @property def user_agent(self): """User agent for this API client""" - return self.default_headers['User-Agent'] + return self.default_headers["User-Agent"] @user_agent.setter def user_agent(self, value): - self.default_headers['User-Agent'] = value + self.default_headers["User-Agent"] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value - _default = None @classmethod @@ -149,12 +145,12 @@ def param_serialize( header_params=None, body=None, post_params=None, - files=None, auth_settings=None, + files=None, + auth_settings=None, collection_formats=None, _host=None, - _request_auth=None + _request_auth=None, ) -> RequestSerialized: - """Builds the HTTP request params needed by the request. :param method: Method to call. :param resource_path: Path to method endpoint. @@ -183,35 +179,28 @@ def param_serialize( header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params['Cookie'] = self.cookie + header_params["Cookie"] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) + self.parameters_to_tuples(header_params, collection_formats) ) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) + path_params = self.parameters_to_tuples(path_params, collection_formats) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) + "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param) ) # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) + post_params = self.parameters_to_tuples(post_params, collection_formats) if files: post_params.extend(self.files_parameters(files)) @@ -223,7 +212,7 @@ def param_serialize( resource_path, method, body, - request_auth=_request_auth + request_auth=_request_auth, ) # body @@ -240,15 +229,11 @@ def param_serialize( # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) + url_query = self.parameters_to_url_query(query_params, collection_formats) url += "?" + url_query return method, url, header_params, body, post_params - def call_api( self, method, @@ -256,7 +241,7 @@ def call_api( header_params=None, body=None, post_params=None, - _request_timeout=None + _request_timeout=None, ) -> rest.RESTResponse: """Makes the HTTP request (synchronous) :param method: Method to call. @@ -273,10 +258,12 @@ def call_api( try: # perform request and return response response_data = self.rest_client.request( - method, url, + method, + url, headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout + body=body, + post_params=post_params, + _request_timeout=_request_timeout, ) except ApiException as e: @@ -287,7 +274,7 @@ def call_api( def response_deserialize( self, response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None + response_types_map: Optional[Dict[str, ApiResponseT]] = None, ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. @@ -299,9 +286,15 @@ def response_deserialize( assert response_data.data is not None, msg response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + if ( + not response_type + and isinstance(response_data.status, int) + and 100 <= response_data.status <= 599 + ): # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + response_type = response_types_map.get( + str(response_data.status)[0] + "XX", None + ) # deserialize response data response_text = None @@ -313,12 +306,14 @@ def response_deserialize( return_data = self.__deserialize_file(response_data) elif response_type is not None: match = None - content_type = response_data.getheader('content-type') + content_type = response_data.getheader("content-type") if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type, content_type) + return_data = self.deserialize( + response_text, response_type, content_type + ) finally: if not 200 <= response_data.status <= 299: raise ApiException.from_response( @@ -328,10 +323,10 @@ def response_deserialize( ) return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), - raw_data = response_data.data + status_code=response_data.status, + data=return_data, + headers=response_data.getheaders(), + raw_data=response_data.data, ) def sanitize_for_serialization(self, obj): @@ -359,13 +354,9 @@ def sanitize_for_serialization(self, obj): elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] + return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) + return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() elif isinstance(obj, decimal.Decimal): @@ -379,17 +370,18 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): obj_dict = obj.to_dict() else: obj_dict = obj.__dict__ return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() + key: self.sanitize_for_serialization(val) for key, val in obj_dict.items() } - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + def deserialize( + self, response_text: str, response_type: str, content_type: Optional[str] + ): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. @@ -415,8 +407,7 @@ def deserialize(self, response_text: str, response_type: str, content_type: Opti data = response_text else: raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) + status=0, reason="Unsupported content type: {0}".format(content_type) ) return self.__deserialize(data, response_type) @@ -433,19 +424,17 @@ def __deserialize(self, data, klass): return None if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) + if klass.startswith("List["): + m = re.match(r"List\[(.*)]", klass) assert m is not None, "Malformed List type definition" sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] + return [self.__deserialize(sub_data, sub_kls) for sub_data in data] - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) + if klass.startswith("Dict["): + m = re.match(r"Dict\[([^,]*), (.*)]", klass) assert m is not None, "Malformed Dict type definition" sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} + return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -481,19 +470,18 @@ def parameters_to_tuples(self, params, collection_formats): for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, value) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) + delimiter = "," + new_params.append((k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params @@ -518,17 +506,17 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, str(value)) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' + delimiter = "," new_params.append( (k, delimiter.join(quote(str(value)) for value in v)) ) @@ -546,7 +534,7 @@ def files_parameters(self, files: Dict[str, Union[str, bytes, io.IOBase]]): params = [] for k, v in files.items(): if isinstance(v, str): - with open(v, 'rb') as f: + with open(v, "rb") as f: filename = os.path.basename(f.name) filedata = f.read() elif isinstance(v, bytes): @@ -557,13 +545,8 @@ def files_parameters(self, files: Dict[str, Union[str, bytes, io.IOBase]]): filedata = v.read() else: raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) + mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" + params.append(tuple([k, tuple([filename, filedata, mimetype])])) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -576,7 +559,7 @@ def select_header_accept(self, accepts: List[str]) -> Optional[str]: return None for accept in accepts: - if re.search('json', accept, re.IGNORECASE): + if re.search("json", accept, re.IGNORECASE): return accept return accepts[0] @@ -591,7 +574,7 @@ def select_header_content_type(self, content_types): return None for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): + if re.search("json", content_type, re.IGNORECASE): return content_type return content_types[0] @@ -604,7 +587,7 @@ def update_params_for_auth( resource_path, method, body, - request_auth=None + request_auth=None, ) -> None: """Updates header and query params based on authentication setting. @@ -623,34 +606,18 @@ def update_params_for_auth( if request_auth: self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth + headers, queries, resource_path, method, body, request_auth ) else: for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting + headers, queries, resource_path, method, body, auth_setting ) def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting + self, headers, queries, resource_path, method, body, auth_setting ) -> None: """Updates the request parameters based on a single auth_setting @@ -662,17 +629,15 @@ def _apply_auth_params( The object type is the return value of sanitize_for_serialization(). :param auth_setting: auth settings for the endpoint """ - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) + if auth_setting["in"] == "cookie": + headers["Cookie"] = auth_setting["value"] + elif auth_setting["in"] == "header": + if auth_setting["type"] != "http-signature": + headers[auth_setting["key"]] = auth_setting["value"] + elif auth_setting["in"] == "query": + queries.append((auth_setting["key"], auth_setting["value"])) else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + raise ApiValueError("Authentication token must be in `query` or `header`") def __deserialize_file(self, response): """Deserializes body to file @@ -692,10 +657,7 @@ def __deserialize_file(self, response): content_disposition = response.getheader("Content-Disposition") if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) + m = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition) assert m is not None, "Unexpected 'content-disposition' header value" filename = m.group(1) path = os.path.join(os.path.dirname(path), filename) @@ -739,8 +701,7 @@ def __deserialize_date(self, string): return string except ValueError: raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) + status=0, reason="Failed to parse `{0}` as date object".format(string) ) def __deserialize_datetime(self, string): @@ -758,10 +719,7 @@ def __deserialize_datetime(self, string): except ValueError: raise rest.ApiException( status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) + reason=("Failed to parse `{0}` as datetime object".format(string)), ) def __deserialize_enum(self, data, klass): @@ -775,11 +733,7 @@ def __deserialize_enum(self, data, klass): return klass(data) except ValueError: raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) - ) + status=0, reason=("Failed to parse `{0}` as `{1}`".format(data, klass)) ) def __deserialize_model(self, data, klass): diff --git a/sdks/python/dropbox_sign/api_response.py b/sdks/python/dropbox_sign/api_response.py index 9bc7c11f6..1ce13729b 100644 --- a/sdks/python/dropbox_sign/api_response.py +++ b/sdks/python/dropbox_sign/api_response.py @@ -6,6 +6,7 @@ T = TypeVar("T") + class ApiResponse(BaseModel, Generic[T]): """ API response object @@ -16,6 +17,4 @@ class ApiResponse(BaseModel, Generic[T]): data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - model_config = { - "arbitrary_types_allowed": True - } + model_config = {"arbitrary_types_allowed": True} diff --git a/sdks/python/dropbox_sign/configuration.py b/sdks/python/dropbox_sign/configuration.py index 4041cb85a..d89eb27b9 100644 --- a/sdks/python/dropbox_sign/configuration.py +++ b/sdks/python/dropbox_sign/configuration.py @@ -24,76 +24,89 @@ import http.client as httplib JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum", + "maxLength", + "minLength", + "pattern", + "maxItems", + "minItems", } + class Configuration: """This class contains various settings of the API client. - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: Number of retries for API requests. - - :Example: - - HTTP Basic Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - http_basic_auth: - type: http - scheme: basic - - Configure API client with HTTP basic authentication: - -conf = dropbox_sign.Configuration( - username='YOUR_API_KEY', -) + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: Number of retries for API requests. + + :Example: + + HTTP Basic Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + http_basic_auth: + type: http + scheme: basic + + Configure API client with HTTP basic authentication: + + conf = dropbox_sign.Configuration( + username='YOUR_API_KEY', + ) """ _default = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - username=None, password=None, - access_token=None, - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ignore_operation_servers=False, - ssl_ca_cert=None, - retries=None, - *, - debug: Optional[bool] = None - ) -> None: - """Constructor - """ + def __init__( + self, + host=None, + api_key=None, + api_key_prefix=None, + username=None, + password=None, + access_token=None, + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, + ignore_operation_servers=False, + ssl_ca_cert=None, + retries=None, + *, + debug: Optional[bool] = None + ) -> None: + """Constructor""" self._base_path = "https://api.hellosign.com/v3" if host is None else host """Default Base url """ @@ -139,7 +152,7 @@ def __init__(self, host=None, """ self.logger["package_logger"] = logging.getLogger("dropbox_sign") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' + self.logger_format = "%(asctime)s %(levelname)s %(message)s" """Log format """ self.logger_stream_handler = None @@ -194,7 +207,7 @@ def __init__(self, host=None, self.proxy_headers = None """Proxy headers """ - self.safe_chars_for_path_param = '' + self.safe_chars_for_path_param = "" """Safe chars for path_param """ self.retries = retries @@ -220,7 +233,7 @@ def __deepcopy__(self, memo): result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): + if k not in ("logger", "logger_file_handler"): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -361,7 +374,9 @@ def get_api_key_with_prefix(self, identifier, alias=None): """ if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + key = self.api_key.get( + identifier, self.api_key.get(alias) if alias is not None else None + ) if key: prefix = self.api_key_prefix.get(identifier) if prefix: @@ -380,9 +395,9 @@ def get_basic_auth_token(self): password = "" if self.password is not None: password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') + return urllib3.util.make_headers(basic_auth=username + ":" + password).get( + "authorization" + ) def auth_settings(self): """Gets Auth Settings dict for api client. @@ -391,19 +406,19 @@ def auth_settings(self): """ auth = {} if self.username is not None: - auth['api_key'] = { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() + auth["api_key"] = { + "type": "basic", + "in": "header", + "key": "Authorization", + "value": self.get_basic_auth_token(), } if self.access_token is not None: - auth['oauth2'] = { - 'type': 'bearer', - 'in': 'header', - 'format': 'JWT', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token + auth["oauth2"] = { + "type": "bearer", + "in": "header", + "format": "JWT", + "key": "Authorization", + "value": "Bearer " + self.access_token, } return auth @@ -412,12 +427,15 @@ def to_debug_report(self): :return: The report for debugging. """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 3.0.0\n"\ - "SDK Package Version: 1.6-dev".\ - format(env=sys.platform, pyversion=sys.version) + return ( + "Python SDK Debug Report:\n" + "OS: {env}\n" + "Python Version: {pyversion}\n" + "Version of the API: 3.0.0\n" + "SDK Package Version: 1.6-dev".format( + env=sys.platform, pyversion=sys.version + ) + ) def get_host_settings(self): """Gets an array of host settings @@ -426,8 +444,8 @@ def get_host_settings(self): """ return [ { - 'url': "https://api.hellosign.com/v3", - 'description': "No description provided", + "url": "https://api.hellosign.com/v3", + "description": "No description provided", } ] @@ -449,22 +467,22 @@ def get_host_from_settings(self, index, variables=None, servers=None): except IndexError: raise ValueError( "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) + "Must be less than {1}".format(index, len(servers)) + ) - url = server['url'] + url = server["url"] # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) + for variable_name, variable in server.get("variables", {}).items(): + used_value = variables.get(variable_name, variable["default_value"]) - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: + if "enum_values" in variable and used_value not in variable["enum_values"]: raise ValueError( "The variable `{0}` in the host URL has invalid value " "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) + variable_name, variables[variable_name], variable["enum_values"] + ) + ) url = url.replace("{" + variable_name + "}", used_value) @@ -473,7 +491,9 @@ def get_host_from_settings(self, index, variables=None, servers=None): @property def host(self): """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) + return self.get_host_from_settings( + self.server_index, variables=self.server_variables + ) @host.setter def host(self, value): diff --git a/sdks/python/dropbox_sign/event_callback_helper.py b/sdks/python/dropbox_sign/event_callback_helper.py index e8a87d7d7..ea078666a 100644 --- a/sdks/python/dropbox_sign/event_callback_helper.py +++ b/sdks/python/dropbox_sign/event_callback_helper.py @@ -4,9 +4,9 @@ class EventCallbackHelper: - EVENT_TYPE_ACCOUNT_CALLBACK = 'account_callback' + EVENT_TYPE_ACCOUNT_CALLBACK = "account_callback" - EVENT_TYPE_APP_CALLBACK = 'app_callback' + EVENT_TYPE_APP_CALLBACK = "app_callback" @classmethod def is_valid(cls, api_key, event_callback: EventCallbackRequest): # noqa: E501 @@ -17,9 +17,12 @@ def is_valid(cls, api_key, event_callback: EventCallbackRequest): # noqa: E501 event_callback (EventCallbackRequest): """ hashed = hmac.new( - bytes(api_key, 'utf-8'), - bytes(f'{event_callback.event.event_time}{event_callback.event.event_type}', 'utf-8'), - hashlib.sha256 + bytes(api_key, "utf-8"), + bytes( + f"{event_callback.event.event_time}{event_callback.event.event_type}", + "utf-8", + ), + hashlib.sha256, ).hexdigest() return event_callback.event.event_hash == hashed @@ -32,7 +35,9 @@ def get_callback_type(cls, event_callback: EventCallbackRequest): Args: event_callback (EventCallbackRequest): """ - metadata: EventCallbackRequestEventMetadata = event_callback.event.event_metadata + metadata: EventCallbackRequestEventMetadata = ( + event_callback.event.event_metadata + ) if not metadata or not metadata.reported_for_app_id: return cls.EVENT_TYPE_ACCOUNT_CALLBACK diff --git a/sdks/python/dropbox_sign/exceptions.py b/sdks/python/dropbox_sign/exceptions.py index ba101a20f..43300ceac 100644 --- a/sdks/python/dropbox_sign/exceptions.py +++ b/sdks/python/dropbox_sign/exceptions.py @@ -16,14 +16,16 @@ from typing_extensions import Self from dropbox_sign.models.error_response import ErrorResponse + class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors + def __init__( + self, msg, path_to_item=None, valid_classes=None, key_type=None + ) -> None: + """Raises an exception for TypeErrors Args: msg (str): the exception message @@ -106,9 +108,9 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): def __init__( - self, - status=None, - reason=None, + self, + status=None, + reason=None, http_resp=None, *, body: Optional[str] = None, @@ -127,17 +129,17 @@ def __init__( self.reason = http_resp.reason if self.body is None: try: - self.body = http_resp.data.decode('utf-8') + self.body = http_resp.data.decode("utf-8") except Exception: pass self.headers = http_resp.getheaders() @classmethod def from_response( - cls, - *, - http_resp, - body: Optional[str], + cls, + *, + http_resp, + body: Optional[str], data: Optional[Any], ) -> Self: if http_resp.status == 400: @@ -158,11 +160,9 @@ def from_response( def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) + error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) + error_message += "HTTP response headers: {0}\n".format(self.headers) if self.data or self.body: error_message += "HTTP response body: {0}\n".format(self.data or self.body) diff --git a/sdks/python/dropbox_sign/models/__init__.py b/sdks/python/dropbox_sign/models/__init__.py index ed9579770..919a66d9c 100644 --- a/sdks/python/dropbox_sign/models/__init__.py +++ b/sdks/python/dropbox_sign/models/__init__.py @@ -24,36 +24,58 @@ from dropbox_sign.models.account_update_request import AccountUpdateRequest from dropbox_sign.models.account_verify_request import AccountVerifyRequest from dropbox_sign.models.account_verify_response import AccountVerifyResponse -from dropbox_sign.models.account_verify_response_account import AccountVerifyResponseAccount +from dropbox_sign.models.account_verify_response_account import ( + AccountVerifyResponseAccount, +) from dropbox_sign.models.api_app_create_request import ApiAppCreateRequest from dropbox_sign.models.api_app_get_response import ApiAppGetResponse from dropbox_sign.models.api_app_list_response import ApiAppListResponse from dropbox_sign.models.api_app_response import ApiAppResponse from dropbox_sign.models.api_app_response_o_auth import ApiAppResponseOAuth from dropbox_sign.models.api_app_response_options import ApiAppResponseOptions -from dropbox_sign.models.api_app_response_owner_account import ApiAppResponseOwnerAccount -from dropbox_sign.models.api_app_response_white_labeling_options import ApiAppResponseWhiteLabelingOptions +from dropbox_sign.models.api_app_response_owner_account import ( + ApiAppResponseOwnerAccount, +) +from dropbox_sign.models.api_app_response_white_labeling_options import ( + ApiAppResponseWhiteLabelingOptions, +) from dropbox_sign.models.api_app_update_request import ApiAppUpdateRequest from dropbox_sign.models.bulk_send_job_get_response import BulkSendJobGetResponse -from dropbox_sign.models.bulk_send_job_get_response_signature_requests import BulkSendJobGetResponseSignatureRequests +from dropbox_sign.models.bulk_send_job_get_response_signature_requests import ( + BulkSendJobGetResponseSignatureRequests, +) from dropbox_sign.models.bulk_send_job_list_response import BulkSendJobListResponse from dropbox_sign.models.bulk_send_job_response import BulkSendJobResponse from dropbox_sign.models.bulk_send_job_send_response import BulkSendJobSendResponse from dropbox_sign.models.embedded_edit_url_request import EmbeddedEditUrlRequest from dropbox_sign.models.embedded_edit_url_response import EmbeddedEditUrlResponse -from dropbox_sign.models.embedded_edit_url_response_embedded import EmbeddedEditUrlResponseEmbedded +from dropbox_sign.models.embedded_edit_url_response_embedded import ( + EmbeddedEditUrlResponseEmbedded, +) from dropbox_sign.models.embedded_sign_url_response import EmbeddedSignUrlResponse -from dropbox_sign.models.embedded_sign_url_response_embedded import EmbeddedSignUrlResponseEmbedded +from dropbox_sign.models.embedded_sign_url_response_embedded import ( + EmbeddedSignUrlResponseEmbedded, +) from dropbox_sign.models.error_response import ErrorResponse from dropbox_sign.models.error_response_error import ErrorResponseError from dropbox_sign.models.event_callback_request import EventCallbackRequest from dropbox_sign.models.event_callback_request_event import EventCallbackRequestEvent -from dropbox_sign.models.event_callback_request_event_metadata import EventCallbackRequestEventMetadata +from dropbox_sign.models.event_callback_request_event_metadata import ( + EventCallbackRequestEventMetadata, +) from dropbox_sign.models.fax_line_add_user_request import FaxLineAddUserRequest -from dropbox_sign.models.fax_line_area_code_get_country_enum import FaxLineAreaCodeGetCountryEnum -from dropbox_sign.models.fax_line_area_code_get_province_enum import FaxLineAreaCodeGetProvinceEnum -from dropbox_sign.models.fax_line_area_code_get_response import FaxLineAreaCodeGetResponse -from dropbox_sign.models.fax_line_area_code_get_state_enum import FaxLineAreaCodeGetStateEnum +from dropbox_sign.models.fax_line_area_code_get_country_enum import ( + FaxLineAreaCodeGetCountryEnum, +) +from dropbox_sign.models.fax_line_area_code_get_province_enum import ( + FaxLineAreaCodeGetProvinceEnum, +) +from dropbox_sign.models.fax_line_area_code_get_response import ( + FaxLineAreaCodeGetResponse, +) +from dropbox_sign.models.fax_line_area_code_get_state_enum import ( + FaxLineAreaCodeGetStateEnum, +) from dropbox_sign.models.fax_line_create_request import FaxLineCreateRequest from dropbox_sign.models.fax_line_delete_request import FaxLineDeleteRequest from dropbox_sign.models.fax_line_list_response import FaxLineListResponse @@ -69,37 +91,93 @@ from dropbox_sign.models.report_create_request import ReportCreateRequest from dropbox_sign.models.report_create_response import ReportCreateResponse from dropbox_sign.models.report_response import ReportResponse -from dropbox_sign.models.signature_request_bulk_create_embedded_with_template_request import SignatureRequestBulkCreateEmbeddedWithTemplateRequest -from dropbox_sign.models.signature_request_bulk_send_with_template_request import SignatureRequestBulkSendWithTemplateRequest -from dropbox_sign.models.signature_request_create_embedded_request import SignatureRequestCreateEmbeddedRequest -from dropbox_sign.models.signature_request_create_embedded_with_template_request import SignatureRequestCreateEmbeddedWithTemplateRequest -from dropbox_sign.models.signature_request_get_response import SignatureRequestGetResponse -from dropbox_sign.models.signature_request_list_response import SignatureRequestListResponse -from dropbox_sign.models.signature_request_remind_request import SignatureRequestRemindRequest +from dropbox_sign.models.signature_request_bulk_create_embedded_with_template_request import ( + SignatureRequestBulkCreateEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.signature_request_bulk_send_with_template_request import ( + SignatureRequestBulkSendWithTemplateRequest, +) +from dropbox_sign.models.signature_request_create_embedded_request import ( + SignatureRequestCreateEmbeddedRequest, +) +from dropbox_sign.models.signature_request_create_embedded_with_template_request import ( + SignatureRequestCreateEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.signature_request_get_response import ( + SignatureRequestGetResponse, +) +from dropbox_sign.models.signature_request_list_response import ( + SignatureRequestListResponse, +) +from dropbox_sign.models.signature_request_remind_request import ( + SignatureRequestRemindRequest, +) from dropbox_sign.models.signature_request_response import SignatureRequestResponse -from dropbox_sign.models.signature_request_response_attachment import SignatureRequestResponseAttachment -from dropbox_sign.models.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase -from dropbox_sign.models.signature_request_response_custom_field_checkbox import SignatureRequestResponseCustomFieldCheckbox -from dropbox_sign.models.signature_request_response_custom_field_text import SignatureRequestResponseCustomFieldText -from dropbox_sign.models.signature_request_response_custom_field_type_enum import SignatureRequestResponseCustomFieldTypeEnum -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase -from dropbox_sign.models.signature_request_response_data_type_enum import SignatureRequestResponseDataTypeEnum -from dropbox_sign.models.signature_request_response_data_value_checkbox import SignatureRequestResponseDataValueCheckbox -from dropbox_sign.models.signature_request_response_data_value_checkbox_merge import SignatureRequestResponseDataValueCheckboxMerge -from dropbox_sign.models.signature_request_response_data_value_date_signed import SignatureRequestResponseDataValueDateSigned -from dropbox_sign.models.signature_request_response_data_value_dropdown import SignatureRequestResponseDataValueDropdown -from dropbox_sign.models.signature_request_response_data_value_initials import SignatureRequestResponseDataValueInitials -from dropbox_sign.models.signature_request_response_data_value_radio import SignatureRequestResponseDataValueRadio -from dropbox_sign.models.signature_request_response_data_value_signature import SignatureRequestResponseDataValueSignature -from dropbox_sign.models.signature_request_response_data_value_text import SignatureRequestResponseDataValueText -from dropbox_sign.models.signature_request_response_data_value_text_merge import SignatureRequestResponseDataValueTextMerge -from dropbox_sign.models.signature_request_response_signatures import SignatureRequestResponseSignatures -from dropbox_sign.models.signature_request_send_request import SignatureRequestSendRequest -from dropbox_sign.models.signature_request_send_with_template_request import SignatureRequestSendWithTemplateRequest -from dropbox_sign.models.signature_request_update_request import SignatureRequestUpdateRequest +from dropbox_sign.models.signature_request_response_attachment import ( + SignatureRequestResponseAttachment, +) +from dropbox_sign.models.signature_request_response_custom_field_base import ( + SignatureRequestResponseCustomFieldBase, +) +from dropbox_sign.models.signature_request_response_custom_field_checkbox import ( + SignatureRequestResponseCustomFieldCheckbox, +) +from dropbox_sign.models.signature_request_response_custom_field_text import ( + SignatureRequestResponseCustomFieldText, +) +from dropbox_sign.models.signature_request_response_custom_field_type_enum import ( + SignatureRequestResponseCustomFieldTypeEnum, +) +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) +from dropbox_sign.models.signature_request_response_data_type_enum import ( + SignatureRequestResponseDataTypeEnum, +) +from dropbox_sign.models.signature_request_response_data_value_checkbox import ( + SignatureRequestResponseDataValueCheckbox, +) +from dropbox_sign.models.signature_request_response_data_value_checkbox_merge import ( + SignatureRequestResponseDataValueCheckboxMerge, +) +from dropbox_sign.models.signature_request_response_data_value_date_signed import ( + SignatureRequestResponseDataValueDateSigned, +) +from dropbox_sign.models.signature_request_response_data_value_dropdown import ( + SignatureRequestResponseDataValueDropdown, +) +from dropbox_sign.models.signature_request_response_data_value_initials import ( + SignatureRequestResponseDataValueInitials, +) +from dropbox_sign.models.signature_request_response_data_value_radio import ( + SignatureRequestResponseDataValueRadio, +) +from dropbox_sign.models.signature_request_response_data_value_signature import ( + SignatureRequestResponseDataValueSignature, +) +from dropbox_sign.models.signature_request_response_data_value_text import ( + SignatureRequestResponseDataValueText, +) +from dropbox_sign.models.signature_request_response_data_value_text_merge import ( + SignatureRequestResponseDataValueTextMerge, +) +from dropbox_sign.models.signature_request_response_signatures import ( + SignatureRequestResponseSignatures, +) +from dropbox_sign.models.signature_request_send_request import ( + SignatureRequestSendRequest, +) +from dropbox_sign.models.signature_request_send_with_template_request import ( + SignatureRequestSendWithTemplateRequest, +) +from dropbox_sign.models.signature_request_update_request import ( + SignatureRequestUpdateRequest, +) from dropbox_sign.models.sub_attachment import SubAttachment from dropbox_sign.models.sub_bulk_signer_list import SubBulkSignerList -from dropbox_sign.models.sub_bulk_signer_list_custom_field import SubBulkSignerListCustomField +from dropbox_sign.models.sub_bulk_signer_list_custom_field import ( + SubBulkSignerListCustomField, +) from dropbox_sign.models.sub_cc import SubCC from dropbox_sign.models.sub_custom_field import SubCustomField from dropbox_sign.models.sub_editor_options import SubEditorOptions @@ -108,30 +186,62 @@ from dropbox_sign.models.sub_form_field_rule import SubFormFieldRule from dropbox_sign.models.sub_form_field_rule_action import SubFormFieldRuleAction from dropbox_sign.models.sub_form_field_rule_trigger import SubFormFieldRuleTrigger -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase -from dropbox_sign.models.sub_form_fields_per_document_checkbox import SubFormFieldsPerDocumentCheckbox -from dropbox_sign.models.sub_form_fields_per_document_checkbox_merge import SubFormFieldsPerDocumentCheckboxMerge -from dropbox_sign.models.sub_form_fields_per_document_date_signed import SubFormFieldsPerDocumentDateSigned -from dropbox_sign.models.sub_form_fields_per_document_dropdown import SubFormFieldsPerDocumentDropdown -from dropbox_sign.models.sub_form_fields_per_document_font_enum import SubFormFieldsPerDocumentFontEnum -from dropbox_sign.models.sub_form_fields_per_document_hyperlink import SubFormFieldsPerDocumentHyperlink -from dropbox_sign.models.sub_form_fields_per_document_initials import SubFormFieldsPerDocumentInitials -from dropbox_sign.models.sub_form_fields_per_document_radio import SubFormFieldsPerDocumentRadio -from dropbox_sign.models.sub_form_fields_per_document_signature import SubFormFieldsPerDocumentSignature -from dropbox_sign.models.sub_form_fields_per_document_text import SubFormFieldsPerDocumentText -from dropbox_sign.models.sub_form_fields_per_document_text_merge import SubFormFieldsPerDocumentTextMerge -from dropbox_sign.models.sub_form_fields_per_document_type_enum import SubFormFieldsPerDocumentTypeEnum +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) +from dropbox_sign.models.sub_form_fields_per_document_checkbox import ( + SubFormFieldsPerDocumentCheckbox, +) +from dropbox_sign.models.sub_form_fields_per_document_checkbox_merge import ( + SubFormFieldsPerDocumentCheckboxMerge, +) +from dropbox_sign.models.sub_form_fields_per_document_date_signed import ( + SubFormFieldsPerDocumentDateSigned, +) +from dropbox_sign.models.sub_form_fields_per_document_dropdown import ( + SubFormFieldsPerDocumentDropdown, +) +from dropbox_sign.models.sub_form_fields_per_document_font_enum import ( + SubFormFieldsPerDocumentFontEnum, +) +from dropbox_sign.models.sub_form_fields_per_document_hyperlink import ( + SubFormFieldsPerDocumentHyperlink, +) +from dropbox_sign.models.sub_form_fields_per_document_initials import ( + SubFormFieldsPerDocumentInitials, +) +from dropbox_sign.models.sub_form_fields_per_document_radio import ( + SubFormFieldsPerDocumentRadio, +) +from dropbox_sign.models.sub_form_fields_per_document_signature import ( + SubFormFieldsPerDocumentSignature, +) +from dropbox_sign.models.sub_form_fields_per_document_text import ( + SubFormFieldsPerDocumentText, +) +from dropbox_sign.models.sub_form_fields_per_document_text_merge import ( + SubFormFieldsPerDocumentTextMerge, +) +from dropbox_sign.models.sub_form_fields_per_document_type_enum import ( + SubFormFieldsPerDocumentTypeEnum, +) from dropbox_sign.models.sub_merge_field import SubMergeField from dropbox_sign.models.sub_o_auth import SubOAuth from dropbox_sign.models.sub_options import SubOptions -from dropbox_sign.models.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners +from dropbox_sign.models.sub_signature_request_grouped_signers import ( + SubSignatureRequestGroupedSigners, +) from dropbox_sign.models.sub_signature_request_signer import SubSignatureRequestSigner -from dropbox_sign.models.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner +from dropbox_sign.models.sub_signature_request_template_signer import ( + SubSignatureRequestTemplateSigner, +) from dropbox_sign.models.sub_signing_options import SubSigningOptions from dropbox_sign.models.sub_team_response import SubTeamResponse from dropbox_sign.models.sub_template_role import SubTemplateRole from dropbox_sign.models.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner -from dropbox_sign.models.sub_unclaimed_draft_template_signer import SubUnclaimedDraftTemplateSigner +from dropbox_sign.models.sub_unclaimed_draft_template_signer import ( + SubUnclaimedDraftTemplateSigner, +) from dropbox_sign.models.sub_white_labeling_options import SubWhiteLabelingOptions from dropbox_sign.models.team_add_member_request import TeamAddMemberRequest from dropbox_sign.models.team_create_request import TeamCreateRequest @@ -148,53 +258,125 @@ from dropbox_sign.models.team_sub_teams_response import TeamSubTeamsResponse from dropbox_sign.models.team_update_request import TeamUpdateRequest from dropbox_sign.models.template_add_user_request import TemplateAddUserRequest -from dropbox_sign.models.template_create_embedded_draft_request import TemplateCreateEmbeddedDraftRequest -from dropbox_sign.models.template_create_embedded_draft_response import TemplateCreateEmbeddedDraftResponse -from dropbox_sign.models.template_create_embedded_draft_response_template import TemplateCreateEmbeddedDraftResponseTemplate +from dropbox_sign.models.template_create_embedded_draft_request import ( + TemplateCreateEmbeddedDraftRequest, +) +from dropbox_sign.models.template_create_embedded_draft_response import ( + TemplateCreateEmbeddedDraftResponse, +) +from dropbox_sign.models.template_create_embedded_draft_response_template import ( + TemplateCreateEmbeddedDraftResponseTemplate, +) from dropbox_sign.models.template_create_request import TemplateCreateRequest from dropbox_sign.models.template_create_response import TemplateCreateResponse -from dropbox_sign.models.template_create_response_template import TemplateCreateResponseTemplate +from dropbox_sign.models.template_create_response_template import ( + TemplateCreateResponseTemplate, +) from dropbox_sign.models.template_edit_response import TemplateEditResponse from dropbox_sign.models.template_get_response import TemplateGetResponse from dropbox_sign.models.template_list_response import TemplateListResponse from dropbox_sign.models.template_remove_user_request import TemplateRemoveUserRequest from dropbox_sign.models.template_response import TemplateResponse from dropbox_sign.models.template_response_account import TemplateResponseAccount -from dropbox_sign.models.template_response_account_quota import TemplateResponseAccountQuota +from dropbox_sign.models.template_response_account_quota import ( + TemplateResponseAccountQuota, +) from dropbox_sign.models.template_response_cc_role import TemplateResponseCCRole from dropbox_sign.models.template_response_document import TemplateResponseDocument -from dropbox_sign.models.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase -from dropbox_sign.models.template_response_document_custom_field_checkbox import TemplateResponseDocumentCustomFieldCheckbox -from dropbox_sign.models.template_response_document_custom_field_text import TemplateResponseDocumentCustomFieldText -from dropbox_sign.models.template_response_document_field_group import TemplateResponseDocumentFieldGroup -from dropbox_sign.models.template_response_document_field_group_rule import TemplateResponseDocumentFieldGroupRule -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase -from dropbox_sign.models.template_response_document_form_field_checkbox import TemplateResponseDocumentFormFieldCheckbox -from dropbox_sign.models.template_response_document_form_field_date_signed import TemplateResponseDocumentFormFieldDateSigned -from dropbox_sign.models.template_response_document_form_field_dropdown import TemplateResponseDocumentFormFieldDropdown -from dropbox_sign.models.template_response_document_form_field_hyperlink import TemplateResponseDocumentFormFieldHyperlink -from dropbox_sign.models.template_response_document_form_field_initials import TemplateResponseDocumentFormFieldInitials -from dropbox_sign.models.template_response_document_form_field_radio import TemplateResponseDocumentFormFieldRadio -from dropbox_sign.models.template_response_document_form_field_signature import TemplateResponseDocumentFormFieldSignature -from dropbox_sign.models.template_response_document_form_field_text import TemplateResponseDocumentFormFieldText -from dropbox_sign.models.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase -from dropbox_sign.models.template_response_document_static_field_checkbox import TemplateResponseDocumentStaticFieldCheckbox -from dropbox_sign.models.template_response_document_static_field_date_signed import TemplateResponseDocumentStaticFieldDateSigned -from dropbox_sign.models.template_response_document_static_field_dropdown import TemplateResponseDocumentStaticFieldDropdown -from dropbox_sign.models.template_response_document_static_field_hyperlink import TemplateResponseDocumentStaticFieldHyperlink -from dropbox_sign.models.template_response_document_static_field_initials import TemplateResponseDocumentStaticFieldInitials -from dropbox_sign.models.template_response_document_static_field_radio import TemplateResponseDocumentStaticFieldRadio -from dropbox_sign.models.template_response_document_static_field_signature import TemplateResponseDocumentStaticFieldSignature -from dropbox_sign.models.template_response_document_static_field_text import TemplateResponseDocumentStaticFieldText -from dropbox_sign.models.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength +from dropbox_sign.models.template_response_document_custom_field_base import ( + TemplateResponseDocumentCustomFieldBase, +) +from dropbox_sign.models.template_response_document_custom_field_checkbox import ( + TemplateResponseDocumentCustomFieldCheckbox, +) +from dropbox_sign.models.template_response_document_custom_field_text import ( + TemplateResponseDocumentCustomFieldText, +) +from dropbox_sign.models.template_response_document_field_group import ( + TemplateResponseDocumentFieldGroup, +) +from dropbox_sign.models.template_response_document_field_group_rule import ( + TemplateResponseDocumentFieldGroupRule, +) +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) +from dropbox_sign.models.template_response_document_form_field_checkbox import ( + TemplateResponseDocumentFormFieldCheckbox, +) +from dropbox_sign.models.template_response_document_form_field_date_signed import ( + TemplateResponseDocumentFormFieldDateSigned, +) +from dropbox_sign.models.template_response_document_form_field_dropdown import ( + TemplateResponseDocumentFormFieldDropdown, +) +from dropbox_sign.models.template_response_document_form_field_hyperlink import ( + TemplateResponseDocumentFormFieldHyperlink, +) +from dropbox_sign.models.template_response_document_form_field_initials import ( + TemplateResponseDocumentFormFieldInitials, +) +from dropbox_sign.models.template_response_document_form_field_radio import ( + TemplateResponseDocumentFormFieldRadio, +) +from dropbox_sign.models.template_response_document_form_field_signature import ( + TemplateResponseDocumentFormFieldSignature, +) +from dropbox_sign.models.template_response_document_form_field_text import ( + TemplateResponseDocumentFormFieldText, +) +from dropbox_sign.models.template_response_document_static_field_base import ( + TemplateResponseDocumentStaticFieldBase, +) +from dropbox_sign.models.template_response_document_static_field_checkbox import ( + TemplateResponseDocumentStaticFieldCheckbox, +) +from dropbox_sign.models.template_response_document_static_field_date_signed import ( + TemplateResponseDocumentStaticFieldDateSigned, +) +from dropbox_sign.models.template_response_document_static_field_dropdown import ( + TemplateResponseDocumentStaticFieldDropdown, +) +from dropbox_sign.models.template_response_document_static_field_hyperlink import ( + TemplateResponseDocumentStaticFieldHyperlink, +) +from dropbox_sign.models.template_response_document_static_field_initials import ( + TemplateResponseDocumentStaticFieldInitials, +) +from dropbox_sign.models.template_response_document_static_field_radio import ( + TemplateResponseDocumentStaticFieldRadio, +) +from dropbox_sign.models.template_response_document_static_field_signature import ( + TemplateResponseDocumentStaticFieldSignature, +) +from dropbox_sign.models.template_response_document_static_field_text import ( + TemplateResponseDocumentStaticFieldText, +) +from dropbox_sign.models.template_response_field_avg_text_length import ( + TemplateResponseFieldAvgTextLength, +) from dropbox_sign.models.template_response_signer_role import TemplateResponseSignerRole from dropbox_sign.models.template_update_files_request import TemplateUpdateFilesRequest -from dropbox_sign.models.template_update_files_response import TemplateUpdateFilesResponse -from dropbox_sign.models.template_update_files_response_template import TemplateUpdateFilesResponseTemplate -from dropbox_sign.models.unclaimed_draft_create_embedded_request import UnclaimedDraftCreateEmbeddedRequest -from dropbox_sign.models.unclaimed_draft_create_embedded_with_template_request import UnclaimedDraftCreateEmbeddedWithTemplateRequest -from dropbox_sign.models.unclaimed_draft_create_request import UnclaimedDraftCreateRequest -from dropbox_sign.models.unclaimed_draft_create_response import UnclaimedDraftCreateResponse -from dropbox_sign.models.unclaimed_draft_edit_and_resend_request import UnclaimedDraftEditAndResendRequest +from dropbox_sign.models.template_update_files_response import ( + TemplateUpdateFilesResponse, +) +from dropbox_sign.models.template_update_files_response_template import ( + TemplateUpdateFilesResponseTemplate, +) +from dropbox_sign.models.unclaimed_draft_create_embedded_request import ( + UnclaimedDraftCreateEmbeddedRequest, +) +from dropbox_sign.models.unclaimed_draft_create_embedded_with_template_request import ( + UnclaimedDraftCreateEmbeddedWithTemplateRequest, +) +from dropbox_sign.models.unclaimed_draft_create_request import ( + UnclaimedDraftCreateRequest, +) +from dropbox_sign.models.unclaimed_draft_create_response import ( + UnclaimedDraftCreateResponse, +) +from dropbox_sign.models.unclaimed_draft_edit_and_resend_request import ( + UnclaimedDraftEditAndResendRequest, +) from dropbox_sign.models.unclaimed_draft_response import UnclaimedDraftResponse from dropbox_sign.models.warning_response import WarningResponse diff --git a/sdks/python/dropbox_sign/models/account_create_request.py b/sdks/python/dropbox_sign/models/account_create_request.py index 698d4ba18..eb0d37416 100644 --- a/sdks/python/dropbox_sign/models/account_create_request.py +++ b/sdks/python/dropbox_sign/models/account_create_request.py @@ -26,15 +26,33 @@ from pydantic import StrictBool from typing import Union + class AccountCreateRequest(BaseModel): """ AccountCreateRequest - """ # noqa: E501 - email_address: StrictStr = Field(description="The email address which will be associated with the new Account.") - client_id: Optional[StrictStr] = Field(default=None, description="Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization)") - client_secret: Optional[StrictStr] = Field(default=None, description="Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization)") - locale: Optional[StrictStr] = Field(default=None, description="The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.") - __properties: ClassVar[List[str]] = ["email_address", "client_id", "client_secret", "locale"] + """ # noqa: E501 + + email_address: StrictStr = Field( + description="The email address which will be associated with the new Account." + ) + client_id: Optional[StrictStr] = Field( + default=None, + description="Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization)", + ) + client_secret: Optional[StrictStr] = Field( + default=None, + description="Used when creating a new account with OAuth authorization. See [OAuth 2.0 Authorization](https://app.hellosign.com/api/oauthWalkthrough#OAuthAuthorization)", + ) + locale: Optional[StrictStr] = Field( + default=None, + description="The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.", + ) + __properties: ClassVar[List[str]] = [ + "email_address", + "client_id", + "client_secret", + "locale", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +61,6 @@ class AccountCreateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +70,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,12 +115,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "email_address": obj.get("email_address"), - "client_id": obj.get("client_id"), - "client_secret": obj.get("client_secret"), - "locale": obj.get("locale") - }) + _obj = cls.model_validate( + { + "email_address": obj.get("email_address"), + "client_id": obj.get("client_id"), + "client_secret": obj.get("client_secret"), + "locale": obj.get("locale"), + } + ) return _obj @classmethod @@ -125,6 +146,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/account_create_response.py b/sdks/python/dropbox_sign/models/account_create_response.py index d25a2adc9..c1788e0e7 100644 --- a/sdks/python/dropbox_sign/models/account_create_response.py +++ b/sdks/python/dropbox_sign/models/account_create_response.py @@ -29,13 +29,17 @@ from pydantic import StrictBool from typing import Union + class AccountCreateResponse(BaseModel): """ AccountCreateResponse - """ # noqa: E501 + """ # noqa: E501 + account: AccountResponse oauth_data: Optional[OAuthTokenResponse] = None - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["account", "oauth_data", "warnings"] model_config = ConfigDict( @@ -45,7 +49,6 @@ class AccountCreateResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +58,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -89,17 +94,17 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of account if self.account: - _dict['account'] = self.account.to_dict() + _dict["account"] = self.account.to_dict() # override the default output from pydantic by calling `to_dict()` of oauth_data if self.oauth_data: - _dict['oauth_data'] = self.oauth_data.to_dict() + _dict["oauth_data"] = self.oauth_data.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -111,11 +116,25 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None, - "oauth_data": OAuthTokenResponse.from_dict(obj["oauth_data"]) if obj.get("oauth_data") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "account": ( + AccountResponse.from_dict(obj["account"]) + if obj.get("account") is not None + else None + ), + "oauth_data": ( + OAuthTokenResponse.from_dict(obj["oauth_data"]) + if obj.get("oauth_data") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -141,4 +160,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/account_get_response.py b/sdks/python/dropbox_sign/models/account_get_response.py index 6f21ab6e9..1be99f48c 100644 --- a/sdks/python/dropbox_sign/models/account_get_response.py +++ b/sdks/python/dropbox_sign/models/account_get_response.py @@ -28,12 +28,16 @@ from pydantic import StrictBool from typing import Union + class AccountGetResponse(BaseModel): """ AccountGetResponse - """ # noqa: E501 + """ # noqa: E501 + account: AccountResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["account", "warnings"] model_config = ConfigDict( @@ -43,7 +47,6 @@ class AccountGetResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +92,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of account if self.account: - _dict['account'] = self.account.to_dict() + _dict["account"] = self.account.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +111,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "account": ( + AccountResponse.from_dict(obj["account"]) + if obj.get("account") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +149,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/account_response.py b/sdks/python/dropbox_sign/models/account_response.py index 48fc371ac..8af0a6fb5 100644 --- a/sdks/python/dropbox_sign/models/account_response.py +++ b/sdks/python/dropbox_sign/models/account_response.py @@ -28,22 +28,58 @@ from pydantic import StrictBool from typing import Union + class AccountResponse(BaseModel): """ AccountResponse - """ # noqa: E501 - account_id: Optional[StrictStr] = Field(default=None, description="The ID of the Account") - email_address: Optional[StrictStr] = Field(default=None, description="The email address associated with the Account.") - is_locked: Optional[StrictBool] = Field(default=None, description="Returns `true` if the user has been locked out of their account by a team admin.") - is_paid_hs: Optional[StrictBool] = Field(default=None, description="Returns `true` if the user has a paid Dropbox Sign account.") - is_paid_hf: Optional[StrictBool] = Field(default=None, description="Returns `true` if the user has a paid HelloFax account.") + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, description="The ID of the Account" + ) + email_address: Optional[StrictStr] = Field( + default=None, description="The email address associated with the Account." + ) + is_locked: Optional[StrictBool] = Field( + default=None, + description="Returns `true` if the user has been locked out of their account by a team admin.", + ) + is_paid_hs: Optional[StrictBool] = Field( + default=None, + description="Returns `true` if the user has a paid Dropbox Sign account.", + ) + is_paid_hf: Optional[StrictBool] = Field( + default=None, + description="Returns `true` if the user has a paid HelloFax account.", + ) quotas: Optional[AccountResponseQuotas] = None - callback_url: Optional[StrictStr] = Field(default=None, description="The URL that Dropbox Sign events will `POST` to.") - role_code: Optional[StrictStr] = Field(default=None, description="The membership role for the team.") - team_id: Optional[StrictStr] = Field(default=None, description="The id of the team account belongs to.") - locale: Optional[StrictStr] = Field(default=None, description="The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.") + callback_url: Optional[StrictStr] = Field( + default=None, description="The URL that Dropbox Sign events will `POST` to." + ) + role_code: Optional[StrictStr] = Field( + default=None, description="The membership role for the team." + ) + team_id: Optional[StrictStr] = Field( + default=None, description="The id of the team account belongs to." + ) + locale: Optional[StrictStr] = Field( + default=None, + description="The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.", + ) usage: Optional[AccountResponseUsage] = None - __properties: ClassVar[List[str]] = ["account_id", "email_address", "is_locked", "is_paid_hs", "is_paid_hf", "quotas", "callback_url", "role_code", "team_id", "locale", "usage"] + __properties: ClassVar[List[str]] = [ + "account_id", + "email_address", + "is_locked", + "is_paid_hs", + "is_paid_hf", + "quotas", + "callback_url", + "role_code", + "team_id", + "locale", + "usage", + ] model_config = ConfigDict( populate_by_name=True, @@ -52,7 +88,6 @@ class AccountResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +97,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,10 +133,10 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of quotas if self.quotas: - _dict['quotas'] = self.quotas.to_dict() + _dict["quotas"] = self.quotas.to_dict() # override the default output from pydantic by calling `to_dict()` of usage if self.usage: - _dict['usage'] = self.usage.to_dict() + _dict["usage"] = self.usage.to_dict() return _dict @classmethod @@ -111,19 +148,29 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account_id": obj.get("account_id"), - "email_address": obj.get("email_address"), - "is_locked": obj.get("is_locked"), - "is_paid_hs": obj.get("is_paid_hs"), - "is_paid_hf": obj.get("is_paid_hf"), - "quotas": AccountResponseQuotas.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None, - "callback_url": obj.get("callback_url"), - "role_code": obj.get("role_code"), - "team_id": obj.get("team_id"), - "locale": obj.get("locale"), - "usage": AccountResponseUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None - }) + _obj = cls.model_validate( + { + "account_id": obj.get("account_id"), + "email_address": obj.get("email_address"), + "is_locked": obj.get("is_locked"), + "is_paid_hs": obj.get("is_paid_hs"), + "is_paid_hf": obj.get("is_paid_hf"), + "quotas": ( + AccountResponseQuotas.from_dict(obj["quotas"]) + if obj.get("quotas") is not None + else None + ), + "callback_url": obj.get("callback_url"), + "role_code": obj.get("role_code"), + "team_id": obj.get("team_id"), + "locale": obj.get("locale"), + "usage": ( + AccountResponseUsage.from_dict(obj["usage"]) + if obj.get("usage") is not None + else None + ), + } + ) return _obj @classmethod @@ -154,6 +201,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/account_response_quotas.py b/sdks/python/dropbox_sign/models/account_response_quotas.py index b67e442bb..1b90d4162 100644 --- a/sdks/python/dropbox_sign/models/account_response_quotas.py +++ b/sdks/python/dropbox_sign/models/account_response_quotas.py @@ -26,17 +26,38 @@ from pydantic import StrictBool from typing import Union + class AccountResponseQuotas(BaseModel): """ Details concerning remaining monthly quotas. - """ # noqa: E501 - api_signature_requests_left: Optional[StrictInt] = Field(default=None, description="API signature requests remaining.") - documents_left: Optional[StrictInt] = Field(default=None, description="Signature requests remaining.") - templates_total: Optional[StrictInt] = Field(default=None, description="Total API templates allowed.") - templates_left: Optional[StrictInt] = Field(default=None, description="API templates remaining.") - sms_verifications_left: Optional[StrictInt] = Field(default=None, description="SMS verifications remaining.") - num_fax_pages_left: Optional[StrictInt] = Field(default=None, description="Number of fax pages left") - __properties: ClassVar[List[str]] = ["api_signature_requests_left", "documents_left", "templates_total", "templates_left", "sms_verifications_left", "num_fax_pages_left"] + """ # noqa: E501 + + api_signature_requests_left: Optional[StrictInt] = Field( + default=None, description="API signature requests remaining." + ) + documents_left: Optional[StrictInt] = Field( + default=None, description="Signature requests remaining." + ) + templates_total: Optional[StrictInt] = Field( + default=None, description="Total API templates allowed." + ) + templates_left: Optional[StrictInt] = Field( + default=None, description="API templates remaining." + ) + sms_verifications_left: Optional[StrictInt] = Field( + default=None, description="SMS verifications remaining." + ) + num_fax_pages_left: Optional[StrictInt] = Field( + default=None, description="Number of fax pages left" + ) + __properties: ClassVar[List[str]] = [ + "api_signature_requests_left", + "documents_left", + "templates_total", + "templates_left", + "sms_verifications_left", + "num_fax_pages_left", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +66,6 @@ class AccountResponseQuotas(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +75,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -98,14 +120,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_signature_requests_left": obj.get("api_signature_requests_left"), - "documents_left": obj.get("documents_left"), - "templates_total": obj.get("templates_total"), - "templates_left": obj.get("templates_left"), - "sms_verifications_left": obj.get("sms_verifications_left"), - "num_fax_pages_left": obj.get("num_fax_pages_left") - }) + _obj = cls.model_validate( + { + "api_signature_requests_left": obj.get("api_signature_requests_left"), + "documents_left": obj.get("documents_left"), + "templates_total": obj.get("templates_total"), + "templates_left": obj.get("templates_left"), + "sms_verifications_left": obj.get("sms_verifications_left"), + "num_fax_pages_left": obj.get("num_fax_pages_left"), + } + ) return _obj @classmethod @@ -131,6 +155,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/account_response_usage.py b/sdks/python/dropbox_sign/models/account_response_usage.py index 72bf13210..8efc7a64b 100644 --- a/sdks/python/dropbox_sign/models/account_response_usage.py +++ b/sdks/python/dropbox_sign/models/account_response_usage.py @@ -26,11 +26,15 @@ from pydantic import StrictBool from typing import Union + class AccountResponseUsage(BaseModel): """ Details concerning monthly usage - """ # noqa: E501 - fax_pages_sent: Optional[StrictInt] = Field(default=None, description="Number of fax pages sent") + """ # noqa: E501 + + fax_pages_sent: Optional[StrictInt] = Field( + default=None, description="Number of fax pages sent" + ) __properties: ClassVar[List[str]] = ["fax_pages_sent"] model_config = ConfigDict( @@ -40,7 +44,6 @@ class AccountResponseUsage(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +53,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "fax_pages_sent": obj.get("fax_pages_sent") - }) + _obj = cls.model_validate({"fax_pages_sent": obj.get("fax_pages_sent")}) return _obj @classmethod @@ -116,6 +119,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/account_update_request.py b/sdks/python/dropbox_sign/models/account_update_request.py index 4165071bb..7b5c95ddf 100644 --- a/sdks/python/dropbox_sign/models/account_update_request.py +++ b/sdks/python/dropbox_sign/models/account_update_request.py @@ -26,13 +26,22 @@ from pydantic import StrictBool from typing import Union + class AccountUpdateRequest(BaseModel): """ AccountUpdateRequest - """ # noqa: E501 - account_id: Optional[StrictStr] = Field(default=None, description="The ID of the Account") - callback_url: Optional[StrictStr] = Field(default=None, description="The URL that Dropbox Sign should POST events to.") - locale: Optional[StrictStr] = Field(default=None, description="The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.") + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, description="The ID of the Account" + ) + callback_url: Optional[StrictStr] = Field( + default=None, description="The URL that Dropbox Sign should POST events to." + ) + locale: Optional[StrictStr] = Field( + default=None, + description="The locale used in this Account. Check out the list of [supported locales](/api/reference/constants/#supported-locales) to learn more about the possible values.", + ) __properties: ClassVar[List[str]] = ["account_id", "callback_url", "locale"] model_config = ConfigDict( @@ -42,7 +51,6 @@ class AccountUpdateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +60,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,11 +105,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account_id": obj.get("account_id"), - "callback_url": obj.get("callback_url"), - "locale": obj.get("locale") - }) + _obj = cls.model_validate( + { + "account_id": obj.get("account_id"), + "callback_url": obj.get("callback_url"), + "locale": obj.get("locale"), + } + ) return _obj @classmethod @@ -122,6 +134,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/account_verify_request.py b/sdks/python/dropbox_sign/models/account_verify_request.py index 5d018cd3c..a3a95c352 100644 --- a/sdks/python/dropbox_sign/models/account_verify_request.py +++ b/sdks/python/dropbox_sign/models/account_verify_request.py @@ -26,11 +26,15 @@ from pydantic import StrictBool from typing import Union + class AccountVerifyRequest(BaseModel): """ AccountVerifyRequest - """ # noqa: E501 - email_address: StrictStr = Field(description="Email address to run the verification for.") + """ # noqa: E501 + + email_address: StrictStr = Field( + description="Email address to run the verification for." + ) __properties: ClassVar[List[str]] = ["email_address"] model_config = ConfigDict( @@ -40,7 +44,6 @@ class AccountVerifyRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +53,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "email_address": obj.get("email_address") - }) + _obj = cls.model_validate({"email_address": obj.get("email_address")}) return _obj @classmethod @@ -116,6 +119,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/account_verify_response.py b/sdks/python/dropbox_sign/models/account_verify_response.py index 7c3e5ccd2..c5f1960be 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response.py +++ b/sdks/python/dropbox_sign/models/account_verify_response.py @@ -20,7 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.account_verify_response_account import AccountVerifyResponseAccount +from dropbox_sign.models.account_verify_response_account import ( + AccountVerifyResponseAccount, +) from dropbox_sign.models.warning_response import WarningResponse from typing import Optional, Set, Tuple from typing_extensions import Self @@ -28,12 +30,16 @@ from pydantic import StrictBool from typing import Union + class AccountVerifyResponse(BaseModel): """ AccountVerifyResponse - """ # noqa: E501 + """ # noqa: E501 + account: Optional[AccountVerifyResponseAccount] = None - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["account", "warnings"] model_config = ConfigDict( @@ -43,7 +49,6 @@ class AccountVerifyResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +58,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +94,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of account if self.account: - _dict['account'] = self.account.to_dict() + _dict["account"] = self.account.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +113,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account": AccountVerifyResponseAccount.from_dict(obj["account"]) if obj.get("account") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "account": ( + AccountVerifyResponseAccount.from_dict(obj["account"]) + if obj.get("account") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +151,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/account_verify_response_account.py b/sdks/python/dropbox_sign/models/account_verify_response_account.py index 112abc2cd..3724cd063 100644 --- a/sdks/python/dropbox_sign/models/account_verify_response_account.py +++ b/sdks/python/dropbox_sign/models/account_verify_response_account.py @@ -26,11 +26,15 @@ from pydantic import StrictBool from typing import Union + class AccountVerifyResponseAccount(BaseModel): """ AccountVerifyResponseAccount - """ # noqa: E501 - email_address: Optional[StrictStr] = Field(default=None, description="The email address associated with the Account.") + """ # noqa: E501 + + email_address: Optional[StrictStr] = Field( + default=None, description="The email address associated with the Account." + ) __properties: ClassVar[List[str]] = ["email_address"] model_config = ConfigDict( @@ -40,7 +44,6 @@ class AccountVerifyResponseAccount(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +53,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "email_address": obj.get("email_address") - }) + _obj = cls.model_validate({"email_address": obj.get("email_address")}) return _obj @classmethod @@ -116,6 +119,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/api_app_create_request.py b/sdks/python/dropbox_sign/models/api_app_create_request.py index e9319cc9c..4f7181b59 100644 --- a/sdks/python/dropbox_sign/models/api_app_create_request.py +++ b/sdks/python/dropbox_sign/models/api_app_create_request.py @@ -30,18 +30,36 @@ from pydantic import StrictBool from typing import Union + class ApiAppCreateRequest(BaseModel): """ ApiAppCreateRequest - """ # noqa: E501 - domains: Annotated[List[StrictStr], Field(min_length=1, max_length=2)] = Field(description="The domain names the ApiApp will be associated with.") + """ # noqa: E501 + + domains: Annotated[List[StrictStr], Field(min_length=1, max_length=2)] = Field( + description="The domain names the ApiApp will be associated with." + ) name: StrictStr = Field(description="The name you want to assign to the ApiApp.") - callback_url: Optional[StrictStr] = Field(default=None, description="The URL at which the ApiApp should receive event callbacks.") - custom_logo_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field(default=None, description="An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)") + callback_url: Optional[StrictStr] = Field( + default=None, + description="The URL at which the ApiApp should receive event callbacks.", + ) + custom_logo_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field( + default=None, + description="An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)", + ) oauth: Optional[SubOAuth] = None options: Optional[SubOptions] = None white_labeling_options: Optional[SubWhiteLabelingOptions] = None - __properties: ClassVar[List[str]] = ["domains", "name", "callback_url", "custom_logo_file", "oauth", "options", "white_labeling_options"] + __properties: ClassVar[List[str]] = [ + "domains", + "name", + "callback_url", + "custom_logo_file", + "oauth", + "options", + "white_labeling_options", + ] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +68,6 @@ class ApiAppCreateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +77,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,13 +113,13 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of oauth if self.oauth: - _dict['oauth'] = self.oauth.to_dict() + _dict["oauth"] = self.oauth.to_dict() # override the default output from pydantic by calling `to_dict()` of options if self.options: - _dict['options'] = self.options.to_dict() + _dict["options"] = self.options.to_dict() # override the default output from pydantic by calling `to_dict()` of white_labeling_options if self.white_labeling_options: - _dict['white_labeling_options'] = self.white_labeling_options.to_dict() + _dict["white_labeling_options"] = self.white_labeling_options.to_dict() return _dict @classmethod @@ -112,15 +131,29 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "domains": obj.get("domains"), - "name": obj.get("name"), - "callback_url": obj.get("callback_url"), - "custom_logo_file": obj.get("custom_logo_file"), - "oauth": SubOAuth.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, - "options": SubOptions.from_dict(obj["options"]) if obj.get("options") is not None else None, - "white_labeling_options": SubWhiteLabelingOptions.from_dict(obj["white_labeling_options"]) if obj.get("white_labeling_options") is not None else None - }) + _obj = cls.model_validate( + { + "domains": obj.get("domains"), + "name": obj.get("name"), + "callback_url": obj.get("callback_url"), + "custom_logo_file": obj.get("custom_logo_file"), + "oauth": ( + SubOAuth.from_dict(obj["oauth"]) + if obj.get("oauth") is not None + else None + ), + "options": ( + SubOptions.from_dict(obj["options"]) + if obj.get("options") is not None + else None + ), + "white_labeling_options": ( + SubWhiteLabelingOptions.from_dict(obj["white_labeling_options"]) + if obj.get("white_labeling_options") is not None + else None + ), + } + ) return _obj @classmethod @@ -150,4 +183,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "domains", ] - diff --git a/sdks/python/dropbox_sign/models/api_app_get_response.py b/sdks/python/dropbox_sign/models/api_app_get_response.py index ce0317d9b..5c03394e6 100644 --- a/sdks/python/dropbox_sign/models/api_app_get_response.py +++ b/sdks/python/dropbox_sign/models/api_app_get_response.py @@ -28,12 +28,16 @@ from pydantic import StrictBool from typing import Union + class ApiAppGetResponse(BaseModel): """ ApiAppGetResponse - """ # noqa: E501 + """ # noqa: E501 + api_app: ApiAppResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["api_app", "warnings"] model_config = ConfigDict( @@ -43,7 +47,6 @@ class ApiAppGetResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +92,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of api_app if self.api_app: - _dict['api_app'] = self.api_app.to_dict() + _dict["api_app"] = self.api_app.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +111,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_app": ApiAppResponse.from_dict(obj["api_app"]) if obj.get("api_app") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "api_app": ( + ApiAppResponse.from_dict(obj["api_app"]) + if obj.get("api_app") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +149,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/api_app_list_response.py b/sdks/python/dropbox_sign/models/api_app_list_response.py index 970e69d11..748cc9365 100644 --- a/sdks/python/dropbox_sign/models/api_app_list_response.py +++ b/sdks/python/dropbox_sign/models/api_app_list_response.py @@ -29,13 +29,19 @@ from pydantic import StrictBool from typing import Union + class ApiAppListResponse(BaseModel): """ ApiAppListResponse - """ # noqa: E501 - api_apps: List[ApiAppResponse] = Field(description="Contains information about API Apps.") + """ # noqa: E501 + + api_apps: List[ApiAppResponse] = Field( + description="Contains information about API Apps." + ) list_info: ListInfoResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["api_apps", "list_info", "warnings"] model_config = ConfigDict( @@ -45,7 +51,6 @@ class ApiAppListResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +60,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,17 +100,17 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_api_apps in self.api_apps: if _item_api_apps: _items.append(_item_api_apps.to_dict()) - _dict['api_apps'] = _items + _dict["api_apps"] = _items # override the default output from pydantic by calling `to_dict()` of list_info if self.list_info: - _dict['list_info'] = self.list_info.to_dict() + _dict["list_info"] = self.list_info.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -115,11 +122,25 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_apps": [ApiAppResponse.from_dict(_item) for _item in obj["api_apps"]] if obj.get("api_apps") is not None else None, - "list_info": ListInfoResponse.from_dict(obj["list_info"]) if obj.get("list_info") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "api_apps": ( + [ApiAppResponse.from_dict(_item) for _item in obj["api_apps"]] + if obj.get("api_apps") is not None + else None + ), + "list_info": ( + ListInfoResponse.from_dict(obj["list_info"]) + if obj.get("list_info") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -146,4 +167,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "api_apps", "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/api_app_response.py b/sdks/python/dropbox_sign/models/api_app_response.py index b45d59bb6..a1f0bf157 100644 --- a/sdks/python/dropbox_sign/models/api_app_response.py +++ b/sdks/python/dropbox_sign/models/api_app_response.py @@ -22,29 +22,56 @@ from typing import Any, ClassVar, Dict, List, Optional from dropbox_sign.models.api_app_response_o_auth import ApiAppResponseOAuth from dropbox_sign.models.api_app_response_options import ApiAppResponseOptions -from dropbox_sign.models.api_app_response_owner_account import ApiAppResponseOwnerAccount -from dropbox_sign.models.api_app_response_white_labeling_options import ApiAppResponseWhiteLabelingOptions +from dropbox_sign.models.api_app_response_owner_account import ( + ApiAppResponseOwnerAccount, +) +from dropbox_sign.models.api_app_response_white_labeling_options import ( + ApiAppResponseWhiteLabelingOptions, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class ApiAppResponse(BaseModel): """ Contains information about an API App. - """ # noqa: E501 - callback_url: Optional[StrictStr] = Field(default=None, description="The app's callback URL (for events)") - client_id: Optional[StrictStr] = Field(default=None, description="The app's client id") - created_at: Optional[StrictInt] = Field(default=None, description="The time that the app was created") - domains: Optional[List[StrictStr]] = Field(default=None, description="The domain name(s) associated with the app") + """ # noqa: E501 + + callback_url: Optional[StrictStr] = Field( + default=None, description="The app's callback URL (for events)" + ) + client_id: Optional[StrictStr] = Field( + default=None, description="The app's client id" + ) + created_at: Optional[StrictInt] = Field( + default=None, description="The time that the app was created" + ) + domains: Optional[List[StrictStr]] = Field( + default=None, description="The domain name(s) associated with the app" + ) name: Optional[StrictStr] = Field(default=None, description="The name of the app") - is_approved: Optional[StrictBool] = Field(default=None, description="Boolean to indicate if the app has been approved") + is_approved: Optional[StrictBool] = Field( + default=None, description="Boolean to indicate if the app has been approved" + ) oauth: Optional[ApiAppResponseOAuth] = None options: Optional[ApiAppResponseOptions] = None owner_account: Optional[ApiAppResponseOwnerAccount] = None white_labeling_options: Optional[ApiAppResponseWhiteLabelingOptions] = None - __properties: ClassVar[List[str]] = ["callback_url", "client_id", "created_at", "domains", "name", "is_approved", "oauth", "options", "owner_account", "white_labeling_options"] + __properties: ClassVar[List[str]] = [ + "callback_url", + "client_id", + "created_at", + "domains", + "name", + "is_approved", + "oauth", + "options", + "owner_account", + "white_labeling_options", + ] model_config = ConfigDict( populate_by_name=True, @@ -53,7 +80,6 @@ class ApiAppResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +89,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -97,16 +125,16 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of oauth if self.oauth: - _dict['oauth'] = self.oauth.to_dict() + _dict["oauth"] = self.oauth.to_dict() # override the default output from pydantic by calling `to_dict()` of options if self.options: - _dict['options'] = self.options.to_dict() + _dict["options"] = self.options.to_dict() # override the default output from pydantic by calling `to_dict()` of owner_account if self.owner_account: - _dict['owner_account'] = self.owner_account.to_dict() + _dict["owner_account"] = self.owner_account.to_dict() # override the default output from pydantic by calling `to_dict()` of white_labeling_options if self.white_labeling_options: - _dict['white_labeling_options'] = self.white_labeling_options.to_dict() + _dict["white_labeling_options"] = self.white_labeling_options.to_dict() return _dict @classmethod @@ -118,18 +146,38 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "callback_url": obj.get("callback_url"), - "client_id": obj.get("client_id"), - "created_at": obj.get("created_at"), - "domains": obj.get("domains"), - "name": obj.get("name"), - "is_approved": obj.get("is_approved"), - "oauth": ApiAppResponseOAuth.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, - "options": ApiAppResponseOptions.from_dict(obj["options"]) if obj.get("options") is not None else None, - "owner_account": ApiAppResponseOwnerAccount.from_dict(obj["owner_account"]) if obj.get("owner_account") is not None else None, - "white_labeling_options": ApiAppResponseWhiteLabelingOptions.from_dict(obj["white_labeling_options"]) if obj.get("white_labeling_options") is not None else None - }) + _obj = cls.model_validate( + { + "callback_url": obj.get("callback_url"), + "client_id": obj.get("client_id"), + "created_at": obj.get("created_at"), + "domains": obj.get("domains"), + "name": obj.get("name"), + "is_approved": obj.get("is_approved"), + "oauth": ( + ApiAppResponseOAuth.from_dict(obj["oauth"]) + if obj.get("oauth") is not None + else None + ), + "options": ( + ApiAppResponseOptions.from_dict(obj["options"]) + if obj.get("options") is not None + else None + ), + "owner_account": ( + ApiAppResponseOwnerAccount.from_dict(obj["owner_account"]) + if obj.get("owner_account") is not None + else None + ), + "white_labeling_options": ( + ApiAppResponseWhiteLabelingOptions.from_dict( + obj["white_labeling_options"] + ) + if obj.get("white_labeling_options") is not None + else None + ), + } + ) return _obj @classmethod @@ -162,4 +210,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "domains", ] - diff --git a/sdks/python/dropbox_sign/models/api_app_response_o_auth.py b/sdks/python/dropbox_sign/models/api_app_response_o_auth.py index 554bb05bd..981f94d9f 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_o_auth.py +++ b/sdks/python/dropbox_sign/models/api_app_response_o_auth.py @@ -26,15 +26,32 @@ from pydantic import StrictBool from typing import Union + class ApiAppResponseOAuth(BaseModel): """ An object describing the app's OAuth properties, or null if OAuth is not configured for the app. - """ # noqa: E501 - callback_url: Optional[StrictStr] = Field(default=None, description="The app's OAuth callback URL.") - secret: Optional[StrictStr] = Field(default=None, description="The app's OAuth secret, or null if the app does not belong to user.") - scopes: Optional[List[StrictStr]] = Field(default=None, description="Array of OAuth scopes used by the app.") - charges_users: Optional[StrictBool] = Field(default=None, description="Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests.") - __properties: ClassVar[List[str]] = ["callback_url", "secret", "scopes", "charges_users"] + """ # noqa: E501 + + callback_url: Optional[StrictStr] = Field( + default=None, description="The app's OAuth callback URL." + ) + secret: Optional[StrictStr] = Field( + default=None, + description="The app's OAuth secret, or null if the app does not belong to user.", + ) + scopes: Optional[List[StrictStr]] = Field( + default=None, description="Array of OAuth scopes used by the app." + ) + charges_users: Optional[StrictBool] = Field( + default=None, + description="Boolean indicating whether the app owner or the account granting permission is billed for OAuth requests.", + ) + __properties: ClassVar[List[str]] = [ + "callback_url", + "secret", + "scopes", + "charges_users", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +60,6 @@ class ApiAppResponseOAuth(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,12 +114,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "callback_url": obj.get("callback_url"), - "secret": obj.get("secret"), - "scopes": obj.get("scopes"), - "charges_users": obj.get("charges_users") - }) + _obj = cls.model_validate( + { + "callback_url": obj.get("callback_url"), + "secret": obj.get("secret"), + "scopes": obj.get("scopes"), + "charges_users": obj.get("charges_users"), + } + ) return _obj @classmethod @@ -128,4 +148,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "scopes", ] - diff --git a/sdks/python/dropbox_sign/models/api_app_response_options.py b/sdks/python/dropbox_sign/models/api_app_response_options.py index effa7a15d..751daf0de 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_options.py +++ b/sdks/python/dropbox_sign/models/api_app_response_options.py @@ -26,11 +26,16 @@ from pydantic import StrictBool from typing import Union + class ApiAppResponseOptions(BaseModel): """ An object with options that override account settings. - """ # noqa: E501 - can_insert_everywhere: Optional[StrictBool] = Field(default=None, description="Boolean denoting if signers can \"Insert Everywhere\" in one click while signing a document") + """ # noqa: E501 + + can_insert_everywhere: Optional[StrictBool] = Field( + default=None, + description='Boolean denoting if signers can "Insert Everywhere" in one click while signing a document', + ) __properties: ClassVar[List[str]] = ["can_insert_everywhere"] model_config = ConfigDict( @@ -40,7 +45,6 @@ class ApiAppResponseOptions(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +54,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +99,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "can_insert_everywhere": obj.get("can_insert_everywhere") - }) + _obj = cls.model_validate( + {"can_insert_everywhere": obj.get("can_insert_everywhere")} + ) return _obj @classmethod @@ -116,6 +122,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/api_app_response_owner_account.py b/sdks/python/dropbox_sign/models/api_app_response_owner_account.py index 325b6f72b..c1ed456c8 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_owner_account.py +++ b/sdks/python/dropbox_sign/models/api_app_response_owner_account.py @@ -26,12 +26,18 @@ from pydantic import StrictBool from typing import Union + class ApiAppResponseOwnerAccount(BaseModel): """ An object describing the app's owner - """ # noqa: E501 - account_id: Optional[StrictStr] = Field(default=None, description="The owner account's ID") - email_address: Optional[StrictStr] = Field(default=None, description="The owner account's email address") + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, description="The owner account's ID" + ) + email_address: Optional[StrictStr] = Field( + default=None, description="The owner account's email address" + ) __properties: ClassVar[List[str]] = ["account_id", "email_address"] model_config = ConfigDict( @@ -41,7 +47,6 @@ class ApiAppResponseOwnerAccount(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +101,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account_id": obj.get("account_id"), - "email_address": obj.get("email_address") - }) + _obj = cls.model_validate( + { + "account_id": obj.get("account_id"), + "email_address": obj.get("email_address"), + } + ) return _obj @classmethod @@ -119,6 +128,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/api_app_response_white_labeling_options.py b/sdks/python/dropbox_sign/models/api_app_response_white_labeling_options.py index 7934751ed..734022f90 100644 --- a/sdks/python/dropbox_sign/models/api_app_response_white_labeling_options.py +++ b/sdks/python/dropbox_sign/models/api_app_response_white_labeling_options.py @@ -26,10 +26,12 @@ from pydantic import StrictBool from typing import Union + class ApiAppResponseWhiteLabelingOptions(BaseModel): """ An object with options to customize the app's signer page - """ # noqa: E501 + """ # noqa: E501 + header_background_color: Optional[StrictStr] = None legal_version: Optional[StrictStr] = None link_color: Optional[StrictStr] = None @@ -44,7 +46,22 @@ class ApiAppResponseWhiteLabelingOptions(BaseModel): secondary_button_text_color_hover: Optional[StrictStr] = None text_color1: Optional[StrictStr] = None text_color2: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["header_background_color", "legal_version", "link_color", "page_background_color", "primary_button_color", "primary_button_color_hover", "primary_button_text_color", "primary_button_text_color_hover", "secondary_button_color", "secondary_button_color_hover", "secondary_button_text_color", "secondary_button_text_color_hover", "text_color1", "text_color2"] + __properties: ClassVar[List[str]] = [ + "header_background_color", + "legal_version", + "link_color", + "page_background_color", + "primary_button_color", + "primary_button_color_hover", + "primary_button_text_color", + "primary_button_text_color_hover", + "secondary_button_color", + "secondary_button_color_hover", + "secondary_button_text_color", + "secondary_button_text_color_hover", + "text_color1", + "text_color2", + ] model_config = ConfigDict( populate_by_name=True, @@ -53,7 +70,6 @@ class ApiAppResponseWhiteLabelingOptions(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +79,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -106,22 +124,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "header_background_color": obj.get("header_background_color"), - "legal_version": obj.get("legal_version"), - "link_color": obj.get("link_color"), - "page_background_color": obj.get("page_background_color"), - "primary_button_color": obj.get("primary_button_color"), - "primary_button_color_hover": obj.get("primary_button_color_hover"), - "primary_button_text_color": obj.get("primary_button_text_color"), - "primary_button_text_color_hover": obj.get("primary_button_text_color_hover"), - "secondary_button_color": obj.get("secondary_button_color"), - "secondary_button_color_hover": obj.get("secondary_button_color_hover"), - "secondary_button_text_color": obj.get("secondary_button_text_color"), - "secondary_button_text_color_hover": obj.get("secondary_button_text_color_hover"), - "text_color1": obj.get("text_color1"), - "text_color2": obj.get("text_color2") - }) + _obj = cls.model_validate( + { + "header_background_color": obj.get("header_background_color"), + "legal_version": obj.get("legal_version"), + "link_color": obj.get("link_color"), + "page_background_color": obj.get("page_background_color"), + "primary_button_color": obj.get("primary_button_color"), + "primary_button_color_hover": obj.get("primary_button_color_hover"), + "primary_button_text_color": obj.get("primary_button_text_color"), + "primary_button_text_color_hover": obj.get( + "primary_button_text_color_hover" + ), + "secondary_button_color": obj.get("secondary_button_color"), + "secondary_button_color_hover": obj.get("secondary_button_color_hover"), + "secondary_button_text_color": obj.get("secondary_button_text_color"), + "secondary_button_text_color_hover": obj.get( + "secondary_button_text_color_hover" + ), + "text_color1": obj.get("text_color1"), + "text_color2": obj.get("text_color2"), + } + ) return _obj @classmethod @@ -155,6 +179,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/api_app_update_request.py b/sdks/python/dropbox_sign/models/api_app_update_request.py index 649ad361a..e3f2a1abc 100644 --- a/sdks/python/dropbox_sign/models/api_app_update_request.py +++ b/sdks/python/dropbox_sign/models/api_app_update_request.py @@ -30,18 +30,38 @@ from pydantic import StrictBool from typing import Union + class ApiAppUpdateRequest(BaseModel): """ ApiAppUpdateRequest - """ # noqa: E501 - callback_url: Optional[StrictStr] = Field(default=None, description="The URL at which the API App should receive event callbacks.") - custom_logo_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field(default=None, description="An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)") - domains: Optional[Annotated[List[StrictStr], Field(max_length=2)]] = Field(default=None, description="The domain names the ApiApp will be associated with.") - name: Optional[StrictStr] = Field(default=None, description="The name you want to assign to the ApiApp.") + """ # noqa: E501 + + callback_url: Optional[StrictStr] = Field( + default=None, + description="The URL at which the API App should receive event callbacks.", + ) + custom_logo_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field( + default=None, + description="An image file to use as a custom logo in embedded contexts. (Only applies to some API plans)", + ) + domains: Optional[Annotated[List[StrictStr], Field(max_length=2)]] = Field( + default=None, description="The domain names the ApiApp will be associated with." + ) + name: Optional[StrictStr] = Field( + default=None, description="The name you want to assign to the ApiApp." + ) oauth: Optional[SubOAuth] = None options: Optional[SubOptions] = None white_labeling_options: Optional[SubWhiteLabelingOptions] = None - __properties: ClassVar[List[str]] = ["callback_url", "custom_logo_file", "domains", "name", "oauth", "options", "white_labeling_options"] + __properties: ClassVar[List[str]] = [ + "callback_url", + "custom_logo_file", + "domains", + "name", + "oauth", + "options", + "white_labeling_options", + ] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +70,6 @@ class ApiAppUpdateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +79,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,13 +115,13 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of oauth if self.oauth: - _dict['oauth'] = self.oauth.to_dict() + _dict["oauth"] = self.oauth.to_dict() # override the default output from pydantic by calling `to_dict()` of options if self.options: - _dict['options'] = self.options.to_dict() + _dict["options"] = self.options.to_dict() # override the default output from pydantic by calling `to_dict()` of white_labeling_options if self.white_labeling_options: - _dict['white_labeling_options'] = self.white_labeling_options.to_dict() + _dict["white_labeling_options"] = self.white_labeling_options.to_dict() return _dict @classmethod @@ -112,15 +133,29 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "callback_url": obj.get("callback_url"), - "custom_logo_file": obj.get("custom_logo_file"), - "domains": obj.get("domains"), - "name": obj.get("name"), - "oauth": SubOAuth.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, - "options": SubOptions.from_dict(obj["options"]) if obj.get("options") is not None else None, - "white_labeling_options": SubWhiteLabelingOptions.from_dict(obj["white_labeling_options"]) if obj.get("white_labeling_options") is not None else None - }) + _obj = cls.model_validate( + { + "callback_url": obj.get("callback_url"), + "custom_logo_file": obj.get("custom_logo_file"), + "domains": obj.get("domains"), + "name": obj.get("name"), + "oauth": ( + SubOAuth.from_dict(obj["oauth"]) + if obj.get("oauth") is not None + else None + ), + "options": ( + SubOptions.from_dict(obj["options"]) + if obj.get("options") is not None + else None + ), + "white_labeling_options": ( + SubWhiteLabelingOptions.from_dict(obj["white_labeling_options"]) + if obj.get("white_labeling_options") is not None + else None + ), + } + ) return _obj @classmethod @@ -150,4 +185,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "domains", ] - diff --git a/sdks/python/dropbox_sign/models/bulk_send_job_get_response.py b/sdks/python/dropbox_sign/models/bulk_send_job_get_response.py index 8811323e5..749ba54b1 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_get_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_get_response.py @@ -20,7 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.bulk_send_job_get_response_signature_requests import BulkSendJobGetResponseSignatureRequests +from dropbox_sign.models.bulk_send_job_get_response_signature_requests import ( + BulkSendJobGetResponseSignatureRequests, +) from dropbox_sign.models.bulk_send_job_response import BulkSendJobResponse from dropbox_sign.models.list_info_response import ListInfoResponse from dropbox_sign.models.warning_response import WarningResponse @@ -30,15 +32,26 @@ from pydantic import StrictBool from typing import Union + class BulkSendJobGetResponse(BaseModel): """ BulkSendJobGetResponse - """ # noqa: E501 + """ # noqa: E501 + bulk_send_job: BulkSendJobResponse list_info: ListInfoResponse - signature_requests: List[BulkSendJobGetResponseSignatureRequests] = Field(description="Contains information about the Signature Requests sent in bulk.") - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") - __properties: ClassVar[List[str]] = ["bulk_send_job", "list_info", "signature_requests", "warnings"] + signature_requests: List[BulkSendJobGetResponseSignatureRequests] = Field( + description="Contains information about the Signature Requests sent in bulk." + ) + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) + __properties: ClassVar[List[str]] = [ + "bulk_send_job", + "list_info", + "signature_requests", + "warnings", + ] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +60,6 @@ class BulkSendJobGetResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -57,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -91,24 +105,24 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of bulk_send_job if self.bulk_send_job: - _dict['bulk_send_job'] = self.bulk_send_job.to_dict() + _dict["bulk_send_job"] = self.bulk_send_job.to_dict() # override the default output from pydantic by calling `to_dict()` of list_info if self.list_info: - _dict['list_info'] = self.list_info.to_dict() + _dict["list_info"] = self.list_info.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in signature_requests (list) _items = [] if self.signature_requests: for _item_signature_requests in self.signature_requests: if _item_signature_requests: _items.append(_item_signature_requests.to_dict()) - _dict['signature_requests'] = _items + _dict["signature_requests"] = _items # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -120,12 +134,33 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "bulk_send_job": BulkSendJobResponse.from_dict(obj["bulk_send_job"]) if obj.get("bulk_send_job") is not None else None, - "list_info": ListInfoResponse.from_dict(obj["list_info"]) if obj.get("list_info") is not None else None, - "signature_requests": [BulkSendJobGetResponseSignatureRequests.from_dict(_item) for _item in obj["signature_requests"]] if obj.get("signature_requests") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "bulk_send_job": ( + BulkSendJobResponse.from_dict(obj["bulk_send_job"]) + if obj.get("bulk_send_job") is not None + else None + ), + "list_info": ( + ListInfoResponse.from_dict(obj["list_info"]) + if obj.get("list_info") is not None + else None + ), + "signature_requests": ( + [ + BulkSendJobGetResponseSignatureRequests.from_dict(_item) + for _item in obj["signature_requests"] + ] + if obj.get("signature_requests") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -153,4 +188,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "signature_requests", "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/bulk_send_job_get_response_signature_requests.py b/sdks/python/dropbox_sign/models/bulk_send_job_get_response_signature_requests.py index 71bdd8157..748c75c1d 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_get_response_signature_requests.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_get_response_signature_requests.py @@ -20,46 +20,150 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_attachment import SignatureRequestResponseAttachment -from dropbox_sign.models.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase -from dropbox_sign.models.signature_request_response_signatures import SignatureRequestResponseSignatures +from dropbox_sign.models.signature_request_response_attachment import ( + SignatureRequestResponseAttachment, +) +from dropbox_sign.models.signature_request_response_custom_field_base import ( + SignatureRequestResponseCustomFieldBase, +) +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) +from dropbox_sign.models.signature_request_response_signatures import ( + SignatureRequestResponseSignatures, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class BulkSendJobGetResponseSignatureRequests(BaseModel): """ BulkSendJobGetResponseSignatureRequests - """ # noqa: E501 - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test signature request. Test requests have no legal value. Defaults to `false`.") - signature_request_id: Optional[StrictStr] = Field(default=None, description="The id of the SignatureRequest.") - requester_email_address: Optional[StrictStr] = Field(default=None, description="The email address of the initiator of the SignatureRequest.") - title: Optional[StrictStr] = Field(default=None, description="The title the specified Account uses for the SignatureRequest.") - original_title: Optional[StrictStr] = Field(default=None, description="Default Label for account.") - subject: Optional[StrictStr] = Field(default=None, description="The subject in the email that was initially sent to the signers.") - message: Optional[StrictStr] = Field(default=None, description="The custom message in the email that was initially sent to the signers.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata attached to the signature request.") - created_at: Optional[StrictInt] = Field(default=None, description="Time the signature request was created.") - expires_at: Optional[StrictInt] = Field(default=None, description="The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.") - is_complete: Optional[StrictBool] = Field(default=None, description="Whether or not the SignatureRequest has been fully executed by all signers.") - is_declined: Optional[StrictBool] = Field(default=None, description="Whether or not the SignatureRequest has been declined by a signer.") - has_error: Optional[StrictBool] = Field(default=None, description="Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings).") - files_url: Optional[StrictStr] = Field(default=None, description="The URL where a copy of the request's documents can be downloaded.") - signing_url: Optional[StrictStr] = Field(default=None, description="The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing.") - details_url: Optional[StrictStr] = Field(default=None, description="The URL where the requester and the signers can view the current status of the SignatureRequest.") - cc_email_addresses: Optional[List[StrictStr]] = Field(default=None, description="A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed.") - signing_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want the signer redirected to after they successfully sign.") - final_copy_uri: Optional[StrictStr] = Field(default=None, description="The path where the completed document can be downloaded") - template_ids: Optional[List[StrictStr]] = Field(default=None, description="Templates IDs used in this SignatureRequest (if any).") - custom_fields: Optional[List[SignatureRequestResponseCustomFieldBase]] = Field(default=None, description="An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`") - attachments: Optional[List[SignatureRequestResponseAttachment]] = Field(default=None, description="Signer attachments.") - response_data: Optional[List[SignatureRequestResponseDataBase]] = Field(default=None, description="An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.") - signatures: Optional[List[SignatureRequestResponseSignatures]] = Field(default=None, description="An array of signature objects, 1 for each signer.") - bulk_send_job_id: Optional[StrictStr] = Field(default=None, description="The id of the BulkSendJob.") - __properties: ClassVar[List[str]] = ["test_mode", "signature_request_id", "requester_email_address", "title", "original_title", "subject", "message", "metadata", "created_at", "expires_at", "is_complete", "is_declined", "has_error", "files_url", "signing_url", "details_url", "cc_email_addresses", "signing_redirect_url", "final_copy_uri", "template_ids", "custom_fields", "attachments", "response_data", "signatures", "bulk_send_job_id"] + """ # noqa: E501 + + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test signature request. Test requests have no legal value. Defaults to `false`.", + ) + signature_request_id: Optional[StrictStr] = Field( + default=None, description="The id of the SignatureRequest." + ) + requester_email_address: Optional[StrictStr] = Field( + default=None, + description="The email address of the initiator of the SignatureRequest.", + ) + title: Optional[StrictStr] = Field( + default=None, + description="The title the specified Account uses for the SignatureRequest.", + ) + original_title: Optional[StrictStr] = Field( + default=None, description="Default Label for account." + ) + subject: Optional[StrictStr] = Field( + default=None, + description="The subject in the email that was initially sent to the signers.", + ) + message: Optional[StrictStr] = Field( + default=None, + description="The custom message in the email that was initially sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, description="The metadata attached to the signature request." + ) + created_at: Optional[StrictInt] = Field( + default=None, description="Time the signature request was created." + ) + expires_at: Optional[StrictInt] = Field( + default=None, + description="The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.", + ) + is_complete: Optional[StrictBool] = Field( + default=None, + description="Whether or not the SignatureRequest has been fully executed by all signers.", + ) + is_declined: Optional[StrictBool] = Field( + default=None, + description="Whether or not the SignatureRequest has been declined by a signer.", + ) + has_error: Optional[StrictBool] = Field( + default=None, + description="Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings).", + ) + files_url: Optional[StrictStr] = Field( + default=None, + description="The URL where a copy of the request's documents can be downloaded.", + ) + signing_url: Optional[StrictStr] = Field( + default=None, + description="The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing.", + ) + details_url: Optional[StrictStr] = Field( + default=None, + description="The URL where the requester and the signers can view the current status of the SignatureRequest.", + ) + cc_email_addresses: Optional[List[StrictStr]] = Field( + default=None, + description="A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed.", + ) + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want the signer redirected to after they successfully sign.", + ) + final_copy_uri: Optional[StrictStr] = Field( + default=None, + description="The path where the completed document can be downloaded", + ) + template_ids: Optional[List[StrictStr]] = Field( + default=None, + description="Templates IDs used in this SignatureRequest (if any).", + ) + custom_fields: Optional[List[SignatureRequestResponseCustomFieldBase]] = Field( + default=None, + description="An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`", + ) + attachments: Optional[List[SignatureRequestResponseAttachment]] = Field( + default=None, description="Signer attachments." + ) + response_data: Optional[List[SignatureRequestResponseDataBase]] = Field( + default=None, + description="An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.", + ) + signatures: Optional[List[SignatureRequestResponseSignatures]] = Field( + default=None, description="An array of signature objects, 1 for each signer." + ) + bulk_send_job_id: Optional[StrictStr] = Field( + default=None, description="The id of the BulkSendJob." + ) + __properties: ClassVar[List[str]] = [ + "test_mode", + "signature_request_id", + "requester_email_address", + "title", + "original_title", + "subject", + "message", + "metadata", + "created_at", + "expires_at", + "is_complete", + "is_declined", + "has_error", + "files_url", + "signing_url", + "details_url", + "cc_email_addresses", + "signing_redirect_url", + "final_copy_uri", + "template_ids", + "custom_fields", + "attachments", + "response_data", + "signatures", + "bulk_send_job_id", + ] model_config = ConfigDict( populate_by_name=True, @@ -68,7 +172,6 @@ class BulkSendJobGetResponseSignatureRequests(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +181,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -116,28 +221,28 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: for _item_attachments in self.attachments: if _item_attachments: _items.append(_item_attachments.to_dict()) - _dict['attachments'] = _items + _dict["attachments"] = _items # override the default output from pydantic by calling `to_dict()` of each item in response_data (list) _items = [] if self.response_data: for _item_response_data in self.response_data: if _item_response_data: _items.append(_item_response_data.to_dict()) - _dict['response_data'] = _items + _dict["response_data"] = _items # override the default output from pydantic by calling `to_dict()` of each item in signatures (list) _items = [] if self.signatures: for _item_signatures in self.signatures: if _item_signatures: _items.append(_item_signatures.to_dict()) - _dict['signatures'] = _items + _dict["signatures"] = _items return _dict @classmethod @@ -149,33 +254,65 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "signature_request_id": obj.get("signature_request_id"), - "requester_email_address": obj.get("requester_email_address"), - "title": obj.get("title"), - "original_title": obj.get("original_title"), - "subject": obj.get("subject"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - "is_complete": obj.get("is_complete"), - "is_declined": obj.get("is_declined"), - "has_error": obj.get("has_error"), - "files_url": obj.get("files_url"), - "signing_url": obj.get("signing_url"), - "details_url": obj.get("details_url"), - "cc_email_addresses": obj.get("cc_email_addresses"), - "signing_redirect_url": obj.get("signing_redirect_url"), - "final_copy_uri": obj.get("final_copy_uri"), - "template_ids": obj.get("template_ids"), - "custom_fields": [SignatureRequestResponseCustomFieldBase.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "attachments": [SignatureRequestResponseAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, - "response_data": [SignatureRequestResponseDataBase.from_dict(_item) for _item in obj["response_data"]] if obj.get("response_data") is not None else None, - "signatures": [SignatureRequestResponseSignatures.from_dict(_item) for _item in obj["signatures"]] if obj.get("signatures") is not None else None, - "bulk_send_job_id": obj.get("bulk_send_job_id") - }) + _obj = cls.model_validate( + { + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "signature_request_id": obj.get("signature_request_id"), + "requester_email_address": obj.get("requester_email_address"), + "title": obj.get("title"), + "original_title": obj.get("original_title"), + "subject": obj.get("subject"), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at"), + "is_complete": obj.get("is_complete"), + "is_declined": obj.get("is_declined"), + "has_error": obj.get("has_error"), + "files_url": obj.get("files_url"), + "signing_url": obj.get("signing_url"), + "details_url": obj.get("details_url"), + "cc_email_addresses": obj.get("cc_email_addresses"), + "signing_redirect_url": obj.get("signing_redirect_url"), + "final_copy_uri": obj.get("final_copy_uri"), + "template_ids": obj.get("template_ids"), + "custom_fields": ( + [ + SignatureRequestResponseCustomFieldBase.from_dict(_item) + for _item in obj["custom_fields"] + ] + if obj.get("custom_fields") is not None + else None + ), + "attachments": ( + [ + SignatureRequestResponseAttachment.from_dict(_item) + for _item in obj["attachments"] + ] + if obj.get("attachments") is not None + else None + ), + "response_data": ( + [ + SignatureRequestResponseDataBase.from_dict(_item) + for _item in obj["response_data"] + ] + if obj.get("response_data") is not None + else None + ), + "signatures": ( + [ + SignatureRequestResponseSignatures.from_dict(_item) + for _item in obj["signatures"] + ] + if obj.get("signatures") is not None + else None + ), + "bulk_send_job_id": obj.get("bulk_send_job_id"), + } + ) return _obj @classmethod @@ -228,4 +365,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "response_data", "signatures", ] - diff --git a/sdks/python/dropbox_sign/models/bulk_send_job_list_response.py b/sdks/python/dropbox_sign/models/bulk_send_job_list_response.py index 05ae51983..91d471ccc 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_list_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_list_response.py @@ -29,13 +29,19 @@ from pydantic import StrictBool from typing import Union + class BulkSendJobListResponse(BaseModel): """ BulkSendJobListResponse - """ # noqa: E501 - bulk_send_jobs: List[BulkSendJobResponse] = Field(description="Contains a list of BulkSendJobs that the API caller has access to.") + """ # noqa: E501 + + bulk_send_jobs: List[BulkSendJobResponse] = Field( + description="Contains a list of BulkSendJobs that the API caller has access to." + ) list_info: ListInfoResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["bulk_send_jobs", "list_info", "warnings"] model_config = ConfigDict( @@ -45,7 +51,6 @@ class BulkSendJobListResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +60,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,17 +100,17 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_bulk_send_jobs in self.bulk_send_jobs: if _item_bulk_send_jobs: _items.append(_item_bulk_send_jobs.to_dict()) - _dict['bulk_send_jobs'] = _items + _dict["bulk_send_jobs"] = _items # override the default output from pydantic by calling `to_dict()` of list_info if self.list_info: - _dict['list_info'] = self.list_info.to_dict() + _dict["list_info"] = self.list_info.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -115,11 +122,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "bulk_send_jobs": [BulkSendJobResponse.from_dict(_item) for _item in obj["bulk_send_jobs"]] if obj.get("bulk_send_jobs") is not None else None, - "list_info": ListInfoResponse.from_dict(obj["list_info"]) if obj.get("list_info") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "bulk_send_jobs": ( + [ + BulkSendJobResponse.from_dict(_item) + for _item in obj["bulk_send_jobs"] + ] + if obj.get("bulk_send_jobs") is not None + else None + ), + "list_info": ( + ListInfoResponse.from_dict(obj["list_info"]) + if obj.get("list_info") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -146,4 +170,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "bulk_send_jobs", "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/bulk_send_job_response.py b/sdks/python/dropbox_sign/models/bulk_send_job_response.py index 164d399e5..0812cb85d 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_response.py @@ -26,15 +26,32 @@ from pydantic import StrictBool from typing import Union + class BulkSendJobResponse(BaseModel): """ Contains information about the BulkSendJob such as when it was created and how many signature requests are queued. - """ # noqa: E501 - bulk_send_job_id: Optional[StrictStr] = Field(default=None, description="The id of the BulkSendJob.") - total: Optional[StrictInt] = Field(default=None, description="The total amount of Signature Requests queued for sending.") - is_creator: Optional[StrictBool] = Field(default=None, description="True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member.") - created_at: Optional[StrictInt] = Field(default=None, description="Time that the BulkSendJob was created.") - __properties: ClassVar[List[str]] = ["bulk_send_job_id", "total", "is_creator", "created_at"] + """ # noqa: E501 + + bulk_send_job_id: Optional[StrictStr] = Field( + default=None, description="The id of the BulkSendJob." + ) + total: Optional[StrictInt] = Field( + default=None, + description="The total amount of Signature Requests queued for sending.", + ) + is_creator: Optional[StrictBool] = Field( + default=None, + description="True if you are the owner of this BulkSendJob, false if it's been shared with you by a team member.", + ) + created_at: Optional[StrictInt] = Field( + default=None, description="Time that the BulkSendJob was created." + ) + __properties: ClassVar[List[str]] = [ + "bulk_send_job_id", + "total", + "is_creator", + "created_at", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +60,6 @@ class BulkSendJobResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,12 +114,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "bulk_send_job_id": obj.get("bulk_send_job_id"), - "total": obj.get("total"), - "is_creator": obj.get("is_creator"), - "created_at": obj.get("created_at") - }) + _obj = cls.model_validate( + { + "bulk_send_job_id": obj.get("bulk_send_job_id"), + "total": obj.get("total"), + "is_creator": obj.get("is_creator"), + "created_at": obj.get("created_at"), + } + ) return _obj @classmethod @@ -125,6 +145,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/bulk_send_job_send_response.py b/sdks/python/dropbox_sign/models/bulk_send_job_send_response.py index 932b0963e..e340ab831 100644 --- a/sdks/python/dropbox_sign/models/bulk_send_job_send_response.py +++ b/sdks/python/dropbox_sign/models/bulk_send_job_send_response.py @@ -28,12 +28,16 @@ from pydantic import StrictBool from typing import Union + class BulkSendJobSendResponse(BaseModel): """ BulkSendJobSendResponse - """ # noqa: E501 + """ # noqa: E501 + bulk_send_job: BulkSendJobResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["bulk_send_job", "warnings"] model_config = ConfigDict( @@ -43,7 +47,6 @@ class BulkSendJobSendResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +92,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of bulk_send_job if self.bulk_send_job: - _dict['bulk_send_job'] = self.bulk_send_job.to_dict() + _dict["bulk_send_job"] = self.bulk_send_job.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +111,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "bulk_send_job": BulkSendJobResponse.from_dict(obj["bulk_send_job"]) if obj.get("bulk_send_job") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "bulk_send_job": ( + BulkSendJobResponse.from_dict(obj["bulk_send_job"]) + if obj.get("bulk_send_job") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +149,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/embedded_edit_url_request.py b/sdks/python/dropbox_sign/models/embedded_edit_url_request.py index 4eadf9c9e..525dfa828 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_request.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_request.py @@ -28,21 +28,61 @@ from pydantic import StrictBool from typing import Union + class EmbeddedEditUrlRequest(BaseModel): """ EmbeddedEditUrlRequest - """ # noqa: E501 - allow_edit_ccs: Optional[StrictBool] = Field(default=False, description="This allows the requester to enable/disable to add or change CC roles when editing the template.") - cc_roles: Optional[List[StrictStr]] = Field(default=None, description="The CC roles that must be assigned when using the template to send a signature request. To remove all CC roles, pass in a single role with no name. For use in a POST request.") + """ # noqa: E501 + + allow_edit_ccs: Optional[StrictBool] = Field( + default=False, + description="This allows the requester to enable/disable to add or change CC roles when editing the template.", + ) + cc_roles: Optional[List[StrictStr]] = Field( + default=None, + description="The CC roles that must be assigned when using the template to send a signature request. To remove all CC roles, pass in a single role with no name. For use in a POST request.", + ) editor_options: Optional[SubEditorOptions] = None - force_signer_roles: Optional[StrictBool] = Field(default=False, description="Provide users the ability to review/edit the template signer roles.") - force_subject_message: Optional[StrictBool] = Field(default=False, description="Provide users the ability to review/edit the template subject and message.") - merge_fields: Optional[List[SubMergeField]] = Field(default=None, description="Add additional merge fields to the template, which can be used used to pre-fill data by passing values into signature requests made with that template. Remove all merge fields on the template by passing an empty array `[]`.") - preview_only: Optional[StrictBool] = Field(default=False, description="This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). **NOTE:** This parameter overwrites `show_preview=true` (if set).") - show_preview: Optional[StrictBool] = Field(default=False, description="This allows the requester to enable the editor/preview experience.") - show_progress_stepper: Optional[StrictBool] = Field(default=True, description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`.") - __properties: ClassVar[List[str]] = ["allow_edit_ccs", "cc_roles", "editor_options", "force_signer_roles", "force_subject_message", "merge_fields", "preview_only", "show_preview", "show_progress_stepper", "test_mode"] + force_signer_roles: Optional[StrictBool] = Field( + default=False, + description="Provide users the ability to review/edit the template signer roles.", + ) + force_subject_message: Optional[StrictBool] = Field( + default=False, + description="Provide users the ability to review/edit the template subject and message.", + ) + merge_fields: Optional[List[SubMergeField]] = Field( + default=None, + description="Add additional merge fields to the template, which can be used used to pre-fill data by passing values into signature requests made with that template. Remove all merge fields on the template by passing an empty array `[]`.", + ) + preview_only: Optional[StrictBool] = Field( + default=False, + description="This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). **NOTE:** This parameter overwrites `show_preview=true` (if set).", + ) + show_preview: Optional[StrictBool] = Field( + default=False, + description="This allows the requester to enable the editor/preview experience.", + ) + show_progress_stepper: Optional[StrictBool] = Field( + default=True, + description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, locked templates will only be available for editing if this is set to `true`. Defaults to `false`.", + ) + __properties: ClassVar[List[str]] = [ + "allow_edit_ccs", + "cc_roles", + "editor_options", + "force_signer_roles", + "force_subject_message", + "merge_fields", + "preview_only", + "show_preview", + "show_progress_stepper", + "test_mode", + ] model_config = ConfigDict( populate_by_name=True, @@ -51,7 +91,6 @@ class EmbeddedEditUrlRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +100,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +136,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of editor_options if self.editor_options: - _dict['editor_options'] = self.editor_options.to_dict() + _dict["editor_options"] = self.editor_options.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in merge_fields (list) _items = [] if self.merge_fields: for _item_merge_fields in self.merge_fields: if _item_merge_fields: _items.append(_item_merge_fields.to_dict()) - _dict['merge_fields'] = _items + _dict["merge_fields"] = _items return _dict @classmethod @@ -114,18 +155,54 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "allow_edit_ccs": obj.get("allow_edit_ccs") if obj.get("allow_edit_ccs") is not None else False, - "cc_roles": obj.get("cc_roles"), - "editor_options": SubEditorOptions.from_dict(obj["editor_options"]) if obj.get("editor_options") is not None else None, - "force_signer_roles": obj.get("force_signer_roles") if obj.get("force_signer_roles") is not None else False, - "force_subject_message": obj.get("force_subject_message") if obj.get("force_subject_message") is not None else False, - "merge_fields": [SubMergeField.from_dict(_item) for _item in obj["merge_fields"]] if obj.get("merge_fields") is not None else None, - "preview_only": obj.get("preview_only") if obj.get("preview_only") is not None else False, - "show_preview": obj.get("show_preview") if obj.get("show_preview") is not None else False, - "show_progress_stepper": obj.get("show_progress_stepper") if obj.get("show_progress_stepper") is not None else True, - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False - }) + _obj = cls.model_validate( + { + "allow_edit_ccs": ( + obj.get("allow_edit_ccs") + if obj.get("allow_edit_ccs") is not None + else False + ), + "cc_roles": obj.get("cc_roles"), + "editor_options": ( + SubEditorOptions.from_dict(obj["editor_options"]) + if obj.get("editor_options") is not None + else None + ), + "force_signer_roles": ( + obj.get("force_signer_roles") + if obj.get("force_signer_roles") is not None + else False + ), + "force_subject_message": ( + obj.get("force_subject_message") + if obj.get("force_subject_message") is not None + else False + ), + "merge_fields": ( + [SubMergeField.from_dict(_item) for _item in obj["merge_fields"]] + if obj.get("merge_fields") is not None + else None + ), + "preview_only": ( + obj.get("preview_only") + if obj.get("preview_only") is not None + else False + ), + "show_preview": ( + obj.get("show_preview") + if obj.get("show_preview") is not None + else False + ), + "show_progress_stepper": ( + obj.get("show_progress_stepper") + if obj.get("show_progress_stepper") is not None + else True + ), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + } + ) return _obj @classmethod @@ -159,4 +236,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "cc_roles", "merge_fields", ] - diff --git a/sdks/python/dropbox_sign/models/embedded_edit_url_response.py b/sdks/python/dropbox_sign/models/embedded_edit_url_response.py index e77e06f9a..6c8ecc37a 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_response.py @@ -20,7 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.embedded_edit_url_response_embedded import EmbeddedEditUrlResponseEmbedded +from dropbox_sign.models.embedded_edit_url_response_embedded import ( + EmbeddedEditUrlResponseEmbedded, +) from dropbox_sign.models.warning_response import WarningResponse from typing import Optional, Set, Tuple from typing_extensions import Self @@ -28,12 +30,16 @@ from pydantic import StrictBool from typing import Union + class EmbeddedEditUrlResponse(BaseModel): """ EmbeddedEditUrlResponse - """ # noqa: E501 + """ # noqa: E501 + embedded: EmbeddedEditUrlResponseEmbedded - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["embedded", "warnings"] model_config = ConfigDict( @@ -43,7 +49,6 @@ class EmbeddedEditUrlResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +58,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +94,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of embedded if self.embedded: - _dict['embedded'] = self.embedded.to_dict() + _dict["embedded"] = self.embedded.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +113,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "embedded": EmbeddedEditUrlResponseEmbedded.from_dict(obj["embedded"]) if obj.get("embedded") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "embedded": ( + EmbeddedEditUrlResponseEmbedded.from_dict(obj["embedded"]) + if obj.get("embedded") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +151,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/embedded_edit_url_response_embedded.py b/sdks/python/dropbox_sign/models/embedded_edit_url_response_embedded.py index 74e23aa0c..3dfe4d2d2 100644 --- a/sdks/python/dropbox_sign/models/embedded_edit_url_response_embedded.py +++ b/sdks/python/dropbox_sign/models/embedded_edit_url_response_embedded.py @@ -26,12 +26,19 @@ from pydantic import StrictBool from typing import Union + class EmbeddedEditUrlResponseEmbedded(BaseModel): """ An embedded template object. - """ # noqa: E501 - edit_url: Optional[StrictStr] = Field(default=None, description="A template url that can be opened in an iFrame.") - expires_at: Optional[StrictInt] = Field(default=None, description="The specific time that the the `edit_url` link expires, in epoch.") + """ # noqa: E501 + + edit_url: Optional[StrictStr] = Field( + default=None, description="A template url that can be opened in an iFrame." + ) + expires_at: Optional[StrictInt] = Field( + default=None, + description="The specific time that the the `edit_url` link expires, in epoch.", + ) __properties: ClassVar[List[str]] = ["edit_url", "expires_at"] model_config = ConfigDict( @@ -41,7 +48,6 @@ class EmbeddedEditUrlResponseEmbedded(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +57,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +102,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "edit_url": obj.get("edit_url"), - "expires_at": obj.get("expires_at") - }) + _obj = cls.model_validate( + {"edit_url": obj.get("edit_url"), "expires_at": obj.get("expires_at")} + ) return _obj @classmethod @@ -119,6 +126,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/embedded_sign_url_response.py b/sdks/python/dropbox_sign/models/embedded_sign_url_response.py index db473f231..ca92cdc23 100644 --- a/sdks/python/dropbox_sign/models/embedded_sign_url_response.py +++ b/sdks/python/dropbox_sign/models/embedded_sign_url_response.py @@ -20,7 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.embedded_sign_url_response_embedded import EmbeddedSignUrlResponseEmbedded +from dropbox_sign.models.embedded_sign_url_response_embedded import ( + EmbeddedSignUrlResponseEmbedded, +) from dropbox_sign.models.warning_response import WarningResponse from typing import Optional, Set, Tuple from typing_extensions import Self @@ -28,12 +30,16 @@ from pydantic import StrictBool from typing import Union + class EmbeddedSignUrlResponse(BaseModel): """ EmbeddedSignUrlResponse - """ # noqa: E501 + """ # noqa: E501 + embedded: EmbeddedSignUrlResponseEmbedded - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["embedded", "warnings"] model_config = ConfigDict( @@ -43,7 +49,6 @@ class EmbeddedSignUrlResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +58,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +94,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of embedded if self.embedded: - _dict['embedded'] = self.embedded.to_dict() + _dict["embedded"] = self.embedded.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +113,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "embedded": EmbeddedSignUrlResponseEmbedded.from_dict(obj["embedded"]) if obj.get("embedded") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "embedded": ( + EmbeddedSignUrlResponseEmbedded.from_dict(obj["embedded"]) + if obj.get("embedded") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +151,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/embedded_sign_url_response_embedded.py b/sdks/python/dropbox_sign/models/embedded_sign_url_response_embedded.py index fd3eebaf2..6de5a5b8e 100644 --- a/sdks/python/dropbox_sign/models/embedded_sign_url_response_embedded.py +++ b/sdks/python/dropbox_sign/models/embedded_sign_url_response_embedded.py @@ -26,12 +26,19 @@ from pydantic import StrictBool from typing import Union + class EmbeddedSignUrlResponseEmbedded(BaseModel): """ An object that contains necessary information to set up embedded signing. - """ # noqa: E501 - sign_url: Optional[StrictStr] = Field(default=None, description="A signature url that can be opened in an iFrame.") - expires_at: Optional[StrictInt] = Field(default=None, description="The specific time that the the `sign_url` link expires, in epoch.") + """ # noqa: E501 + + sign_url: Optional[StrictStr] = Field( + default=None, description="A signature url that can be opened in an iFrame." + ) + expires_at: Optional[StrictInt] = Field( + default=None, + description="The specific time that the the `sign_url` link expires, in epoch.", + ) __properties: ClassVar[List[str]] = ["sign_url", "expires_at"] model_config = ConfigDict( @@ -41,7 +48,6 @@ class EmbeddedSignUrlResponseEmbedded(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +57,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +102,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "sign_url": obj.get("sign_url"), - "expires_at": obj.get("expires_at") - }) + _obj = cls.model_validate( + {"sign_url": obj.get("sign_url"), "expires_at": obj.get("expires_at")} + ) return _obj @classmethod @@ -119,6 +126,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/error_response.py b/sdks/python/dropbox_sign/models/error_response.py index adfda3ef1..f85c24767 100644 --- a/sdks/python/dropbox_sign/models/error_response.py +++ b/sdks/python/dropbox_sign/models/error_response.py @@ -27,10 +27,12 @@ from pydantic import StrictBool from typing import Union + class ErrorResponse(BaseModel): """ ErrorResponse - """ # noqa: E501 + """ # noqa: E501 + error: ErrorResponseError __properties: ClassVar[List[str]] = ["error"] @@ -41,7 +43,6 @@ class ErrorResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +52,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -85,7 +88,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of error if self.error: - _dict['error'] = self.error.to_dict() + _dict["error"] = self.error.to_dict() return _dict @classmethod @@ -97,9 +100,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "error": ErrorResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None - }) + _obj = cls.model_validate( + { + "error": ( + ErrorResponseError.from_dict(obj["error"]) + if obj.get("error") is not None + else None + ) + } + ) return _obj @classmethod @@ -120,6 +129,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/error_response_error.py b/sdks/python/dropbox_sign/models/error_response_error.py index d5bf7fc62..6577b27e7 100644 --- a/sdks/python/dropbox_sign/models/error_response_error.py +++ b/sdks/python/dropbox_sign/models/error_response_error.py @@ -26,13 +26,17 @@ from pydantic import StrictBool from typing import Union + class ErrorResponseError(BaseModel): """ Contains information about an error that occurred. - """ # noqa: E501 + """ # noqa: E501 + error_msg: StrictStr = Field(description="Message describing an error.") error_name: StrictStr = Field(description="Name of the error.") - error_path: Optional[StrictStr] = Field(default=None, description="Path at which an error occurred.") + error_path: Optional[StrictStr] = Field( + default=None, description="Path at which an error occurred." + ) __properties: ClassVar[List[str]] = ["error_msg", "error_name", "error_path"] model_config = ConfigDict( @@ -42,7 +46,6 @@ class ErrorResponseError(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +55,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,11 +100,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "error_msg": obj.get("error_msg"), - "error_name": obj.get("error_name"), - "error_path": obj.get("error_path") - }) + _obj = cls.model_validate( + { + "error_msg": obj.get("error_msg"), + "error_name": obj.get("error_name"), + "error_path": obj.get("error_path"), + } + ) return _obj @classmethod @@ -122,6 +129,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/event_callback_request.py b/sdks/python/dropbox_sign/models/event_callback_request.py index ad851fbd6..768983736 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request.py +++ b/sdks/python/dropbox_sign/models/event_callback_request.py @@ -30,15 +30,22 @@ from pydantic import StrictBool from typing import Union + class EventCallbackRequest(BaseModel): """ EventCallbackRequest - """ # noqa: E501 + """ # noqa: E501 + event: EventCallbackRequestEvent account: Optional[AccountResponse] = None signature_request: Optional[SignatureRequestResponse] = None template: Optional[TemplateResponse] = None - __properties: ClassVar[List[str]] = ["event", "account", "signature_request", "template"] + __properties: ClassVar[List[str]] = [ + "event", + "account", + "signature_request", + "template", + ] model_config = ConfigDict( populate_by_name=True, @@ -47,7 +54,6 @@ class EventCallbackRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -57,7 +63,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -91,16 +99,16 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of event if self.event: - _dict['event'] = self.event.to_dict() + _dict["event"] = self.event.to_dict() # override the default output from pydantic by calling `to_dict()` of account if self.account: - _dict['account'] = self.account.to_dict() + _dict["account"] = self.account.to_dict() # override the default output from pydantic by calling `to_dict()` of signature_request if self.signature_request: - _dict['signature_request'] = self.signature_request.to_dict() + _dict["signature_request"] = self.signature_request.to_dict() # override the default output from pydantic by calling `to_dict()` of template if self.template: - _dict['template'] = self.template.to_dict() + _dict["template"] = self.template.to_dict() return _dict @classmethod @@ -112,12 +120,30 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "event": EventCallbackRequestEvent.from_dict(obj["event"]) if obj.get("event") is not None else None, - "account": AccountResponse.from_dict(obj["account"]) if obj.get("account") is not None else None, - "signature_request": SignatureRequestResponse.from_dict(obj["signature_request"]) if obj.get("signature_request") is not None else None, - "template": TemplateResponse.from_dict(obj["template"]) if obj.get("template") is not None else None - }) + _obj = cls.model_validate( + { + "event": ( + EventCallbackRequestEvent.from_dict(obj["event"]) + if obj.get("event") is not None + else None + ), + "account": ( + AccountResponse.from_dict(obj["account"]) + if obj.get("account") is not None + else None + ), + "signature_request": ( + SignatureRequestResponse.from_dict(obj["signature_request"]) + if obj.get("signature_request") is not None + else None + ), + "template": ( + TemplateResponse.from_dict(obj["template"]) + if obj.get("template") is not None + else None + ), + } + ) return _obj @classmethod @@ -141,6 +167,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/event_callback_request_event.py b/sdks/python/dropbox_sign/models/event_callback_request_event.py index ad57d9dc1..971fff98b 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request_event.py +++ b/sdks/python/dropbox_sign/models/event_callback_request_event.py @@ -20,28 +20,71 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.event_callback_request_event_metadata import EventCallbackRequestEventMetadata +from dropbox_sign.models.event_callback_request_event_metadata import ( + EventCallbackRequestEventMetadata, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class EventCallbackRequestEvent(BaseModel): """ Basic information about the event that occurred. - """ # noqa: E501 - event_time: StrictStr = Field(description="Time the event was created (using Unix time).") - event_type: StrictStr = Field(description="Type of callback event that was triggered.") - event_hash: StrictStr = Field(description="Generated hash used to verify source of event data.") - event_metadata: Optional[EventCallbackRequestEventMetadata] = None - __properties: ClassVar[List[str]] = ["event_time", "event_type", "event_hash", "event_metadata"] + """ # noqa: E501 - @field_validator('event_type') + event_time: StrictStr = Field( + description="Time the event was created (using Unix time)." + ) + event_type: StrictStr = Field( + description="Type of callback event that was triggered." + ) + event_hash: StrictStr = Field( + description="Generated hash used to verify source of event data." + ) + event_metadata: Optional[EventCallbackRequestEventMetadata] = None + __properties: ClassVar[List[str]] = [ + "event_time", + "event_type", + "event_hash", + "event_metadata", + ] + + @field_validator("event_type") def event_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['account_confirmed', 'unknown_error', 'file_error', 'sign_url_invalid', 'signature_request_viewed', 'signature_request_signed', 'signature_request_sent', 'signature_request_all_signed', 'signature_request_email_bounce', 'signature_request_remind', 'signature_request_incomplete_qes', 'signature_request_destroyed', 'signature_request_canceled', 'signature_request_downloadable', 'signature_request_declined', 'signature_request_reassigned', 'signature_request_invalid', 'signature_request_prepared', 'signature_request_expired', 'template_created', 'template_error', 'callback_test', 'signature_request_signer_removed']): - raise ValueError("must be one of enum values ('account_confirmed', 'unknown_error', 'file_error', 'sign_url_invalid', 'signature_request_viewed', 'signature_request_signed', 'signature_request_sent', 'signature_request_all_signed', 'signature_request_email_bounce', 'signature_request_remind', 'signature_request_incomplete_qes', 'signature_request_destroyed', 'signature_request_canceled', 'signature_request_downloadable', 'signature_request_declined', 'signature_request_reassigned', 'signature_request_invalid', 'signature_request_prepared', 'signature_request_expired', 'template_created', 'template_error', 'callback_test', 'signature_request_signer_removed')") + if value not in set( + [ + "account_confirmed", + "unknown_error", + "file_error", + "sign_url_invalid", + "signature_request_viewed", + "signature_request_signed", + "signature_request_sent", + "signature_request_all_signed", + "signature_request_email_bounce", + "signature_request_remind", + "signature_request_incomplete_qes", + "signature_request_destroyed", + "signature_request_canceled", + "signature_request_downloadable", + "signature_request_declined", + "signature_request_reassigned", + "signature_request_invalid", + "signature_request_prepared", + "signature_request_expired", + "template_created", + "template_error", + "callback_test", + "signature_request_signer_removed", + ] + ): + raise ValueError( + "must be one of enum values ('account_confirmed', 'unknown_error', 'file_error', 'sign_url_invalid', 'signature_request_viewed', 'signature_request_signed', 'signature_request_sent', 'signature_request_all_signed', 'signature_request_email_bounce', 'signature_request_remind', 'signature_request_incomplete_qes', 'signature_request_destroyed', 'signature_request_canceled', 'signature_request_downloadable', 'signature_request_declined', 'signature_request_reassigned', 'signature_request_invalid', 'signature_request_prepared', 'signature_request_expired', 'template_created', 'template_error', 'callback_test', 'signature_request_signer_removed')" + ) return value model_config = ConfigDict( @@ -51,7 +94,6 @@ def event_type_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +103,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,7 +139,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of event_metadata if self.event_metadata: - _dict['event_metadata'] = self.event_metadata.to_dict() + _dict["event_metadata"] = self.event_metadata.to_dict() return _dict @classmethod @@ -107,12 +151,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "event_time": obj.get("event_time"), - "event_type": obj.get("event_type"), - "event_hash": obj.get("event_hash"), - "event_metadata": EventCallbackRequestEventMetadata.from_dict(obj["event_metadata"]) if obj.get("event_metadata") is not None else None - }) + _obj = cls.model_validate( + { + "event_time": obj.get("event_time"), + "event_type": obj.get("event_type"), + "event_hash": obj.get("event_hash"), + "event_metadata": ( + EventCallbackRequestEventMetadata.from_dict(obj["event_metadata"]) + if obj.get("event_metadata") is not None + else None + ), + } + ) return _obj @classmethod @@ -136,6 +186,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/event_callback_request_event_metadata.py b/sdks/python/dropbox_sign/models/event_callback_request_event_metadata.py index 79a90dc3c..572abb509 100644 --- a/sdks/python/dropbox_sign/models/event_callback_request_event_metadata.py +++ b/sdks/python/dropbox_sign/models/event_callback_request_event_metadata.py @@ -26,15 +26,32 @@ from pydantic import StrictBool from typing import Union + class EventCallbackRequestEventMetadata(BaseModel): """ Specific metadata about the event. - """ # noqa: E501 - related_signature_id: Optional[StrictStr] = Field(default=None, description="Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events.") - reported_for_account_id: Optional[StrictStr] = Field(default=None, description="Account ID the event was reported for.") - reported_for_app_id: Optional[StrictStr] = Field(default=None, description="App ID the event was reported for.") - event_message: Optional[StrictStr] = Field(default=None, description="Message about a declined or failed (due to error) signature flow.") - __properties: ClassVar[List[str]] = ["related_signature_id", "reported_for_account_id", "reported_for_app_id", "event_message"] + """ # noqa: E501 + + related_signature_id: Optional[StrictStr] = Field( + default=None, + description="Signature ID for a specific signer. Applicable to `signature_request_signed` and `signature_request_viewed` events.", + ) + reported_for_account_id: Optional[StrictStr] = Field( + default=None, description="Account ID the event was reported for." + ) + reported_for_app_id: Optional[StrictStr] = Field( + default=None, description="App ID the event was reported for." + ) + event_message: Optional[StrictStr] = Field( + default=None, + description="Message about a declined or failed (due to error) signature flow.", + ) + __properties: ClassVar[List[str]] = [ + "related_signature_id", + "reported_for_account_id", + "reported_for_app_id", + "event_message", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +60,6 @@ class EventCallbackRequestEventMetadata(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,12 +114,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "related_signature_id": obj.get("related_signature_id"), - "reported_for_account_id": obj.get("reported_for_account_id"), - "reported_for_app_id": obj.get("reported_for_app_id"), - "event_message": obj.get("event_message") - }) + _obj = cls.model_validate( + { + "related_signature_id": obj.get("related_signature_id"), + "reported_for_account_id": obj.get("reported_for_account_id"), + "reported_for_app_id": obj.get("reported_for_app_id"), + "event_message": obj.get("event_message"), + } + ) return _obj @classmethod @@ -125,6 +145,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/fax_line_add_user_request.py b/sdks/python/dropbox_sign/models/fax_line_add_user_request.py index 9afd9eeeb..aaa2b4763 100644 --- a/sdks/python/dropbox_sign/models/fax_line_add_user_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_add_user_request.py @@ -26,13 +26,17 @@ from pydantic import StrictBool from typing import Union + class FaxLineAddUserRequest(BaseModel): """ FaxLineAddUserRequest - """ # noqa: E501 + """ # noqa: E501 + number: StrictStr = Field(description="The Fax Line number.") account_id: Optional[StrictStr] = Field(default=None, description="Account ID") - email_address: Optional[StrictStr] = Field(default=None, description="Email address") + email_address: Optional[StrictStr] = Field( + default=None, description="Email address" + ) __properties: ClassVar[List[str]] = ["number", "account_id", "email_address"] model_config = ConfigDict( @@ -42,7 +46,6 @@ class FaxLineAddUserRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +55,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,11 +100,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "number": obj.get("number"), - "account_id": obj.get("account_id"), - "email_address": obj.get("email_address") - }) + _obj = cls.model_validate( + { + "number": obj.get("number"), + "account_id": obj.get("account_id"), + "email_address": obj.get("email_address"), + } + ) return _obj @classmethod @@ -122,6 +129,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/fax_line_area_code_get_country_enum.py b/sdks/python/dropbox_sign/models/fax_line_area_code_get_country_enum.py index f76331e63..62b87eb08 100644 --- a/sdks/python/dropbox_sign/models/fax_line_area_code_get_country_enum.py +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_country_enum.py @@ -27,13 +27,11 @@ class FaxLineAreaCodeGetCountryEnum(str, Enum): """ allowed enum values """ - CA = 'CA' - US = 'US' - UK = 'UK' + CA = "CA" + US = "US" + UK = "UK" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of FaxLineAreaCodeGetCountryEnum from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/sdks/python/dropbox_sign/models/fax_line_area_code_get_province_enum.py b/sdks/python/dropbox_sign/models/fax_line_area_code_get_province_enum.py index cb6625d7d..cbe1eea81 100644 --- a/sdks/python/dropbox_sign/models/fax_line_area_code_get_province_enum.py +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_province_enum.py @@ -27,23 +27,21 @@ class FaxLineAreaCodeGetProvinceEnum(str, Enum): """ allowed enum values """ - AB = 'AB' - BC = 'BC' - MB = 'MB' - NB = 'NB' - NL = 'NL' - NT = 'NT' - NS = 'NS' - NU = 'NU' - ON = 'ON' - PE = 'PE' - QC = 'QC' - SK = 'SK' - YT = 'YT' + AB = "AB" + BC = "BC" + MB = "MB" + NB = "NB" + NL = "NL" + NT = "NT" + NS = "NS" + NU = "NU" + ON = "ON" + PE = "PE" + QC = "QC" + SK = "SK" + YT = "YT" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of FaxLineAreaCodeGetProvinceEnum from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/sdks/python/dropbox_sign/models/fax_line_area_code_get_response.py b/sdks/python/dropbox_sign/models/fax_line_area_code_get_response.py index ca071fa2a..ac8722d39 100644 --- a/sdks/python/dropbox_sign/models/fax_line_area_code_get_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_response.py @@ -26,10 +26,12 @@ from pydantic import StrictBool from typing import Union + class FaxLineAreaCodeGetResponse(BaseModel): """ FaxLineAreaCodeGetResponse - """ # noqa: E501 + """ # noqa: E501 + area_codes: List[StrictInt] __properties: ClassVar[List[str]] = ["area_codes"] @@ -40,7 +42,6 @@ class FaxLineAreaCodeGetResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +51,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "area_codes": obj.get("area_codes") - }) + _obj = cls.model_validate({"area_codes": obj.get("area_codes")}) return _obj @classmethod @@ -119,4 +120,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "area_codes", ] - diff --git a/sdks/python/dropbox_sign/models/fax_line_area_code_get_state_enum.py b/sdks/python/dropbox_sign/models/fax_line_area_code_get_state_enum.py index 29b8f70ff..51f9da013 100644 --- a/sdks/python/dropbox_sign/models/fax_line_area_code_get_state_enum.py +++ b/sdks/python/dropbox_sign/models/fax_line_area_code_get_state_enum.py @@ -27,61 +27,59 @@ class FaxLineAreaCodeGetStateEnum(str, Enum): """ allowed enum values """ - AK = 'AK' - AL = 'AL' - AR = 'AR' - AZ = 'AZ' - CA = 'CA' - CO = 'CO' - CT = 'CT' - DC = 'DC' - DE = 'DE' - FL = 'FL' - GA = 'GA' - HI = 'HI' - IA = 'IA' - ID = 'ID' - IL = 'IL' - IN = 'IN' - KS = 'KS' - KY = 'KY' - LA = 'LA' - MA = 'MA' - MD = 'MD' - ME = 'ME' - MI = 'MI' - MN = 'MN' - MO = 'MO' - MS = 'MS' - MT = 'MT' - NC = 'NC' - ND = 'ND' - NE = 'NE' - NH = 'NH' - NJ = 'NJ' - NM = 'NM' - NV = 'NV' - NY = 'NY' - OH = 'OH' - OK = 'OK' - OR = 'OR' - PA = 'PA' - RI = 'RI' - SC = 'SC' - SD = 'SD' - TN = 'TN' - TX = 'TX' - UT = 'UT' - VA = 'VA' - VT = 'VT' - WA = 'WA' - WI = 'WI' - WV = 'WV' - WY = 'WY' + AK = "AK" + AL = "AL" + AR = "AR" + AZ = "AZ" + CA = "CA" + CO = "CO" + CT = "CT" + DC = "DC" + DE = "DE" + FL = "FL" + GA = "GA" + HI = "HI" + IA = "IA" + ID = "ID" + IL = "IL" + IN = "IN" + KS = "KS" + KY = "KY" + LA = "LA" + MA = "MA" + MD = "MD" + ME = "ME" + MI = "MI" + MN = "MN" + MO = "MO" + MS = "MS" + MT = "MT" + NC = "NC" + ND = "ND" + NE = "NE" + NH = "NH" + NJ = "NJ" + NM = "NM" + NV = "NV" + NY = "NY" + OH = "OH" + OK = "OK" + OR = "OR" + PA = "PA" + RI = "RI" + SC = "SC" + SD = "SD" + TN = "TN" + TX = "TX" + UT = "UT" + VA = "VA" + VT = "VT" + WA = "WA" + WI = "WI" + WV = "WV" + WY = "WY" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of FaxLineAreaCodeGetStateEnum from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/sdks/python/dropbox_sign/models/fax_line_create_request.py b/sdks/python/dropbox_sign/models/fax_line_create_request.py index aa27a9bc6..42e16de1a 100644 --- a/sdks/python/dropbox_sign/models/fax_line_create_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_create_request.py @@ -26,20 +26,22 @@ from pydantic import StrictBool from typing import Union + class FaxLineCreateRequest(BaseModel): """ FaxLineCreateRequest - """ # noqa: E501 + """ # noqa: E501 + area_code: StrictInt = Field(description="Area code") country: StrictStr = Field(description="Country") city: Optional[StrictStr] = Field(default=None, description="City") account_id: Optional[StrictStr] = Field(default=None, description="Account ID") __properties: ClassVar[List[str]] = ["area_code", "country", "city", "account_id"] - @field_validator('country') + @field_validator("country") def country_validate_enum(cls, value): """Validates the enum""" - if value not in set(['CA', 'US', 'UK']): + if value not in set(["CA", "US", "UK"]): raise ValueError("must be one of enum values ('CA', 'US', 'UK')") return value @@ -50,7 +52,6 @@ def country_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +61,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -103,12 +106,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "area_code": obj.get("area_code"), - "country": obj.get("country"), - "city": obj.get("city"), - "account_id": obj.get("account_id") - }) + _obj = cls.model_validate( + { + "area_code": obj.get("area_code"), + "country": obj.get("country"), + "city": obj.get("city"), + "account_id": obj.get("account_id"), + } + ) return _obj @classmethod @@ -132,6 +137,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/fax_line_delete_request.py b/sdks/python/dropbox_sign/models/fax_line_delete_request.py index f52880d49..7f5ebe5e7 100644 --- a/sdks/python/dropbox_sign/models/fax_line_delete_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_delete_request.py @@ -26,10 +26,12 @@ from pydantic import StrictBool from typing import Union + class FaxLineDeleteRequest(BaseModel): """ FaxLineDeleteRequest - """ # noqa: E501 + """ # noqa: E501 + number: StrictStr = Field(description="The Fax Line number.") __properties: ClassVar[List[str]] = ["number"] @@ -40,7 +42,6 @@ class FaxLineDeleteRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +51,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "number": obj.get("number") - }) + _obj = cls.model_validate({"number": obj.get("number")}) return _obj @classmethod @@ -116,6 +117,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/fax_line_list_response.py b/sdks/python/dropbox_sign/models/fax_line_list_response.py index 6f090675c..099c3cc55 100644 --- a/sdks/python/dropbox_sign/models/fax_line_list_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_list_response.py @@ -29,10 +29,12 @@ from pydantic import StrictBool from typing import Union + class FaxLineListResponse(BaseModel): """ FaxLineListResponse - """ # noqa: E501 + """ # noqa: E501 + list_info: ListInfoResponse fax_lines: List[FaxLineResponseFaxLine] warnings: Optional[WarningResponse] = None @@ -45,7 +47,6 @@ class FaxLineListResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -89,17 +92,17 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of list_info if self.list_info: - _dict['list_info'] = self.list_info.to_dict() + _dict["list_info"] = self.list_info.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in fax_lines (list) _items = [] if self.fax_lines: for _item_fax_lines in self.fax_lines: if _item_fax_lines: _items.append(_item_fax_lines.to_dict()) - _dict['fax_lines'] = _items + _dict["fax_lines"] = _items # override the default output from pydantic by calling `to_dict()` of warnings if self.warnings: - _dict['warnings'] = self.warnings.to_dict() + _dict["warnings"] = self.warnings.to_dict() return _dict @classmethod @@ -111,11 +114,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "list_info": ListInfoResponse.from_dict(obj["list_info"]) if obj.get("list_info") is not None else None, - "fax_lines": [FaxLineResponseFaxLine.from_dict(_item) for _item in obj["fax_lines"]] if obj.get("fax_lines") is not None else None, - "warnings": WarningResponse.from_dict(obj["warnings"]) if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "list_info": ( + ListInfoResponse.from_dict(obj["list_info"]) + if obj.get("list_info") is not None + else None + ), + "fax_lines": ( + [ + FaxLineResponseFaxLine.from_dict(_item) + for _item in obj["fax_lines"] + ] + if obj.get("fax_lines") is not None + else None + ), + "warnings": ( + WarningResponse.from_dict(obj["warnings"]) + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -141,4 +161,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "fax_lines", ] - diff --git a/sdks/python/dropbox_sign/models/fax_line_remove_user_request.py b/sdks/python/dropbox_sign/models/fax_line_remove_user_request.py index e4c10045e..e36be3090 100644 --- a/sdks/python/dropbox_sign/models/fax_line_remove_user_request.py +++ b/sdks/python/dropbox_sign/models/fax_line_remove_user_request.py @@ -26,13 +26,17 @@ from pydantic import StrictBool from typing import Union + class FaxLineRemoveUserRequest(BaseModel): """ FaxLineRemoveUserRequest - """ # noqa: E501 + """ # noqa: E501 + number: StrictStr = Field(description="The Fax Line number.") account_id: Optional[StrictStr] = Field(default=None, description="Account ID") - email_address: Optional[StrictStr] = Field(default=None, description="Email address") + email_address: Optional[StrictStr] = Field( + default=None, description="Email address" + ) __properties: ClassVar[List[str]] = ["number", "account_id", "email_address"] model_config = ConfigDict( @@ -42,7 +46,6 @@ class FaxLineRemoveUserRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +55,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,11 +100,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "number": obj.get("number"), - "account_id": obj.get("account_id"), - "email_address": obj.get("email_address") - }) + _obj = cls.model_validate( + { + "number": obj.get("number"), + "account_id": obj.get("account_id"), + "email_address": obj.get("email_address"), + } + ) return _obj @classmethod @@ -122,6 +129,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/fax_line_response.py b/sdks/python/dropbox_sign/models/fax_line_response.py index b3e16131b..a719bc9fa 100644 --- a/sdks/python/dropbox_sign/models/fax_line_response.py +++ b/sdks/python/dropbox_sign/models/fax_line_response.py @@ -28,10 +28,12 @@ from pydantic import StrictBool from typing import Union + class FaxLineResponse(BaseModel): """ FaxLineResponse - """ # noqa: E501 + """ # noqa: E501 + fax_line: FaxLineResponseFaxLine warnings: Optional[WarningResponse] = None __properties: ClassVar[List[str]] = ["fax_line", "warnings"] @@ -43,7 +45,6 @@ class FaxLineResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +54,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,10 +90,10 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of fax_line if self.fax_line: - _dict['fax_line'] = self.fax_line.to_dict() + _dict["fax_line"] = self.fax_line.to_dict() # override the default output from pydantic by calling `to_dict()` of warnings if self.warnings: - _dict['warnings'] = self.warnings.to_dict() + _dict["warnings"] = self.warnings.to_dict() return _dict @classmethod @@ -102,10 +105,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "fax_line": FaxLineResponseFaxLine.from_dict(obj["fax_line"]) if obj.get("fax_line") is not None else None, - "warnings": WarningResponse.from_dict(obj["warnings"]) if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "fax_line": ( + FaxLineResponseFaxLine.from_dict(obj["fax_line"]) + if obj.get("fax_line") is not None + else None + ), + "warnings": ( + WarningResponse.from_dict(obj["warnings"]) + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -127,6 +140,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/fax_line_response_fax_line.py b/sdks/python/dropbox_sign/models/fax_line_response_fax_line.py index cedc50d83..7d89f44cc 100644 --- a/sdks/python/dropbox_sign/models/fax_line_response_fax_line.py +++ b/sdks/python/dropbox_sign/models/fax_line_response_fax_line.py @@ -27,15 +27,22 @@ from pydantic import StrictBool from typing import Union + class FaxLineResponseFaxLine(BaseModel): """ FaxLineResponseFaxLine - """ # noqa: E501 + """ # noqa: E501 + number: Optional[StrictStr] = Field(default=None, description="Number") created_at: Optional[StrictInt] = Field(default=None, description="Created at") updated_at: Optional[StrictInt] = Field(default=None, description="Updated at") accounts: Optional[List[AccountResponse]] = None - __properties: ClassVar[List[str]] = ["number", "created_at", "updated_at", "accounts"] + __properties: ClassVar[List[str]] = [ + "number", + "created_at", + "updated_at", + "accounts", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +51,6 @@ class FaxLineResponseFaxLine(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -54,7 +60,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -92,7 +100,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_accounts in self.accounts: if _item_accounts: _items.append(_item_accounts.to_dict()) - _dict['accounts'] = _items + _dict["accounts"] = _items return _dict @classmethod @@ -104,12 +112,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "number": obj.get("number"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "accounts": [AccountResponse.from_dict(_item) for _item in obj["accounts"]] if obj.get("accounts") is not None else None - }) + _obj = cls.model_validate( + { + "number": obj.get("number"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "accounts": ( + [AccountResponse.from_dict(_item) for _item in obj["accounts"]] + if obj.get("accounts") is not None + else None + ), + } + ) return _obj @classmethod @@ -136,4 +150,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "accounts", ] - diff --git a/sdks/python/dropbox_sign/models/file_response.py b/sdks/python/dropbox_sign/models/file_response.py index 8e7fe3c3f..e0479e3d6 100644 --- a/sdks/python/dropbox_sign/models/file_response.py +++ b/sdks/python/dropbox_sign/models/file_response.py @@ -26,10 +26,12 @@ from pydantic import StrictBool from typing import Union + class FileResponse(BaseModel): """ FileResponse - """ # noqa: E501 + """ # noqa: E501 + file_url: StrictStr = Field(description="URL to the file.") expires_at: StrictInt = Field(description="When the link expires.") __properties: ClassVar[List[str]] = ["file_url", "expires_at"] @@ -41,7 +43,6 @@ class FileResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +52,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +97,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "file_url": obj.get("file_url"), - "expires_at": obj.get("expires_at") - }) + _obj = cls.model_validate( + {"file_url": obj.get("file_url"), "expires_at": obj.get("expires_at")} + ) return _obj @classmethod @@ -119,6 +121,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/file_response_data_uri.py b/sdks/python/dropbox_sign/models/file_response_data_uri.py index 012bc8318..c7c2e403f 100644 --- a/sdks/python/dropbox_sign/models/file_response_data_uri.py +++ b/sdks/python/dropbox_sign/models/file_response_data_uri.py @@ -26,10 +26,12 @@ from pydantic import StrictBool from typing import Union + class FileResponseDataUri(BaseModel): """ FileResponseDataUri - """ # noqa: E501 + """ # noqa: E501 + data_uri: StrictStr = Field(description="File as base64 encoded string.") __properties: ClassVar[List[str]] = ["data_uri"] @@ -40,7 +42,6 @@ class FileResponseDataUri(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +51,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "data_uri": obj.get("data_uri") - }) + _obj = cls.model_validate({"data_uri": obj.get("data_uri")}) return _obj @classmethod @@ -116,6 +117,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/list_info_response.py b/sdks/python/dropbox_sign/models/list_info_response.py index 816accbda..b51627288 100644 --- a/sdks/python/dropbox_sign/models/list_info_response.py +++ b/sdks/python/dropbox_sign/models/list_info_response.py @@ -26,15 +26,30 @@ from pydantic import StrictBool from typing import Union + class ListInfoResponse(BaseModel): """ Contains pagination information about the data returned. - """ # noqa: E501 - num_pages: Optional[StrictInt] = Field(default=None, description="Total number of pages available.") - num_results: Optional[StrictInt] = Field(default=None, description="Total number of objects available.") - page: Optional[StrictInt] = Field(default=None, description="Number of the page being returned.") - page_size: Optional[StrictInt] = Field(default=None, description="Objects returned per page.") - __properties: ClassVar[List[str]] = ["num_pages", "num_results", "page", "page_size"] + """ # noqa: E501 + + num_pages: Optional[StrictInt] = Field( + default=None, description="Total number of pages available." + ) + num_results: Optional[StrictInt] = Field( + default=None, description="Total number of objects available." + ) + page: Optional[StrictInt] = Field( + default=None, description="Number of the page being returned." + ) + page_size: Optional[StrictInt] = Field( + default=None, description="Objects returned per page." + ) + __properties: ClassVar[List[str]] = [ + "num_pages", + "num_results", + "page", + "page_size", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +58,6 @@ class ListInfoResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,12 +112,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "num_pages": obj.get("num_pages"), - "num_results": obj.get("num_results"), - "page": obj.get("page"), - "page_size": obj.get("page_size") - }) + _obj = cls.model_validate( + { + "num_pages": obj.get("num_pages"), + "num_results": obj.get("num_results"), + "page": obj.get("page"), + "page_size": obj.get("page_size"), + } + ) return _obj @classmethod @@ -125,6 +143,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/o_auth_token_generate_request.py b/sdks/python/dropbox_sign/models/o_auth_token_generate_request.py index 0f2f0ae78..ff2aefb6b 100644 --- a/sdks/python/dropbox_sign/models/o_auth_token_generate_request.py +++ b/sdks/python/dropbox_sign/models/o_auth_token_generate_request.py @@ -26,16 +26,30 @@ from pydantic import StrictBool from typing import Union + class OAuthTokenGenerateRequest(BaseModel): """ OAuthTokenGenerateRequest - """ # noqa: E501 - client_id: StrictStr = Field(description="The client id of the app requesting authorization.") + """ # noqa: E501 + + client_id: StrictStr = Field( + description="The client id of the app requesting authorization." + ) client_secret: StrictStr = Field(description="The secret token of your app.") - code: StrictStr = Field(description="The code passed to your callback when the user granted access.") - grant_type: StrictStr = Field(description="When generating a new token use `authorization_code`.") + code: StrictStr = Field( + description="The code passed to your callback when the user granted access." + ) + grant_type: StrictStr = Field( + description="When generating a new token use `authorization_code`." + ) state: StrictStr = Field(description="Same as the state you specified earlier.") - __properties: ClassVar[List[str]] = ["client_id", "client_secret", "code", "grant_type", "state"] + __properties: ClassVar[List[str]] = [ + "client_id", + "client_secret", + "code", + "grant_type", + "state", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +58,6 @@ class OAuthTokenGenerateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -54,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -97,13 +112,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "client_id": obj.get("client_id"), - "client_secret": obj.get("client_secret"), - "code": obj.get("code"), - "grant_type": obj.get("grant_type") if obj.get("grant_type") is not None else 'authorization_code', - "state": obj.get("state") - }) + _obj = cls.model_validate( + { + "client_id": obj.get("client_id"), + "client_secret": obj.get("client_secret"), + "code": obj.get("code"), + "grant_type": ( + obj.get("grant_type") + if obj.get("grant_type") is not None + else "authorization_code" + ), + "state": obj.get("state"), + } + ) return _obj @classmethod @@ -128,6 +149,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/o_auth_token_refresh_request.py b/sdks/python/dropbox_sign/models/o_auth_token_refresh_request.py index 7b4ee8b41..09535d939 100644 --- a/sdks/python/dropbox_sign/models/o_auth_token_refresh_request.py +++ b/sdks/python/dropbox_sign/models/o_auth_token_refresh_request.py @@ -26,12 +26,18 @@ from pydantic import StrictBool from typing import Union + class OAuthTokenRefreshRequest(BaseModel): """ OAuthTokenRefreshRequest - """ # noqa: E501 - grant_type: StrictStr = Field(description="When refreshing an existing token use `refresh_token`.") - refresh_token: StrictStr = Field(description="The token provided when you got the expired access token.") + """ # noqa: E501 + + grant_type: StrictStr = Field( + description="When refreshing an existing token use `refresh_token`." + ) + refresh_token: StrictStr = Field( + description="The token provided when you got the expired access token." + ) __properties: ClassVar[List[str]] = ["grant_type", "refresh_token"] model_config = ConfigDict( @@ -41,7 +47,6 @@ class OAuthTokenRefreshRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +101,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "grant_type": obj.get("grant_type") if obj.get("grant_type") is not None else 'refresh_token', - "refresh_token": obj.get("refresh_token") - }) + _obj = cls.model_validate( + { + "grant_type": ( + obj.get("grant_type") + if obj.get("grant_type") is not None + else "refresh_token" + ), + "refresh_token": obj.get("refresh_token"), + } + ) return _obj @classmethod @@ -119,6 +132,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/o_auth_token_response.py b/sdks/python/dropbox_sign/models/o_auth_token_response.py index 6ababb429..e42732a19 100644 --- a/sdks/python/dropbox_sign/models/o_auth_token_response.py +++ b/sdks/python/dropbox_sign/models/o_auth_token_response.py @@ -26,16 +26,27 @@ from pydantic import StrictBool from typing import Union + class OAuthTokenResponse(BaseModel): """ OAuthTokenResponse - """ # noqa: E501 + """ # noqa: E501 + access_token: Optional[StrictStr] = None token_type: Optional[StrictStr] = None refresh_token: Optional[StrictStr] = None - expires_in: Optional[StrictInt] = Field(default=None, description="Number of seconds until the `access_token` expires. Uses epoch time.") + expires_in: Optional[StrictInt] = Field( + default=None, + description="Number of seconds until the `access_token` expires. Uses epoch time.", + ) state: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["access_token", "token_type", "refresh_token", "expires_in", "state"] + __properties: ClassVar[List[str]] = [ + "access_token", + "token_type", + "refresh_token", + "expires_in", + "state", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +55,6 @@ class OAuthTokenResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -54,7 +64,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -97,13 +109,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "access_token": obj.get("access_token"), - "token_type": obj.get("token_type"), - "refresh_token": obj.get("refresh_token"), - "expires_in": obj.get("expires_in"), - "state": obj.get("state") - }) + _obj = cls.model_validate( + { + "access_token": obj.get("access_token"), + "token_type": obj.get("token_type"), + "refresh_token": obj.get("refresh_token"), + "expires_in": obj.get("expires_in"), + "state": obj.get("state"), + } + ) return _obj @classmethod @@ -128,6 +142,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/report_create_request.py b/sdks/python/dropbox_sign/models/report_create_request.py index 3276ff25b..4bed0f940 100644 --- a/sdks/python/dropbox_sign/models/report_create_request.py +++ b/sdks/python/dropbox_sign/models/report_create_request.py @@ -27,21 +27,31 @@ from pydantic import StrictBool from typing import Union + class ReportCreateRequest(BaseModel): """ ReportCreateRequest - """ # noqa: E501 - end_date: StrictStr = Field(description="The (inclusive) end date for the report data in `MM/DD/YYYY` format.") - report_type: Annotated[List[StrictStr], Field(min_length=1, max_length=2)] = Field(description="The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status).") - start_date: StrictStr = Field(description="The (inclusive) start date for the report data in `MM/DD/YYYY` format.") + """ # noqa: E501 + + end_date: StrictStr = Field( + description="The (inclusive) end date for the report data in `MM/DD/YYYY` format." + ) + report_type: Annotated[List[StrictStr], Field(min_length=1, max_length=2)] = Field( + description="The type(s) of the report you are requesting. Allowed values are `user_activity` and `document_status`. User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status)." + ) + start_date: StrictStr = Field( + description="The (inclusive) start date for the report data in `MM/DD/YYYY` format." + ) __properties: ClassVar[List[str]] = ["end_date", "report_type", "start_date"] - @field_validator('report_type') + @field_validator("report_type") def report_type_validate_enum(cls, value): """Validates the enum""" for i in value: - if i not in set(['user_activity', 'document_status']): - raise ValueError("each list item must be one of ('user_activity', 'document_status')") + if i not in set(["user_activity", "document_status"]): + raise ValueError( + "each list item must be one of ('user_activity', 'document_status')" + ) return value model_config = ConfigDict( @@ -51,7 +61,6 @@ def report_type_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +70,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -104,11 +115,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "end_date": obj.get("end_date"), - "report_type": obj.get("report_type"), - "start_date": obj.get("start_date") - }) + _obj = cls.model_validate( + { + "end_date": obj.get("end_date"), + "report_type": obj.get("report_type"), + "start_date": obj.get("start_date"), + } + ) return _obj @classmethod @@ -134,4 +147,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "report_type", ] - diff --git a/sdks/python/dropbox_sign/models/report_create_response.py b/sdks/python/dropbox_sign/models/report_create_response.py index 99a5f33c1..6fc7ec8e0 100644 --- a/sdks/python/dropbox_sign/models/report_create_response.py +++ b/sdks/python/dropbox_sign/models/report_create_response.py @@ -28,12 +28,16 @@ from pydantic import StrictBool from typing import Union + class ReportCreateResponse(BaseModel): """ ReportCreateResponse - """ # noqa: E501 + """ # noqa: E501 + report: ReportResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["report", "warnings"] model_config = ConfigDict( @@ -43,7 +47,6 @@ class ReportCreateResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +92,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of report if self.report: - _dict['report'] = self.report.to_dict() + _dict["report"] = self.report.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +111,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "report": ReportResponse.from_dict(obj["report"]) if obj.get("report") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "report": ( + ReportResponse.from_dict(obj["report"]) + if obj.get("report") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +149,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/report_response.py b/sdks/python/dropbox_sign/models/report_response.py index b801a3021..2ed765c4a 100644 --- a/sdks/python/dropbox_sign/models/report_response.py +++ b/sdks/python/dropbox_sign/models/report_response.py @@ -26,25 +26,46 @@ from pydantic import StrictBool from typing import Union + class ReportResponse(BaseModel): """ Contains information about the report request. - """ # noqa: E501 - success: Optional[StrictStr] = Field(default=None, description="A message indicating the requested operation's success") - start_date: Optional[StrictStr] = Field(default=None, description="The (inclusive) start date for the report data in MM/DD/YYYY format.") - end_date: Optional[StrictStr] = Field(default=None, description="The (inclusive) end date for the report data in MM/DD/YYYY format.") - report_type: Optional[List[StrictStr]] = Field(default=None, description="The type(s) of the report you are requesting. Allowed values are \"user_activity\" and \"document_status\". User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status).") - __properties: ClassVar[List[str]] = ["success", "start_date", "end_date", "report_type"] - - @field_validator('report_type') + """ # noqa: E501 + + success: Optional[StrictStr] = Field( + default=None, + description="A message indicating the requested operation's success", + ) + start_date: Optional[StrictStr] = Field( + default=None, + description="The (inclusive) start date for the report data in MM/DD/YYYY format.", + ) + end_date: Optional[StrictStr] = Field( + default=None, + description="The (inclusive) end date for the report data in MM/DD/YYYY format.", + ) + report_type: Optional[List[StrictStr]] = Field( + default=None, + description='The type(s) of the report you are requesting. Allowed values are "user_activity" and "document_status". User activity reports contain list of all users and their activity during the specified date range. Document status report contain a list of signature requests created in the specified time range (and their status).', + ) + __properties: ClassVar[List[str]] = [ + "success", + "start_date", + "end_date", + "report_type", + ] + + @field_validator("report_type") def report_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value for i in value: - if i not in set(['user_activity', 'document_status']): - raise ValueError("each list item must be one of ('user_activity', 'document_status')") + if i not in set(["user_activity", "document_status"]): + raise ValueError( + "each list item must be one of ('user_activity', 'document_status')" + ) return value model_config = ConfigDict( @@ -54,7 +75,6 @@ def report_type_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +84,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -107,12 +129,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "success": obj.get("success"), - "start_date": obj.get("start_date"), - "end_date": obj.get("end_date"), - "report_type": obj.get("report_type") - }) + _obj = cls.model_validate( + { + "success": obj.get("success"), + "start_date": obj.get("start_date"), + "end_date": obj.get("end_date"), + "report_type": obj.get("report_type"), + } + ) return _obj @classmethod @@ -139,4 +163,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "report_type", ] - diff --git a/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py index f6be2bb63..a3250eb3c 100644 --- a/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_bulk_create_embedded_with_template_request.py @@ -30,24 +30,77 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestBulkCreateEmbeddedWithTemplateRequest(BaseModel): """ SignatureRequestBulkCreateEmbeddedWithTemplateRequest - """ # noqa: E501 - template_ids: List[StrictStr] = Field(description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.") - client_id: StrictStr = Field(description="Client id of the app you're using to create this embedded signature request. Used for security purposes.") - signer_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field(default=None, description="`signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ```") - signer_list: Optional[List[SubBulkSignerList]] = Field(default=None, description="`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.") - allow_decline: Optional[StrictBool] = Field(default=False, description="Allows signers to decline to sign a document if `true`. Defaults to `false`.") - ccs: Optional[List[SubCC]] = Field(default=None, description="Add CC email recipients. Required when a CC role exists for the Template.") - custom_fields: Optional[List[SubCustomField]] = Field(default=None, description="When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The custom message in the email that will be sent to the signers.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.") - signing_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully sign.") - subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The subject in the email that will be sent to the signers.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.") - title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The title you want to assign to the SignatureRequest.") - __properties: ClassVar[List[str]] = ["template_ids", "client_id", "signer_file", "signer_list", "allow_decline", "ccs", "custom_fields", "message", "metadata", "signing_redirect_url", "subject", "test_mode", "title"] + """ # noqa: E501 + + template_ids: List[StrictStr] = Field( + description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used." + ) + client_id: StrictStr = Field( + description="Client id of the app you're using to create this embedded signature request. Used for security purposes." + ) + signer_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field( + default=None, + description="`signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ```", + ) + signer_list: Optional[List[SubBulkSignerList]] = Field( + default=None, + description="`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.", + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + ccs: Optional[List[SubCC]] = Field( + default=None, + description="Add CC email recipients. Required when a CC role exists for the Template.", + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description='When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.', + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully sign.", + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + __properties: ClassVar[List[str]] = [ + "template_ids", + "client_id", + "signer_file", + "signer_list", + "allow_decline", + "ccs", + "custom_fields", + "message", + "metadata", + "signing_redirect_url", + "subject", + "test_mode", + "title", + ] model_config = ConfigDict( populate_by_name=True, @@ -56,7 +109,6 @@ class SignatureRequestBulkCreateEmbeddedWithTemplateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +118,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -104,21 +158,21 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_signer_list in self.signer_list: if _item_signer_list: _items.append(_item_signer_list.to_dict()) - _dict['signer_list'] = _items + _dict["signer_list"] = _items # override the default output from pydantic by calling `to_dict()` of each item in ccs (list) _items = [] if self.ccs: for _item_ccs in self.ccs: if _item_ccs: _items.append(_item_ccs.to_dict()) - _dict['ccs'] = _items + _dict["ccs"] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) _items = [] if self.custom_fields: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items return _dict @classmethod @@ -130,21 +184,41 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template_ids": obj.get("template_ids"), - "client_id": obj.get("client_id"), - "signer_file": obj.get("signer_file"), - "signer_list": [SubBulkSignerList.from_dict(_item) for _item in obj["signer_list"]] if obj.get("signer_list") is not None else None, - "allow_decline": obj.get("allow_decline") if obj.get("allow_decline") is not None else False, - "ccs": [SubCC.from_dict(_item) for _item in obj["ccs"]] if obj.get("ccs") is not None else None, - "custom_fields": [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "signing_redirect_url": obj.get("signing_redirect_url"), - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "title": obj.get("title") - }) + _obj = cls.model_validate( + { + "template_ids": obj.get("template_ids"), + "client_id": obj.get("client_id"), + "signer_file": obj.get("signer_file"), + "signer_list": ( + [SubBulkSignerList.from_dict(_item) for _item in obj["signer_list"]] + if obj.get("signer_list") is not None + else None + ), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "ccs": ( + [SubCC.from_dict(_item) for _item in obj["ccs"]] + if obj.get("ccs") is not None + else None + ), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "signing_redirect_url": obj.get("signing_redirect_url"), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + } + ) return _obj @classmethod @@ -183,4 +257,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "ccs", "custom_fields", ] - diff --git a/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py index 4e4abf801..6c122576b 100644 --- a/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_bulk_send_with_template_request.py @@ -30,24 +30,78 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestBulkSendWithTemplateRequest(BaseModel): """ SignatureRequestBulkSendWithTemplateRequest - """ # noqa: E501 - template_ids: List[StrictStr] = Field(description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.") - signer_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field(default=None, description="`signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ```") - signer_list: Optional[List[SubBulkSignerList]] = Field(default=None, description="`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.") - allow_decline: Optional[StrictBool] = Field(default=False, description="Allows signers to decline to sign a document if `true`. Defaults to `false`.") - ccs: Optional[List[SubCC]] = Field(default=None, description="Add CC email recipients. Required when a CC role exists for the Template.") - client_id: Optional[StrictStr] = Field(default=None, description="The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.") - custom_fields: Optional[List[SubCustomField]] = Field(default=None, description="When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The custom message in the email that will be sent to the signers.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.") - signing_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully sign.") - subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The subject in the email that will be sent to the signers.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.") - title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The title you want to assign to the SignatureRequest.") - __properties: ClassVar[List[str]] = ["template_ids", "signer_file", "signer_list", "allow_decline", "ccs", "client_id", "custom_fields", "message", "metadata", "signing_redirect_url", "subject", "test_mode", "title"] + """ # noqa: E501 + + template_ids: List[StrictStr] = Field( + description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used." + ) + signer_file: Optional[Union[StrictBytes, StrictStr, io.IOBase]] = Field( + default=None, + description="`signer_file` is a CSV file defining values and options for signer fields. Required unless a `signer_list` is used, you may not use both. The CSV can have the following columns: - `name`: the name of the signer filling the role of RoleName - `email_address`: email address of the signer filling the role of RoleName - `pin`: the 4- to 12-character access code that will secure this signer's signature page (optional) - `sms_phone_number`: An E.164 formatted phone number that will receive a code via SMS to access this signer's signature page. (optional) By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher. - `*_field`: any column with a _field\" suffix will be treated as a custom field (optional) You may only specify field values here, any other options should be set in the custom_fields request parameter. Example CSV: ``` name, email_address, pin, company_field George, george@example.com, d79a3td, ABC Corp Mary, mary@example.com, gd9as5b, 123 LLC ```", + ) + signer_list: Optional[List[SubBulkSignerList]] = Field( + default=None, + description="`signer_list` is an array defining values and options for signer fields. Required unless a `signer_file` is used, you may not use both.", + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + ccs: Optional[List[SubCC]] = Field( + default=None, + description="Add CC email recipients. Required when a CC role exists for the Template.", + ) + client_id: Optional[StrictStr] = Field( + default=None, + description="The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.", + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description='When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.', + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully sign.", + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + __properties: ClassVar[List[str]] = [ + "template_ids", + "signer_file", + "signer_list", + "allow_decline", + "ccs", + "client_id", + "custom_fields", + "message", + "metadata", + "signing_redirect_url", + "subject", + "test_mode", + "title", + ] model_config = ConfigDict( populate_by_name=True, @@ -56,7 +110,6 @@ class SignatureRequestBulkSendWithTemplateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +119,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -104,21 +159,21 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_signer_list in self.signer_list: if _item_signer_list: _items.append(_item_signer_list.to_dict()) - _dict['signer_list'] = _items + _dict["signer_list"] = _items # override the default output from pydantic by calling `to_dict()` of each item in ccs (list) _items = [] if self.ccs: for _item_ccs in self.ccs: if _item_ccs: _items.append(_item_ccs.to_dict()) - _dict['ccs'] = _items + _dict["ccs"] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) _items = [] if self.custom_fields: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items return _dict @classmethod @@ -130,21 +185,41 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template_ids": obj.get("template_ids"), - "signer_file": obj.get("signer_file"), - "signer_list": [SubBulkSignerList.from_dict(_item) for _item in obj["signer_list"]] if obj.get("signer_list") is not None else None, - "allow_decline": obj.get("allow_decline") if obj.get("allow_decline") is not None else False, - "ccs": [SubCC.from_dict(_item) for _item in obj["ccs"]] if obj.get("ccs") is not None else None, - "client_id": obj.get("client_id"), - "custom_fields": [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "signing_redirect_url": obj.get("signing_redirect_url"), - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "title": obj.get("title") - }) + _obj = cls.model_validate( + { + "template_ids": obj.get("template_ids"), + "signer_file": obj.get("signer_file"), + "signer_list": ( + [SubBulkSignerList.from_dict(_item) for _item in obj["signer_list"]] + if obj.get("signer_list") is not None + else None + ), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "ccs": ( + [SubCC.from_dict(_item) for _item in obj["ccs"]] + if obj.get("ccs") is not None + else None + ), + "client_id": obj.get("client_id"), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "signing_redirect_url": obj.get("signing_redirect_url"), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + } + ) return _obj @classmethod @@ -183,4 +258,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "ccs", "custom_fields", ] - diff --git a/sdks/python/dropbox_sign/models/signature_request_create_embedded_request.py b/sdks/python/dropbox_sign/models/signature_request_create_embedded_request.py index f4474c5c1..8912b4560 100644 --- a/sdks/python/dropbox_sign/models/signature_request_create_embedded_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_create_embedded_request.py @@ -18,7 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictInt, StrictStr +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictBytes, + StrictInt, + StrictStr, +) from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from dropbox_sign.models.sub_attachment import SubAttachment @@ -26,8 +34,12 @@ from dropbox_sign.models.sub_field_options import SubFieldOptions from dropbox_sign.models.sub_form_field_group import SubFormFieldGroup from dropbox_sign.models.sub_form_field_rule import SubFormFieldRule -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase -from dropbox_sign.models.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) +from dropbox_sign.models.sub_signature_request_grouped_signers import ( + SubSignatureRequestGroupedSigners, +) from dropbox_sign.models.sub_signature_request_signer import SubSignatureRequestSigner from dropbox_sign.models.sub_signing_options import SubSigningOptions from typing import Optional, Set, Tuple @@ -36,35 +48,125 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestCreateEmbeddedRequest(BaseModel): """ SignatureRequestCreateEmbeddedRequest - """ # noqa: E501 - client_id: StrictStr = Field(description="Client id of the app you're using to create this embedded signature request. Used for security purposes.") - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field(default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - file_urls: Optional[List[StrictStr]] = Field(default=None, description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - signers: Optional[List[SubSignatureRequestSigner]] = Field(default=None, description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.") - grouped_signers: Optional[List[SubSignatureRequestGroupedSigners]] = Field(default=None, description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.") - allow_decline: Optional[StrictBool] = Field(default=False, description="Allows signers to decline to sign a document if `true`. Defaults to `false`.") - allow_reassign: Optional[StrictBool] = Field(default=False, description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan.") - attachments: Optional[List[SubAttachment]] = Field(default=None, description="A list describing the attachments") - cc_email_addresses: Optional[List[StrictStr]] = Field(default=None, description="The email addresses that should be CCed.") - custom_fields: Optional[List[SubCustomField]] = Field(default=None, description="When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.") + """ # noqa: E501 + + client_id: StrictStr = Field( + description="Client id of the app you're using to create this embedded signature request. Used for security purposes." + ) + files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + signers: Optional[List[SubSignatureRequestSigner]] = Field( + default=None, + description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.", + ) + grouped_signers: Optional[List[SubSignatureRequestGroupedSigners]] = Field( + default=None, + description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.", + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + allow_reassign: Optional[StrictBool] = Field( + default=False, + description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan.", + ) + attachments: Optional[List[SubAttachment]] = Field( + default=None, description="A list describing the attachments" + ) + cc_email_addresses: Optional[List[StrictStr]] = Field( + default=None, description="The email addresses that should be CCed." + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description='When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.', + ) field_options: Optional[SubFieldOptions] = None - form_field_groups: Optional[List[SubFormFieldGroup]] = Field(default=None, description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.") - form_field_rules: Optional[List[SubFormFieldRule]] = Field(default=None, description="Conditional Logic rules for fields defined in `form_fields_per_document`.") - form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field(default=None, description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`") - hide_text_tags: Optional[StrictBool] = Field(default=False, description="Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The custom message in the email that will be sent to the signers.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.") + form_field_groups: Optional[List[SubFormFieldGroup]] = Field( + default=None, + description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.", + ) + form_field_rules: Optional[List[SubFormFieldRule]] = Field( + default=None, + description="Conditional Logic rules for fields defined in `form_fields_per_document`.", + ) + form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field( + default=None, + description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`", + ) + hide_text_tags: Optional[StrictBool] = Field( + default=False, + description="Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) signing_options: Optional[SubSigningOptions] = None - subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The subject in the email that will be sent to the signers.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.") - title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The title you want to assign to the SignatureRequest.") - use_text_tags: Optional[StrictBool] = Field(default=False, description="Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.") - populate_auto_fill_fields: Optional[StrictBool] = Field(default=False, description="Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.") - expires_at: Optional[StrictInt] = Field(default=None, description="When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.") - __properties: ClassVar[List[str]] = ["client_id", "files", "file_urls", "signers", "grouped_signers", "allow_decline", "allow_reassign", "attachments", "cc_email_addresses", "custom_fields", "field_options", "form_field_groups", "form_field_rules", "form_fields_per_document", "hide_text_tags", "message", "metadata", "signing_options", "subject", "test_mode", "title", "use_text_tags", "populate_auto_fill_fields", "expires_at"] + subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + use_text_tags: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.", + ) + populate_auto_fill_fields: Optional[StrictBool] = Field( + default=False, + description="Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.", + ) + expires_at: Optional[StrictInt] = Field( + default=None, + description="When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.", + ) + __properties: ClassVar[List[str]] = [ + "client_id", + "files", + "file_urls", + "signers", + "grouped_signers", + "allow_decline", + "allow_reassign", + "attachments", + "cc_email_addresses", + "custom_fields", + "field_options", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + "hide_text_tags", + "message", + "metadata", + "signing_options", + "subject", + "test_mode", + "title", + "use_text_tags", + "populate_auto_fill_fields", + "expires_at", + ] model_config = ConfigDict( populate_by_name=True, @@ -73,7 +175,6 @@ class SignatureRequestCreateEmbeddedRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +184,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -121,55 +224,55 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_signers in self.signers: if _item_signers: _items.append(_item_signers.to_dict()) - _dict['signers'] = _items + _dict["signers"] = _items # override the default output from pydantic by calling `to_dict()` of each item in grouped_signers (list) _items = [] if self.grouped_signers: for _item_grouped_signers in self.grouped_signers: if _item_grouped_signers: _items.append(_item_grouped_signers.to_dict()) - _dict['grouped_signers'] = _items + _dict["grouped_signers"] = _items # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: for _item_attachments in self.attachments: if _item_attachments: _items.append(_item_attachments.to_dict()) - _dict['attachments'] = _items + _dict["attachments"] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) _items = [] if self.custom_fields: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of field_options if self.field_options: - _dict['field_options'] = self.field_options.to_dict() + _dict["field_options"] = self.field_options.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in form_field_groups (list) _items = [] if self.form_field_groups: for _item_form_field_groups in self.form_field_groups: if _item_form_field_groups: _items.append(_item_form_field_groups.to_dict()) - _dict['form_field_groups'] = _items + _dict["form_field_groups"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_field_rules (list) _items = [] if self.form_field_rules: for _item_form_field_rules in self.form_field_rules: if _item_form_field_rules: _items.append(_item_form_field_rules.to_dict()) - _dict['form_field_rules'] = _items + _dict["form_field_rules"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_fields_per_document (list) _items = [] if self.form_fields_per_document: for _item_form_fields_per_document in self.form_fields_per_document: if _item_form_fields_per_document: _items.append(_item_form_fields_per_document.to_dict()) - _dict['form_fields_per_document'] = _items + _dict["form_fields_per_document"] = _items # override the default output from pydantic by calling `to_dict()` of signing_options if self.signing_options: - _dict['signing_options'] = self.signing_options.to_dict() + _dict["signing_options"] = self.signing_options.to_dict() return _dict @classmethod @@ -181,32 +284,107 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "client_id": obj.get("client_id"), - "files": obj.get("files"), - "file_urls": obj.get("file_urls"), - "signers": [SubSignatureRequestSigner.from_dict(_item) for _item in obj["signers"]] if obj.get("signers") is not None else None, - "grouped_signers": [SubSignatureRequestGroupedSigners.from_dict(_item) for _item in obj["grouped_signers"]] if obj.get("grouped_signers") is not None else None, - "allow_decline": obj.get("allow_decline") if obj.get("allow_decline") is not None else False, - "allow_reassign": obj.get("allow_reassign") if obj.get("allow_reassign") is not None else False, - "attachments": [SubAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, - "cc_email_addresses": obj.get("cc_email_addresses"), - "custom_fields": [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "field_options": SubFieldOptions.from_dict(obj["field_options"]) if obj.get("field_options") is not None else None, - "form_field_groups": [SubFormFieldGroup.from_dict(_item) for _item in obj["form_field_groups"]] if obj.get("form_field_groups") is not None else None, - "form_field_rules": [SubFormFieldRule.from_dict(_item) for _item in obj["form_field_rules"]] if obj.get("form_field_rules") is not None else None, - "form_fields_per_document": [SubFormFieldsPerDocumentBase.from_dict(_item) for _item in obj["form_fields_per_document"]] if obj.get("form_fields_per_document") is not None else None, - "hide_text_tags": obj.get("hide_text_tags") if obj.get("hide_text_tags") is not None else False, - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "signing_options": SubSigningOptions.from_dict(obj["signing_options"]) if obj.get("signing_options") is not None else None, - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "title": obj.get("title"), - "use_text_tags": obj.get("use_text_tags") if obj.get("use_text_tags") is not None else False, - "populate_auto_fill_fields": obj.get("populate_auto_fill_fields") if obj.get("populate_auto_fill_fields") is not None else False, - "expires_at": obj.get("expires_at") - }) + _obj = cls.model_validate( + { + "client_id": obj.get("client_id"), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "signers": ( + [ + SubSignatureRequestSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "grouped_signers": ( + [ + SubSignatureRequestGroupedSigners.from_dict(_item) + for _item in obj["grouped_signers"] + ] + if obj.get("grouped_signers") is not None + else None + ), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "allow_reassign": ( + obj.get("allow_reassign") + if obj.get("allow_reassign") is not None + else False + ), + "attachments": ( + [SubAttachment.from_dict(_item) for _item in obj["attachments"]] + if obj.get("attachments") is not None + else None + ), + "cc_email_addresses": obj.get("cc_email_addresses"), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "field_options": ( + SubFieldOptions.from_dict(obj["field_options"]) + if obj.get("field_options") is not None + else None + ), + "form_field_groups": ( + [ + SubFormFieldGroup.from_dict(_item) + for _item in obj["form_field_groups"] + ] + if obj.get("form_field_groups") is not None + else None + ), + "form_field_rules": ( + [ + SubFormFieldRule.from_dict(_item) + for _item in obj["form_field_rules"] + ] + if obj.get("form_field_rules") is not None + else None + ), + "form_fields_per_document": ( + [ + SubFormFieldsPerDocumentBase.from_dict(_item) + for _item in obj["form_fields_per_document"] + ] + if obj.get("form_fields_per_document") is not None + else None + ), + "hide_text_tags": ( + obj.get("hide_text_tags") + if obj.get("hide_text_tags") is not None + else False + ), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "signing_options": ( + SubSigningOptions.from_dict(obj["signing_options"]) + if obj.get("signing_options") is not None + else None + ), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + "use_text_tags": ( + obj.get("use_text_tags") + if obj.get("use_text_tags") is not None + else False + ), + "populate_auto_fill_fields": ( + obj.get("populate_auto_fill_fields") + if obj.get("populate_auto_fill_fields") is not None + else False + ), + "expires_at": obj.get("expires_at"), + } + ) return _obj @classmethod @@ -262,4 +440,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "form_field_rules", "form_fields_per_document", ] - diff --git a/sdks/python/dropbox_sign/models/signature_request_create_embedded_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_create_embedded_with_template_request.py index d99187212..2c7d080d7 100644 --- a/sdks/python/dropbox_sign/models/signature_request_create_embedded_with_template_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_create_embedded_with_template_request.py @@ -23,7 +23,9 @@ from typing_extensions import Annotated from dropbox_sign.models.sub_cc import SubCC from dropbox_sign.models.sub_custom_field import SubCustomField -from dropbox_sign.models.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner +from dropbox_sign.models.sub_signature_request_template_signer import ( + SubSignatureRequestTemplateSigner, +) from dropbox_sign.models.sub_signing_options import SubSigningOptions from typing import Optional, Set, Tuple from typing_extensions import Self @@ -31,26 +33,83 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestCreateEmbeddedWithTemplateRequest(BaseModel): """ SignatureRequestCreateEmbeddedWithTemplateRequest - """ # noqa: E501 - template_ids: List[StrictStr] = Field(description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.") - client_id: StrictStr = Field(description="Client id of the app you're using to create this embedded signature request. Used for security purposes.") - signers: List[SubSignatureRequestTemplateSigner] = Field(description="Add Signers to your Templated-based Signature Request.") - allow_decline: Optional[StrictBool] = Field(default=False, description="Allows signers to decline to sign a document if `true`. Defaults to `false`.") - ccs: Optional[List[SubCC]] = Field(default=None, description="Add CC email recipients. Required when a CC role exists for the Template.") - custom_fields: Optional[List[SubCustomField]] = Field(default=None, description="An array defining values and options for custom fields. Required when a custom field exists in the Template.") - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field(default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - file_urls: Optional[List[StrictStr]] = Field(default=None, description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The custom message in the email that will be sent to the signers.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.") + """ # noqa: E501 + + template_ids: List[StrictStr] = Field( + description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used." + ) + client_id: StrictStr = Field( + description="Client id of the app you're using to create this embedded signature request. Used for security purposes." + ) + signers: List[SubSignatureRequestTemplateSigner] = Field( + description="Add Signers to your Templated-based Signature Request." + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + ccs: Optional[List[SubCC]] = Field( + default=None, + description="Add CC email recipients. Required when a CC role exists for the Template.", + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description="An array defining values and options for custom fields. Required when a custom field exists in the Template.", + ) + files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) signing_options: Optional[SubSigningOptions] = None - subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The subject in the email that will be sent to the signers.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.") - title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The title you want to assign to the SignatureRequest.") - populate_auto_fill_fields: Optional[StrictBool] = Field(default=False, description="Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.") - __properties: ClassVar[List[str]] = ["template_ids", "client_id", "signers", "allow_decline", "ccs", "custom_fields", "files", "file_urls", "message", "metadata", "signing_options", "subject", "test_mode", "title", "populate_auto_fill_fields"] + subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + populate_auto_fill_fields: Optional[StrictBool] = Field( + default=False, + description="Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.", + ) + __properties: ClassVar[List[str]] = [ + "template_ids", + "client_id", + "signers", + "allow_decline", + "ccs", + "custom_fields", + "files", + "file_urls", + "message", + "metadata", + "signing_options", + "subject", + "test_mode", + "title", + "populate_auto_fill_fields", + ] model_config = ConfigDict( populate_by_name=True, @@ -59,7 +118,6 @@ class SignatureRequestCreateEmbeddedWithTemplateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,7 +127,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -107,24 +167,24 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_signers in self.signers: if _item_signers: _items.append(_item_signers.to_dict()) - _dict['signers'] = _items + _dict["signers"] = _items # override the default output from pydantic by calling `to_dict()` of each item in ccs (list) _items = [] if self.ccs: for _item_ccs in self.ccs: if _item_ccs: _items.append(_item_ccs.to_dict()) - _dict['ccs'] = _items + _dict["ccs"] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) _items = [] if self.custom_fields: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of signing_options if self.signing_options: - _dict['signing_options'] = self.signing_options.to_dict() + _dict["signing_options"] = self.signing_options.to_dict() return _dict @classmethod @@ -136,23 +196,54 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template_ids": obj.get("template_ids"), - "client_id": obj.get("client_id"), - "signers": [SubSignatureRequestTemplateSigner.from_dict(_item) for _item in obj["signers"]] if obj.get("signers") is not None else None, - "allow_decline": obj.get("allow_decline") if obj.get("allow_decline") is not None else False, - "ccs": [SubCC.from_dict(_item) for _item in obj["ccs"]] if obj.get("ccs") is not None else None, - "custom_fields": [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "files": obj.get("files"), - "file_urls": obj.get("file_urls"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "signing_options": SubSigningOptions.from_dict(obj["signing_options"]) if obj.get("signing_options") is not None else None, - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "title": obj.get("title"), - "populate_auto_fill_fields": obj.get("populate_auto_fill_fields") if obj.get("populate_auto_fill_fields") is not None else False - }) + _obj = cls.model_validate( + { + "template_ids": obj.get("template_ids"), + "client_id": obj.get("client_id"), + "signers": ( + [ + SubSignatureRequestTemplateSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "ccs": ( + [SubCC.from_dict(_item) for _item in obj["ccs"]] + if obj.get("ccs") is not None + else None + ), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "signing_options": ( + SubSigningOptions.from_dict(obj["signing_options"]) + if obj.get("signing_options") is not None + else None + ), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + "populate_auto_fill_fields": ( + obj.get("populate_auto_fill_fields") + if obj.get("populate_auto_fill_fields") is not None + else False + ), + } + ) return _obj @classmethod @@ -195,4 +286,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "files", "file_urls", ] - diff --git a/sdks/python/dropbox_sign/models/signature_request_get_response.py b/sdks/python/dropbox_sign/models/signature_request_get_response.py index 4a950cc3b..8a1c556f4 100644 --- a/sdks/python/dropbox_sign/models/signature_request_get_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_get_response.py @@ -28,12 +28,16 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestGetResponse(BaseModel): """ SignatureRequestGetResponse - """ # noqa: E501 + """ # noqa: E501 + signature_request: SignatureRequestResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["signature_request", "warnings"] model_config = ConfigDict( @@ -43,7 +47,6 @@ class SignatureRequestGetResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +92,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of signature_request if self.signature_request: - _dict['signature_request'] = self.signature_request.to_dict() + _dict["signature_request"] = self.signature_request.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +111,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "signature_request": SignatureRequestResponse.from_dict(obj["signature_request"]) if obj.get("signature_request") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "signature_request": ( + SignatureRequestResponse.from_dict(obj["signature_request"]) + if obj.get("signature_request") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +149,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/signature_request_list_response.py b/sdks/python/dropbox_sign/models/signature_request_list_response.py index 4b9c3a607..02f8d7426 100644 --- a/sdks/python/dropbox_sign/models/signature_request_list_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_list_response.py @@ -29,13 +29,19 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestListResponse(BaseModel): """ SignatureRequestListResponse - """ # noqa: E501 - signature_requests: List[SignatureRequestResponse] = Field(description="Contains information about signature requests.") + """ # noqa: E501 + + signature_requests: List[SignatureRequestResponse] = Field( + description="Contains information about signature requests." + ) list_info: ListInfoResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["signature_requests", "list_info", "warnings"] model_config = ConfigDict( @@ -45,7 +51,6 @@ class SignatureRequestListResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +60,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,17 +100,17 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_signature_requests in self.signature_requests: if _item_signature_requests: _items.append(_item_signature_requests.to_dict()) - _dict['signature_requests'] = _items + _dict["signature_requests"] = _items # override the default output from pydantic by calling `to_dict()` of list_info if self.list_info: - _dict['list_info'] = self.list_info.to_dict() + _dict["list_info"] = self.list_info.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -115,11 +122,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "signature_requests": [SignatureRequestResponse.from_dict(_item) for _item in obj["signature_requests"]] if obj.get("signature_requests") is not None else None, - "list_info": ListInfoResponse.from_dict(obj["list_info"]) if obj.get("list_info") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "signature_requests": ( + [ + SignatureRequestResponse.from_dict(_item) + for _item in obj["signature_requests"] + ] + if obj.get("signature_requests") is not None + else None + ), + "list_info": ( + ListInfoResponse.from_dict(obj["list_info"]) + if obj.get("list_info") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -146,4 +170,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "signature_requests", "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/signature_request_remind_request.py b/sdks/python/dropbox_sign/models/signature_request_remind_request.py index 5b7c9a27a..21483ce2a 100644 --- a/sdks/python/dropbox_sign/models/signature_request_remind_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_remind_request.py @@ -26,12 +26,19 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestRemindRequest(BaseModel): """ SignatureRequestRemindRequest - """ # noqa: E501 - email_address: StrictStr = Field(description="The email address of the signer to send a reminder to.") - name: Optional[StrictStr] = Field(default=None, description="The name of the signer to send a reminder to. Include if two or more signers share an email address.") + """ # noqa: E501 + + email_address: StrictStr = Field( + description="The email address of the signer to send a reminder to." + ) + name: Optional[StrictStr] = Field( + default=None, + description="The name of the signer to send a reminder to. Include if two or more signers share an email address.", + ) __properties: ClassVar[List[str]] = ["email_address", "name"] model_config = ConfigDict( @@ -41,7 +48,6 @@ class SignatureRequestRemindRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +57,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +102,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "email_address": obj.get("email_address"), - "name": obj.get("name") - }) + _obj = cls.model_validate( + {"email_address": obj.get("email_address"), "name": obj.get("name")} + ) return _obj @classmethod @@ -119,6 +126,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response.py b/sdks/python/dropbox_sign/models/signature_request_response.py index 08cf1cf26..5c8efc067 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response.py +++ b/sdks/python/dropbox_sign/models/signature_request_response.py @@ -20,46 +20,151 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_attachment import SignatureRequestResponseAttachment -from dropbox_sign.models.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase -from dropbox_sign.models.signature_request_response_signatures import SignatureRequestResponseSignatures +from dropbox_sign.models.signature_request_response_attachment import ( + SignatureRequestResponseAttachment, +) +from dropbox_sign.models.signature_request_response_custom_field_base import ( + SignatureRequestResponseCustomFieldBase, +) +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) +from dropbox_sign.models.signature_request_response_signatures import ( + SignatureRequestResponseSignatures, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SignatureRequestResponse(BaseModel): """ Contains information about a signature request. - """ # noqa: E501 - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test signature request. Test requests have no legal value. Defaults to `false`.") - signature_request_id: Optional[StrictStr] = Field(default=None, description="The id of the SignatureRequest.") - requester_email_address: Optional[StrictStr] = Field(default=None, description="The email address of the initiator of the SignatureRequest.") - title: Optional[StrictStr] = Field(default=None, description="The title the specified Account uses for the SignatureRequest.") - original_title: Optional[StrictStr] = Field(default=None, description="Default Label for account.") - subject: Optional[StrictStr] = Field(default=None, description="The subject in the email that was initially sent to the signers.") - message: Optional[StrictStr] = Field(default=None, description="The custom message in the email that was initially sent to the signers.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata attached to the signature request.") - created_at: Optional[StrictInt] = Field(default=None, description="Time the signature request was created.") - expires_at: Optional[StrictInt] = Field(default=None, description="The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.") - is_complete: Optional[StrictBool] = Field(default=None, description="Whether or not the SignatureRequest has been fully executed by all signers.") - is_declined: Optional[StrictBool] = Field(default=None, description="Whether or not the SignatureRequest has been declined by a signer.") - has_error: Optional[StrictBool] = Field(default=None, description="Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings).") - files_url: Optional[StrictStr] = Field(default=None, description="The URL where a copy of the request's documents can be downloaded.") - signing_url: Optional[StrictStr] = Field(default=None, description="The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing.") - details_url: Optional[StrictStr] = Field(default=None, description="The URL where the requester and the signers can view the current status of the SignatureRequest.") - cc_email_addresses: Optional[List[StrictStr]] = Field(default=None, description="A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed.") - signing_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want the signer redirected to after they successfully sign.") - final_copy_uri: Optional[StrictStr] = Field(default=None, description="The path where the completed document can be downloaded") - template_ids: Optional[List[StrictStr]] = Field(default=None, description="Templates IDs used in this SignatureRequest (if any).") - custom_fields: Optional[List[SignatureRequestResponseCustomFieldBase]] = Field(default=None, description="An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`") - attachments: Optional[List[SignatureRequestResponseAttachment]] = Field(default=None, description="Signer attachments.") - response_data: Optional[List[SignatureRequestResponseDataBase]] = Field(default=None, description="An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.") - signatures: Optional[List[SignatureRequestResponseSignatures]] = Field(default=None, description="An array of signature objects, 1 for each signer.") - bulk_send_job_id: Optional[StrictStr] = Field(default=None, description="The ID of the Bulk Send job which sent the signature request, if applicable.") - __properties: ClassVar[List[str]] = ["test_mode", "signature_request_id", "requester_email_address", "title", "original_title", "subject", "message", "metadata", "created_at", "expires_at", "is_complete", "is_declined", "has_error", "files_url", "signing_url", "details_url", "cc_email_addresses", "signing_redirect_url", "final_copy_uri", "template_ids", "custom_fields", "attachments", "response_data", "signatures", "bulk_send_job_id"] + """ # noqa: E501 + + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test signature request. Test requests have no legal value. Defaults to `false`.", + ) + signature_request_id: Optional[StrictStr] = Field( + default=None, description="The id of the SignatureRequest." + ) + requester_email_address: Optional[StrictStr] = Field( + default=None, + description="The email address of the initiator of the SignatureRequest.", + ) + title: Optional[StrictStr] = Field( + default=None, + description="The title the specified Account uses for the SignatureRequest.", + ) + original_title: Optional[StrictStr] = Field( + default=None, description="Default Label for account." + ) + subject: Optional[StrictStr] = Field( + default=None, + description="The subject in the email that was initially sent to the signers.", + ) + message: Optional[StrictStr] = Field( + default=None, + description="The custom message in the email that was initially sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, description="The metadata attached to the signature request." + ) + created_at: Optional[StrictInt] = Field( + default=None, description="Time the signature request was created." + ) + expires_at: Optional[StrictInt] = Field( + default=None, + description="The time when the signature request will expire unsigned signatures. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.", + ) + is_complete: Optional[StrictBool] = Field( + default=None, + description="Whether or not the SignatureRequest has been fully executed by all signers.", + ) + is_declined: Optional[StrictBool] = Field( + default=None, + description="Whether or not the SignatureRequest has been declined by a signer.", + ) + has_error: Optional[StrictBool] = Field( + default=None, + description="Whether or not an error occurred (either during the creation of the SignatureRequest or during one of the signings).", + ) + files_url: Optional[StrictStr] = Field( + default=None, + description="The URL where a copy of the request's documents can be downloaded.", + ) + signing_url: Optional[StrictStr] = Field( + default=None, + description="The URL where a signer, after authenticating, can sign the documents. This should only be used by users with existing Dropbox Sign accounts as they will be required to log in before signing.", + ) + details_url: Optional[StrictStr] = Field( + default=None, + description="The URL where the requester and the signers can view the current status of the SignatureRequest.", + ) + cc_email_addresses: Optional[List[StrictStr]] = Field( + default=None, + description="A list of email addresses that were CCed on the SignatureRequest. They will receive a copy of the final PDF once all the signers have signed.", + ) + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want the signer redirected to after they successfully sign.", + ) + final_copy_uri: Optional[StrictStr] = Field( + default=None, + description="The path where the completed document can be downloaded", + ) + template_ids: Optional[List[StrictStr]] = Field( + default=None, + description="Templates IDs used in this SignatureRequest (if any).", + ) + custom_fields: Optional[List[SignatureRequestResponseCustomFieldBase]] = Field( + default=None, + description="An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox`", + ) + attachments: Optional[List[SignatureRequestResponseAttachment]] = Field( + default=None, description="Signer attachments." + ) + response_data: Optional[List[SignatureRequestResponseDataBase]] = Field( + default=None, + description="An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers.", + ) + signatures: Optional[List[SignatureRequestResponseSignatures]] = Field( + default=None, description="An array of signature objects, 1 for each signer." + ) + bulk_send_job_id: Optional[StrictStr] = Field( + default=None, + description="The ID of the Bulk Send job which sent the signature request, if applicable.", + ) + __properties: ClassVar[List[str]] = [ + "test_mode", + "signature_request_id", + "requester_email_address", + "title", + "original_title", + "subject", + "message", + "metadata", + "created_at", + "expires_at", + "is_complete", + "is_declined", + "has_error", + "files_url", + "signing_url", + "details_url", + "cc_email_addresses", + "signing_redirect_url", + "final_copy_uri", + "template_ids", + "custom_fields", + "attachments", + "response_data", + "signatures", + "bulk_send_job_id", + ] model_config = ConfigDict( populate_by_name=True, @@ -68,7 +173,6 @@ class SignatureRequestResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +182,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -116,28 +222,28 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: for _item_attachments in self.attachments: if _item_attachments: _items.append(_item_attachments.to_dict()) - _dict['attachments'] = _items + _dict["attachments"] = _items # override the default output from pydantic by calling `to_dict()` of each item in response_data (list) _items = [] if self.response_data: for _item_response_data in self.response_data: if _item_response_data: _items.append(_item_response_data.to_dict()) - _dict['response_data'] = _items + _dict["response_data"] = _items # override the default output from pydantic by calling `to_dict()` of each item in signatures (list) _items = [] if self.signatures: for _item_signatures in self.signatures: if _item_signatures: _items.append(_item_signatures.to_dict()) - _dict['signatures'] = _items + _dict["signatures"] = _items return _dict @classmethod @@ -149,33 +255,65 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "signature_request_id": obj.get("signature_request_id"), - "requester_email_address": obj.get("requester_email_address"), - "title": obj.get("title"), - "original_title": obj.get("original_title"), - "subject": obj.get("subject"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - "is_complete": obj.get("is_complete"), - "is_declined": obj.get("is_declined"), - "has_error": obj.get("has_error"), - "files_url": obj.get("files_url"), - "signing_url": obj.get("signing_url"), - "details_url": obj.get("details_url"), - "cc_email_addresses": obj.get("cc_email_addresses"), - "signing_redirect_url": obj.get("signing_redirect_url"), - "final_copy_uri": obj.get("final_copy_uri"), - "template_ids": obj.get("template_ids"), - "custom_fields": [SignatureRequestResponseCustomFieldBase.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "attachments": [SignatureRequestResponseAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, - "response_data": [SignatureRequestResponseDataBase.from_dict(_item) for _item in obj["response_data"]] if obj.get("response_data") is not None else None, - "signatures": [SignatureRequestResponseSignatures.from_dict(_item) for _item in obj["signatures"]] if obj.get("signatures") is not None else None, - "bulk_send_job_id": obj.get("bulk_send_job_id") - }) + _obj = cls.model_validate( + { + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "signature_request_id": obj.get("signature_request_id"), + "requester_email_address": obj.get("requester_email_address"), + "title": obj.get("title"), + "original_title": obj.get("original_title"), + "subject": obj.get("subject"), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at"), + "is_complete": obj.get("is_complete"), + "is_declined": obj.get("is_declined"), + "has_error": obj.get("has_error"), + "files_url": obj.get("files_url"), + "signing_url": obj.get("signing_url"), + "details_url": obj.get("details_url"), + "cc_email_addresses": obj.get("cc_email_addresses"), + "signing_redirect_url": obj.get("signing_redirect_url"), + "final_copy_uri": obj.get("final_copy_uri"), + "template_ids": obj.get("template_ids"), + "custom_fields": ( + [ + SignatureRequestResponseCustomFieldBase.from_dict(_item) + for _item in obj["custom_fields"] + ] + if obj.get("custom_fields") is not None + else None + ), + "attachments": ( + [ + SignatureRequestResponseAttachment.from_dict(_item) + for _item in obj["attachments"] + ] + if obj.get("attachments") is not None + else None + ), + "response_data": ( + [ + SignatureRequestResponseDataBase.from_dict(_item) + for _item in obj["response_data"] + ] + if obj.get("response_data") is not None + else None + ), + "signatures": ( + [ + SignatureRequestResponseSignatures.from_dict(_item) + for _item in obj["signatures"] + ] + if obj.get("signatures") is not None + else None + ), + "bulk_send_job_id": obj.get("bulk_send_job_id"), + } + ) return _obj @classmethod @@ -228,4 +366,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "response_data", "signatures", ] - diff --git a/sdks/python/dropbox_sign/models/signature_request_response_attachment.py b/sdks/python/dropbox_sign/models/signature_request_response_attachment.py index 6c833fd3e..a8f364ba7 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_attachment.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_attachment.py @@ -26,17 +26,34 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestResponseAttachment(BaseModel): """ Signer attachments. - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="The unique ID for this attachment.") - signer: Union[StrictStr, StrictInt] = Field(description="The Signer this attachment is assigned to.") + signer: Union[StrictStr, StrictInt] = Field( + description="The Signer this attachment is assigned to." + ) name: StrictStr = Field(description="The name of this attachment.") - required: StrictBool = Field(description="A boolean value denoting if this attachment is required.") - instructions: Optional[StrictStr] = Field(default=None, description="Instructions for Signer.") - uploaded_at: Optional[StrictInt] = Field(default=None, description="Timestamp when attachment was uploaded by Signer.") - __properties: ClassVar[List[str]] = ["id", "signer", "name", "required", "instructions", "uploaded_at"] + required: StrictBool = Field( + description="A boolean value denoting if this attachment is required." + ) + instructions: Optional[StrictStr] = Field( + default=None, description="Instructions for Signer." + ) + uploaded_at: Optional[StrictInt] = Field( + default=None, description="Timestamp when attachment was uploaded by Signer." + ) + __properties: ClassVar[List[str]] = [ + "id", + "signer", + "name", + "required", + "instructions", + "uploaded_at", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +62,6 @@ class SignatureRequestResponseAttachment(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +71,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -98,14 +116,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "signer": obj.get("signer"), - "name": obj.get("name"), - "required": obj.get("required"), - "instructions": obj.get("instructions"), - "uploaded_at": obj.get("uploaded_at") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "signer": obj.get("signer"), + "name": obj.get("name"), + "required": obj.get("required"), + "instructions": obj.get("instructions"), + "uploaded_at": obj.get("uploaded_at"), + } + ) return _obj @classmethod @@ -131,6 +151,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_base.py b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_base.py index 4f320f394..03fd81e16 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_base.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_base.py @@ -28,19 +28,35 @@ from typing import Union from typing import TYPE_CHECKING + if TYPE_CHECKING: - from dropbox_sign.models.signature_request_response_custom_field_checkbox import SignatureRequestResponseCustomFieldCheckbox - from dropbox_sign.models.signature_request_response_custom_field_text import SignatureRequestResponseCustomFieldText + from dropbox_sign.models.signature_request_response_custom_field_checkbox import ( + SignatureRequestResponseCustomFieldCheckbox, + ) + from dropbox_sign.models.signature_request_response_custom_field_text import ( + SignatureRequestResponseCustomFieldText, + ) + class SignatureRequestResponseCustomFieldBase(BaseModel): """ An array of Custom Field objects containing the name and type of each custom field. * Text Field uses `SignatureRequestResponseCustomFieldText` * Checkbox Field uses `SignatureRequestResponseCustomFieldCheckbox` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this Custom Field. Only 'text' and 'checkbox' are currently supported.") + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this Custom Field. Only 'text' and 'checkbox' are currently supported." + ) name: StrictStr = Field(description="The name of the Custom Field.") - required: Optional[StrictBool] = Field(default=None, description="A boolean value denoting if this field is required.") - api_id: Optional[StrictStr] = Field(default=None, description="The unique ID for this field.") - editor: Optional[StrictStr] = Field(default=None, description="The name of the Role that is able to edit this field.") + required: Optional[StrictBool] = Field( + default=None, description="A boolean value denoting if this field is required." + ) + api_id: Optional[StrictStr] = Field( + default=None, description="The unique ID for this field." + ) + editor: Optional[StrictStr] = Field( + default=None, + description="The name of the Role that is able to edit this field.", + ) __properties: ClassVar[List[str]] = ["type", "name", "required", "api_id", "editor"] model_config = ConfigDict( @@ -50,13 +66,13 @@ class SignatureRequestResponseCustomFieldBase(BaseModel): arbitrary_types_allowed=True, ) - # JSON field name that stores the object type - __discriminator_property_name: ClassVar[str] = 'type' + __discriminator_property_name: ClassVar[str] = "type" # discriminator mappings __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'checkbox': 'SignatureRequestResponseCustomFieldCheckbox','text': 'SignatureRequestResponseCustomFieldText' + "checkbox": "SignatureRequestResponseCustomFieldCheckbox", + "text": "SignatureRequestResponseCustomFieldText", } @classmethod @@ -77,7 +93,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -89,7 +107,12 @@ def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[st return data @classmethod - def from_json(cls, json_str: str) -> Optional[Union[SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText]]: + def from_json(cls, json_str: str) -> Optional[ + Union[ + SignatureRequestResponseCustomFieldCheckbox, + SignatureRequestResponseCustomFieldText, + ] + ]: """Create an instance of SignatureRequestResponseCustomFieldBase from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -112,19 +135,32 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[SignatureRequestResponseCustomFieldCheckbox, SignatureRequestResponseCustomFieldText]]: + def from_dict(cls, obj: Dict[str, Any]) -> Optional[ + Union[ + SignatureRequestResponseCustomFieldCheckbox, + SignatureRequestResponseCustomFieldText, + ] + ]: """Create an instance of SignatureRequestResponseCustomFieldBase from a dict""" # look up the object type based on discriminator mapping object_type = cls.get_discriminator_value(obj) - if object_type == 'SignatureRequestResponseCustomFieldCheckbox': - return import_module("dropbox_sign.models.signature_request_response_custom_field_checkbox").SignatureRequestResponseCustomFieldCheckbox.from_dict(obj) - if object_type == 'SignatureRequestResponseCustomFieldText': - return import_module("dropbox_sign.models.signature_request_response_custom_field_text").SignatureRequestResponseCustomFieldText.from_dict(obj) - - raise ValueError("SignatureRequestResponseCustomFieldBase failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) - + if object_type == "SignatureRequestResponseCustomFieldCheckbox": + return import_module( + "dropbox_sign.models.signature_request_response_custom_field_checkbox" + ).SignatureRequestResponseCustomFieldCheckbox.from_dict(obj) + if object_type == "SignatureRequestResponseCustomFieldText": + return import_module( + "dropbox_sign.models.signature_request_response_custom_field_text" + ).SignatureRequestResponseCustomFieldText.from_dict(obj) + + raise ValueError( + "SignatureRequestResponseCustomFieldBase failed to lookup discriminator value from " + + json.dumps(obj) + + ". Discriminator property name: " + + cls.__discriminator_property_name + + ", mapping: " + + json.dumps(cls.__discriminator_value_class_map) + ) @classmethod def openapi_types(cls) -> Dict[str, str]: @@ -138,6 +174,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_checkbox.py b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_checkbox.py index e0ca67386..229a9f245 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_checkbox.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_checkbox.py @@ -20,20 +20,37 @@ from pydantic import ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase +from dropbox_sign.models.signature_request_response_custom_field_base import ( + SignatureRequestResponseCustomFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union -class SignatureRequestResponseCustomFieldCheckbox(SignatureRequestResponseCustomFieldBase): + +class SignatureRequestResponseCustomFieldCheckbox( + SignatureRequestResponseCustomFieldBase +): """ This class extends `SignatureRequestResponseCustomFieldBase`. - """ # noqa: E501 - type: StrictStr = Field(description="The type of this Custom Field. Only 'text' and 'checkbox' are currently supported.") - value: Optional[StrictBool] = Field(default=None, description="A true/false for checkbox fields") - __properties: ClassVar[List[str]] = ["type", "name", "required", "api_id", "editor", "value"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this Custom Field. Only 'text' and 'checkbox' are currently supported." + ) + value: Optional[StrictBool] = Field( + default=None, description="A true/false for checkbox fields" + ) + __properties: ClassVar[List[str]] = [ + "type", + "name", + "required", + "api_id", + "editor", + "value", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +59,6 @@ class SignatureRequestResponseCustomFieldCheckbox(SignatureRequestResponseCustom arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +68,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +113,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'checkbox', - "name": obj.get("name"), - "required": obj.get("required"), - "api_id": obj.get("api_id"), - "editor": obj.get("editor"), - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "checkbox", + "name": obj.get("name"), + "required": obj.get("required"), + "api_id": obj.get("api_id"), + "editor": obj.get("editor"), + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -128,6 +148,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_text.py b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_text.py index 7ee2fe800..b4605b54f 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_text.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_text.py @@ -20,20 +20,35 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_custom_field_base import SignatureRequestResponseCustomFieldBase +from dropbox_sign.models.signature_request_response_custom_field_base import ( + SignatureRequestResponseCustomFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SignatureRequestResponseCustomFieldText(SignatureRequestResponseCustomFieldBase): """ This class extends `SignatureRequestResponseCustomFieldBase`. - """ # noqa: E501 - type: StrictStr = Field(description="The type of this Custom Field. Only 'text' and 'checkbox' are currently supported.") - value: Optional[StrictStr] = Field(default=None, description="A text string for text fields") - __properties: ClassVar[List[str]] = ["type", "name", "required", "api_id", "editor", "value"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this Custom Field. Only 'text' and 'checkbox' are currently supported." + ) + value: Optional[StrictStr] = Field( + default=None, description="A text string for text fields" + ) + __properties: ClassVar[List[str]] = [ + "type", + "name", + "required", + "api_id", + "editor", + "value", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +57,6 @@ class SignatureRequestResponseCustomFieldText(SignatureRequestResponseCustomFiel arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +66,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +111,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'text', - "name": obj.get("name"), - "required": obj.get("required"), - "api_id": obj.get("api_id"), - "editor": obj.get("editor"), - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "text", + "name": obj.get("name"), + "required": obj.get("required"), + "api_id": obj.get("api_id"), + "editor": obj.get("editor"), + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -128,6 +146,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_type_enum.py b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_type_enum.py index b8cd0e748..db67d6872 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_custom_field_type_enum.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_custom_field_type_enum.py @@ -27,12 +27,10 @@ class SignatureRequestResponseCustomFieldTypeEnum(str, Enum): """ allowed enum values """ - TEXT = 'text' - CHECKBOX = 'checkbox' + TEXT = "text" + CHECKBOX = "checkbox" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SignatureRequestResponseCustomFieldTypeEnum from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_base.py b/sdks/python/dropbox_sign/models/signature_request_response_data_base.py index 4e9f139f2..1e72f17e7 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_base.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_base.py @@ -28,27 +28,63 @@ from typing import Union from typing import TYPE_CHECKING + if TYPE_CHECKING: - from dropbox_sign.models.signature_request_response_data_value_checkbox import SignatureRequestResponseDataValueCheckbox - from dropbox_sign.models.signature_request_response_data_value_checkbox_merge import SignatureRequestResponseDataValueCheckboxMerge - from dropbox_sign.models.signature_request_response_data_value_date_signed import SignatureRequestResponseDataValueDateSigned - from dropbox_sign.models.signature_request_response_data_value_dropdown import SignatureRequestResponseDataValueDropdown - from dropbox_sign.models.signature_request_response_data_value_initials import SignatureRequestResponseDataValueInitials - from dropbox_sign.models.signature_request_response_data_value_radio import SignatureRequestResponseDataValueRadio - from dropbox_sign.models.signature_request_response_data_value_signature import SignatureRequestResponseDataValueSignature - from dropbox_sign.models.signature_request_response_data_value_text import SignatureRequestResponseDataValueText - from dropbox_sign.models.signature_request_response_data_value_text_merge import SignatureRequestResponseDataValueTextMerge + from dropbox_sign.models.signature_request_response_data_value_checkbox import ( + SignatureRequestResponseDataValueCheckbox, + ) + from dropbox_sign.models.signature_request_response_data_value_checkbox_merge import ( + SignatureRequestResponseDataValueCheckboxMerge, + ) + from dropbox_sign.models.signature_request_response_data_value_date_signed import ( + SignatureRequestResponseDataValueDateSigned, + ) + from dropbox_sign.models.signature_request_response_data_value_dropdown import ( + SignatureRequestResponseDataValueDropdown, + ) + from dropbox_sign.models.signature_request_response_data_value_initials import ( + SignatureRequestResponseDataValueInitials, + ) + from dropbox_sign.models.signature_request_response_data_value_radio import ( + SignatureRequestResponseDataValueRadio, + ) + from dropbox_sign.models.signature_request_response_data_value_signature import ( + SignatureRequestResponseDataValueSignature, + ) + from dropbox_sign.models.signature_request_response_data_value_text import ( + SignatureRequestResponseDataValueText, + ) + from dropbox_sign.models.signature_request_response_data_value_text_merge import ( + SignatureRequestResponseDataValueTextMerge, + ) + class SignatureRequestResponseDataBase(BaseModel): """ An array of form field objects containing the name, value, and type of each textbox or checkmark field filled in by the signers. - """ # noqa: E501 - api_id: Optional[StrictStr] = Field(default=None, description="The unique ID for this field.") - signature_id: Optional[StrictStr] = Field(default=None, description="The ID of the signature to which this response is linked.") - name: Optional[StrictStr] = Field(default=None, description="The name of the form field.") - required: Optional[StrictBool] = Field(default=None, description="A boolean value denoting if this field is required.") + """ # noqa: E501 + + api_id: Optional[StrictStr] = Field( + default=None, description="The unique ID for this field." + ) + signature_id: Optional[StrictStr] = Field( + default=None, + description="The ID of the signature to which this response is linked.", + ) + name: Optional[StrictStr] = Field( + default=None, description="The name of the form field." + ) + required: Optional[StrictBool] = Field( + default=None, description="A boolean value denoting if this field is required." + ) type: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["api_id", "signature_id", "name", "required", "type"] + __properties: ClassVar[List[str]] = [ + "api_id", + "signature_id", + "name", + "required", + "type", + ] model_config = ConfigDict( populate_by_name=True, @@ -57,13 +93,20 @@ class SignatureRequestResponseDataBase(BaseModel): arbitrary_types_allowed=True, ) - # JSON field name that stores the object type - __discriminator_property_name: ClassVar[str] = 'type' + __discriminator_property_name: ClassVar[str] = "type" # discriminator mappings __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'checkbox': 'SignatureRequestResponseDataValueCheckbox','checkbox-merge': 'SignatureRequestResponseDataValueCheckboxMerge','date_signed': 'SignatureRequestResponseDataValueDateSigned','dropdown': 'SignatureRequestResponseDataValueDropdown','initials': 'SignatureRequestResponseDataValueInitials','radio': 'SignatureRequestResponseDataValueRadio','signature': 'SignatureRequestResponseDataValueSignature','text': 'SignatureRequestResponseDataValueText','text-merge': 'SignatureRequestResponseDataValueTextMerge' + "checkbox": "SignatureRequestResponseDataValueCheckbox", + "checkbox-merge": "SignatureRequestResponseDataValueCheckboxMerge", + "date_signed": "SignatureRequestResponseDataValueDateSigned", + "dropdown": "SignatureRequestResponseDataValueDropdown", + "initials": "SignatureRequestResponseDataValueInitials", + "radio": "SignatureRequestResponseDataValueRadio", + "signature": "SignatureRequestResponseDataValueSignature", + "text": "SignatureRequestResponseDataValueText", + "text-merge": "SignatureRequestResponseDataValueTextMerge", } @classmethod @@ -84,7 +127,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,7 +141,19 @@ def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[st return data @classmethod - def from_json(cls, json_str: str) -> Optional[Union[SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge]]: + def from_json(cls, json_str: str) -> Optional[ + Union[ + SignatureRequestResponseDataValueCheckbox, + SignatureRequestResponseDataValueCheckboxMerge, + SignatureRequestResponseDataValueDateSigned, + SignatureRequestResponseDataValueDropdown, + SignatureRequestResponseDataValueInitials, + SignatureRequestResponseDataValueRadio, + SignatureRequestResponseDataValueSignature, + SignatureRequestResponseDataValueText, + SignatureRequestResponseDataValueTextMerge, + ] + ]: """Create an instance of SignatureRequestResponseDataBase from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -119,33 +176,67 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[SignatureRequestResponseDataValueCheckbox, SignatureRequestResponseDataValueCheckboxMerge, SignatureRequestResponseDataValueDateSigned, SignatureRequestResponseDataValueDropdown, SignatureRequestResponseDataValueInitials, SignatureRequestResponseDataValueRadio, SignatureRequestResponseDataValueSignature, SignatureRequestResponseDataValueText, SignatureRequestResponseDataValueTextMerge]]: + def from_dict(cls, obj: Dict[str, Any]) -> Optional[ + Union[ + SignatureRequestResponseDataValueCheckbox, + SignatureRequestResponseDataValueCheckboxMerge, + SignatureRequestResponseDataValueDateSigned, + SignatureRequestResponseDataValueDropdown, + SignatureRequestResponseDataValueInitials, + SignatureRequestResponseDataValueRadio, + SignatureRequestResponseDataValueSignature, + SignatureRequestResponseDataValueText, + SignatureRequestResponseDataValueTextMerge, + ] + ]: """Create an instance of SignatureRequestResponseDataBase from a dict""" # look up the object type based on discriminator mapping object_type = cls.get_discriminator_value(obj) - if object_type == 'SignatureRequestResponseDataValueCheckbox': - return import_module("dropbox_sign.models.signature_request_response_data_value_checkbox").SignatureRequestResponseDataValueCheckbox.from_dict(obj) - if object_type == 'SignatureRequestResponseDataValueCheckboxMerge': - return import_module("dropbox_sign.models.signature_request_response_data_value_checkbox_merge").SignatureRequestResponseDataValueCheckboxMerge.from_dict(obj) - if object_type == 'SignatureRequestResponseDataValueDateSigned': - return import_module("dropbox_sign.models.signature_request_response_data_value_date_signed").SignatureRequestResponseDataValueDateSigned.from_dict(obj) - if object_type == 'SignatureRequestResponseDataValueDropdown': - return import_module("dropbox_sign.models.signature_request_response_data_value_dropdown").SignatureRequestResponseDataValueDropdown.from_dict(obj) - if object_type == 'SignatureRequestResponseDataValueInitials': - return import_module("dropbox_sign.models.signature_request_response_data_value_initials").SignatureRequestResponseDataValueInitials.from_dict(obj) - if object_type == 'SignatureRequestResponseDataValueRadio': - return import_module("dropbox_sign.models.signature_request_response_data_value_radio").SignatureRequestResponseDataValueRadio.from_dict(obj) - if object_type == 'SignatureRequestResponseDataValueSignature': - return import_module("dropbox_sign.models.signature_request_response_data_value_signature").SignatureRequestResponseDataValueSignature.from_dict(obj) - if object_type == 'SignatureRequestResponseDataValueText': - return import_module("dropbox_sign.models.signature_request_response_data_value_text").SignatureRequestResponseDataValueText.from_dict(obj) - if object_type == 'SignatureRequestResponseDataValueTextMerge': - return import_module("dropbox_sign.models.signature_request_response_data_value_text_merge").SignatureRequestResponseDataValueTextMerge.from_dict(obj) - - raise ValueError("SignatureRequestResponseDataBase failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) - + if object_type == "SignatureRequestResponseDataValueCheckbox": + return import_module( + "dropbox_sign.models.signature_request_response_data_value_checkbox" + ).SignatureRequestResponseDataValueCheckbox.from_dict(obj) + if object_type == "SignatureRequestResponseDataValueCheckboxMerge": + return import_module( + "dropbox_sign.models.signature_request_response_data_value_checkbox_merge" + ).SignatureRequestResponseDataValueCheckboxMerge.from_dict(obj) + if object_type == "SignatureRequestResponseDataValueDateSigned": + return import_module( + "dropbox_sign.models.signature_request_response_data_value_date_signed" + ).SignatureRequestResponseDataValueDateSigned.from_dict(obj) + if object_type == "SignatureRequestResponseDataValueDropdown": + return import_module( + "dropbox_sign.models.signature_request_response_data_value_dropdown" + ).SignatureRequestResponseDataValueDropdown.from_dict(obj) + if object_type == "SignatureRequestResponseDataValueInitials": + return import_module( + "dropbox_sign.models.signature_request_response_data_value_initials" + ).SignatureRequestResponseDataValueInitials.from_dict(obj) + if object_type == "SignatureRequestResponseDataValueRadio": + return import_module( + "dropbox_sign.models.signature_request_response_data_value_radio" + ).SignatureRequestResponseDataValueRadio.from_dict(obj) + if object_type == "SignatureRequestResponseDataValueSignature": + return import_module( + "dropbox_sign.models.signature_request_response_data_value_signature" + ).SignatureRequestResponseDataValueSignature.from_dict(obj) + if object_type == "SignatureRequestResponseDataValueText": + return import_module( + "dropbox_sign.models.signature_request_response_data_value_text" + ).SignatureRequestResponseDataValueText.from_dict(obj) + if object_type == "SignatureRequestResponseDataValueTextMerge": + return import_module( + "dropbox_sign.models.signature_request_response_data_value_text_merge" + ).SignatureRequestResponseDataValueTextMerge.from_dict(obj) + + raise ValueError( + "SignatureRequestResponseDataBase failed to lookup discriminator value from " + + json.dumps(obj) + + ". Discriminator property name: " + + cls.__discriminator_property_name + + ", mapping: " + + json.dumps(cls.__discriminator_value_class_map) + ) @classmethod def openapi_types(cls) -> Dict[str, str]: @@ -159,6 +250,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_type_enum.py b/sdks/python/dropbox_sign/models/signature_request_response_data_type_enum.py index 17f8831e8..edd8ac007 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_type_enum.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_type_enum.py @@ -27,19 +27,17 @@ class SignatureRequestResponseDataTypeEnum(str, Enum): """ allowed enum values """ - TEXT = 'text' - CHECKBOX = 'checkbox' - DATE_SIGNED = 'date_signed' - DROPDOWN = 'dropdown' - INITIALS = 'initials' - RADIO = 'radio' - SIGNATURE = 'signature' - TEXT_MINUS_MERGE = 'text-merge' - CHECKBOX_MINUS_MERGE = 'checkbox-merge' + TEXT = "text" + CHECKBOX = "checkbox" + DATE_SIGNED = "date_signed" + DROPDOWN = "dropdown" + INITIALS = "initials" + RADIO = "radio" + SIGNATURE = "signature" + TEXT_MINUS_MERGE = "text-merge" + CHECKBOX_MINUS_MERGE = "checkbox-merge" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SignatureRequestResponseDataTypeEnum from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox.py index 658f9179f..97dd0ebf9 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox.py @@ -20,20 +20,35 @@ from pydantic import ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SignatureRequestResponseDataValueCheckbox(SignatureRequestResponseDataBase): """ SignatureRequestResponseDataValueCheckbox - """ # noqa: E501 - type: Optional[StrictStr] = Field(default='checkbox', description="A yes/no checkbox") - value: Optional[StrictBool] = Field(default=None, description="The value of the form field.") - __properties: ClassVar[List[str]] = ["api_id", "signature_id", "name", "required", "type", "value"] + """ # noqa: E501 + + type: Optional[StrictStr] = Field( + default="checkbox", description="A yes/no checkbox" + ) + value: Optional[StrictBool] = Field( + default=None, description="The value of the form field." + ) + __properties: ClassVar[List[str]] = [ + "api_id", + "signature_id", + "name", + "required", + "type", + "value", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +57,6 @@ class SignatureRequestResponseDataValueCheckbox(SignatureRequestResponseDataBase arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +66,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +111,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_id": obj.get("api_id"), - "signature_id": obj.get("signature_id"), - "name": obj.get("name"), - "required": obj.get("required"), - "type": obj.get("type") if obj.get("type") is not None else 'checkbox', - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "api_id": obj.get("api_id"), + "signature_id": obj.get("signature_id"), + "name": obj.get("name"), + "required": obj.get("required"), + "type": obj.get("type") if obj.get("type") is not None else "checkbox", + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -128,6 +146,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox_merge.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox_merge.py index e391d75ba..a48b3d07e 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox_merge.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_checkbox_merge.py @@ -20,20 +20,36 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SignatureRequestResponseDataValueCheckboxMerge(SignatureRequestResponseDataBase): """ SignatureRequestResponseDataValueCheckboxMerge - """ # noqa: E501 - type: Optional[StrictStr] = Field(default='checkbox-merge', description="A checkbox field that has default value set by the api") - value: Optional[StrictStr] = Field(default=None, description="The value of the form field.") - __properties: ClassVar[List[str]] = ["api_id", "signature_id", "name", "required", "type", "value"] + """ # noqa: E501 + + type: Optional[StrictStr] = Field( + default="checkbox-merge", + description="A checkbox field that has default value set by the api", + ) + value: Optional[StrictStr] = Field( + default=None, description="The value of the form field." + ) + __properties: ClassVar[List[str]] = [ + "api_id", + "signature_id", + "name", + "required", + "type", + "value", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +58,6 @@ class SignatureRequestResponseDataValueCheckboxMerge(SignatureRequestResponseDat arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +112,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_id": obj.get("api_id"), - "signature_id": obj.get("signature_id"), - "name": obj.get("name"), - "required": obj.get("required"), - "type": obj.get("type") if obj.get("type") is not None else 'checkbox-merge', - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "api_id": obj.get("api_id"), + "signature_id": obj.get("signature_id"), + "name": obj.get("name"), + "required": obj.get("required"), + "type": ( + obj.get("type") if obj.get("type") is not None else "checkbox-merge" + ), + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -128,6 +149,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_date_signed.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_date_signed.py index e7508f97d..b06f89be6 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_date_signed.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_date_signed.py @@ -20,20 +20,33 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SignatureRequestResponseDataValueDateSigned(SignatureRequestResponseDataBase): """ SignatureRequestResponseDataValueDateSigned - """ # noqa: E501 - type: Optional[StrictStr] = Field(default='date_signed', description="A date") - value: Optional[StrictStr] = Field(default=None, description="The value of the form field.") - __properties: ClassVar[List[str]] = ["api_id", "signature_id", "name", "required", "type", "value"] + """ # noqa: E501 + + type: Optional[StrictStr] = Field(default="date_signed", description="A date") + value: Optional[StrictStr] = Field( + default=None, description="The value of the form field." + ) + __properties: ClassVar[List[str]] = [ + "api_id", + "signature_id", + "name", + "required", + "type", + "value", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +55,6 @@ class SignatureRequestResponseDataValueDateSigned(SignatureRequestResponseDataBa arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +64,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +109,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_id": obj.get("api_id"), - "signature_id": obj.get("signature_id"), - "name": obj.get("name"), - "required": obj.get("required"), - "type": obj.get("type") if obj.get("type") is not None else 'date_signed', - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "api_id": obj.get("api_id"), + "signature_id": obj.get("signature_id"), + "name": obj.get("name"), + "required": obj.get("required"), + "type": ( + obj.get("type") if obj.get("type") is not None else "date_signed" + ), + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -128,6 +146,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_dropdown.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_dropdown.py index bf79e05c0..94ea1c7f4 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_dropdown.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_dropdown.py @@ -20,20 +20,35 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SignatureRequestResponseDataValueDropdown(SignatureRequestResponseDataBase): """ SignatureRequestResponseDataValueDropdown - """ # noqa: E501 - type: Optional[StrictStr] = Field(default='dropdown', description="An input field for dropdowns") - value: Optional[StrictStr] = Field(default=None, description="The value of the form field.") - __properties: ClassVar[List[str]] = ["api_id", "signature_id", "name", "required", "type", "value"] + """ # noqa: E501 + + type: Optional[StrictStr] = Field( + default="dropdown", description="An input field for dropdowns" + ) + value: Optional[StrictStr] = Field( + default=None, description="The value of the form field." + ) + __properties: ClassVar[List[str]] = [ + "api_id", + "signature_id", + "name", + "required", + "type", + "value", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +57,6 @@ class SignatureRequestResponseDataValueDropdown(SignatureRequestResponseDataBase arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +66,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +111,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_id": obj.get("api_id"), - "signature_id": obj.get("signature_id"), - "name": obj.get("name"), - "required": obj.get("required"), - "type": obj.get("type") if obj.get("type") is not None else 'dropdown', - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "api_id": obj.get("api_id"), + "signature_id": obj.get("signature_id"), + "name": obj.get("name"), + "required": obj.get("required"), + "type": obj.get("type") if obj.get("type") is not None else "dropdown", + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -128,6 +146,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_initials.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_initials.py index eb8b8ac2e..db4e0281f 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_initials.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_initials.py @@ -20,20 +20,35 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SignatureRequestResponseDataValueInitials(SignatureRequestResponseDataBase): """ SignatureRequestResponseDataValueInitials - """ # noqa: E501 - type: Optional[StrictStr] = Field(default='initials', description="An input field for initials") - value: Optional[StrictStr] = Field(default=None, description="The value of the form field.") - __properties: ClassVar[List[str]] = ["api_id", "signature_id", "name", "required", "type", "value"] + """ # noqa: E501 + + type: Optional[StrictStr] = Field( + default="initials", description="An input field for initials" + ) + value: Optional[StrictStr] = Field( + default=None, description="The value of the form field." + ) + __properties: ClassVar[List[str]] = [ + "api_id", + "signature_id", + "name", + "required", + "type", + "value", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +57,6 @@ class SignatureRequestResponseDataValueInitials(SignatureRequestResponseDataBase arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +66,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +111,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_id": obj.get("api_id"), - "signature_id": obj.get("signature_id"), - "name": obj.get("name"), - "required": obj.get("required"), - "type": obj.get("type") if obj.get("type") is not None else 'initials', - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "api_id": obj.get("api_id"), + "signature_id": obj.get("signature_id"), + "name": obj.get("name"), + "required": obj.get("required"), + "type": obj.get("type") if obj.get("type") is not None else "initials", + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -128,6 +146,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_radio.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_radio.py index 8c7c734fd..8b531ece2 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_radio.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_radio.py @@ -20,20 +20,35 @@ from pydantic import ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SignatureRequestResponseDataValueRadio(SignatureRequestResponseDataBase): """ SignatureRequestResponseDataValueRadio - """ # noqa: E501 - type: Optional[StrictStr] = Field(default='radio', description="An input field for radios") - value: Optional[StrictBool] = Field(default=None, description="The value of the form field.") - __properties: ClassVar[List[str]] = ["api_id", "signature_id", "name", "required", "type", "value"] + """ # noqa: E501 + + type: Optional[StrictStr] = Field( + default="radio", description="An input field for radios" + ) + value: Optional[StrictBool] = Field( + default=None, description="The value of the form field." + ) + __properties: ClassVar[List[str]] = [ + "api_id", + "signature_id", + "name", + "required", + "type", + "value", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +57,6 @@ class SignatureRequestResponseDataValueRadio(SignatureRequestResponseDataBase): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +66,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +111,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_id": obj.get("api_id"), - "signature_id": obj.get("signature_id"), - "name": obj.get("name"), - "required": obj.get("required"), - "type": obj.get("type") if obj.get("type") is not None else 'radio', - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "api_id": obj.get("api_id"), + "signature_id": obj.get("signature_id"), + "name": obj.get("name"), + "required": obj.get("required"), + "type": obj.get("type") if obj.get("type") is not None else "radio", + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -128,6 +146,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_signature.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_signature.py index 589801d69..795ab9b3f 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_signature.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_signature.py @@ -20,20 +20,35 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SignatureRequestResponseDataValueSignature(SignatureRequestResponseDataBase): """ SignatureRequestResponseDataValueSignature - """ # noqa: E501 - type: Optional[StrictStr] = Field(default='signature', description="A signature input field") - value: Optional[StrictStr] = Field(default=None, description="The value of the form field.") - __properties: ClassVar[List[str]] = ["api_id", "signature_id", "name", "required", "type", "value"] + """ # noqa: E501 + + type: Optional[StrictStr] = Field( + default="signature", description="A signature input field" + ) + value: Optional[StrictStr] = Field( + default=None, description="The value of the form field." + ) + __properties: ClassVar[List[str]] = [ + "api_id", + "signature_id", + "name", + "required", + "type", + "value", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +57,6 @@ class SignatureRequestResponseDataValueSignature(SignatureRequestResponseDataBas arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +66,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +111,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_id": obj.get("api_id"), - "signature_id": obj.get("signature_id"), - "name": obj.get("name"), - "required": obj.get("required"), - "type": obj.get("type") if obj.get("type") is not None else 'signature', - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "api_id": obj.get("api_id"), + "signature_id": obj.get("signature_id"), + "name": obj.get("name"), + "required": obj.get("required"), + "type": obj.get("type") if obj.get("type") is not None else "signature", + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -128,6 +146,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_text.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_text.py index 2bfb27d52..df76cb604 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_text.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_text.py @@ -20,20 +20,33 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SignatureRequestResponseDataValueText(SignatureRequestResponseDataBase): """ SignatureRequestResponseDataValueText - """ # noqa: E501 - type: Optional[StrictStr] = Field(default='text', description="A text input field") - value: Optional[StrictStr] = Field(default=None, description="The value of the form field.") - __properties: ClassVar[List[str]] = ["api_id", "signature_id", "name", "required", "type", "value"] + """ # noqa: E501 + + type: Optional[StrictStr] = Field(default="text", description="A text input field") + value: Optional[StrictStr] = Field( + default=None, description="The value of the form field." + ) + __properties: ClassVar[List[str]] = [ + "api_id", + "signature_id", + "name", + "required", + "type", + "value", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +55,6 @@ class SignatureRequestResponseDataValueText(SignatureRequestResponseDataBase): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +64,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +109,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_id": obj.get("api_id"), - "signature_id": obj.get("signature_id"), - "name": obj.get("name"), - "required": obj.get("required"), - "type": obj.get("type") if obj.get("type") is not None else 'text', - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "api_id": obj.get("api_id"), + "signature_id": obj.get("signature_id"), + "name": obj.get("name"), + "required": obj.get("required"), + "type": obj.get("type") if obj.get("type") is not None else "text", + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -128,6 +144,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_data_value_text_merge.py b/sdks/python/dropbox_sign/models/signature_request_response_data_value_text_merge.py index 518dc2c3e..15ffbb331 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_data_value_text_merge.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_data_value_text_merge.py @@ -20,20 +20,36 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.signature_request_response_data_base import SignatureRequestResponseDataBase +from dropbox_sign.models.signature_request_response_data_base import ( + SignatureRequestResponseDataBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SignatureRequestResponseDataValueTextMerge(SignatureRequestResponseDataBase): """ SignatureRequestResponseDataValueTextMerge - """ # noqa: E501 - type: Optional[StrictStr] = Field(default='text-merge', description="A text field that has default text set by the api") - value: Optional[StrictStr] = Field(default=None, description="The value of the form field.") - __properties: ClassVar[List[str]] = ["api_id", "signature_id", "name", "required", "type", "value"] + """ # noqa: E501 + + type: Optional[StrictStr] = Field( + default="text-merge", + description="A text field that has default text set by the api", + ) + value: Optional[StrictStr] = Field( + default=None, description="The value of the form field." + ) + __properties: ClassVar[List[str]] = [ + "api_id", + "signature_id", + "name", + "required", + "type", + "value", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +58,6 @@ class SignatureRequestResponseDataValueTextMerge(SignatureRequestResponseDataBas arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,14 +112,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "api_id": obj.get("api_id"), - "signature_id": obj.get("signature_id"), - "name": obj.get("name"), - "required": obj.get("required"), - "type": obj.get("type") if obj.get("type") is not None else 'text-merge', - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "api_id": obj.get("api_id"), + "signature_id": obj.get("signature_id"), + "name": obj.get("name"), + "required": obj.get("required"), + "type": ( + obj.get("type") if obj.get("type") is not None else "text-merge" + ), + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -128,6 +149,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_response_signatures.py b/sdks/python/dropbox_sign/models/signature_request_response_signatures.py index da2db2e20..0a964e5f8 100644 --- a/sdks/python/dropbox_sign/models/signature_request_response_signatures.py +++ b/sdks/python/dropbox_sign/models/signature_request_response_signatures.py @@ -26,30 +26,101 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestResponseSignatures(BaseModel): """ An array of signature objects, 1 for each signer. - """ # noqa: E501 - signature_id: Optional[StrictStr] = Field(default=None, description="Signature identifier.") - signer_group_guid: Optional[StrictStr] = Field(default=None, description="Signer Group GUID") - signer_email_address: Optional[StrictStr] = Field(default=None, description="The email address of the signer.") - signer_name: Optional[StrictStr] = Field(default=None, description="The name of the signer.") - signer_role: Optional[StrictStr] = Field(default=None, description="The role of the signer.") - order: Optional[StrictInt] = Field(default=None, description="If signer order is assigned this is the 0-based index for this signer.") - status_code: Optional[StrictStr] = Field(default=None, description="The current status of the signature. eg: awaiting_signature, signed, declined.") - decline_reason: Optional[StrictStr] = Field(default=None, description="The reason provided by the signer for declining the request.") - signed_at: Optional[StrictInt] = Field(default=None, description="Time that the document was signed or null.") - last_viewed_at: Optional[StrictInt] = Field(default=None, description="The time that the document was last viewed by this signer or null.") - last_reminded_at: Optional[StrictInt] = Field(default=None, description="The time the last reminder email was sent to the signer or null.") - has_pin: Optional[StrictBool] = Field(default=None, description="Boolean to indicate whether this signature requires a PIN to access.") - has_sms_auth: Optional[StrictBool] = Field(default=None, description="Boolean to indicate whether this signature has SMS authentication enabled.") - has_sms_delivery: Optional[StrictBool] = Field(default=None, description="Boolean to indicate whether this signature has SMS delivery enabled.") - sms_phone_number: Optional[StrictStr] = Field(default=None, description="The SMS phone number used for authentication or signature request delivery.") - reassigned_by: Optional[StrictStr] = Field(default=None, description="Email address of original signer who reassigned to this signer.") - reassignment_reason: Optional[StrictStr] = Field(default=None, description="Reason provided by original signer who reassigned to this signer.") - reassigned_from: Optional[StrictStr] = Field(default=None, description="Previous signature identifier.") - error: Optional[StrictStr] = Field(default=None, description="Error message pertaining to this signer, or null.") - __properties: ClassVar[List[str]] = ["signature_id", "signer_group_guid", "signer_email_address", "signer_name", "signer_role", "order", "status_code", "decline_reason", "signed_at", "last_viewed_at", "last_reminded_at", "has_pin", "has_sms_auth", "has_sms_delivery", "sms_phone_number", "reassigned_by", "reassignment_reason", "reassigned_from", "error"] + """ # noqa: E501 + + signature_id: Optional[StrictStr] = Field( + default=None, description="Signature identifier." + ) + signer_group_guid: Optional[StrictStr] = Field( + default=None, description="Signer Group GUID" + ) + signer_email_address: Optional[StrictStr] = Field( + default=None, description="The email address of the signer." + ) + signer_name: Optional[StrictStr] = Field( + default=None, description="The name of the signer." + ) + signer_role: Optional[StrictStr] = Field( + default=None, description="The role of the signer." + ) + order: Optional[StrictInt] = Field( + default=None, + description="If signer order is assigned this is the 0-based index for this signer.", + ) + status_code: Optional[StrictStr] = Field( + default=None, + description="The current status of the signature. eg: awaiting_signature, signed, declined.", + ) + decline_reason: Optional[StrictStr] = Field( + default=None, + description="The reason provided by the signer for declining the request.", + ) + signed_at: Optional[StrictInt] = Field( + default=None, description="Time that the document was signed or null." + ) + last_viewed_at: Optional[StrictInt] = Field( + default=None, + description="The time that the document was last viewed by this signer or null.", + ) + last_reminded_at: Optional[StrictInt] = Field( + default=None, + description="The time the last reminder email was sent to the signer or null.", + ) + has_pin: Optional[StrictBool] = Field( + default=None, + description="Boolean to indicate whether this signature requires a PIN to access.", + ) + has_sms_auth: Optional[StrictBool] = Field( + default=None, + description="Boolean to indicate whether this signature has SMS authentication enabled.", + ) + has_sms_delivery: Optional[StrictBool] = Field( + default=None, + description="Boolean to indicate whether this signature has SMS delivery enabled.", + ) + sms_phone_number: Optional[StrictStr] = Field( + default=None, + description="The SMS phone number used for authentication or signature request delivery.", + ) + reassigned_by: Optional[StrictStr] = Field( + default=None, + description="Email address of original signer who reassigned to this signer.", + ) + reassignment_reason: Optional[StrictStr] = Field( + default=None, + description="Reason provided by original signer who reassigned to this signer.", + ) + reassigned_from: Optional[StrictStr] = Field( + default=None, description="Previous signature identifier." + ) + error: Optional[StrictStr] = Field( + default=None, description="Error message pertaining to this signer, or null." + ) + __properties: ClassVar[List[str]] = [ + "signature_id", + "signer_group_guid", + "signer_email_address", + "signer_name", + "signer_role", + "order", + "status_code", + "decline_reason", + "signed_at", + "last_viewed_at", + "last_reminded_at", + "has_pin", + "has_sms_auth", + "has_sms_delivery", + "sms_phone_number", + "reassigned_by", + "reassignment_reason", + "reassigned_from", + "error", + ] model_config = ConfigDict( populate_by_name=True, @@ -58,7 +129,6 @@ class SignatureRequestResponseSignatures(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +138,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -111,27 +183,29 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "signature_id": obj.get("signature_id"), - "signer_group_guid": obj.get("signer_group_guid"), - "signer_email_address": obj.get("signer_email_address"), - "signer_name": obj.get("signer_name"), - "signer_role": obj.get("signer_role"), - "order": obj.get("order"), - "status_code": obj.get("status_code"), - "decline_reason": obj.get("decline_reason"), - "signed_at": obj.get("signed_at"), - "last_viewed_at": obj.get("last_viewed_at"), - "last_reminded_at": obj.get("last_reminded_at"), - "has_pin": obj.get("has_pin"), - "has_sms_auth": obj.get("has_sms_auth"), - "has_sms_delivery": obj.get("has_sms_delivery"), - "sms_phone_number": obj.get("sms_phone_number"), - "reassigned_by": obj.get("reassigned_by"), - "reassignment_reason": obj.get("reassignment_reason"), - "reassigned_from": obj.get("reassigned_from"), - "error": obj.get("error") - }) + _obj = cls.model_validate( + { + "signature_id": obj.get("signature_id"), + "signer_group_guid": obj.get("signer_group_guid"), + "signer_email_address": obj.get("signer_email_address"), + "signer_name": obj.get("signer_name"), + "signer_role": obj.get("signer_role"), + "order": obj.get("order"), + "status_code": obj.get("status_code"), + "decline_reason": obj.get("decline_reason"), + "signed_at": obj.get("signed_at"), + "last_viewed_at": obj.get("last_viewed_at"), + "last_reminded_at": obj.get("last_reminded_at"), + "has_pin": obj.get("has_pin"), + "has_sms_auth": obj.get("has_sms_auth"), + "has_sms_delivery": obj.get("has_sms_delivery"), + "sms_phone_number": obj.get("sms_phone_number"), + "reassigned_by": obj.get("reassigned_by"), + "reassignment_reason": obj.get("reassignment_reason"), + "reassigned_from": obj.get("reassigned_from"), + "error": obj.get("error"), + } + ) return _obj @classmethod @@ -170,6 +244,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/signature_request_send_request.py b/sdks/python/dropbox_sign/models/signature_request_send_request.py index a6744fa97..806a1def1 100644 --- a/sdks/python/dropbox_sign/models/signature_request_send_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_send_request.py @@ -18,7 +18,15 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictInt, StrictStr +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictBytes, + StrictInt, + StrictStr, +) from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from dropbox_sign.models.sub_attachment import SubAttachment @@ -26,8 +34,12 @@ from dropbox_sign.models.sub_field_options import SubFieldOptions from dropbox_sign.models.sub_form_field_group import SubFormFieldGroup from dropbox_sign.models.sub_form_field_rule import SubFormFieldRule -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase -from dropbox_sign.models.sub_signature_request_grouped_signers import SubSignatureRequestGroupedSigners +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) +from dropbox_sign.models.sub_signature_request_grouped_signers import ( + SubSignatureRequestGroupedSigners, +) from dropbox_sign.models.sub_signature_request_signer import SubSignatureRequestSigner from dropbox_sign.models.sub_signing_options import SubSigningOptions from typing import Optional, Set, Tuple @@ -36,37 +48,136 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestSendRequest(BaseModel): """ SignatureRequestSendRequest - """ # noqa: E501 - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field(default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - file_urls: Optional[List[StrictStr]] = Field(default=None, description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - signers: Optional[List[SubSignatureRequestSigner]] = Field(default=None, description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.") - grouped_signers: Optional[List[SubSignatureRequestGroupedSigners]] = Field(default=None, description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.") - allow_decline: Optional[StrictBool] = Field(default=False, description="Allows signers to decline to sign a document if `true`. Defaults to `false`.") - allow_reassign: Optional[StrictBool] = Field(default=False, description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.") - attachments: Optional[List[SubAttachment]] = Field(default=None, description="A list describing the attachments") - cc_email_addresses: Optional[List[StrictStr]] = Field(default=None, description="The email addresses that should be CCed.") - client_id: Optional[StrictStr] = Field(default=None, description="The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.") - custom_fields: Optional[List[SubCustomField]] = Field(default=None, description="When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.") + """ # noqa: E501 + + files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + signers: Optional[List[SubSignatureRequestSigner]] = Field( + default=None, + description="Add Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.", + ) + grouped_signers: Optional[List[SubSignatureRequestGroupedSigners]] = Field( + default=None, + description="Add Grouped Signers to your Signature Request. This endpoint requires either **signers** or **grouped_signers**, but not both.", + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + allow_reassign: Optional[StrictBool] = Field( + default=False, + description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.", + ) + attachments: Optional[List[SubAttachment]] = Field( + default=None, description="A list describing the attachments" + ) + cc_email_addresses: Optional[List[StrictStr]] = Field( + default=None, description="The email addresses that should be CCed." + ) + client_id: Optional[StrictStr] = Field( + default=None, + description="The client id of the API App you want to associate with this request. Used to apply the branding and callback url defined for the app.", + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description='When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.', + ) field_options: Optional[SubFieldOptions] = None - form_field_groups: Optional[List[SubFormFieldGroup]] = Field(default=None, description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.") - form_field_rules: Optional[List[SubFormFieldRule]] = Field(default=None, description="Conditional Logic rules for fields defined in `form_fields_per_document`.") - form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field(default=None, description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`") - hide_text_tags: Optional[StrictBool] = Field(default=False, description="Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information.") - is_qualified_signature: Optional[StrictBool] = Field(default=False, description="Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer.") - is_eid: Optional[StrictBool] = Field(default=False, description="Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The custom message in the email that will be sent to the signers.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.") + form_field_groups: Optional[List[SubFormFieldGroup]] = Field( + default=None, + description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.", + ) + form_field_rules: Optional[List[SubFormFieldRule]] = Field( + default=None, + description="Conditional Logic rules for fields defined in `form_fields_per_document`.", + ) + form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field( + default=None, + description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`", + ) + hide_text_tags: Optional[StrictBool] = Field( + default=False, + description="Enables automatic Text Tag removal when set to true. **NOTE:** Removing text tags this way can cause unwanted clipping. We recommend leaving this setting on `false` and instead hiding your text tags using white text or a similar approach. See the [Text Tags Walkthrough](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) for more information.", + ) + is_qualified_signature: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer.", + ) + is_eid: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) signing_options: Optional[SubSigningOptions] = None - signing_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully sign.") - subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The subject in the email that will be sent to the signers.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.") - title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The title you want to assign to the SignatureRequest.") - use_text_tags: Optional[StrictBool] = Field(default=False, description="Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.") - expires_at: Optional[StrictInt] = Field(default=None, description="When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.") - __properties: ClassVar[List[str]] = ["files", "file_urls", "signers", "grouped_signers", "allow_decline", "allow_reassign", "attachments", "cc_email_addresses", "client_id", "custom_fields", "field_options", "form_field_groups", "form_field_rules", "form_fields_per_document", "hide_text_tags", "is_qualified_signature", "is_eid", "message", "metadata", "signing_options", "signing_redirect_url", "subject", "test_mode", "title", "use_text_tags", "expires_at"] + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully sign.", + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + use_text_tags: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document. Defaults to disabled, or `false`.", + ) + expires_at: Optional[StrictInt] = Field( + default=None, + description="When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.", + ) + __properties: ClassVar[List[str]] = [ + "files", + "file_urls", + "signers", + "grouped_signers", + "allow_decline", + "allow_reassign", + "attachments", + "cc_email_addresses", + "client_id", + "custom_fields", + "field_options", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + "hide_text_tags", + "is_qualified_signature", + "is_eid", + "message", + "metadata", + "signing_options", + "signing_redirect_url", + "subject", + "test_mode", + "title", + "use_text_tags", + "expires_at", + ] model_config = ConfigDict( populate_by_name=True, @@ -75,7 +186,6 @@ class SignatureRequestSendRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -85,7 +195,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -123,55 +235,55 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_signers in self.signers: if _item_signers: _items.append(_item_signers.to_dict()) - _dict['signers'] = _items + _dict["signers"] = _items # override the default output from pydantic by calling `to_dict()` of each item in grouped_signers (list) _items = [] if self.grouped_signers: for _item_grouped_signers in self.grouped_signers: if _item_grouped_signers: _items.append(_item_grouped_signers.to_dict()) - _dict['grouped_signers'] = _items + _dict["grouped_signers"] = _items # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: for _item_attachments in self.attachments: if _item_attachments: _items.append(_item_attachments.to_dict()) - _dict['attachments'] = _items + _dict["attachments"] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) _items = [] if self.custom_fields: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of field_options if self.field_options: - _dict['field_options'] = self.field_options.to_dict() + _dict["field_options"] = self.field_options.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in form_field_groups (list) _items = [] if self.form_field_groups: for _item_form_field_groups in self.form_field_groups: if _item_form_field_groups: _items.append(_item_form_field_groups.to_dict()) - _dict['form_field_groups'] = _items + _dict["form_field_groups"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_field_rules (list) _items = [] if self.form_field_rules: for _item_form_field_rules in self.form_field_rules: if _item_form_field_rules: _items.append(_item_form_field_rules.to_dict()) - _dict['form_field_rules'] = _items + _dict["form_field_rules"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_fields_per_document (list) _items = [] if self.form_fields_per_document: for _item_form_fields_per_document in self.form_fields_per_document: if _item_form_fields_per_document: _items.append(_item_form_fields_per_document.to_dict()) - _dict['form_fields_per_document'] = _items + _dict["form_fields_per_document"] = _items # override the default output from pydantic by calling `to_dict()` of signing_options if self.signing_options: - _dict['signing_options'] = self.signing_options.to_dict() + _dict["signing_options"] = self.signing_options.to_dict() return _dict @classmethod @@ -183,34 +295,109 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "files": obj.get("files"), - "file_urls": obj.get("file_urls"), - "signers": [SubSignatureRequestSigner.from_dict(_item) for _item in obj["signers"]] if obj.get("signers") is not None else None, - "grouped_signers": [SubSignatureRequestGroupedSigners.from_dict(_item) for _item in obj["grouped_signers"]] if obj.get("grouped_signers") is not None else None, - "allow_decline": obj.get("allow_decline") if obj.get("allow_decline") is not None else False, - "allow_reassign": obj.get("allow_reassign") if obj.get("allow_reassign") is not None else False, - "attachments": [SubAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, - "cc_email_addresses": obj.get("cc_email_addresses"), - "client_id": obj.get("client_id"), - "custom_fields": [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "field_options": SubFieldOptions.from_dict(obj["field_options"]) if obj.get("field_options") is not None else None, - "form_field_groups": [SubFormFieldGroup.from_dict(_item) for _item in obj["form_field_groups"]] if obj.get("form_field_groups") is not None else None, - "form_field_rules": [SubFormFieldRule.from_dict(_item) for _item in obj["form_field_rules"]] if obj.get("form_field_rules") is not None else None, - "form_fields_per_document": [SubFormFieldsPerDocumentBase.from_dict(_item) for _item in obj["form_fields_per_document"]] if obj.get("form_fields_per_document") is not None else None, - "hide_text_tags": obj.get("hide_text_tags") if obj.get("hide_text_tags") is not None else False, - "is_qualified_signature": obj.get("is_qualified_signature") if obj.get("is_qualified_signature") is not None else False, - "is_eid": obj.get("is_eid") if obj.get("is_eid") is not None else False, - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "signing_options": SubSigningOptions.from_dict(obj["signing_options"]) if obj.get("signing_options") is not None else None, - "signing_redirect_url": obj.get("signing_redirect_url"), - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "title": obj.get("title"), - "use_text_tags": obj.get("use_text_tags") if obj.get("use_text_tags") is not None else False, - "expires_at": obj.get("expires_at") - }) + _obj = cls.model_validate( + { + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "signers": ( + [ + SubSignatureRequestSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "grouped_signers": ( + [ + SubSignatureRequestGroupedSigners.from_dict(_item) + for _item in obj["grouped_signers"] + ] + if obj.get("grouped_signers") is not None + else None + ), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "allow_reassign": ( + obj.get("allow_reassign") + if obj.get("allow_reassign") is not None + else False + ), + "attachments": ( + [SubAttachment.from_dict(_item) for _item in obj["attachments"]] + if obj.get("attachments") is not None + else None + ), + "cc_email_addresses": obj.get("cc_email_addresses"), + "client_id": obj.get("client_id"), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "field_options": ( + SubFieldOptions.from_dict(obj["field_options"]) + if obj.get("field_options") is not None + else None + ), + "form_field_groups": ( + [ + SubFormFieldGroup.from_dict(_item) + for _item in obj["form_field_groups"] + ] + if obj.get("form_field_groups") is not None + else None + ), + "form_field_rules": ( + [ + SubFormFieldRule.from_dict(_item) + for _item in obj["form_field_rules"] + ] + if obj.get("form_field_rules") is not None + else None + ), + "form_fields_per_document": ( + [ + SubFormFieldsPerDocumentBase.from_dict(_item) + for _item in obj["form_fields_per_document"] + ] + if obj.get("form_fields_per_document") is not None + else None + ), + "hide_text_tags": ( + obj.get("hide_text_tags") + if obj.get("hide_text_tags") is not None + else False + ), + "is_qualified_signature": ( + obj.get("is_qualified_signature") + if obj.get("is_qualified_signature") is not None + else False + ), + "is_eid": obj.get("is_eid") if obj.get("is_eid") is not None else False, + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "signing_options": ( + SubSigningOptions.from_dict(obj["signing_options"]) + if obj.get("signing_options") is not None + else None + ), + "signing_redirect_url": obj.get("signing_redirect_url"), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + "use_text_tags": ( + obj.get("use_text_tags") + if obj.get("use_text_tags") is not None + else False + ), + "expires_at": obj.get("expires_at"), + } + ) return _obj @classmethod @@ -268,4 +455,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "form_field_rules", "form_fields_per_document", ] - diff --git a/sdks/python/dropbox_sign/models/signature_request_send_with_template_request.py b/sdks/python/dropbox_sign/models/signature_request_send_with_template_request.py index 36e806aa0..9c4045a3e 100644 --- a/sdks/python/dropbox_sign/models/signature_request_send_with_template_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_send_with_template_request.py @@ -23,7 +23,9 @@ from typing_extensions import Annotated from dropbox_sign.models.sub_cc import SubCC from dropbox_sign.models.sub_custom_field import SubCustomField -from dropbox_sign.models.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner +from dropbox_sign.models.sub_signature_request_template_signer import ( + SubSignatureRequestTemplateSigner, +) from dropbox_sign.models.sub_signing_options import SubSigningOptions from typing import Optional, Set, Tuple from typing_extensions import Self @@ -31,28 +33,92 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestSendWithTemplateRequest(BaseModel): - """ - - """ # noqa: E501 - template_ids: List[StrictStr] = Field(description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used.") - signers: List[SubSignatureRequestTemplateSigner] = Field(description="Add Signers to your Templated-based Signature Request.") - allow_decline: Optional[StrictBool] = Field(default=False, description="Allows signers to decline to sign a document if `true`. Defaults to `false`.") - ccs: Optional[List[SubCC]] = Field(default=None, description="Add CC email recipients. Required when a CC role exists for the Template.") - client_id: Optional[StrictStr] = Field(default=None, description="Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.") - custom_fields: Optional[List[SubCustomField]] = Field(default=None, description="An array defining values and options for custom fields. Required when a custom field exists in the Template.") - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field(default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - file_urls: Optional[List[StrictStr]] = Field(default=None, description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - is_qualified_signature: Optional[StrictBool] = Field(default=False, description="Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer.") - is_eid: Optional[StrictBool] = Field(default=False, description="Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The custom message in the email that will be sent to the signers.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.") + """ """ # noqa: E501 + + template_ids: List[StrictStr] = Field( + description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the template will be used." + ) + signers: List[SubSignatureRequestTemplateSigner] = Field( + description="Add Signers to your Templated-based Signature Request." + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + ccs: Optional[List[SubCC]] = Field( + default=None, + description="Add CC email recipients. Required when a CC role exists for the Template.", + ) + client_id: Optional[StrictStr] = Field( + default=None, + description="Client id of the app to associate with the signature request. Used to apply the branding and callback url defined for the app.", + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description="An array defining values and options for custom fields. Required when a custom field exists in the Template.", + ) + files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + is_qualified_signature: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable [Qualified Electronic Signatures](https://www.hellosign.com/features/qualified-electronic-signatures) (QES), which requires a face-to-face call to verify the signer's identity.
**NOTE:** QES is only available on the Premium API plan as an add-on purchase. Cannot be used in `test_mode`. Only works on requests with one signer.", + ) + is_eid: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable [electronic identification (eID)](https://www.hellosign.com/features/electronic-id), which requires the signer to verify their identity with an eID provider to sign a document.
**NOTE:** eID is only available on the Premium API plan. Cannot be used in `test_mode`. Only works on requests with one signer.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) signing_options: Optional[SubSigningOptions] = None - signing_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully sign.") - subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The subject in the email that will be sent to the signers.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.") - title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The title you want to assign to the SignatureRequest.") - __properties: ClassVar[List[str]] = ["template_ids", "signers", "allow_decline", "ccs", "client_id", "custom_fields", "files", "file_urls", "is_qualified_signature", "is_eid", "message", "metadata", "signing_options", "signing_redirect_url", "subject", "test_mode", "title"] + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully sign.", + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + __properties: ClassVar[List[str]] = [ + "template_ids", + "signers", + "allow_decline", + "ccs", + "client_id", + "custom_fields", + "files", + "file_urls", + "is_qualified_signature", + "is_eid", + "message", + "metadata", + "signing_options", + "signing_redirect_url", + "subject", + "test_mode", + "title", + ] model_config = ConfigDict( populate_by_name=True, @@ -61,7 +127,6 @@ class SignatureRequestSendWithTemplateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -71,7 +136,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -109,24 +176,24 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_signers in self.signers: if _item_signers: _items.append(_item_signers.to_dict()) - _dict['signers'] = _items + _dict["signers"] = _items # override the default output from pydantic by calling `to_dict()` of each item in ccs (list) _items = [] if self.ccs: for _item_ccs in self.ccs: if _item_ccs: _items.append(_item_ccs.to_dict()) - _dict['ccs'] = _items + _dict["ccs"] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) _items = [] if self.custom_fields: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of signing_options if self.signing_options: - _dict['signing_options'] = self.signing_options.to_dict() + _dict["signing_options"] = self.signing_options.to_dict() return _dict @classmethod @@ -138,25 +205,56 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template_ids": obj.get("template_ids"), - "signers": [SubSignatureRequestTemplateSigner.from_dict(_item) for _item in obj["signers"]] if obj.get("signers") is not None else None, - "allow_decline": obj.get("allow_decline") if obj.get("allow_decline") is not None else False, - "ccs": [SubCC.from_dict(_item) for _item in obj["ccs"]] if obj.get("ccs") is not None else None, - "client_id": obj.get("client_id"), - "custom_fields": [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "files": obj.get("files"), - "file_urls": obj.get("file_urls"), - "is_qualified_signature": obj.get("is_qualified_signature") if obj.get("is_qualified_signature") is not None else False, - "is_eid": obj.get("is_eid") if obj.get("is_eid") is not None else False, - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "signing_options": SubSigningOptions.from_dict(obj["signing_options"]) if obj.get("signing_options") is not None else None, - "signing_redirect_url": obj.get("signing_redirect_url"), - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "title": obj.get("title") - }) + _obj = cls.model_validate( + { + "template_ids": obj.get("template_ids"), + "signers": ( + [ + SubSignatureRequestTemplateSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "ccs": ( + [SubCC.from_dict(_item) for _item in obj["ccs"]] + if obj.get("ccs") is not None + else None + ), + "client_id": obj.get("client_id"), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "is_qualified_signature": ( + obj.get("is_qualified_signature") + if obj.get("is_qualified_signature") is not None + else False + ), + "is_eid": obj.get("is_eid") if obj.get("is_eid") is not None else False, + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "signing_options": ( + SubSigningOptions.from_dict(obj["signing_options"]) + if obj.get("signing_options") is not None + else None + ), + "signing_redirect_url": obj.get("signing_redirect_url"), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + } + ) return _obj @classmethod @@ -201,4 +299,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "files", "file_urls", ] - diff --git a/sdks/python/dropbox_sign/models/signature_request_update_request.py b/sdks/python/dropbox_sign/models/signature_request_update_request.py index 0f9b554b7..37c4e18b2 100644 --- a/sdks/python/dropbox_sign/models/signature_request_update_request.py +++ b/sdks/python/dropbox_sign/models/signature_request_update_request.py @@ -26,15 +26,31 @@ from pydantic import StrictBool from typing import Union + class SignatureRequestUpdateRequest(BaseModel): """ SignatureRequestUpdateRequest - """ # noqa: E501 + """ # noqa: E501 + signature_id: StrictStr = Field(description="The signature ID for the recipient.") - email_address: Optional[StrictStr] = Field(default=None, description="The new email address for the recipient. This will generate a new `signature_id` value. **NOTE:** Optional if `name` is provided.") - name: Optional[StrictStr] = Field(default=None, description="The new name for the recipient. **NOTE:** Optional if `email_address` is provided.") - expires_at: Optional[StrictInt] = Field(default=None, description="The new time when the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.") - __properties: ClassVar[List[str]] = ["signature_id", "email_address", "name", "expires_at"] + email_address: Optional[StrictStr] = Field( + default=None, + description="The new email address for the recipient. This will generate a new `signature_id` value. **NOTE:** Optional if `name` is provided.", + ) + name: Optional[StrictStr] = Field( + default=None, + description="The new name for the recipient. **NOTE:** Optional if `email_address` is provided.", + ) + expires_at: Optional[StrictInt] = Field( + default=None, + description="The new time when the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details.", + ) + __properties: ClassVar[List[str]] = [ + "signature_id", + "email_address", + "name", + "expires_at", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +59,6 @@ class SignatureRequestUpdateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +68,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,12 +113,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "signature_id": obj.get("signature_id"), - "email_address": obj.get("email_address"), - "name": obj.get("name"), - "expires_at": obj.get("expires_at") - }) + _obj = cls.model_validate( + { + "signature_id": obj.get("signature_id"), + "email_address": obj.get("email_address"), + "name": obj.get("name"), + "expires_at": obj.get("expires_at"), + } + ) return _obj @classmethod @@ -125,6 +144,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_attachment.py b/sdks/python/dropbox_sign/models/sub_attachment.py index 200c6a5ab..a0c288d3a 100644 --- a/sdks/python/dropbox_sign/models/sub_attachment.py +++ b/sdks/python/dropbox_sign/models/sub_attachment.py @@ -26,15 +26,28 @@ from pydantic import StrictBool from typing import Union + class SubAttachment(BaseModel): """ SubAttachment - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="The name of attachment.") - signer_index: StrictInt = Field(description="The signer's index in the `signers` parameter (0-based indexing). **NOTE:** Only one signer can be assigned per attachment.") - instructions: Optional[StrictStr] = Field(default=None, description="The instructions for uploading the attachment.") - required: Optional[StrictBool] = Field(default=False, description="Determines if the attachment must be uploaded.") - __properties: ClassVar[List[str]] = ["name", "signer_index", "instructions", "required"] + signer_index: StrictInt = Field( + description="The signer's index in the `signers` parameter (0-based indexing). **NOTE:** Only one signer can be assigned per attachment." + ) + instructions: Optional[StrictStr] = Field( + default=None, description="The instructions for uploading the attachment." + ) + required: Optional[StrictBool] = Field( + default=False, description="Determines if the attachment must be uploaded." + ) + __properties: ClassVar[List[str]] = [ + "name", + "signer_index", + "instructions", + "required", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +56,6 @@ class SubAttachment(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +65,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,12 +110,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "signer_index": obj.get("signer_index"), - "instructions": obj.get("instructions"), - "required": obj.get("required") if obj.get("required") is not None else False - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "signer_index": obj.get("signer_index"), + "instructions": obj.get("instructions"), + "required": ( + obj.get("required") if obj.get("required") is not None else False + ), + } + ) return _obj @classmethod @@ -125,6 +143,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py index 06991dbe2..d5d8edb45 100644 --- a/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py +++ b/sdks/python/dropbox_sign/models/sub_bulk_signer_list.py @@ -20,20 +20,31 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.sub_bulk_signer_list_custom_field import SubBulkSignerListCustomField -from dropbox_sign.models.sub_signature_request_template_signer import SubSignatureRequestTemplateSigner +from dropbox_sign.models.sub_bulk_signer_list_custom_field import ( + SubBulkSignerListCustomField, +) +from dropbox_sign.models.sub_signature_request_template_signer import ( + SubSignatureRequestTemplateSigner, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SubBulkSignerList(BaseModel): """ SubBulkSignerList - """ # noqa: E501 - custom_fields: Optional[List[SubBulkSignerListCustomField]] = Field(default=None, description="An array of custom field values.") - signers: Optional[List[SubSignatureRequestTemplateSigner]] = Field(default=None, description="Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document. Currently only templates with a single role are supported. All signers must have the same `role` value.") + """ # noqa: E501 + + custom_fields: Optional[List[SubBulkSignerListCustomField]] = Field( + default=None, description="An array of custom field values." + ) + signers: Optional[List[SubSignatureRequestTemplateSigner]] = Field( + default=None, + description="Add Signers to your Templated-based Signature Request. Allows the requester to specify editor options when a preparing a document. Currently only templates with a single role are supported. All signers must have the same `role` value.", + ) __properties: ClassVar[List[str]] = ["custom_fields", "signers"] model_config = ConfigDict( @@ -43,7 +54,6 @@ class SubBulkSignerList(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +63,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -91,14 +103,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of each item in signers (list) _items = [] if self.signers: for _item_signers in self.signers: if _item_signers: _items.append(_item_signers.to_dict()) - _dict['signers'] = _items + _dict["signers"] = _items return _dict @classmethod @@ -110,10 +122,26 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "custom_fields": [SubBulkSignerListCustomField.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "signers": [SubSignatureRequestTemplateSigner.from_dict(_item) for _item in obj["signers"]] if obj.get("signers") is not None else None - }) + _obj = cls.model_validate( + { + "custom_fields": ( + [ + SubBulkSignerListCustomField.from_dict(_item) + for _item in obj["custom_fields"] + ] + if obj.get("custom_fields") is not None + else None + ), + "signers": ( + [ + SubSignatureRequestTemplateSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + } + ) return _obj @classmethod @@ -139,4 +167,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "custom_fields", "signers", ] - diff --git a/sdks/python/dropbox_sign/models/sub_bulk_signer_list_custom_field.py b/sdks/python/dropbox_sign/models/sub_bulk_signer_list_custom_field.py index 2a171a16e..dbd925d79 100644 --- a/sdks/python/dropbox_sign/models/sub_bulk_signer_list_custom_field.py +++ b/sdks/python/dropbox_sign/models/sub_bulk_signer_list_custom_field.py @@ -26,11 +26,15 @@ from pydantic import StrictBool from typing import Union + class SubBulkSignerListCustomField(BaseModel): """ SubBulkSignerListCustomField - """ # noqa: E501 - name: StrictStr = Field(description="The name of the custom field. Must be the field's `name` or `api_id`.") + """ # noqa: E501 + + name: StrictStr = Field( + description="The name of the custom field. Must be the field's `name` or `api_id`." + ) value: StrictStr = Field(description="The value of the custom field.") __properties: ClassVar[List[str]] = ["name", "value"] @@ -41,7 +45,6 @@ class SubBulkSignerListCustomField(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +54,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "value": obj.get("value") - }) + _obj = cls.model_validate({"name": obj.get("name"), "value": obj.get("value")}) return _obj @classmethod @@ -119,6 +121,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_cc.py b/sdks/python/dropbox_sign/models/sub_cc.py index 840897e19..a0aa82906 100644 --- a/sdks/python/dropbox_sign/models/sub_cc.py +++ b/sdks/python/dropbox_sign/models/sub_cc.py @@ -26,12 +26,18 @@ from pydantic import StrictBool from typing import Union + class SubCC(BaseModel): """ SubCC - """ # noqa: E501 - role: StrictStr = Field(description="Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role.") - email_address: StrictStr = Field(description="The email address of the CC recipient.") + """ # noqa: E501 + + role: StrictStr = Field( + description="Must match an existing CC role in chosen Template(s). Multiple CC recipients cannot share the same CC role." + ) + email_address: StrictStr = Field( + description="The email address of the CC recipient." + ) __properties: ClassVar[List[str]] = ["role", "email_address"] model_config = ConfigDict( @@ -41,7 +47,6 @@ class SubCC(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +101,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "role": obj.get("role"), - "email_address": obj.get("email_address") - }) + _obj = cls.model_validate( + {"role": obj.get("role"), "email_address": obj.get("email_address")} + ) return _obj @classmethod @@ -119,6 +125,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_custom_field.py b/sdks/python/dropbox_sign/models/sub_custom_field.py index ac22b9896..aa837bcdc 100644 --- a/sdks/python/dropbox_sign/models/sub_custom_field.py +++ b/sdks/python/dropbox_sign/models/sub_custom_field.py @@ -26,14 +26,27 @@ from pydantic import StrictBool from typing import Union + class SubCustomField(BaseModel): """ When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template. - """ # noqa: E501 - name: StrictStr = Field(description="The name of a custom field. When working with pre-filled data, the custom field's name must have a matching merge field name or the field will remain empty on the document during signing.") - editor: Optional[StrictStr] = Field(default=None, description="Used to create editable merge fields. When the value matches a role passed in with `signers`, that role can edit the data that was pre-filled to that field. This field is optional, but required when this custom field object is set to `required = true`. **NOTE:** Editable merge fields are only supported for single signer requests (or the first signer in ordered signature requests). If used when there are multiple signers in an unordered signature request, the editor value is ignored and the field won't be editable.") - required: Optional[StrictBool] = Field(default=False, description="Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`.") - value: Optional[StrictStr] = Field(default=None, description="The string that resolves (aka \"pre-fills\") to the merge field on the final document(s) used for signing.") + """ # noqa: E501 + + name: StrictStr = Field( + description="The name of a custom field. When working with pre-filled data, the custom field's name must have a matching merge field name or the field will remain empty on the document during signing." + ) + editor: Optional[StrictStr] = Field( + default=None, + description="Used to create editable merge fields. When the value matches a role passed in with `signers`, that role can edit the data that was pre-filled to that field. This field is optional, but required when this custom field object is set to `required = true`. **NOTE:** Editable merge fields are only supported for single signer requests (or the first signer in ordered signature requests). If used when there are multiple signers in an unordered signature request, the editor value is ignored and the field won't be editable.", + ) + required: Optional[StrictBool] = Field( + default=False, + description="Used to set an editable merge field when working with pre-filled data. When `true`, the custom field must specify a signer role in `editor`.", + ) + value: Optional[StrictStr] = Field( + default=None, + description='The string that resolves (aka "pre-fills") to the merge field on the final document(s) used for signing.', + ) __properties: ClassVar[List[str]] = ["name", "editor", "required", "value"] model_config = ConfigDict( @@ -43,7 +56,6 @@ class SubCustomField(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +65,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,12 +110,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "editor": obj.get("editor"), - "required": obj.get("required") if obj.get("required") is not None else False, - "value": obj.get("value") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "editor": obj.get("editor"), + "required": ( + obj.get("required") if obj.get("required") is not None else False + ), + "value": obj.get("value"), + } + ) return _obj @classmethod @@ -125,6 +143,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_editor_options.py b/sdks/python/dropbox_sign/models/sub_editor_options.py index fbe6ecb95..7e4315cbe 100644 --- a/sdks/python/dropbox_sign/models/sub_editor_options.py +++ b/sdks/python/dropbox_sign/models/sub_editor_options.py @@ -26,12 +26,19 @@ from pydantic import StrictBool from typing import Union + class SubEditorOptions(BaseModel): """ This allows the requester to specify editor options when a preparing a document - """ # noqa: E501 - allow_edit_signers: Optional[StrictBool] = Field(default=False, description="Allows requesters to edit the list of signers") - allow_edit_documents: Optional[StrictBool] = Field(default=False, description="Allows requesters to edit documents, including delete and add") + """ # noqa: E501 + + allow_edit_signers: Optional[StrictBool] = Field( + default=False, description="Allows requesters to edit the list of signers" + ) + allow_edit_documents: Optional[StrictBool] = Field( + default=False, + description="Allows requesters to edit documents, including delete and add", + ) __properties: ClassVar[List[str]] = ["allow_edit_signers", "allow_edit_documents"] model_config = ConfigDict( @@ -41,7 +48,6 @@ class SubEditorOptions(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +57,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +102,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "allow_edit_signers": obj.get("allow_edit_signers") if obj.get("allow_edit_signers") is not None else False, - "allow_edit_documents": obj.get("allow_edit_documents") if obj.get("allow_edit_documents") is not None else False - }) + _obj = cls.model_validate( + { + "allow_edit_signers": ( + obj.get("allow_edit_signers") + if obj.get("allow_edit_signers") is not None + else False + ), + "allow_edit_documents": ( + obj.get("allow_edit_documents") + if obj.get("allow_edit_documents") is not None + else False + ), + } + ) return _obj @classmethod @@ -119,6 +137,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_field_options.py b/sdks/python/dropbox_sign/models/sub_field_options.py index 15413583c..bd4ca3aa1 100644 --- a/sdks/python/dropbox_sign/models/sub_field_options.py +++ b/sdks/python/dropbox_sign/models/sub_field_options.py @@ -26,18 +26,33 @@ from pydantic import StrictBool from typing import Union + class SubFieldOptions(BaseModel): """ This allows the requester to specify field options for a signature request. - """ # noqa: E501 - date_format: StrictStr = Field(description="Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats)) **NOTE:** Only available for Premium and higher.") + """ # noqa: E501 + + date_format: StrictStr = Field( + description="Allows requester to specify the date format (see list of allowed [formats](/api/reference/constants/#date-formats)) **NOTE:** Only available for Premium and higher." + ) __properties: ClassVar[List[str]] = ["date_format"] - @field_validator('date_format') + @field_validator("date_format") def date_format_validate_enum(cls, value): """Validates the enum""" - if value not in set(['MM / DD / YYYY', 'MM - DD - YYYY', 'DD / MM / YYYY', 'DD - MM - YYYY', 'YYYY / MM / DD', 'YYYY - MM - DD']): - raise ValueError("must be one of enum values ('MM / DD / YYYY', 'MM - DD - YYYY', 'DD / MM / YYYY', 'DD - MM - YYYY', 'YYYY / MM / DD', 'YYYY - MM - DD')") + if value not in set( + [ + "MM / DD / YYYY", + "MM - DD - YYYY", + "DD / MM / YYYY", + "DD - MM - YYYY", + "YYYY / MM / DD", + "YYYY - MM - DD", + ] + ): + raise ValueError( + "must be one of enum values ('MM / DD / YYYY', 'MM - DD - YYYY', 'DD / MM / YYYY', 'DD - MM - YYYY', 'YYYY / MM / DD', 'YYYY - MM - DD')" + ) return value model_config = ConfigDict( @@ -47,7 +62,6 @@ def date_format_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -57,7 +71,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -100,9 +116,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "date_format": obj.get("date_format") - }) + _obj = cls.model_validate({"date_format": obj.get("date_format")}) return _obj @classmethod @@ -123,6 +137,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_field_group.py b/sdks/python/dropbox_sign/models/sub_form_field_group.py index ee3dcb964..9a9964b90 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_group.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_group.py @@ -26,13 +26,19 @@ from pydantic import StrictBool from typing import Union + class SubFormFieldGroup(BaseModel): """ SubFormFieldGroup - """ # noqa: E501 - group_id: StrictStr = Field(description="ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`.") + """ # noqa: E501 + + group_id: StrictStr = Field( + description="ID of group. Use this to reference a specific group from the `group` value in `form_fields_per_document`." + ) group_label: StrictStr = Field(description="Name of the group") - requirement: StrictStr = Field(description="Examples: `require_0-1` `require_1` `require_1-ormore` - Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group.") + requirement: StrictStr = Field( + description="Examples: `require_0-1` `require_1` `require_1-ormore` - Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group." + ) __properties: ClassVar[List[str]] = ["group_id", "group_label", "requirement"] model_config = ConfigDict( @@ -42,7 +48,6 @@ class SubFormFieldGroup(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +57,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,11 +102,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "group_id": obj.get("group_id"), - "group_label": obj.get("group_label"), - "requirement": obj.get("requirement") - }) + _obj = cls.model_validate( + { + "group_id": obj.get("group_id"), + "group_label": obj.get("group_label"), + "requirement": obj.get("requirement"), + } + ) return _obj @classmethod @@ -122,6 +131,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_field_rule.py b/sdks/python/dropbox_sign/models/sub_form_field_rule.py index bd2680277..345122638 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_rule.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule.py @@ -29,15 +29,30 @@ from pydantic import StrictBool from typing import Union + class SubFormFieldRule(BaseModel): """ SubFormFieldRule - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr = Field(description="Must be unique across all defined rules.") - trigger_operator: StrictStr = Field(description="Currently only `AND` is supported. Support for `OR` is being worked on.") - triggers: Annotated[List[SubFormFieldRuleTrigger], Field(min_length=1, max_length=1)] = Field(description="An array of trigger definitions, the \"if this\" part of \"**if this**, then that\". Currently only a single trigger per rule is allowed.") - actions: Annotated[List[SubFormFieldRuleAction], Field(min_length=1)] = Field(description="An array of action definitions, the \"then that\" part of \"if this, **then that**\". Any number of actions may be attached to a single rule.") - __properties: ClassVar[List[str]] = ["id", "trigger_operator", "triggers", "actions"] + trigger_operator: StrictStr = Field( + description="Currently only `AND` is supported. Support for `OR` is being worked on." + ) + triggers: Annotated[ + List[SubFormFieldRuleTrigger], Field(min_length=1, max_length=1) + ] = Field( + description='An array of trigger definitions, the "if this" part of "**if this**, then that". Currently only a single trigger per rule is allowed.' + ) + actions: Annotated[List[SubFormFieldRuleAction], Field(min_length=1)] = Field( + description='An array of action definitions, the "then that" part of "if this, **then that**". Any number of actions may be attached to a single rule.' + ) + __properties: ClassVar[List[str]] = [ + "id", + "trigger_operator", + "triggers", + "actions", + ] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +61,6 @@ class SubFormFieldRule(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -56,7 +70,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,14 +110,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_triggers in self.triggers: if _item_triggers: _items.append(_item_triggers.to_dict()) - _dict['triggers'] = _items + _dict["triggers"] = _items # override the default output from pydantic by calling `to_dict()` of each item in actions (list) _items = [] if self.actions: for _item_actions in self.actions: if _item_actions: _items.append(_item_actions.to_dict()) - _dict['actions'] = _items + _dict["actions"] = _items return _dict @classmethod @@ -113,12 +129,32 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "trigger_operator": obj.get("trigger_operator") if obj.get("trigger_operator") is not None else 'AND', - "triggers": [SubFormFieldRuleTrigger.from_dict(_item) for _item in obj["triggers"]] if obj.get("triggers") is not None else None, - "actions": [SubFormFieldRuleAction.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "trigger_operator": ( + obj.get("trigger_operator") + if obj.get("trigger_operator") is not None + else "AND" + ), + "triggers": ( + [ + SubFormFieldRuleTrigger.from_dict(_item) + for _item in obj["triggers"] + ] + if obj.get("triggers") is not None + else None + ), + "actions": ( + [ + SubFormFieldRuleAction.from_dict(_item) + for _item in obj["actions"] + ] + if obj.get("actions") is not None + else None + ), + } + ) return _obj @classmethod @@ -146,4 +182,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "triggers", "actions", ] - diff --git a/sdks/python/dropbox_sign/models/sub_form_field_rule_action.py b/sdks/python/dropbox_sign/models/sub_form_field_rule_action.py index b9deef4e4..2e8eedfae 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_rule_action.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule_action.py @@ -18,7 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set, Tuple from typing_extensions import Self @@ -26,21 +33,33 @@ from pydantic import StrictBool from typing import Union + class SubFormFieldRuleAction(BaseModel): """ SubFormFieldRuleAction - """ # noqa: E501 - hidden: StrictBool = Field(description="`true` to hide the target field when rule is satisfied, otherwise `false`.") + """ # noqa: E501 + + hidden: StrictBool = Field( + description="`true` to hide the target field when rule is satisfied, otherwise `false`." + ) type: StrictStr - field_id: Optional[StrictStr] = Field(default=None, description="**field_id** or **group_id** is required, but not both. Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Cannot use with `group_id`. Trigger and action fields must belong to the same signer.") - group_id: Optional[StrictStr] = Field(default=None, description="**group_id** or **field_id** is required, but not both. Must reference the ID of an existing group defined within `form_field_groups`. Cannot use with `field_id`. Trigger and action fields and groups must belong to the same signer.") + field_id: Optional[StrictStr] = Field( + default=None, + description="**field_id** or **group_id** is required, but not both. Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Cannot use with `group_id`. Trigger and action fields must belong to the same signer.", + ) + group_id: Optional[StrictStr] = Field( + default=None, + description="**group_id** or **field_id** is required, but not both. Must reference the ID of an existing group defined within `form_field_groups`. Cannot use with `field_id`. Trigger and action fields and groups must belong to the same signer.", + ) __properties: ClassVar[List[str]] = ["hidden", "type", "field_id", "group_id"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['change-field-visibility', 'change-group-visibility']): - raise ValueError("must be one of enum values ('change-field-visibility', 'change-group-visibility')") + if value not in set(["change-field-visibility", "change-group-visibility"]): + raise ValueError( + "must be one of enum values ('change-field-visibility', 'change-group-visibility')" + ) return value model_config = ConfigDict( @@ -50,7 +69,6 @@ def type_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +78,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -103,12 +123,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "hidden": obj.get("hidden"), - "type": obj.get("type"), - "field_id": obj.get("field_id"), - "group_id": obj.get("group_id") - }) + _obj = cls.model_validate( + { + "hidden": obj.get("hidden"), + "type": obj.get("type"), + "field_id": obj.get("field_id"), + "group_id": obj.get("group_id"), + } + ) return _obj @classmethod @@ -132,6 +154,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_field_rule_trigger.py b/sdks/python/dropbox_sign/models/sub_form_field_rule_trigger.py index 888fc01f5..124a9212c 100644 --- a/sdks/python/dropbox_sign/models/sub_form_field_rule_trigger.py +++ b/sdks/python/dropbox_sign/models/sub_form_field_rule_trigger.py @@ -26,21 +26,35 @@ from pydantic import StrictBool from typing import Union + class SubFormFieldRuleTrigger(BaseModel): """ SubFormFieldRuleTrigger - """ # noqa: E501 - id: StrictStr = Field(description="Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Trigger and action fields and groups must belong to the same signer.") - operator: StrictStr = Field(description="Different field types allow different `operator` values: - Field type of **text**: - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - **any**: exact match, array of values. - **none**: not exact match, array of values. - Field type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact match, single value") - value: Optional[StrictStr] = Field(default=None, description="**value** or **values** is required, but not both. The value to match against **operator**. - When **operator** is one of the following, **value** must be `String`: - `is` - `not` - `match` Otherwise, - **checkbox**: When **type** of trigger is **checkbox**, **value** must be `0` or `1` - **radio**: When **type** of trigger is **radio**, **value** must be `1`") - values: Optional[List[StrictStr]] = Field(default=None, description="**values** or **value** is required, but not both. The values to match against **operator** when it is one of the following: - `any` - `none`") + """ # noqa: E501 + + id: StrictStr = Field( + description="Must reference the `api_id` of an existing field defined within `form_fields_per_document`. Trigger and action fields and groups must belong to the same signer." + ) + operator: StrictStr = Field( + description="Different field types allow different `operator` values: - Field type of **text**: - **is**: exact match - **not**: not exact match - **match**: regular expression, without /. Example: - OK `[a-zA-Z0-9]` - Not OK `/[a-zA-Z0-9]/` - Field type of **dropdown**: - **is**: exact match, single value - **not**: not exact match, single value - **any**: exact match, array of values. - **none**: not exact match, array of values. - Field type of **checkbox**: - **is**: exact match, single value - **not**: not exact match, single value - Field type of **radio**: - **is**: exact match, single value - **not**: not exact match, single value" + ) + value: Optional[StrictStr] = Field( + default=None, + description="**value** or **values** is required, but not both. The value to match against **operator**. - When **operator** is one of the following, **value** must be `String`: - `is` - `not` - `match` Otherwise, - **checkbox**: When **type** of trigger is **checkbox**, **value** must be `0` or `1` - **radio**: When **type** of trigger is **radio**, **value** must be `1`", + ) + values: Optional[List[StrictStr]] = Field( + default=None, + description="**values** or **value** is required, but not both. The values to match against **operator** when it is one of the following: - `any` - `none`", + ) __properties: ClassVar[List[str]] = ["id", "operator", "value", "values"] - @field_validator('operator') + @field_validator("operator") def operator_validate_enum(cls, value): """Validates the enum""" - if value not in set(['any', 'is', 'match', 'none', 'not']): - raise ValueError("must be one of enum values ('any', 'is', 'match', 'none', 'not')") + if value not in set(["any", "is", "match", "none", "not"]): + raise ValueError( + "must be one of enum values ('any', 'is', 'match', 'none', 'not')" + ) return value model_config = ConfigDict( @@ -50,7 +64,6 @@ def operator_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -60,7 +73,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -103,12 +118,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "id": obj.get("id"), - "operator": obj.get("operator"), - "value": obj.get("value"), - "values": obj.get("values") - }) + _obj = cls.model_validate( + { + "id": obj.get("id"), + "operator": obj.get("operator"), + "value": obj.get("value"), + "values": obj.get("values"), + } + ) return _obj @classmethod @@ -135,4 +152,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "values", ] - diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_base.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_base.py index 3209cd0a4..0f05fbeee 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_base.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_base.py @@ -28,34 +28,80 @@ from typing import Union from typing import TYPE_CHECKING + if TYPE_CHECKING: - from dropbox_sign.models.sub_form_fields_per_document_checkbox import SubFormFieldsPerDocumentCheckbox - from dropbox_sign.models.sub_form_fields_per_document_checkbox_merge import SubFormFieldsPerDocumentCheckboxMerge - from dropbox_sign.models.sub_form_fields_per_document_date_signed import SubFormFieldsPerDocumentDateSigned - from dropbox_sign.models.sub_form_fields_per_document_dropdown import SubFormFieldsPerDocumentDropdown - from dropbox_sign.models.sub_form_fields_per_document_hyperlink import SubFormFieldsPerDocumentHyperlink - from dropbox_sign.models.sub_form_fields_per_document_initials import SubFormFieldsPerDocumentInitials - from dropbox_sign.models.sub_form_fields_per_document_radio import SubFormFieldsPerDocumentRadio - from dropbox_sign.models.sub_form_fields_per_document_signature import SubFormFieldsPerDocumentSignature - from dropbox_sign.models.sub_form_fields_per_document_text import SubFormFieldsPerDocumentText - from dropbox_sign.models.sub_form_fields_per_document_text_merge import SubFormFieldsPerDocumentTextMerge + from dropbox_sign.models.sub_form_fields_per_document_checkbox import ( + SubFormFieldsPerDocumentCheckbox, + ) + from dropbox_sign.models.sub_form_fields_per_document_checkbox_merge import ( + SubFormFieldsPerDocumentCheckboxMerge, + ) + from dropbox_sign.models.sub_form_fields_per_document_date_signed import ( + SubFormFieldsPerDocumentDateSigned, + ) + from dropbox_sign.models.sub_form_fields_per_document_dropdown import ( + SubFormFieldsPerDocumentDropdown, + ) + from dropbox_sign.models.sub_form_fields_per_document_hyperlink import ( + SubFormFieldsPerDocumentHyperlink, + ) + from dropbox_sign.models.sub_form_fields_per_document_initials import ( + SubFormFieldsPerDocumentInitials, + ) + from dropbox_sign.models.sub_form_fields_per_document_radio import ( + SubFormFieldsPerDocumentRadio, + ) + from dropbox_sign.models.sub_form_fields_per_document_signature import ( + SubFormFieldsPerDocumentSignature, + ) + from dropbox_sign.models.sub_form_fields_per_document_text import ( + SubFormFieldsPerDocumentText, + ) + from dropbox_sign.models.sub_form_fields_per_document_text_merge import ( + SubFormFieldsPerDocumentTextMerge, + ) + class SubFormFieldsPerDocumentBase(BaseModel): """ The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge` - """ # noqa: E501 - document_index: StrictInt = Field(description="Represents the integer index of the `file` or `file_url` document the field should be attached to.") - api_id: StrictStr = Field(description="An identifier for the field that is unique across all documents in the request.") + """ # noqa: E501 + + document_index: StrictInt = Field( + description="Represents the integer index of the `file` or `file_url` document the field should be attached to." + ) + api_id: StrictStr = Field( + description="An identifier for the field that is unique across all documents in the request." + ) height: StrictInt = Field(description="Size of the field in pixels.") required: StrictBool = Field(description="Whether this field is required.") - signer: Union[StrictStr, StrictInt] = Field(description="Signer index identified by the offset in the signers parameter (0-based indexing), indicating which signer should fill out the field. **NOTE:** To set the value of the field as the preparer you must set this to `me_now` **NOTE:** If type is `text-merge` or `checkbox-merge`, you must set this to sender in order to use pre-filled data.") + signer: Union[StrictStr, StrictInt] = Field( + description="Signer index identified by the offset in the signers parameter (0-based indexing), indicating which signer should fill out the field. **NOTE:** To set the value of the field as the preparer you must set this to `me_now` **NOTE:** If type is `text-merge` or `checkbox-merge`, you must set this to sender in order to use pre-filled data." + ) type: StrictStr width: StrictInt = Field(description="Size of the field in pixels.") x: StrictInt = Field(description="Location coordinates of the field in pixels.") y: StrictInt = Field(description="Location coordinates of the field in pixels.") - name: Optional[StrictStr] = Field(default=None, description="Display name for the field.") - page: Optional[StrictInt] = Field(default=None, description="Page in the document where the field should be placed (requires documents be PDF files). - When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them.") - __properties: ClassVar[List[str]] = ["document_index", "api_id", "height", "required", "signer", "type", "width", "x", "y", "name", "page"] + name: Optional[StrictStr] = Field( + default=None, description="Display name for the field." + ) + page: Optional[StrictInt] = Field( + default=None, + description="Page in the document where the field should be placed (requires documents be PDF files). - When the page number parameter is supplied, the API will use the new coordinate system. - Check out the differences between both [coordinate systems](https://faq.hellosign.com/hc/en-us/articles/217115577) and how to use them.", + ) + __properties: ClassVar[List[str]] = [ + "document_index", + "api_id", + "height", + "required", + "signer", + "type", + "width", + "x", + "y", + "name", + "page", + ] model_config = ConfigDict( populate_by_name=True, @@ -64,13 +110,21 @@ class SubFormFieldsPerDocumentBase(BaseModel): arbitrary_types_allowed=True, ) - # JSON field name that stores the object type - __discriminator_property_name: ClassVar[str] = 'type' + __discriminator_property_name: ClassVar[str] = "type" # discriminator mappings __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'checkbox': 'SubFormFieldsPerDocumentCheckbox','checkbox-merge': 'SubFormFieldsPerDocumentCheckboxMerge','date_signed': 'SubFormFieldsPerDocumentDateSigned','dropdown': 'SubFormFieldsPerDocumentDropdown','hyperlink': 'SubFormFieldsPerDocumentHyperlink','initials': 'SubFormFieldsPerDocumentInitials','radio': 'SubFormFieldsPerDocumentRadio','signature': 'SubFormFieldsPerDocumentSignature','text': 'SubFormFieldsPerDocumentText','text-merge': 'SubFormFieldsPerDocumentTextMerge' + "checkbox": "SubFormFieldsPerDocumentCheckbox", + "checkbox-merge": "SubFormFieldsPerDocumentCheckboxMerge", + "date_signed": "SubFormFieldsPerDocumentDateSigned", + "dropdown": "SubFormFieldsPerDocumentDropdown", + "hyperlink": "SubFormFieldsPerDocumentHyperlink", + "initials": "SubFormFieldsPerDocumentInitials", + "radio": "SubFormFieldsPerDocumentRadio", + "signature": "SubFormFieldsPerDocumentSignature", + "text": "SubFormFieldsPerDocumentText", + "text-merge": "SubFormFieldsPerDocumentTextMerge", } @classmethod @@ -91,7 +145,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -103,7 +159,20 @@ def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[st return data @classmethod - def from_json(cls, json_str: str) -> Optional[Union[SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge]]: + def from_json(cls, json_str: str) -> Optional[ + Union[ + SubFormFieldsPerDocumentCheckbox, + SubFormFieldsPerDocumentCheckboxMerge, + SubFormFieldsPerDocumentDateSigned, + SubFormFieldsPerDocumentDropdown, + SubFormFieldsPerDocumentHyperlink, + SubFormFieldsPerDocumentInitials, + SubFormFieldsPerDocumentRadio, + SubFormFieldsPerDocumentSignature, + SubFormFieldsPerDocumentText, + SubFormFieldsPerDocumentTextMerge, + ] + ]: """Create an instance of SubFormFieldsPerDocumentBase from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -126,35 +195,72 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[SubFormFieldsPerDocumentCheckbox, SubFormFieldsPerDocumentCheckboxMerge, SubFormFieldsPerDocumentDateSigned, SubFormFieldsPerDocumentDropdown, SubFormFieldsPerDocumentHyperlink, SubFormFieldsPerDocumentInitials, SubFormFieldsPerDocumentRadio, SubFormFieldsPerDocumentSignature, SubFormFieldsPerDocumentText, SubFormFieldsPerDocumentTextMerge]]: + def from_dict(cls, obj: Dict[str, Any]) -> Optional[ + Union[ + SubFormFieldsPerDocumentCheckbox, + SubFormFieldsPerDocumentCheckboxMerge, + SubFormFieldsPerDocumentDateSigned, + SubFormFieldsPerDocumentDropdown, + SubFormFieldsPerDocumentHyperlink, + SubFormFieldsPerDocumentInitials, + SubFormFieldsPerDocumentRadio, + SubFormFieldsPerDocumentSignature, + SubFormFieldsPerDocumentText, + SubFormFieldsPerDocumentTextMerge, + ] + ]: """Create an instance of SubFormFieldsPerDocumentBase from a dict""" # look up the object type based on discriminator mapping object_type = cls.get_discriminator_value(obj) - if object_type == 'SubFormFieldsPerDocumentCheckbox': - return import_module("dropbox_sign.models.sub_form_fields_per_document_checkbox").SubFormFieldsPerDocumentCheckbox.from_dict(obj) - if object_type == 'SubFormFieldsPerDocumentCheckboxMerge': - return import_module("dropbox_sign.models.sub_form_fields_per_document_checkbox_merge").SubFormFieldsPerDocumentCheckboxMerge.from_dict(obj) - if object_type == 'SubFormFieldsPerDocumentDateSigned': - return import_module("dropbox_sign.models.sub_form_fields_per_document_date_signed").SubFormFieldsPerDocumentDateSigned.from_dict(obj) - if object_type == 'SubFormFieldsPerDocumentDropdown': - return import_module("dropbox_sign.models.sub_form_fields_per_document_dropdown").SubFormFieldsPerDocumentDropdown.from_dict(obj) - if object_type == 'SubFormFieldsPerDocumentHyperlink': - return import_module("dropbox_sign.models.sub_form_fields_per_document_hyperlink").SubFormFieldsPerDocumentHyperlink.from_dict(obj) - if object_type == 'SubFormFieldsPerDocumentInitials': - return import_module("dropbox_sign.models.sub_form_fields_per_document_initials").SubFormFieldsPerDocumentInitials.from_dict(obj) - if object_type == 'SubFormFieldsPerDocumentRadio': - return import_module("dropbox_sign.models.sub_form_fields_per_document_radio").SubFormFieldsPerDocumentRadio.from_dict(obj) - if object_type == 'SubFormFieldsPerDocumentSignature': - return import_module("dropbox_sign.models.sub_form_fields_per_document_signature").SubFormFieldsPerDocumentSignature.from_dict(obj) - if object_type == 'SubFormFieldsPerDocumentText': - return import_module("dropbox_sign.models.sub_form_fields_per_document_text").SubFormFieldsPerDocumentText.from_dict(obj) - if object_type == 'SubFormFieldsPerDocumentTextMerge': - return import_module("dropbox_sign.models.sub_form_fields_per_document_text_merge").SubFormFieldsPerDocumentTextMerge.from_dict(obj) - - raise ValueError("SubFormFieldsPerDocumentBase failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + if object_type == "SubFormFieldsPerDocumentCheckbox": + return import_module( + "dropbox_sign.models.sub_form_fields_per_document_checkbox" + ).SubFormFieldsPerDocumentCheckbox.from_dict(obj) + if object_type == "SubFormFieldsPerDocumentCheckboxMerge": + return import_module( + "dropbox_sign.models.sub_form_fields_per_document_checkbox_merge" + ).SubFormFieldsPerDocumentCheckboxMerge.from_dict(obj) + if object_type == "SubFormFieldsPerDocumentDateSigned": + return import_module( + "dropbox_sign.models.sub_form_fields_per_document_date_signed" + ).SubFormFieldsPerDocumentDateSigned.from_dict(obj) + if object_type == "SubFormFieldsPerDocumentDropdown": + return import_module( + "dropbox_sign.models.sub_form_fields_per_document_dropdown" + ).SubFormFieldsPerDocumentDropdown.from_dict(obj) + if object_type == "SubFormFieldsPerDocumentHyperlink": + return import_module( + "dropbox_sign.models.sub_form_fields_per_document_hyperlink" + ).SubFormFieldsPerDocumentHyperlink.from_dict(obj) + if object_type == "SubFormFieldsPerDocumentInitials": + return import_module( + "dropbox_sign.models.sub_form_fields_per_document_initials" + ).SubFormFieldsPerDocumentInitials.from_dict(obj) + if object_type == "SubFormFieldsPerDocumentRadio": + return import_module( + "dropbox_sign.models.sub_form_fields_per_document_radio" + ).SubFormFieldsPerDocumentRadio.from_dict(obj) + if object_type == "SubFormFieldsPerDocumentSignature": + return import_module( + "dropbox_sign.models.sub_form_fields_per_document_signature" + ).SubFormFieldsPerDocumentSignature.from_dict(obj) + if object_type == "SubFormFieldsPerDocumentText": + return import_module( + "dropbox_sign.models.sub_form_fields_per_document_text" + ).SubFormFieldsPerDocumentText.from_dict(obj) + if object_type == "SubFormFieldsPerDocumentTextMerge": + return import_module( + "dropbox_sign.models.sub_form_fields_per_document_text_merge" + ).SubFormFieldsPerDocumentTextMerge.from_dict(obj) + raise ValueError( + "SubFormFieldsPerDocumentBase failed to lookup discriminator value from " + + json.dumps(obj) + + ". Discriminator property name: " + + cls.__discriminator_property_name + + ", mapping: " + + json.dumps(cls.__discriminator_value_class_map) + ) @classmethod def openapi_types(cls) -> Dict[str, str]: @@ -174,6 +280,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox.py index b134fd0a0..f1765d128 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox.py @@ -20,21 +20,46 @@ from pydantic import ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SubFormFieldsPerDocumentCheckbox(SubFormFieldsPerDocumentBase): """ This class extends `SubFormFieldsPerDocumentBase`. - """ # noqa: E501 - type: StrictStr = Field(description="A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class.") - is_checked: StrictBool = Field(description="`true` for checking the checkbox field by default, otherwise `false`.") - group: Optional[StrictStr] = Field(default=None, description="String referencing group defined in `form_field_groups` parameter.") - __properties: ClassVar[List[str]] = ["document_index", "api_id", "height", "required", "signer", "type", "width", "x", "y", "is_checked", "name", "page", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="A yes/no checkbox. Use the `SubFormFieldsPerDocumentCheckbox` class." + ) + is_checked: StrictBool = Field( + description="`true` for checking the checkbox field by default, otherwise `false`." + ) + group: Optional[StrictStr] = Field( + default=None, + description="String referencing group defined in `form_field_groups` parameter.", + ) + __properties: ClassVar[List[str]] = [ + "document_index", + "api_id", + "height", + "required", + "signer", + "type", + "width", + "x", + "y", + "is_checked", + "name", + "page", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +68,6 @@ class SubFormFieldsPerDocumentCheckbox(SubFormFieldsPerDocumentBase): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +77,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,21 +122,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "document_index": obj.get("document_index"), - "api_id": obj.get("api_id"), - "height": obj.get("height"), - "required": obj.get("required"), - "signer": obj.get("signer"), - "type": obj.get("type") if obj.get("type") is not None else 'checkbox', - "width": obj.get("width"), - "x": obj.get("x"), - "y": obj.get("y"), - "is_checked": obj.get("is_checked"), - "name": obj.get("name"), - "page": obj.get("page"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "document_index": obj.get("document_index"), + "api_id": obj.get("api_id"), + "height": obj.get("height"), + "required": obj.get("required"), + "signer": obj.get("signer"), + "type": obj.get("type") if obj.get("type") is not None else "checkbox", + "width": obj.get("width"), + "x": obj.get("x"), + "y": obj.get("y"), + "is_checked": obj.get("is_checked"), + "name": obj.get("name"), + "page": obj.get("page"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -143,6 +171,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox_merge.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox_merge.py index f63525f4d..157a66f5c 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox_merge.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_checkbox_merge.py @@ -20,19 +20,37 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SubFormFieldsPerDocumentCheckboxMerge(SubFormFieldsPerDocumentBase): """ This class extends `SubFormFieldsPerDocumentBase`. - """ # noqa: E501 - type: StrictStr = Field(description="A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class.") - __properties: ClassVar[List[str]] = ["document_index", "api_id", "height", "required", "signer", "type", "width", "x", "y", "name", "page"] + """ # noqa: E501 + + type: StrictStr = Field( + description="A checkbox field that has default value set using pre-filled data. Use the `SubFormFieldsPerDocumentCheckboxMerge` class." + ) + __properties: ClassVar[List[str]] = [ + "document_index", + "api_id", + "height", + "required", + "signer", + "type", + "width", + "x", + "y", + "name", + "page", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +59,6 @@ class SubFormFieldsPerDocumentCheckboxMerge(SubFormFieldsPerDocumentBase): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +68,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,19 +113,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "document_index": obj.get("document_index"), - "api_id": obj.get("api_id"), - "height": obj.get("height"), - "required": obj.get("required"), - "signer": obj.get("signer"), - "type": obj.get("type") if obj.get("type") is not None else 'checkbox-merge', - "width": obj.get("width"), - "x": obj.get("x"), - "y": obj.get("y"), - "name": obj.get("name"), - "page": obj.get("page") - }) + _obj = cls.model_validate( + { + "document_index": obj.get("document_index"), + "api_id": obj.get("api_id"), + "height": obj.get("height"), + "required": obj.get("required"), + "signer": obj.get("signer"), + "type": ( + obj.get("type") if obj.get("type") is not None else "checkbox-merge" + ), + "width": obj.get("width"), + "x": obj.get("x"), + "y": obj.get("y"), + "name": obj.get("name"), + "page": obj.get("page"), + } + ) return _obj @classmethod @@ -137,6 +160,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_date_signed.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_date_signed.py index 291c4ef8a..298b43a5a 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_date_signed.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_date_signed.py @@ -20,30 +20,76 @@ from pydantic import ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SubFormFieldsPerDocumentDateSigned(SubFormFieldsPerDocumentBase): """ This class extends `SubFormFieldsPerDocumentBase`. - """ # noqa: E501 - type: StrictStr = Field(description="A date. Use the `SubFormFieldsPerDocumentDateSigned` class.") - font_family: Optional[StrictStr] = Field(default=None, description="Font family for the field.") - font_size: Optional[StrictInt] = Field(default=12, description="The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field.") - __properties: ClassVar[List[str]] = ["document_index", "api_id", "height", "required", "signer", "type", "width", "x", "y", "name", "page", "font_family", "font_size"] + """ # noqa: E501 - @field_validator('font_family') + type: StrictStr = Field( + description="A date. Use the `SubFormFieldsPerDocumentDateSigned` class." + ) + font_family: Optional[StrictStr] = Field( + default=None, description="Font family for the field." + ) + font_size: Optional[StrictInt] = Field( + default=12, + description="The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field.", + ) + __properties: ClassVar[List[str]] = [ + "document_index", + "api_id", + "height", + "required", + "signer", + "type", + "width", + "x", + "y", + "name", + "page", + "font_family", + "font_size", + ] + + @field_validator("font_family") def font_family_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged']): - raise ValueError("must be one of enum values ('helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged')") + if value not in set( + [ + "helvetica", + "arial", + "courier", + "calibri", + "cambria", + "georgia", + "times", + "trebuchet", + "verdana", + "roboto", + "robotoMono", + "notoSans", + "notoSerif", + "notoCJK-JP-Regular", + "notoHebrew-Regular", + "notoSanThaiMerged", + ] + ): + raise ValueError( + "must be one of enum values ('helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged')" + ) return value model_config = ConfigDict( @@ -53,7 +99,6 @@ def font_family_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +108,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -106,21 +153,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "document_index": obj.get("document_index"), - "api_id": obj.get("api_id"), - "height": obj.get("height"), - "required": obj.get("required"), - "signer": obj.get("signer"), - "type": obj.get("type") if obj.get("type") is not None else 'date_signed', - "width": obj.get("width"), - "x": obj.get("x"), - "y": obj.get("y"), - "name": obj.get("name"), - "page": obj.get("page"), - "font_family": obj.get("font_family"), - "font_size": obj.get("font_size") if obj.get("font_size") is not None else 12 - }) + _obj = cls.model_validate( + { + "document_index": obj.get("document_index"), + "api_id": obj.get("api_id"), + "height": obj.get("height"), + "required": obj.get("required"), + "signer": obj.get("signer"), + "type": ( + obj.get("type") if obj.get("type") is not None else "date_signed" + ), + "width": obj.get("width"), + "x": obj.get("x"), + "y": obj.get("y"), + "name": obj.get("name"), + "page": obj.get("page"), + "font_family": obj.get("font_family"), + "font_size": ( + obj.get("font_size") if obj.get("font_size") is not None else 12 + ), + } + ) return _obj @classmethod @@ -153,6 +206,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_dropdown.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_dropdown.py index 7a1d38433..331b61720 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_dropdown.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_dropdown.py @@ -21,32 +21,85 @@ from pydantic import ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SubFormFieldsPerDocumentDropdown(SubFormFieldsPerDocumentBase): """ This class extends `SubFormFieldsPerDocumentBase`. - """ # noqa: E501 - type: StrictStr = Field(description="An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class.") - options: Annotated[List[StrictStr], Field(min_length=1)] = Field(description="Array of string values representing dropdown values.") - content: Optional[StrictStr] = Field(default=None, description="Selected value in `options` array. Value must exist in array.") - font_family: Optional[StrictStr] = Field(default=None, description="Font family for the field.") - font_size: Optional[StrictInt] = Field(default=12, description="The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field.") - __properties: ClassVar[List[str]] = ["document_index", "api_id", "height", "required", "signer", "type", "width", "x", "y", "options", "name", "page", "content", "font_family", "font_size"] - - @field_validator('font_family') + """ # noqa: E501 + + type: StrictStr = Field( + description="An input field for dropdowns. Use the `SubFormFieldsPerDocumentDropdown` class." + ) + options: Annotated[List[StrictStr], Field(min_length=1)] = Field( + description="Array of string values representing dropdown values." + ) + content: Optional[StrictStr] = Field( + default=None, + description="Selected value in `options` array. Value must exist in array.", + ) + font_family: Optional[StrictStr] = Field( + default=None, description="Font family for the field." + ) + font_size: Optional[StrictInt] = Field( + default=12, + description="The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field.", + ) + __properties: ClassVar[List[str]] = [ + "document_index", + "api_id", + "height", + "required", + "signer", + "type", + "width", + "x", + "y", + "options", + "name", + "page", + "content", + "font_family", + "font_size", + ] + + @field_validator("font_family") def font_family_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged']): - raise ValueError("must be one of enum values ('helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged')") + if value not in set( + [ + "helvetica", + "arial", + "courier", + "calibri", + "cambria", + "georgia", + "times", + "trebuchet", + "verdana", + "roboto", + "robotoMono", + "notoSans", + "notoSerif", + "notoCJK-JP-Regular", + "notoHebrew-Regular", + "notoSanThaiMerged", + ] + ): + raise ValueError( + "must be one of enum values ('helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged')" + ) return value model_config = ConfigDict( @@ -56,7 +109,6 @@ def font_family_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +118,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -109,23 +163,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "document_index": obj.get("document_index"), - "api_id": obj.get("api_id"), - "height": obj.get("height"), - "required": obj.get("required"), - "signer": obj.get("signer"), - "type": obj.get("type") if obj.get("type") is not None else 'dropdown', - "width": obj.get("width"), - "x": obj.get("x"), - "y": obj.get("y"), - "options": obj.get("options"), - "name": obj.get("name"), - "page": obj.get("page"), - "content": obj.get("content"), - "font_family": obj.get("font_family"), - "font_size": obj.get("font_size") if obj.get("font_size") is not None else 12 - }) + _obj = cls.model_validate( + { + "document_index": obj.get("document_index"), + "api_id": obj.get("api_id"), + "height": obj.get("height"), + "required": obj.get("required"), + "signer": obj.get("signer"), + "type": obj.get("type") if obj.get("type") is not None else "dropdown", + "width": obj.get("width"), + "x": obj.get("x"), + "y": obj.get("y"), + "options": obj.get("options"), + "name": obj.get("name"), + "page": obj.get("page"), + "content": obj.get("content"), + "font_family": obj.get("font_family"), + "font_size": ( + obj.get("font_size") if obj.get("font_size") is not None else 12 + ), + } + ) return _obj @classmethod @@ -163,4 +221,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "options", ] - diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_font_enum.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_font_enum.py index 3b95a6b6b..5244ac297 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_font_enum.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_font_enum.py @@ -27,26 +27,24 @@ class SubFormFieldsPerDocumentFontEnum(str, Enum): """ allowed enum values """ - HELVETICA = 'helvetica' - ARIAL = 'arial' - COURIER = 'courier' - CALIBRI = 'calibri' - CAMBRIA = 'cambria' - GEORGIA = 'georgia' - TIMES = 'times' - TREBUCHET = 'trebuchet' - VERDANA = 'verdana' - ROBOTO = 'roboto' - ROBOTOMONO = 'robotoMono' - NOTOSANS = 'notoSans' - NOTOSERIF = 'notoSerif' - NOTO_CJK_MINUS_JP_MINUS_REGULAR = 'notoCJK-JP-Regular' - NOTO_HEBREW_MINUS_REGULAR = 'notoHebrew-Regular' - NOTOSANTHAIMERGED = 'notoSanThaiMerged' + HELVETICA = "helvetica" + ARIAL = "arial" + COURIER = "courier" + CALIBRI = "calibri" + CAMBRIA = "cambria" + GEORGIA = "georgia" + TIMES = "times" + TREBUCHET = "trebuchet" + VERDANA = "verdana" + ROBOTO = "roboto" + ROBOTOMONO = "robotoMono" + NOTOSANS = "notoSans" + NOTOSERIF = "notoSerif" + NOTO_CJK_MINUS_JP_MINUS_REGULAR = "notoCJK-JP-Regular" + NOTO_HEBREW_MINUS_REGULAR = "notoHebrew-Regular" + NOTOSANTHAIMERGED = "notoSanThaiMerged" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SubFormFieldsPerDocumentFontEnum from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_hyperlink.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_hyperlink.py index 9526b36fb..f8c9d0c54 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_hyperlink.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_hyperlink.py @@ -20,32 +20,80 @@ from pydantic import ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SubFormFieldsPerDocumentHyperlink(SubFormFieldsPerDocumentBase): """ This class extends `SubFormFieldsPerDocumentBase`. - """ # noqa: E501 - type: StrictStr = Field(description="A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class.") + """ # noqa: E501 + + type: StrictStr = Field( + description="A hyperlink field. Use the `SubFormFieldsPerDocumentHyperlink` class." + ) content: StrictStr = Field(description="Link Text.") content_url: StrictStr = Field(description="Link URL.") - font_family: Optional[StrictStr] = Field(default=None, description="Font family for the field.") - font_size: Optional[StrictInt] = Field(default=12, description="The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field.") - __properties: ClassVar[List[str]] = ["document_index", "api_id", "height", "required", "signer", "type", "width", "x", "y", "content", "content_url", "name", "page", "font_family", "font_size"] - - @field_validator('font_family') + font_family: Optional[StrictStr] = Field( + default=None, description="Font family for the field." + ) + font_size: Optional[StrictInt] = Field( + default=12, + description="The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field.", + ) + __properties: ClassVar[List[str]] = [ + "document_index", + "api_id", + "height", + "required", + "signer", + "type", + "width", + "x", + "y", + "content", + "content_url", + "name", + "page", + "font_family", + "font_size", + ] + + @field_validator("font_family") def font_family_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged']): - raise ValueError("must be one of enum values ('helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged')") + if value not in set( + [ + "helvetica", + "arial", + "courier", + "calibri", + "cambria", + "georgia", + "times", + "trebuchet", + "verdana", + "roboto", + "robotoMono", + "notoSans", + "notoSerif", + "notoCJK-JP-Regular", + "notoHebrew-Regular", + "notoSanThaiMerged", + ] + ): + raise ValueError( + "must be one of enum values ('helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged')" + ) return value model_config = ConfigDict( @@ -55,7 +103,6 @@ def font_family_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +112,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -108,23 +157,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "document_index": obj.get("document_index"), - "api_id": obj.get("api_id"), - "height": obj.get("height"), - "required": obj.get("required"), - "signer": obj.get("signer"), - "type": obj.get("type") if obj.get("type") is not None else 'hyperlink', - "width": obj.get("width"), - "x": obj.get("x"), - "y": obj.get("y"), - "content": obj.get("content"), - "content_url": obj.get("content_url"), - "name": obj.get("name"), - "page": obj.get("page"), - "font_family": obj.get("font_family"), - "font_size": obj.get("font_size") if obj.get("font_size") is not None else 12 - }) + _obj = cls.model_validate( + { + "document_index": obj.get("document_index"), + "api_id": obj.get("api_id"), + "height": obj.get("height"), + "required": obj.get("required"), + "signer": obj.get("signer"), + "type": obj.get("type") if obj.get("type") is not None else "hyperlink", + "width": obj.get("width"), + "x": obj.get("x"), + "y": obj.get("y"), + "content": obj.get("content"), + "content_url": obj.get("content_url"), + "name": obj.get("name"), + "page": obj.get("page"), + "font_family": obj.get("font_family"), + "font_size": ( + obj.get("font_size") if obj.get("font_size") is not None else 12 + ), + } + ) return _obj @classmethod @@ -159,6 +212,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_initials.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_initials.py index 45b2f1914..8962b4cee 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_initials.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_initials.py @@ -20,19 +20,37 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SubFormFieldsPerDocumentInitials(SubFormFieldsPerDocumentBase): """ This class extends `SubFormFieldsPerDocumentBase`. - """ # noqa: E501 - type: StrictStr = Field(description="An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class.") - __properties: ClassVar[List[str]] = ["document_index", "api_id", "height", "required", "signer", "type", "width", "x", "y", "name", "page"] + """ # noqa: E501 + + type: StrictStr = Field( + description="An input field for initials. Use the `SubFormFieldsPerDocumentInitials` class." + ) + __properties: ClassVar[List[str]] = [ + "document_index", + "api_id", + "height", + "required", + "signer", + "type", + "width", + "x", + "y", + "name", + "page", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +59,6 @@ class SubFormFieldsPerDocumentInitials(SubFormFieldsPerDocumentBase): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +68,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,19 +113,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "document_index": obj.get("document_index"), - "api_id": obj.get("api_id"), - "height": obj.get("height"), - "required": obj.get("required"), - "signer": obj.get("signer"), - "type": obj.get("type") if obj.get("type") is not None else 'initials', - "width": obj.get("width"), - "x": obj.get("x"), - "y": obj.get("y"), - "name": obj.get("name"), - "page": obj.get("page") - }) + _obj = cls.model_validate( + { + "document_index": obj.get("document_index"), + "api_id": obj.get("api_id"), + "height": obj.get("height"), + "required": obj.get("required"), + "signer": obj.get("signer"), + "type": obj.get("type") if obj.get("type") is not None else "initials", + "width": obj.get("width"), + "x": obj.get("x"), + "y": obj.get("y"), + "name": obj.get("name"), + "page": obj.get("page"), + } + ) return _obj @classmethod @@ -137,6 +158,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_radio.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_radio.py index a40731c01..69407f506 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_radio.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_radio.py @@ -20,21 +20,45 @@ from pydantic import ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SubFormFieldsPerDocumentRadio(SubFormFieldsPerDocumentBase): """ This class extends `SubFormFieldsPerDocumentBase`. - """ # noqa: E501 - type: StrictStr = Field(description="An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class.") - group: StrictStr = Field(description="String referencing group defined in `form_field_groups` parameter.") - is_checked: StrictBool = Field(description="`true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`.") - __properties: ClassVar[List[str]] = ["document_index", "api_id", "height", "required", "signer", "type", "width", "x", "y", "group", "is_checked", "name", "page"] + """ # noqa: E501 + + type: StrictStr = Field( + description="An input field for radios. Use the `SubFormFieldsPerDocumentRadio` class." + ) + group: StrictStr = Field( + description="String referencing group defined in `form_field_groups` parameter." + ) + is_checked: StrictBool = Field( + description="`true` for checking the radio field by default, otherwise `false`. Only one radio field per group can be `true`." + ) + __properties: ClassVar[List[str]] = [ + "document_index", + "api_id", + "height", + "required", + "signer", + "type", + "width", + "x", + "y", + "group", + "is_checked", + "name", + "page", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +67,6 @@ class SubFormFieldsPerDocumentRadio(SubFormFieldsPerDocumentBase): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +76,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,21 +121,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "document_index": obj.get("document_index"), - "api_id": obj.get("api_id"), - "height": obj.get("height"), - "required": obj.get("required"), - "signer": obj.get("signer"), - "type": obj.get("type") if obj.get("type") is not None else 'radio', - "width": obj.get("width"), - "x": obj.get("x"), - "y": obj.get("y"), - "group": obj.get("group"), - "is_checked": obj.get("is_checked"), - "name": obj.get("name"), - "page": obj.get("page") - }) + _obj = cls.model_validate( + { + "document_index": obj.get("document_index"), + "api_id": obj.get("api_id"), + "height": obj.get("height"), + "required": obj.get("required"), + "signer": obj.get("signer"), + "type": obj.get("type") if obj.get("type") is not None else "radio", + "width": obj.get("width"), + "x": obj.get("x"), + "y": obj.get("y"), + "group": obj.get("group"), + "is_checked": obj.get("is_checked"), + "name": obj.get("name"), + "page": obj.get("page"), + } + ) return _obj @classmethod @@ -143,6 +170,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_signature.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_signature.py index 86806693c..e900a7500 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_signature.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_signature.py @@ -20,19 +20,37 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SubFormFieldsPerDocumentSignature(SubFormFieldsPerDocumentBase): """ This class extends `SubFormFieldsPerDocumentBase`. - """ # noqa: E501 - type: StrictStr = Field(description="A signature input field. Use the `SubFormFieldsPerDocumentSignature` class.") - __properties: ClassVar[List[str]] = ["document_index", "api_id", "height", "required", "signer", "type", "width", "x", "y", "name", "page"] + """ # noqa: E501 + + type: StrictStr = Field( + description="A signature input field. Use the `SubFormFieldsPerDocumentSignature` class." + ) + __properties: ClassVar[List[str]] = [ + "document_index", + "api_id", + "height", + "required", + "signer", + "type", + "width", + "x", + "y", + "name", + "page", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +59,6 @@ class SubFormFieldsPerDocumentSignature(SubFormFieldsPerDocumentBase): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +68,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,19 +113,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "document_index": obj.get("document_index"), - "api_id": obj.get("api_id"), - "height": obj.get("height"), - "required": obj.get("required"), - "signer": obj.get("signer"), - "type": obj.get("type") if obj.get("type") is not None else 'signature', - "width": obj.get("width"), - "x": obj.get("x"), - "y": obj.get("y"), - "name": obj.get("name"), - "page": obj.get("page") - }) + _obj = cls.model_validate( + { + "document_index": obj.get("document_index"), + "api_id": obj.get("api_id"), + "height": obj.get("height"), + "required": obj.get("required"), + "signer": obj.get("signer"), + "type": obj.get("type") if obj.get("type") is not None else "signature", + "width": obj.get("width"), + "x": obj.get("x"), + "y": obj.get("y"), + "name": obj.get("name"), + "page": obj.get("page"), + } + ) return _obj @classmethod @@ -137,6 +158,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text.py index 7e569bcfb..b7f473dd3 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text.py @@ -18,50 +18,142 @@ import re # noqa: F401 import json -from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from pydantic import ( + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SubFormFieldsPerDocumentText(SubFormFieldsPerDocumentBase): """ This class extends `SubFormFieldsPerDocumentBase`. - """ # noqa: E501 - type: StrictStr = Field(description="A text input field. Use the `SubFormFieldsPerDocumentText` class.") - placeholder: Optional[StrictStr] = Field(default=None, description="Placeholder value for text field.") - auto_fill_type: Optional[StrictStr] = Field(default=None, description="Auto fill type for populating fields automatically. Check out the list of [auto fill types](/api/reference/constants/#auto-fill-types) to learn more about the possible values.") - link_id: Optional[StrictStr] = Field(default=None, description="Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields.") - masked: Optional[StrictBool] = Field(default=None, description="Masks entered data. For more information see [Masking sensitive information](https://faq.hellosign.com/hc/en-us/articles/360040742811-Masking-sensitive-information). `true` for masking the data in a text field, otherwise `false`.") - validation_type: Optional[StrictStr] = Field(default=None, description="Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. **NOTE:** When using `custom_regex` you are required to pass a second parameter `validation_custom_regex` and you can optionally provide `validation_custom_regex_format_label` for the error message the user will see in case of an invalid value.") + """ # noqa: E501 + + type: StrictStr = Field( + description="A text input field. Use the `SubFormFieldsPerDocumentText` class." + ) + placeholder: Optional[StrictStr] = Field( + default=None, description="Placeholder value for text field." + ) + auto_fill_type: Optional[StrictStr] = Field( + default=None, + description="Auto fill type for populating fields automatically. Check out the list of [auto fill types](/api/reference/constants/#auto-fill-types) to learn more about the possible values.", + ) + link_id: Optional[StrictStr] = Field( + default=None, + description="Link two or more text fields. Enter data into one linked text field, which automatically fill all other linked text fields.", + ) + masked: Optional[StrictBool] = Field( + default=None, + description="Masks entered data. For more information see [Masking sensitive information](https://faq.hellosign.com/hc/en-us/articles/360040742811-Masking-sensitive-information). `true` for masking the data in a text field, otherwise `false`.", + ) + validation_type: Optional[StrictStr] = Field( + default=None, + description="Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values. **NOTE:** When using `custom_regex` you are required to pass a second parameter `validation_custom_regex` and you can optionally provide `validation_custom_regex_format_label` for the error message the user will see in case of an invalid value.", + ) validation_custom_regex: Optional[StrictStr] = None validation_custom_regex_format_label: Optional[StrictStr] = None - content: Optional[StrictStr] = Field(default=None, description="Content of a `me_now` text field") - font_family: Optional[StrictStr] = Field(default=None, description="Font family for the field.") - font_size: Optional[StrictInt] = Field(default=12, description="The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field.") - __properties: ClassVar[List[str]] = ["document_index", "api_id", "height", "required", "signer", "type", "width", "x", "y", "name", "page", "placeholder", "auto_fill_type", "link_id", "masked", "validation_type", "validation_custom_regex", "validation_custom_regex_format_label", "content", "font_family", "font_size"] - - @field_validator('validation_type') + content: Optional[StrictStr] = Field( + default=None, description="Content of a `me_now` text field" + ) + font_family: Optional[StrictStr] = Field( + default=None, description="Font family for the field." + ) + font_size: Optional[StrictInt] = Field( + default=12, + description="The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field.", + ) + __properties: ClassVar[List[str]] = [ + "document_index", + "api_id", + "height", + "required", + "signer", + "type", + "width", + "x", + "y", + "name", + "page", + "placeholder", + "auto_fill_type", + "link_id", + "masked", + "validation_type", + "validation_custom_regex", + "validation_custom_regex_format_label", + "content", + "font_family", + "font_size", + ] + + @field_validator("validation_type") def validation_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['numbers_only', 'letters_only', 'phone_number', 'bank_routing_number', 'bank_account_number', 'email_address', 'zip_code', 'social_security_number', 'employer_identification_number', 'custom_regex']): - raise ValueError("must be one of enum values ('numbers_only', 'letters_only', 'phone_number', 'bank_routing_number', 'bank_account_number', 'email_address', 'zip_code', 'social_security_number', 'employer_identification_number', 'custom_regex')") + if value not in set( + [ + "numbers_only", + "letters_only", + "phone_number", + "bank_routing_number", + "bank_account_number", + "email_address", + "zip_code", + "social_security_number", + "employer_identification_number", + "custom_regex", + ] + ): + raise ValueError( + "must be one of enum values ('numbers_only', 'letters_only', 'phone_number', 'bank_routing_number', 'bank_account_number', 'email_address', 'zip_code', 'social_security_number', 'employer_identification_number', 'custom_regex')" + ) return value - @field_validator('font_family') + @field_validator("font_family") def font_family_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged']): - raise ValueError("must be one of enum values ('helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged')") + if value not in set( + [ + "helvetica", + "arial", + "courier", + "calibri", + "cambria", + "georgia", + "times", + "trebuchet", + "verdana", + "roboto", + "robotoMono", + "notoSans", + "notoSerif", + "notoCJK-JP-Regular", + "notoHebrew-Regular", + "notoSanThaiMerged", + ] + ): + raise ValueError( + "must be one of enum values ('helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged')" + ) return value model_config = ConfigDict( @@ -71,7 +163,6 @@ def font_family_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,7 +172,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -124,29 +217,35 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "document_index": obj.get("document_index"), - "api_id": obj.get("api_id"), - "height": obj.get("height"), - "required": obj.get("required"), - "signer": obj.get("signer"), - "type": obj.get("type") if obj.get("type") is not None else 'text', - "width": obj.get("width"), - "x": obj.get("x"), - "y": obj.get("y"), - "name": obj.get("name"), - "page": obj.get("page"), - "placeholder": obj.get("placeholder"), - "auto_fill_type": obj.get("auto_fill_type"), - "link_id": obj.get("link_id"), - "masked": obj.get("masked"), - "validation_type": obj.get("validation_type"), - "validation_custom_regex": obj.get("validation_custom_regex"), - "validation_custom_regex_format_label": obj.get("validation_custom_regex_format_label"), - "content": obj.get("content"), - "font_family": obj.get("font_family"), - "font_size": obj.get("font_size") if obj.get("font_size") is not None else 12 - }) + _obj = cls.model_validate( + { + "document_index": obj.get("document_index"), + "api_id": obj.get("api_id"), + "height": obj.get("height"), + "required": obj.get("required"), + "signer": obj.get("signer"), + "type": obj.get("type") if obj.get("type") is not None else "text", + "width": obj.get("width"), + "x": obj.get("x"), + "y": obj.get("y"), + "name": obj.get("name"), + "page": obj.get("page"), + "placeholder": obj.get("placeholder"), + "auto_fill_type": obj.get("auto_fill_type"), + "link_id": obj.get("link_id"), + "masked": obj.get("masked"), + "validation_type": obj.get("validation_type"), + "validation_custom_regex": obj.get("validation_custom_regex"), + "validation_custom_regex_format_label": obj.get( + "validation_custom_regex_format_label" + ), + "content": obj.get("content"), + "font_family": obj.get("font_family"), + "font_size": ( + obj.get("font_size") if obj.get("font_size") is not None else 12 + ), + } + ) return _obj @classmethod @@ -187,6 +286,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text_merge.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text_merge.py index a60f04b44..318deab88 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text_merge.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_text_merge.py @@ -20,30 +20,76 @@ from pydantic import ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class SubFormFieldsPerDocumentTextMerge(SubFormFieldsPerDocumentBase): """ This class extends `SubFormFieldsPerDocumentBase`. - """ # noqa: E501 - type: StrictStr = Field(description="A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class.") - font_family: Optional[StrictStr] = Field(default=None, description="Font family for the field.") - font_size: Optional[StrictInt] = Field(default=12, description="The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field.") - __properties: ClassVar[List[str]] = ["document_index", "api_id", "height", "required", "signer", "type", "width", "x", "y", "name", "page", "font_family", "font_size"] + """ # noqa: E501 - @field_validator('font_family') + type: StrictStr = Field( + description="A text field that has default text set using pre-filled data. Use the `SubFormFieldsPerDocumentTextMerge` class." + ) + font_family: Optional[StrictStr] = Field( + default=None, description="Font family for the field." + ) + font_size: Optional[StrictInt] = Field( + default=12, + description="The initial px font size for the field contents. Can be any integer value between `7` and `49`. **NOTE:** Font size may be reduced during processing in order to fit the contents within the dimensions of the field.", + ) + __properties: ClassVar[List[str]] = [ + "document_index", + "api_id", + "height", + "required", + "signer", + "type", + "width", + "x", + "y", + "name", + "page", + "font_family", + "font_size", + ] + + @field_validator("font_family") def font_family_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged']): - raise ValueError("must be one of enum values ('helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged')") + if value not in set( + [ + "helvetica", + "arial", + "courier", + "calibri", + "cambria", + "georgia", + "times", + "trebuchet", + "verdana", + "roboto", + "robotoMono", + "notoSans", + "notoSerif", + "notoCJK-JP-Regular", + "notoHebrew-Regular", + "notoSanThaiMerged", + ] + ): + raise ValueError( + "must be one of enum values ('helvetica', 'arial', 'courier', 'calibri', 'cambria', 'georgia', 'times', 'trebuchet', 'verdana', 'roboto', 'robotoMono', 'notoSans', 'notoSerif', 'notoCJK-JP-Regular', 'notoHebrew-Regular', 'notoSanThaiMerged')" + ) return value model_config = ConfigDict( @@ -53,7 +99,6 @@ def font_family_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +108,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -106,21 +153,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "document_index": obj.get("document_index"), - "api_id": obj.get("api_id"), - "height": obj.get("height"), - "required": obj.get("required"), - "signer": obj.get("signer"), - "type": obj.get("type") if obj.get("type") is not None else 'text-merge', - "width": obj.get("width"), - "x": obj.get("x"), - "y": obj.get("y"), - "name": obj.get("name"), - "page": obj.get("page"), - "font_family": obj.get("font_family"), - "font_size": obj.get("font_size") if obj.get("font_size") is not None else 12 - }) + _obj = cls.model_validate( + { + "document_index": obj.get("document_index"), + "api_id": obj.get("api_id"), + "height": obj.get("height"), + "required": obj.get("required"), + "signer": obj.get("signer"), + "type": ( + obj.get("type") if obj.get("type") is not None else "text-merge" + ), + "width": obj.get("width"), + "x": obj.get("x"), + "y": obj.get("y"), + "name": obj.get("name"), + "page": obj.get("page"), + "font_family": obj.get("font_family"), + "font_size": ( + obj.get("font_size") if obj.get("font_size") is not None else 12 + ), + } + ) return _obj @classmethod @@ -153,6 +206,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_type_enum.py b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_type_enum.py index 3ad73f880..e2ca1330f 100644 --- a/sdks/python/dropbox_sign/models/sub_form_fields_per_document_type_enum.py +++ b/sdks/python/dropbox_sign/models/sub_form_fields_per_document_type_enum.py @@ -27,20 +27,18 @@ class SubFormFieldsPerDocumentTypeEnum(str, Enum): """ allowed enum values """ - CHECKBOX = 'checkbox' - CHECKBOX_MINUS_MERGE = 'checkbox-merge' - DATE_SIGNED = 'date_signed' - DROPDOWN = 'dropdown' - HYPERLINK = 'hyperlink' - INITIALS = 'initials' - SIGNATURE = 'signature' - RADIO = 'radio' - TEXT = 'text' - TEXT_MINUS_MERGE = 'text-merge' + CHECKBOX = "checkbox" + CHECKBOX_MINUS_MERGE = "checkbox-merge" + DATE_SIGNED = "date_signed" + DROPDOWN = "dropdown" + HYPERLINK = "hyperlink" + INITIALS = "initials" + SIGNATURE = "signature" + RADIO = "radio" + TEXT = "text" + TEXT_MINUS_MERGE = "text-merge" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SubFormFieldsPerDocumentTypeEnum from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/sdks/python/dropbox_sign/models/sub_merge_field.py b/sdks/python/dropbox_sign/models/sub_merge_field.py index 9e24d5584..dba544e80 100644 --- a/sdks/python/dropbox_sign/models/sub_merge_field.py +++ b/sdks/python/dropbox_sign/models/sub_merge_field.py @@ -26,18 +26,20 @@ from pydantic import StrictBool from typing import Union + class SubMergeField(BaseModel): """ SubMergeField - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="The name of the merge field. Must be unique.") type: StrictStr = Field(description="The type of merge field.") __properties: ClassVar[List[str]] = ["name", "type"] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['text', 'checkbox']): + if value not in set(["text", "checkbox"]): raise ValueError("must be one of enum values ('text', 'checkbox')") return value @@ -48,7 +50,6 @@ def type_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -58,7 +59,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -101,10 +104,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "type": obj.get("type") - }) + _obj = cls.model_validate({"name": obj.get("name"), "type": obj.get("type")}) return _obj @classmethod @@ -126,6 +126,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_o_auth.py b/sdks/python/dropbox_sign/models/sub_o_auth.py index d3860181c..979d595aa 100644 --- a/sdks/python/dropbox_sign/models/sub_o_auth.py +++ b/sdks/python/dropbox_sign/models/sub_o_auth.py @@ -26,23 +26,44 @@ from pydantic import StrictBool from typing import Union + class SubOAuth(BaseModel): """ OAuth related parameters. - """ # noqa: E501 - callback_url: Optional[StrictStr] = Field(default=None, description="The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided)") - scopes: Optional[List[StrictStr]] = Field(default=None, description="A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided).") + """ # noqa: E501 + + callback_url: Optional[StrictStr] = Field( + default=None, + description="The callback URL to be used for OAuth flows. (Required if `oauth[scopes]` is provided)", + ) + scopes: Optional[List[StrictStr]] = Field( + default=None, + description="A list of [OAuth scopes](/api/reference/tag/OAuth) to be granted to the app. (Required if `oauth[callback_url]` is provided).", + ) __properties: ClassVar[List[str]] = ["callback_url", "scopes"] - @field_validator('scopes') + @field_validator("scopes") def scopes_validate_enum(cls, value): """Validates the enum""" if value is None: return value for i in value: - if i not in set(['request_signature', 'basic_account_info', 'account_access', 'signature_request_access', 'template_access', 'team_access', 'api_app_access', '']): - raise ValueError("each list item must be one of ('request_signature', 'basic_account_info', 'account_access', 'signature_request_access', 'template_access', 'team_access', 'api_app_access', '')") + if i not in set( + [ + "request_signature", + "basic_account_info", + "account_access", + "signature_request_access", + "template_access", + "team_access", + "api_app_access", + "", + ] + ): + raise ValueError( + "each list item must be one of ('request_signature', 'basic_account_info', 'account_access', 'signature_request_access', 'template_access', 'team_access', 'api_app_access', '')" + ) return value model_config = ConfigDict( @@ -52,7 +73,6 @@ def scopes_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +82,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -105,10 +127,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "callback_url": obj.get("callback_url"), - "scopes": obj.get("scopes") - }) + _obj = cls.model_validate( + {"callback_url": obj.get("callback_url"), "scopes": obj.get("scopes")} + ) return _obj @classmethod @@ -133,4 +154,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "scopes", ] - diff --git a/sdks/python/dropbox_sign/models/sub_options.py b/sdks/python/dropbox_sign/models/sub_options.py index 1f80f2a4b..bd4f00ae8 100644 --- a/sdks/python/dropbox_sign/models/sub_options.py +++ b/sdks/python/dropbox_sign/models/sub_options.py @@ -26,11 +26,16 @@ from pydantic import StrictBool from typing import Union + class SubOptions(BaseModel): """ Additional options supported by API App. - """ # noqa: E501 - can_insert_everywhere: Optional[StrictBool] = Field(default=False, description="Determines if signers can use \"Insert Everywhere\" when signing a document.") + """ # noqa: E501 + + can_insert_everywhere: Optional[StrictBool] = Field( + default=False, + description='Determines if signers can use "Insert Everywhere" when signing a document.', + ) __properties: ClassVar[List[str]] = ["can_insert_everywhere"] model_config = ConfigDict( @@ -40,7 +45,6 @@ class SubOptions(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +54,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +99,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "can_insert_everywhere": obj.get("can_insert_everywhere") if obj.get("can_insert_everywhere") is not None else False - }) + _obj = cls.model_validate( + { + "can_insert_everywhere": ( + obj.get("can_insert_everywhere") + if obj.get("can_insert_everywhere") is not None + else False + ) + } + ) return _obj @classmethod @@ -116,6 +128,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_signature_request_grouped_signers.py b/sdks/python/dropbox_sign/models/sub_signature_request_grouped_signers.py index b0734b9dc..24671c921 100644 --- a/sdks/python/dropbox_sign/models/sub_signature_request_grouped_signers.py +++ b/sdks/python/dropbox_sign/models/sub_signature_request_grouped_signers.py @@ -27,13 +27,20 @@ from pydantic import StrictBool from typing import Union + class SubSignatureRequestGroupedSigners(BaseModel): """ SubSignatureRequestGroupedSigners - """ # noqa: E501 + """ # noqa: E501 + group: StrictStr = Field(description="The name of the group.") - signers: List[SubSignatureRequestSigner] = Field(description="Signers belonging to this Group. **NOTE:** Only `name`, `email_address`, and `pin` are available to Grouped Signers. We will ignore all other properties, even though they are listed below.") - order: Optional[StrictInt] = Field(default=None, description="The order the group is required to sign in. Use this instead of Signer-level `order`.") + signers: List[SubSignatureRequestSigner] = Field( + description="Signers belonging to this Group. **NOTE:** Only `name`, `email_address`, and `pin` are available to Grouped Signers. We will ignore all other properties, even though they are listed below." + ) + order: Optional[StrictInt] = Field( + default=None, + description="The order the group is required to sign in. Use this instead of Signer-level `order`.", + ) __properties: ClassVar[List[str]] = ["group", "signers", "order"] model_config = ConfigDict( @@ -43,7 +50,6 @@ class SubSignatureRequestGroupedSigners(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +59,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -91,7 +99,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_signers in self.signers: if _item_signers: _items.append(_item_signers.to_dict()) - _dict['signers'] = _items + _dict["signers"] = _items return _dict @classmethod @@ -103,11 +111,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "group": obj.get("group"), - "signers": [SubSignatureRequestSigner.from_dict(_item) for _item in obj["signers"]] if obj.get("signers") is not None else None, - "order": obj.get("order") - }) + _obj = cls.model_validate( + { + "group": obj.get("group"), + "signers": ( + [ + SubSignatureRequestSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "order": obj.get("order"), + } + ) return _obj @classmethod @@ -133,4 +150,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "signers", ] - diff --git a/sdks/python/dropbox_sign/models/sub_signature_request_signer.py b/sdks/python/dropbox_sign/models/sub_signature_request_signer.py index ff4091a46..ac567d564 100644 --- a/sdks/python/dropbox_sign/models/sub_signature_request_signer.py +++ b/sdks/python/dropbox_sign/models/sub_signature_request_signer.py @@ -27,26 +27,50 @@ from pydantic import StrictBool from typing import Union + class SubSignatureRequestSigner(BaseModel): """ SubSignatureRequestSigner - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr = Field(description="The name of the signer.") email_address: StrictStr = Field(description="The email address of the signer.") - order: Optional[StrictInt] = Field(default=None, description="The order the signer is required to sign in.") - pin: Optional[Annotated[str, Field(min_length=4, strict=True, max_length=12)]] = Field(default=None, description="The 4- to 12-character access code that will secure this signer's signature page.") - sms_phone_number: Optional[StrictStr] = Field(default=None, description="An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher.") - sms_phone_number_type: Optional[StrictStr] = Field(default=None, description="Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email).") - __properties: ClassVar[List[str]] = ["name", "email_address", "order", "pin", "sms_phone_number", "sms_phone_number_type"] - - @field_validator('sms_phone_number_type') + order: Optional[StrictInt] = Field( + default=None, description="The order the signer is required to sign in." + ) + pin: Optional[Annotated[str, Field(min_length=4, strict=True, max_length=12)]] = ( + Field( + default=None, + description="The 4- to 12-character access code that will secure this signer's signature page.", + ) + ) + sms_phone_number: Optional[StrictStr] = Field( + default=None, + description="An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher.", + ) + sms_phone_number_type: Optional[StrictStr] = Field( + default=None, + description="Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email).", + ) + __properties: ClassVar[List[str]] = [ + "name", + "email_address", + "order", + "pin", + "sms_phone_number", + "sms_phone_number_type", + ] + + @field_validator("sms_phone_number_type") def sms_phone_number_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['authentication', 'delivery']): - raise ValueError("must be one of enum values ('authentication', 'delivery')") + if value not in set(["authentication", "delivery"]): + raise ValueError( + "must be one of enum values ('authentication', 'delivery')" + ) return value model_config = ConfigDict( @@ -56,7 +80,6 @@ def sms_phone_number_type_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +89,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -109,14 +134,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "email_address": obj.get("email_address"), - "order": obj.get("order"), - "pin": obj.get("pin"), - "sms_phone_number": obj.get("sms_phone_number"), - "sms_phone_number_type": obj.get("sms_phone_number_type") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "email_address": obj.get("email_address"), + "order": obj.get("order"), + "pin": obj.get("pin"), + "sms_phone_number": obj.get("sms_phone_number"), + "sms_phone_number_type": obj.get("sms_phone_number_type"), + } + ) return _obj @classmethod @@ -142,6 +169,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_signature_request_template_signer.py b/sdks/python/dropbox_sign/models/sub_signature_request_template_signer.py index d5affd2e9..44b6881d8 100644 --- a/sdks/python/dropbox_sign/models/sub_signature_request_template_signer.py +++ b/sdks/python/dropbox_sign/models/sub_signature_request_template_signer.py @@ -27,26 +27,50 @@ from pydantic import StrictBool from typing import Union + class SubSignatureRequestTemplateSigner(BaseModel): """ SubSignatureRequestTemplateSigner - """ # noqa: E501 - role: StrictStr = Field(description="Must match an existing role in chosen Template(s). It's case-sensitive.") + """ # noqa: E501 + + role: StrictStr = Field( + description="Must match an existing role in chosen Template(s). It's case-sensitive." + ) name: StrictStr = Field(description="The name of the signer.") email_address: StrictStr = Field(description="The email address of the signer.") - pin: Optional[Annotated[str, Field(min_length=4, strict=True, max_length=12)]] = Field(default=None, description="The 4- to 12-character access code that will secure this signer's signature page.") - sms_phone_number: Optional[StrictStr] = Field(default=None, description="An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher.") - sms_phone_number_type: Optional[StrictStr] = Field(default=None, description="Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email).") - __properties: ClassVar[List[str]] = ["role", "name", "email_address", "pin", "sms_phone_number", "sms_phone_number_type"] - - @field_validator('sms_phone_number_type') + pin: Optional[Annotated[str, Field(min_length=4, strict=True, max_length=12)]] = ( + Field( + default=None, + description="The 4- to 12-character access code that will secure this signer's signature page.", + ) + ) + sms_phone_number: Optional[StrictStr] = Field( + default=None, + description="An E.164 formatted phone number. By using the feature, you agree you are responsible for obtaining a signer's consent to receive text messages from Dropbox Sign related to this signature request and confirm you have obtained such consent from all signers prior to enabling SMS delivery for this signature request. [Learn more](https://faq.hellosign.com/hc/en-us/articles/15815316468877-Dropbox-Sign-SMS-tools-add-on). **NOTE:** Not available in test mode and requires a Standard plan or higher.", + ) + sms_phone_number_type: Optional[StrictStr] = Field( + default=None, + description="Specifies the feature used with the `sms_phone_number`. Default `authentication`. If `authentication`, signer is sent a verification code via SMS that is required to access the document. If `delivery`, a link to complete the signature request is delivered via SMS (_and_ email).", + ) + __properties: ClassVar[List[str]] = [ + "role", + "name", + "email_address", + "pin", + "sms_phone_number", + "sms_phone_number_type", + ] + + @field_validator("sms_phone_number_type") def sms_phone_number_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['authentication', 'delivery']): - raise ValueError("must be one of enum values ('authentication', 'delivery')") + if value not in set(["authentication", "delivery"]): + raise ValueError( + "must be one of enum values ('authentication', 'delivery')" + ) return value model_config = ConfigDict( @@ -56,7 +80,6 @@ def sms_phone_number_type_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +89,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -109,14 +134,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "role": obj.get("role"), - "name": obj.get("name"), - "email_address": obj.get("email_address"), - "pin": obj.get("pin"), - "sms_phone_number": obj.get("sms_phone_number"), - "sms_phone_number_type": obj.get("sms_phone_number_type") - }) + _obj = cls.model_validate( + { + "role": obj.get("role"), + "name": obj.get("name"), + "email_address": obj.get("email_address"), + "pin": obj.get("pin"), + "sms_phone_number": obj.get("sms_phone_number"), + "sms_phone_number_type": obj.get("sms_phone_number_type"), + } + ) return _obj @classmethod @@ -142,6 +169,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_signing_options.py b/sdks/python/dropbox_sign/models/sub_signing_options.py index eec7baf9c..e6cd96000 100644 --- a/sdks/python/dropbox_sign/models/sub_signing_options.py +++ b/sdks/python/dropbox_sign/models/sub_signing_options.py @@ -18,7 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set, Tuple from typing_extensions import Self @@ -26,22 +33,42 @@ from pydantic import StrictBool from typing import Union + class SubSigningOptions(BaseModel): """ This allows the requester to specify the types allowed for creating a signature. **NOTE:** If `signing_options` are not defined in the request, the allowed types will default to those specified in the account settings. - """ # noqa: E501 - default_type: StrictStr = Field(description="The default type shown (limited to the listed types)") - draw: Optional[StrictBool] = Field(default=False, description="Allows drawing the signature") - phone: Optional[StrictBool] = Field(default=False, description="Allows using a smartphone to email the signature") - type: Optional[StrictBool] = Field(default=False, description="Allows typing the signature") - upload: Optional[StrictBool] = Field(default=False, description="Allows uploading the signature") - __properties: ClassVar[List[str]] = ["default_type", "draw", "phone", "type", "upload"] - - @field_validator('default_type') + """ # noqa: E501 + + default_type: StrictStr = Field( + description="The default type shown (limited to the listed types)" + ) + draw: Optional[StrictBool] = Field( + default=False, description="Allows drawing the signature" + ) + phone: Optional[StrictBool] = Field( + default=False, description="Allows using a smartphone to email the signature" + ) + type: Optional[StrictBool] = Field( + default=False, description="Allows typing the signature" + ) + upload: Optional[StrictBool] = Field( + default=False, description="Allows uploading the signature" + ) + __properties: ClassVar[List[str]] = [ + "default_type", + "draw", + "phone", + "type", + "upload", + ] + + @field_validator("default_type") def default_type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['draw', 'phone', 'type', 'upload']): - raise ValueError("must be one of enum values ('draw', 'phone', 'type', 'upload')") + if value not in set(["draw", "phone", "type", "upload"]): + raise ValueError( + "must be one of enum values ('draw', 'phone', 'type', 'upload')" + ) return value model_config = ConfigDict( @@ -51,7 +78,6 @@ def default_type_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -61,7 +87,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -104,13 +132,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "default_type": obj.get("default_type"), - "draw": obj.get("draw") if obj.get("draw") is not None else False, - "phone": obj.get("phone") if obj.get("phone") is not None else False, - "type": obj.get("type") if obj.get("type") is not None else False, - "upload": obj.get("upload") if obj.get("upload") is not None else False - }) + _obj = cls.model_validate( + { + "default_type": obj.get("default_type"), + "draw": obj.get("draw") if obj.get("draw") is not None else False, + "phone": obj.get("phone") if obj.get("phone") is not None else False, + "type": obj.get("type") if obj.get("type") is not None else False, + "upload": obj.get("upload") if obj.get("upload") is not None else False, + } + ) return _obj @classmethod @@ -135,6 +165,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_team_response.py b/sdks/python/dropbox_sign/models/sub_team_response.py index 8cd9ad5db..98e55e192 100644 --- a/sdks/python/dropbox_sign/models/sub_team_response.py +++ b/sdks/python/dropbox_sign/models/sub_team_response.py @@ -26,10 +26,12 @@ from pydantic import StrictBool from typing import Union + class SubTeamResponse(BaseModel): """ SubTeamResponse - """ # noqa: E501 + """ # noqa: E501 + team_id: Optional[StrictStr] = Field(default=None, description="The id of a team") name: Optional[StrictStr] = Field(default=None, description="The name of a team") __properties: ClassVar[List[str]] = ["team_id", "name"] @@ -41,7 +43,6 @@ class SubTeamResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +52,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +97,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "team_id": obj.get("team_id"), - "name": obj.get("name") - }) + _obj = cls.model_validate( + {"team_id": obj.get("team_id"), "name": obj.get("name")} + ) return _obj @classmethod @@ -119,6 +121,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_template_role.py b/sdks/python/dropbox_sign/models/sub_template_role.py index 95eda3741..187fa77f9 100644 --- a/sdks/python/dropbox_sign/models/sub_template_role.py +++ b/sdks/python/dropbox_sign/models/sub_template_role.py @@ -26,12 +26,20 @@ from pydantic import StrictBool from typing import Union + class SubTemplateRole(BaseModel): """ SubTemplateRole - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="The role name of the signer that will be displayed when the template is used to create a signature request.") - order: Optional[StrictInt] = Field(default=None, description="The order in which this signer role is required to sign.") + """ # noqa: E501 + + name: Optional[StrictStr] = Field( + default=None, + description="The role name of the signer that will be displayed when the template is used to create a signature request.", + ) + order: Optional[StrictInt] = Field( + default=None, + description="The order in which this signer role is required to sign.", + ) __properties: ClassVar[List[str]] = ["name", "order"] model_config = ConfigDict( @@ -41,7 +49,6 @@ class SubTemplateRole(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +58,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +103,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "order": obj.get("order") - }) + _obj = cls.model_validate({"name": obj.get("name"), "order": obj.get("order")}) return _obj @classmethod @@ -119,6 +125,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py index 9f705a09a..fcc70e385 100644 --- a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py +++ b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_signer.py @@ -26,13 +26,17 @@ from pydantic import StrictBool from typing import Union + class SubUnclaimedDraftSigner(BaseModel): """ SubUnclaimedDraftSigner - """ # noqa: E501 + """ # noqa: E501 + email_address: StrictStr = Field(description="The email address of the signer.") name: StrictStr = Field(description="The name of the signer.") - order: Optional[StrictInt] = Field(default=None, description="The order the signer is required to sign in.") + order: Optional[StrictInt] = Field( + default=None, description="The order the signer is required to sign in." + ) __properties: ClassVar[List[str]] = ["email_address", "name", "order"] model_config = ConfigDict( @@ -42,7 +46,6 @@ class SubUnclaimedDraftSigner(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +55,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,11 +100,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "email_address": obj.get("email_address"), - "name": obj.get("name"), - "order": obj.get("order") - }) + _obj = cls.model_validate( + { + "email_address": obj.get("email_address"), + "name": obj.get("name"), + "order": obj.get("order"), + } + ) return _obj @classmethod @@ -122,6 +129,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_template_signer.py b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_template_signer.py index fbe77604b..2154537e8 100644 --- a/sdks/python/dropbox_sign/models/sub_unclaimed_draft_template_signer.py +++ b/sdks/python/dropbox_sign/models/sub_unclaimed_draft_template_signer.py @@ -26,13 +26,21 @@ from pydantic import StrictBool from typing import Union + class SubUnclaimedDraftTemplateSigner(BaseModel): """ SubUnclaimedDraftTemplateSigner - """ # noqa: E501 - role: StrictStr = Field(description="Must match an existing role in chosen Template(s).") - name: StrictStr = Field(description="The name of the signer filling the role of `role`.") - email_address: StrictStr = Field(description="The email address of the signer filling the role of `role`.") + """ # noqa: E501 + + role: StrictStr = Field( + description="Must match an existing role in chosen Template(s)." + ) + name: StrictStr = Field( + description="The name of the signer filling the role of `role`." + ) + email_address: StrictStr = Field( + description="The email address of the signer filling the role of `role`." + ) __properties: ClassVar[List[str]] = ["role", "name", "email_address"] model_config = ConfigDict( @@ -42,7 +50,6 @@ class SubUnclaimedDraftTemplateSigner(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +59,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,11 +104,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "role": obj.get("role"), - "name": obj.get("name"), - "email_address": obj.get("email_address") - }) + _obj = cls.model_validate( + { + "role": obj.get("role"), + "name": obj.get("name"), + "email_address": obj.get("email_address"), + } + ) return _obj @classmethod @@ -122,6 +133,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/sub_white_labeling_options.py b/sdks/python/dropbox_sign/models/sub_white_labeling_options.py index d6e722663..63b8b6f98 100644 --- a/sdks/python/dropbox_sign/models/sub_white_labeling_options.py +++ b/sdks/python/dropbox_sign/models/sub_white_labeling_options.py @@ -18,7 +18,14 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictStr, + field_validator, +) from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set, Tuple from typing_extensions import Self @@ -26,34 +33,55 @@ from pydantic import StrictBool from typing import Union + class SubWhiteLabelingOptions(BaseModel): """ An array of elements and values serialized to a string, to be used to customize the app's signer page. (Only applies to some API plans) Take a look at our [white labeling guide](https://developers.hellosign.com/api/reference/premium-branding/) to learn more. - """ # noqa: E501 - header_background_color: Optional[StrictStr] = '#1A1A1A' - legal_version: Optional[StrictStr] = 'terms1' - link_color: Optional[StrictStr] = '#00B3E6' - page_background_color: Optional[StrictStr] = '#F7F8F9' - primary_button_color: Optional[StrictStr] = '#00B3E6' - primary_button_color_hover: Optional[StrictStr] = '#00B3E6' - primary_button_text_color: Optional[StrictStr] = '#FFFFFF' - primary_button_text_color_hover: Optional[StrictStr] = '#FFFFFF' - secondary_button_color: Optional[StrictStr] = '#FFFFFF' - secondary_button_color_hover: Optional[StrictStr] = '#FFFFFF' - secondary_button_text_color: Optional[StrictStr] = '#00B3E6' - secondary_button_text_color_hover: Optional[StrictStr] = '#00B3E6' - text_color1: Optional[StrictStr] = '#808080' - text_color2: Optional[StrictStr] = '#FFFFFF' - reset_to_default: Optional[StrictBool] = Field(default=None, description="Resets white labeling options to defaults. Only useful when updating an API App.") - __properties: ClassVar[List[str]] = ["header_background_color", "legal_version", "link_color", "page_background_color", "primary_button_color", "primary_button_color_hover", "primary_button_text_color", "primary_button_text_color_hover", "secondary_button_color", "secondary_button_color_hover", "secondary_button_text_color", "secondary_button_text_color_hover", "text_color1", "text_color2", "reset_to_default"] - - @field_validator('legal_version') + """ # noqa: E501 + + header_background_color: Optional[StrictStr] = "#1A1A1A" + legal_version: Optional[StrictStr] = "terms1" + link_color: Optional[StrictStr] = "#00B3E6" + page_background_color: Optional[StrictStr] = "#F7F8F9" + primary_button_color: Optional[StrictStr] = "#00B3E6" + primary_button_color_hover: Optional[StrictStr] = "#00B3E6" + primary_button_text_color: Optional[StrictStr] = "#FFFFFF" + primary_button_text_color_hover: Optional[StrictStr] = "#FFFFFF" + secondary_button_color: Optional[StrictStr] = "#FFFFFF" + secondary_button_color_hover: Optional[StrictStr] = "#FFFFFF" + secondary_button_text_color: Optional[StrictStr] = "#00B3E6" + secondary_button_text_color_hover: Optional[StrictStr] = "#00B3E6" + text_color1: Optional[StrictStr] = "#808080" + text_color2: Optional[StrictStr] = "#FFFFFF" + reset_to_default: Optional[StrictBool] = Field( + default=None, + description="Resets white labeling options to defaults. Only useful when updating an API App.", + ) + __properties: ClassVar[List[str]] = [ + "header_background_color", + "legal_version", + "link_color", + "page_background_color", + "primary_button_color", + "primary_button_color_hover", + "primary_button_text_color", + "primary_button_text_color_hover", + "secondary_button_color", + "secondary_button_color_hover", + "secondary_button_text_color", + "secondary_button_text_color_hover", + "text_color1", + "text_color2", + "reset_to_default", + ] + + @field_validator("legal_version") def legal_version_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['terms1', 'terms2']): + if value not in set(["terms1", "terms2"]): raise ValueError("must be one of enum values ('terms1', 'terms2')") return value @@ -64,7 +92,6 @@ def legal_version_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +101,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -117,23 +146,81 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "header_background_color": obj.get("header_background_color") if obj.get("header_background_color") is not None else '#1A1A1A', - "legal_version": obj.get("legal_version") if obj.get("legal_version") is not None else 'terms1', - "link_color": obj.get("link_color") if obj.get("link_color") is not None else '#00B3E6', - "page_background_color": obj.get("page_background_color") if obj.get("page_background_color") is not None else '#F7F8F9', - "primary_button_color": obj.get("primary_button_color") if obj.get("primary_button_color") is not None else '#00B3E6', - "primary_button_color_hover": obj.get("primary_button_color_hover") if obj.get("primary_button_color_hover") is not None else '#00B3E6', - "primary_button_text_color": obj.get("primary_button_text_color") if obj.get("primary_button_text_color") is not None else '#FFFFFF', - "primary_button_text_color_hover": obj.get("primary_button_text_color_hover") if obj.get("primary_button_text_color_hover") is not None else '#FFFFFF', - "secondary_button_color": obj.get("secondary_button_color") if obj.get("secondary_button_color") is not None else '#FFFFFF', - "secondary_button_color_hover": obj.get("secondary_button_color_hover") if obj.get("secondary_button_color_hover") is not None else '#FFFFFF', - "secondary_button_text_color": obj.get("secondary_button_text_color") if obj.get("secondary_button_text_color") is not None else '#00B3E6', - "secondary_button_text_color_hover": obj.get("secondary_button_text_color_hover") if obj.get("secondary_button_text_color_hover") is not None else '#00B3E6', - "text_color1": obj.get("text_color1") if obj.get("text_color1") is not None else '#808080', - "text_color2": obj.get("text_color2") if obj.get("text_color2") is not None else '#FFFFFF', - "reset_to_default": obj.get("reset_to_default") - }) + _obj = cls.model_validate( + { + "header_background_color": ( + obj.get("header_background_color") + if obj.get("header_background_color") is not None + else "#1A1A1A" + ), + "legal_version": ( + obj.get("legal_version") + if obj.get("legal_version") is not None + else "terms1" + ), + "link_color": ( + obj.get("link_color") + if obj.get("link_color") is not None + else "#00B3E6" + ), + "page_background_color": ( + obj.get("page_background_color") + if obj.get("page_background_color") is not None + else "#F7F8F9" + ), + "primary_button_color": ( + obj.get("primary_button_color") + if obj.get("primary_button_color") is not None + else "#00B3E6" + ), + "primary_button_color_hover": ( + obj.get("primary_button_color_hover") + if obj.get("primary_button_color_hover") is not None + else "#00B3E6" + ), + "primary_button_text_color": ( + obj.get("primary_button_text_color") + if obj.get("primary_button_text_color") is not None + else "#FFFFFF" + ), + "primary_button_text_color_hover": ( + obj.get("primary_button_text_color_hover") + if obj.get("primary_button_text_color_hover") is not None + else "#FFFFFF" + ), + "secondary_button_color": ( + obj.get("secondary_button_color") + if obj.get("secondary_button_color") is not None + else "#FFFFFF" + ), + "secondary_button_color_hover": ( + obj.get("secondary_button_color_hover") + if obj.get("secondary_button_color_hover") is not None + else "#FFFFFF" + ), + "secondary_button_text_color": ( + obj.get("secondary_button_text_color") + if obj.get("secondary_button_text_color") is not None + else "#00B3E6" + ), + "secondary_button_text_color_hover": ( + obj.get("secondary_button_text_color_hover") + if obj.get("secondary_button_text_color_hover") is not None + else "#00B3E6" + ), + "text_color1": ( + obj.get("text_color1") + if obj.get("text_color1") is not None + else "#808080" + ), + "text_color2": ( + obj.get("text_color2") + if obj.get("text_color2") is not None + else "#FFFFFF" + ), + "reset_to_default": obj.get("reset_to_default"), + } + ) return _obj @classmethod @@ -168,6 +255,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/team_add_member_request.py b/sdks/python/dropbox_sign/models/team_add_member_request.py index 3358304f7..275ccf00f 100644 --- a/sdks/python/dropbox_sign/models/team_add_member_request.py +++ b/sdks/python/dropbox_sign/models/team_add_member_request.py @@ -26,23 +26,36 @@ from pydantic import StrictBool from typing import Union + class TeamAddMemberRequest(BaseModel): """ TeamAddMemberRequest - """ # noqa: E501 - account_id: Optional[StrictStr] = Field(default=None, description="`account_id` or `email_address` is required. If both are provided, the account id prevails. Account id of the user to invite to your Team.") - email_address: Optional[StrictStr] = Field(default=None, description="`account_id` or `email_address` is required, If both are provided, the account id prevails. Email address of the user to invite to your Team.") - role: Optional[StrictStr] = Field(default=None, description="A role member will take in a new Team. **NOTE:** This parameter is used only if `team_id` is provided.") + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, + description="`account_id` or `email_address` is required. If both are provided, the account id prevails. Account id of the user to invite to your Team.", + ) + email_address: Optional[StrictStr] = Field( + default=None, + description="`account_id` or `email_address` is required, If both are provided, the account id prevails. Email address of the user to invite to your Team.", + ) + role: Optional[StrictStr] = Field( + default=None, + description="A role member will take in a new Team. **NOTE:** This parameter is used only if `team_id` is provided.", + ) __properties: ClassVar[List[str]] = ["account_id", "email_address", "role"] - @field_validator('role') + @field_validator("role") def role_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['Member', 'Developer', 'Team Manager', 'Admin']): - raise ValueError("must be one of enum values ('Member', 'Developer', 'Team Manager', 'Admin')") + if value not in set(["Member", "Developer", "Team Manager", "Admin"]): + raise ValueError( + "must be one of enum values ('Member', 'Developer', 'Team Manager', 'Admin')" + ) return value model_config = ConfigDict( @@ -52,7 +65,6 @@ def role_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +74,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -105,11 +119,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account_id": obj.get("account_id"), - "email_address": obj.get("email_address"), - "role": obj.get("role") - }) + _obj = cls.model_validate( + { + "account_id": obj.get("account_id"), + "email_address": obj.get("email_address"), + "role": obj.get("role"), + } + ) return _obj @classmethod @@ -132,6 +148,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/team_create_request.py b/sdks/python/dropbox_sign/models/team_create_request.py index 6ffdbbe0f..0c0c696ad 100644 --- a/sdks/python/dropbox_sign/models/team_create_request.py +++ b/sdks/python/dropbox_sign/models/team_create_request.py @@ -26,11 +26,15 @@ from pydantic import StrictBool from typing import Union + class TeamCreateRequest(BaseModel): """ TeamCreateRequest - """ # noqa: E501 - name: Optional[StrictStr] = Field(default='Untitled Team', description="The name of your Team.") + """ # noqa: E501 + + name: Optional[StrictStr] = Field( + default="Untitled Team", description="The name of your Team." + ) __properties: ClassVar[List[str]] = ["name"] model_config = ConfigDict( @@ -40,7 +44,6 @@ class TeamCreateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +53,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +98,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name") if obj.get("name") is not None else 'Untitled Team' - }) + _obj = cls.model_validate( + { + "name": ( + obj.get("name") if obj.get("name") is not None else "Untitled Team" + ) + } + ) return _obj @classmethod @@ -116,6 +125,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/team_get_info_response.py b/sdks/python/dropbox_sign/models/team_get_info_response.py index 553e0388f..3453baa20 100644 --- a/sdks/python/dropbox_sign/models/team_get_info_response.py +++ b/sdks/python/dropbox_sign/models/team_get_info_response.py @@ -28,12 +28,16 @@ from pydantic import StrictBool from typing import Union + class TeamGetInfoResponse(BaseModel): """ TeamGetInfoResponse - """ # noqa: E501 + """ # noqa: E501 + team: TeamInfoResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["team", "warnings"] model_config = ConfigDict( @@ -43,7 +47,6 @@ class TeamGetInfoResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +92,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of team if self.team: - _dict['team'] = self.team.to_dict() + _dict["team"] = self.team.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +111,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "team": TeamInfoResponse.from_dict(obj["team"]) if obj.get("team") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "team": ( + TeamInfoResponse.from_dict(obj["team"]) + if obj.get("team") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +149,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/team_get_response.py b/sdks/python/dropbox_sign/models/team_get_response.py index fcb6fb9f9..65845b263 100644 --- a/sdks/python/dropbox_sign/models/team_get_response.py +++ b/sdks/python/dropbox_sign/models/team_get_response.py @@ -28,12 +28,16 @@ from pydantic import StrictBool from typing import Union + class TeamGetResponse(BaseModel): """ TeamGetResponse - """ # noqa: E501 + """ # noqa: E501 + team: TeamResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["team", "warnings"] model_config = ConfigDict( @@ -43,7 +47,6 @@ class TeamGetResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +92,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of team if self.team: - _dict['team'] = self.team.to_dict() + _dict["team"] = self.team.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +111,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "team": TeamResponse.from_dict(obj["team"]) if obj.get("team") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "team": ( + TeamResponse.from_dict(obj["team"]) + if obj.get("team") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +149,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/team_info_response.py b/sdks/python/dropbox_sign/models/team_info_response.py index 533d3eba1..4c6ae507f 100644 --- a/sdks/python/dropbox_sign/models/team_info_response.py +++ b/sdks/python/dropbox_sign/models/team_info_response.py @@ -27,16 +27,28 @@ from pydantic import StrictBool from typing import Union + class TeamInfoResponse(BaseModel): """ TeamInfoResponse - """ # noqa: E501 + """ # noqa: E501 + team_id: Optional[StrictStr] = Field(default=None, description="The id of a team") team_parent: Optional[TeamParentResponse] = None name: Optional[StrictStr] = Field(default=None, description="The name of a team") - num_members: Optional[StrictInt] = Field(default=None, description="Number of members within a team") - num_sub_teams: Optional[StrictInt] = Field(default=None, description="Number of sub teams within a team") - __properties: ClassVar[List[str]] = ["team_id", "team_parent", "name", "num_members", "num_sub_teams"] + num_members: Optional[StrictInt] = Field( + default=None, description="Number of members within a team" + ) + num_sub_teams: Optional[StrictInt] = Field( + default=None, description="Number of sub teams within a team" + ) + __properties: ClassVar[List[str]] = [ + "team_id", + "team_parent", + "name", + "num_members", + "num_sub_teams", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +57,6 @@ class TeamInfoResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +66,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -89,7 +102,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of team_parent if self.team_parent: - _dict['team_parent'] = self.team_parent.to_dict() + _dict["team_parent"] = self.team_parent.to_dict() return _dict @classmethod @@ -101,13 +114,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "team_id": obj.get("team_id"), - "team_parent": TeamParentResponse.from_dict(obj["team_parent"]) if obj.get("team_parent") is not None else None, - "name": obj.get("name"), - "num_members": obj.get("num_members"), - "num_sub_teams": obj.get("num_sub_teams") - }) + _obj = cls.model_validate( + { + "team_id": obj.get("team_id"), + "team_parent": ( + TeamParentResponse.from_dict(obj["team_parent"]) + if obj.get("team_parent") is not None + else None + ), + "name": obj.get("name"), + "num_members": obj.get("num_members"), + "num_sub_teams": obj.get("num_sub_teams"), + } + ) return _obj @classmethod @@ -132,6 +151,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/team_invite_response.py b/sdks/python/dropbox_sign/models/team_invite_response.py index 5a5068b00..fbc7d130a 100644 --- a/sdks/python/dropbox_sign/models/team_invite_response.py +++ b/sdks/python/dropbox_sign/models/team_invite_response.py @@ -26,17 +26,36 @@ from pydantic import StrictBool from typing import Union + class TeamInviteResponse(BaseModel): """ TeamInviteResponse - """ # noqa: E501 - email_address: Optional[StrictStr] = Field(default=None, description="Email address of the user invited to this team.") + """ # noqa: E501 + + email_address: Optional[StrictStr] = Field( + default=None, description="Email address of the user invited to this team." + ) team_id: Optional[StrictStr] = Field(default=None, description="Id of the team.") - role: Optional[StrictStr] = Field(default=None, description="Role of the user invited to this team.") - sent_at: Optional[StrictInt] = Field(default=None, description="Timestamp when the invitation was sent.") - redeemed_at: Optional[StrictInt] = Field(default=None, description="Timestamp when the invitation was redeemed.") - expires_at: Optional[StrictInt] = Field(default=None, description="Timestamp when the invitation is expiring.") - __properties: ClassVar[List[str]] = ["email_address", "team_id", "role", "sent_at", "redeemed_at", "expires_at"] + role: Optional[StrictStr] = Field( + default=None, description="Role of the user invited to this team." + ) + sent_at: Optional[StrictInt] = Field( + default=None, description="Timestamp when the invitation was sent." + ) + redeemed_at: Optional[StrictInt] = Field( + default=None, description="Timestamp when the invitation was redeemed." + ) + expires_at: Optional[StrictInt] = Field( + default=None, description="Timestamp when the invitation is expiring." + ) + __properties: ClassVar[List[str]] = [ + "email_address", + "team_id", + "role", + "sent_at", + "redeemed_at", + "expires_at", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +64,6 @@ class TeamInviteResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +73,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -98,14 +118,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "email_address": obj.get("email_address"), - "team_id": obj.get("team_id"), - "role": obj.get("role"), - "sent_at": obj.get("sent_at"), - "redeemed_at": obj.get("redeemed_at"), - "expires_at": obj.get("expires_at") - }) + _obj = cls.model_validate( + { + "email_address": obj.get("email_address"), + "team_id": obj.get("team_id"), + "role": obj.get("role"), + "sent_at": obj.get("sent_at"), + "redeemed_at": obj.get("redeemed_at"), + "expires_at": obj.get("expires_at"), + } + ) return _obj @classmethod @@ -131,6 +153,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/team_invites_response.py b/sdks/python/dropbox_sign/models/team_invites_response.py index e54721b1a..aa448daff 100644 --- a/sdks/python/dropbox_sign/models/team_invites_response.py +++ b/sdks/python/dropbox_sign/models/team_invites_response.py @@ -28,11 +28,15 @@ from pydantic import StrictBool from typing import Union + class TeamInvitesResponse(BaseModel): """ TeamInvitesResponse - """ # noqa: E501 - team_invites: List[TeamInviteResponse] = Field(description="Contains a list of team invites and their roles.") + """ # noqa: E501 + + team_invites: List[TeamInviteResponse] = Field( + description="Contains a list of team invites and their roles." + ) warnings: Optional[List[WarningResponse]] = None __properties: ClassVar[List[str]] = ["team_invites", "warnings"] @@ -43,7 +47,6 @@ class TeamInvitesResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -91,14 +96,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_team_invites in self.team_invites: if _item_team_invites: _items.append(_item_team_invites.to_dict()) - _dict['team_invites'] = _items + _dict["team_invites"] = _items # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -110,10 +115,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "team_invites": [TeamInviteResponse.from_dict(_item) for _item in obj["team_invites"]] if obj.get("team_invites") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "team_invites": ( + [ + TeamInviteResponse.from_dict(_item) + for _item in obj["team_invites"] + ] + if obj.get("team_invites") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -139,4 +157,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "team_invites", "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/team_member_response.py b/sdks/python/dropbox_sign/models/team_member_response.py index d880c3cc0..0930eaa85 100644 --- a/sdks/python/dropbox_sign/models/team_member_response.py +++ b/sdks/python/dropbox_sign/models/team_member_response.py @@ -26,13 +26,21 @@ from pydantic import StrictBool from typing import Union + class TeamMemberResponse(BaseModel): """ TeamMemberResponse - """ # noqa: E501 - account_id: Optional[StrictStr] = Field(default=None, description="Account id of the team member.") - email_address: Optional[StrictStr] = Field(default=None, description="Email address of the team member.") - role: Optional[StrictStr] = Field(default=None, description="The specific role a member has on the team.") + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, description="Account id of the team member." + ) + email_address: Optional[StrictStr] = Field( + default=None, description="Email address of the team member." + ) + role: Optional[StrictStr] = Field( + default=None, description="The specific role a member has on the team." + ) __properties: ClassVar[List[str]] = ["account_id", "email_address", "role"] model_config = ConfigDict( @@ -42,7 +50,6 @@ class TeamMemberResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +59,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,11 +104,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account_id": obj.get("account_id"), - "email_address": obj.get("email_address"), - "role": obj.get("role") - }) + _obj = cls.model_validate( + { + "account_id": obj.get("account_id"), + "email_address": obj.get("email_address"), + "role": obj.get("role"), + } + ) return _obj @classmethod @@ -122,6 +133,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/team_members_response.py b/sdks/python/dropbox_sign/models/team_members_response.py index 5ad4aaae1..f150d6ef4 100644 --- a/sdks/python/dropbox_sign/models/team_members_response.py +++ b/sdks/python/dropbox_sign/models/team_members_response.py @@ -29,11 +29,15 @@ from pydantic import StrictBool from typing import Union + class TeamMembersResponse(BaseModel): """ TeamMembersResponse - """ # noqa: E501 - team_members: List[TeamMemberResponse] = Field(description="Contains a list of team members and their roles for a specific team.") + """ # noqa: E501 + + team_members: List[TeamMemberResponse] = Field( + description="Contains a list of team members and their roles for a specific team." + ) list_info: ListInfoResponse warnings: Optional[List[WarningResponse]] = None __properties: ClassVar[List[str]] = ["team_members", "list_info", "warnings"] @@ -45,7 +49,6 @@ class TeamMembersResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +58,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,17 +98,17 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_team_members in self.team_members: if _item_team_members: _items.append(_item_team_members.to_dict()) - _dict['team_members'] = _items + _dict["team_members"] = _items # override the default output from pydantic by calling `to_dict()` of list_info if self.list_info: - _dict['list_info'] = self.list_info.to_dict() + _dict["list_info"] = self.list_info.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -115,11 +120,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "team_members": [TeamMemberResponse.from_dict(_item) for _item in obj["team_members"]] if obj.get("team_members") is not None else None, - "list_info": ListInfoResponse.from_dict(obj["list_info"]) if obj.get("list_info") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "team_members": ( + [ + TeamMemberResponse.from_dict(_item) + for _item in obj["team_members"] + ] + if obj.get("team_members") is not None + else None + ), + "list_info": ( + ListInfoResponse.from_dict(obj["list_info"]) + if obj.get("list_info") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -146,4 +168,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "team_members", "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/team_parent_response.py b/sdks/python/dropbox_sign/models/team_parent_response.py index 35cc1c00d..633b10b61 100644 --- a/sdks/python/dropbox_sign/models/team_parent_response.py +++ b/sdks/python/dropbox_sign/models/team_parent_response.py @@ -26,10 +26,12 @@ from pydantic import StrictBool from typing import Union + class TeamParentResponse(BaseModel): """ Information about the parent team if a team has one, set to `null` otherwise. - """ # noqa: E501 + """ # noqa: E501 + team_id: Optional[StrictStr] = Field(default=None, description="The id of a team") name: Optional[StrictStr] = Field(default=None, description="The name of a team") __properties: ClassVar[List[str]] = ["team_id", "name"] @@ -41,7 +43,6 @@ class TeamParentResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +52,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +97,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "team_id": obj.get("team_id"), - "name": obj.get("name") - }) + _obj = cls.model_validate( + {"team_id": obj.get("team_id"), "name": obj.get("name")} + ) return _obj @classmethod @@ -119,6 +121,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/team_remove_member_request.py b/sdks/python/dropbox_sign/models/team_remove_member_request.py index c1470da82..d21215dca 100644 --- a/sdks/python/dropbox_sign/models/team_remove_member_request.py +++ b/sdks/python/dropbox_sign/models/team_remove_member_request.py @@ -26,25 +26,49 @@ from pydantic import StrictBool from typing import Union + class TeamRemoveMemberRequest(BaseModel): """ TeamRemoveMemberRequest - """ # noqa: E501 - account_id: Optional[StrictStr] = Field(default=None, description="**account_id** or **email_address** is required. If both are provided, the account id prevails. Account id to remove from your Team.") - email_address: Optional[StrictStr] = Field(default=None, description="**account_id** or **email_address** is required. If both are provided, the account id prevails. Email address of the Account to remove from your Team.") - new_owner_email_address: Optional[StrictStr] = Field(default=None, description="The email address of an Account on this Team to receive all documents, templates, and API apps (if applicable) from the removed Account. If not provided, and on an Enterprise plan, this data will remain with the removed Account. **NOTE:** Only available for Enterprise plans.") - new_team_id: Optional[StrictStr] = Field(default=None, description="Id of the new Team.") - new_role: Optional[StrictStr] = Field(default=None, description="A new role member will take in a new Team. **NOTE:** This parameter is used only if `new_team_id` is provided.") - __properties: ClassVar[List[str]] = ["account_id", "email_address", "new_owner_email_address", "new_team_id", "new_role"] - - @field_validator('new_role') + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, + description="**account_id** or **email_address** is required. If both are provided, the account id prevails. Account id to remove from your Team.", + ) + email_address: Optional[StrictStr] = Field( + default=None, + description="**account_id** or **email_address** is required. If both are provided, the account id prevails. Email address of the Account to remove from your Team.", + ) + new_owner_email_address: Optional[StrictStr] = Field( + default=None, + description="The email address of an Account on this Team to receive all documents, templates, and API apps (if applicable) from the removed Account. If not provided, and on an Enterprise plan, this data will remain with the removed Account. **NOTE:** Only available for Enterprise plans.", + ) + new_team_id: Optional[StrictStr] = Field( + default=None, description="Id of the new Team." + ) + new_role: Optional[StrictStr] = Field( + default=None, + description="A new role member will take in a new Team. **NOTE:** This parameter is used only if `new_team_id` is provided.", + ) + __properties: ClassVar[List[str]] = [ + "account_id", + "email_address", + "new_owner_email_address", + "new_team_id", + "new_role", + ] + + @field_validator("new_role") def new_role_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['Member', 'Developer', 'Team Manager', 'Admin']): - raise ValueError("must be one of enum values ('Member', 'Developer', 'Team Manager', 'Admin')") + if value not in set(["Member", "Developer", "Team Manager", "Admin"]): + raise ValueError( + "must be one of enum values ('Member', 'Developer', 'Team Manager', 'Admin')" + ) return value model_config = ConfigDict( @@ -54,7 +78,6 @@ def new_role_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +87,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -107,13 +132,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account_id": obj.get("account_id"), - "email_address": obj.get("email_address"), - "new_owner_email_address": obj.get("new_owner_email_address"), - "new_team_id": obj.get("new_team_id"), - "new_role": obj.get("new_role") - }) + _obj = cls.model_validate( + { + "account_id": obj.get("account_id"), + "email_address": obj.get("email_address"), + "new_owner_email_address": obj.get("new_owner_email_address"), + "new_team_id": obj.get("new_team_id"), + "new_role": obj.get("new_role"), + } + ) return _obj @classmethod @@ -138,6 +165,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/team_response.py b/sdks/python/dropbox_sign/models/team_response.py index cba0fc05f..57bec3332 100644 --- a/sdks/python/dropbox_sign/models/team_response.py +++ b/sdks/python/dropbox_sign/models/team_response.py @@ -27,15 +27,28 @@ from pydantic import StrictBool from typing import Union + class TeamResponse(BaseModel): """ Contains information about your team and its members - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of your Team") accounts: Optional[List[AccountResponse]] = None - invited_accounts: Optional[List[AccountResponse]] = Field(default=None, description="A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`.") - invited_emails: Optional[List[StrictStr]] = Field(default=None, description="A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account.") - __properties: ClassVar[List[str]] = ["name", "accounts", "invited_accounts", "invited_emails"] + invited_accounts: Optional[List[AccountResponse]] = Field( + default=None, + description="A list of all Accounts that have an outstanding invitation to join your Team. Note that this response is a subset of the response parameters found in `GET /account`.", + ) + invited_emails: Optional[List[StrictStr]] = Field( + default=None, + description="A list of email addresses that have an outstanding invitation to join your Team and do not yet have a Dropbox Sign account.", + ) + __properties: ClassVar[List[str]] = [ + "name", + "accounts", + "invited_accounts", + "invited_emails", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +57,6 @@ class TeamResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -54,7 +66,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -92,14 +106,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_accounts in self.accounts: if _item_accounts: _items.append(_item_accounts.to_dict()) - _dict['accounts'] = _items + _dict["accounts"] = _items # override the default output from pydantic by calling `to_dict()` of each item in invited_accounts (list) _items = [] if self.invited_accounts: for _item_invited_accounts in self.invited_accounts: if _item_invited_accounts: _items.append(_item_invited_accounts.to_dict()) - _dict['invited_accounts'] = _items + _dict["invited_accounts"] = _items return _dict @classmethod @@ -111,12 +125,25 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "accounts": [AccountResponse.from_dict(_item) for _item in obj["accounts"]] if obj.get("accounts") is not None else None, - "invited_accounts": [AccountResponse.from_dict(_item) for _item in obj["invited_accounts"]] if obj.get("invited_accounts") is not None else None, - "invited_emails": obj.get("invited_emails") - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "accounts": ( + [AccountResponse.from_dict(_item) for _item in obj["accounts"]] + if obj.get("accounts") is not None + else None + ), + "invited_accounts": ( + [ + AccountResponse.from_dict(_item) + for _item in obj["invited_accounts"] + ] + if obj.get("invited_accounts") is not None + else None + ), + "invited_emails": obj.get("invited_emails"), + } + ) return _obj @classmethod @@ -145,4 +172,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "invited_accounts", "invited_emails", ] - diff --git a/sdks/python/dropbox_sign/models/team_sub_teams_response.py b/sdks/python/dropbox_sign/models/team_sub_teams_response.py index 99b767e3e..6d6b76c23 100644 --- a/sdks/python/dropbox_sign/models/team_sub_teams_response.py +++ b/sdks/python/dropbox_sign/models/team_sub_teams_response.py @@ -29,11 +29,15 @@ from pydantic import StrictBool from typing import Union + class TeamSubTeamsResponse(BaseModel): """ TeamSubTeamsResponse - """ # noqa: E501 - sub_teams: List[SubTeamResponse] = Field(description="Contains a list with sub teams.") + """ # noqa: E501 + + sub_teams: List[SubTeamResponse] = Field( + description="Contains a list with sub teams." + ) list_info: ListInfoResponse warnings: Optional[List[WarningResponse]] = None __properties: ClassVar[List[str]] = ["sub_teams", "list_info", "warnings"] @@ -45,7 +49,6 @@ class TeamSubTeamsResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +58,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,17 +98,17 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_sub_teams in self.sub_teams: if _item_sub_teams: _items.append(_item_sub_teams.to_dict()) - _dict['sub_teams'] = _items + _dict["sub_teams"] = _items # override the default output from pydantic by calling `to_dict()` of list_info if self.list_info: - _dict['list_info'] = self.list_info.to_dict() + _dict["list_info"] = self.list_info.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -115,11 +120,25 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "sub_teams": [SubTeamResponse.from_dict(_item) for _item in obj["sub_teams"]] if obj.get("sub_teams") is not None else None, - "list_info": ListInfoResponse.from_dict(obj["list_info"]) if obj.get("list_info") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "sub_teams": ( + [SubTeamResponse.from_dict(_item) for _item in obj["sub_teams"]] + if obj.get("sub_teams") is not None + else None + ), + "list_info": ( + ListInfoResponse.from_dict(obj["list_info"]) + if obj.get("list_info") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -146,4 +165,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "sub_teams", "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/team_update_request.py b/sdks/python/dropbox_sign/models/team_update_request.py index 48eed77ee..e7bdb4307 100644 --- a/sdks/python/dropbox_sign/models/team_update_request.py +++ b/sdks/python/dropbox_sign/models/team_update_request.py @@ -26,11 +26,15 @@ from pydantic import StrictBool from typing import Union + class TeamUpdateRequest(BaseModel): """ TeamUpdateRequest - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="The name of your Team.") + """ # noqa: E501 + + name: Optional[StrictStr] = Field( + default=None, description="The name of your Team." + ) __properties: ClassVar[List[str]] = ["name"] model_config = ConfigDict( @@ -40,7 +44,6 @@ class TeamUpdateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +53,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name") - }) + _obj = cls.model_validate({"name": obj.get("name")}) return _obj @classmethod @@ -116,6 +119,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_add_user_request.py b/sdks/python/dropbox_sign/models/template_add_user_request.py index bf8702fc6..34c4ed62d 100644 --- a/sdks/python/dropbox_sign/models/template_add_user_request.py +++ b/sdks/python/dropbox_sign/models/template_add_user_request.py @@ -26,14 +26,29 @@ from pydantic import StrictBool from typing import Union + class TemplateAddUserRequest(BaseModel): """ TemplateAddUserRequest - """ # noqa: E501 - account_id: Optional[StrictStr] = Field(default=None, description="The id of the Account to give access to the Template. **NOTE:** The account id prevails if email address is also provided.") - email_address: Optional[StrictStr] = Field(default=None, description="The email address of the Account to give access to the Template. **NOTE:** The account id prevails if it is also provided.") - skip_notification: Optional[StrictBool] = Field(default=False, description="If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`.") - __properties: ClassVar[List[str]] = ["account_id", "email_address", "skip_notification"] + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, + description="The id of the Account to give access to the Template. **NOTE:** The account id prevails if email address is also provided.", + ) + email_address: Optional[StrictStr] = Field( + default=None, + description="The email address of the Account to give access to the Template. **NOTE:** The account id prevails if it is also provided.", + ) + skip_notification: Optional[StrictBool] = Field( + default=False, + description="If set to `true`, the user does not receive an email notification when a template has been shared with them. Defaults to `false`.", + ) + __properties: ClassVar[List[str]] = [ + "account_id", + "email_address", + "skip_notification", + ] model_config = ConfigDict( populate_by_name=True, @@ -42,7 +57,6 @@ class TemplateAddUserRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +66,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -95,11 +111,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account_id": obj.get("account_id"), - "email_address": obj.get("email_address"), - "skip_notification": obj.get("skip_notification") if obj.get("skip_notification") is not None else False - }) + _obj = cls.model_validate( + { + "account_id": obj.get("account_id"), + "email_address": obj.get("email_address"), + "skip_notification": ( + obj.get("skip_notification") + if obj.get("skip_notification") is not None + else False + ), + } + ) return _obj @classmethod @@ -122,6 +144,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_create_embedded_draft_request.py b/sdks/python/dropbox_sign/models/template_create_embedded_draft_request.py index cd27ea0ff..983d872f7 100644 --- a/sdks/python/dropbox_sign/models/template_create_embedded_draft_request.py +++ b/sdks/python/dropbox_sign/models/template_create_embedded_draft_request.py @@ -26,7 +26,9 @@ from dropbox_sign.models.sub_field_options import SubFieldOptions from dropbox_sign.models.sub_form_field_group import SubFormFieldGroup from dropbox_sign.models.sub_form_field_rule import SubFormFieldRule -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from dropbox_sign.models.sub_merge_field import SubMergeField from dropbox_sign.models.sub_template_role import SubTemplateRole from typing import Optional, Set, Tuple @@ -35,36 +37,129 @@ from pydantic import StrictBool from typing import Union + class TemplateCreateEmbeddedDraftRequest(BaseModel): """ TemplateCreateEmbeddedDraftRequest - """ # noqa: E501 - client_id: StrictStr = Field(description="Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app.") - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field(default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - file_urls: Optional[List[StrictStr]] = Field(default=None, description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - allow_ccs: Optional[StrictBool] = Field(default=True, description="This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template.") - allow_reassign: Optional[StrictBool] = Field(default=False, description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.") - attachments: Optional[List[SubAttachment]] = Field(default=None, description="A list describing the attachments") - cc_roles: Optional[List[StrictStr]] = Field(default=None, description="The CC roles that must be assigned when using the template to send a signature request") + """ # noqa: E501 + + client_id: StrictStr = Field( + description="Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app." + ) + files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + allow_ccs: Optional[StrictBool] = Field( + default=True, + description="This allows the requester to specify whether the user is allowed to provide email addresses to CC when creating a template.", + ) + allow_reassign: Optional[StrictBool] = Field( + default=False, + description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.", + ) + attachments: Optional[List[SubAttachment]] = Field( + default=None, description="A list describing the attachments" + ) + cc_roles: Optional[List[StrictStr]] = Field( + default=None, + description="The CC roles that must be assigned when using the template to send a signature request", + ) editor_options: Optional[SubEditorOptions] = None field_options: Optional[SubFieldOptions] = None - force_signer_roles: Optional[StrictBool] = Field(default=False, description="Provide users the ability to review/edit the template signer roles.") - force_subject_message: Optional[StrictBool] = Field(default=False, description="Provide users the ability to review/edit the template subject and message.") - form_field_groups: Optional[List[SubFormFieldGroup]] = Field(default=None, description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.") - form_field_rules: Optional[List[SubFormFieldRule]] = Field(default=None, description="Conditional Logic rules for fields defined in `form_fields_per_document`.") - form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field(default=None, description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`") - merge_fields: Optional[List[SubMergeField]] = Field(default=None, description="Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The default template email message.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.") - show_preview: Optional[StrictBool] = Field(default=False, description="This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience.") - show_progress_stepper: Optional[StrictBool] = Field(default=True, description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.") - signer_roles: Optional[List[SubTemplateRole]] = Field(default=None, description="An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template.") - skip_me_now: Optional[StrictBool] = Field(default=False, description="Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.") - subject: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="The template title (alias).") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.") - title: Optional[StrictStr] = Field(default=None, description="The title you want to assign to the SignatureRequest.") - use_preexisting_fields: Optional[StrictBool] = Field(default=False, description="Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`).") - __properties: ClassVar[List[str]] = ["client_id", "files", "file_urls", "allow_ccs", "allow_reassign", "attachments", "cc_roles", "editor_options", "field_options", "force_signer_roles", "force_subject_message", "form_field_groups", "form_field_rules", "form_fields_per_document", "merge_fields", "message", "metadata", "show_preview", "show_progress_stepper", "signer_roles", "skip_me_now", "subject", "test_mode", "title", "use_preexisting_fields"] + force_signer_roles: Optional[StrictBool] = Field( + default=False, + description="Provide users the ability to review/edit the template signer roles.", + ) + force_subject_message: Optional[StrictBool] = Field( + default=False, + description="Provide users the ability to review/edit the template subject and message.", + ) + form_field_groups: Optional[List[SubFormFieldGroup]] = Field( + default=None, + description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.", + ) + form_field_rules: Optional[List[SubFormFieldRule]] = Field( + default=None, + description="Conditional Logic rules for fields defined in `form_fields_per_document`.", + ) + form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field( + default=None, + description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`", + ) + merge_fields: Optional[List[SubMergeField]] = Field( + default=None, + description="Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, description="The default template email message." + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) + show_preview: Optional[StrictBool] = Field( + default=False, + description="This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience.", + ) + show_progress_stepper: Optional[StrictBool] = Field( + default=True, + description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.", + ) + signer_roles: Optional[List[SubTemplateRole]] = Field( + default=None, + description="An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template.", + ) + skip_me_now: Optional[StrictBool] = Field( + default=False, + description='Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.', + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field( + default=None, description="The template title (alias)." + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[StrictStr] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + use_preexisting_fields: Optional[StrictBool] = Field( + default=False, + description="Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`).", + ) + __properties: ClassVar[List[str]] = [ + "client_id", + "files", + "file_urls", + "allow_ccs", + "allow_reassign", + "attachments", + "cc_roles", + "editor_options", + "field_options", + "force_signer_roles", + "force_subject_message", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + "merge_fields", + "message", + "metadata", + "show_preview", + "show_progress_stepper", + "signer_roles", + "skip_me_now", + "subject", + "test_mode", + "title", + "use_preexisting_fields", + ] model_config = ConfigDict( populate_by_name=True, @@ -73,7 +168,6 @@ class TemplateCreateEmbeddedDraftRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +177,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -121,48 +217,48 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_attachments in self.attachments: if _item_attachments: _items.append(_item_attachments.to_dict()) - _dict['attachments'] = _items + _dict["attachments"] = _items # override the default output from pydantic by calling `to_dict()` of editor_options if self.editor_options: - _dict['editor_options'] = self.editor_options.to_dict() + _dict["editor_options"] = self.editor_options.to_dict() # override the default output from pydantic by calling `to_dict()` of field_options if self.field_options: - _dict['field_options'] = self.field_options.to_dict() + _dict["field_options"] = self.field_options.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in form_field_groups (list) _items = [] if self.form_field_groups: for _item_form_field_groups in self.form_field_groups: if _item_form_field_groups: _items.append(_item_form_field_groups.to_dict()) - _dict['form_field_groups'] = _items + _dict["form_field_groups"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_field_rules (list) _items = [] if self.form_field_rules: for _item_form_field_rules in self.form_field_rules: if _item_form_field_rules: _items.append(_item_form_field_rules.to_dict()) - _dict['form_field_rules'] = _items + _dict["form_field_rules"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_fields_per_document (list) _items = [] if self.form_fields_per_document: for _item_form_fields_per_document in self.form_fields_per_document: if _item_form_fields_per_document: _items.append(_item_form_fields_per_document.to_dict()) - _dict['form_fields_per_document'] = _items + _dict["form_fields_per_document"] = _items # override the default output from pydantic by calling `to_dict()` of each item in merge_fields (list) _items = [] if self.merge_fields: for _item_merge_fields in self.merge_fields: if _item_merge_fields: _items.append(_item_merge_fields.to_dict()) - _dict['merge_fields'] = _items + _dict["merge_fields"] = _items # override the default output from pydantic by calling `to_dict()` of each item in signer_roles (list) _items = [] if self.signer_roles: for _item_signer_roles in self.signer_roles: if _item_signer_roles: _items.append(_item_signer_roles.to_dict()) - _dict['signer_roles'] = _items + _dict["signer_roles"] = _items return _dict @classmethod @@ -174,33 +270,108 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "client_id": obj.get("client_id"), - "files": obj.get("files"), - "file_urls": obj.get("file_urls"), - "allow_ccs": obj.get("allow_ccs") if obj.get("allow_ccs") is not None else True, - "allow_reassign": obj.get("allow_reassign") if obj.get("allow_reassign") is not None else False, - "attachments": [SubAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, - "cc_roles": obj.get("cc_roles"), - "editor_options": SubEditorOptions.from_dict(obj["editor_options"]) if obj.get("editor_options") is not None else None, - "field_options": SubFieldOptions.from_dict(obj["field_options"]) if obj.get("field_options") is not None else None, - "force_signer_roles": obj.get("force_signer_roles") if obj.get("force_signer_roles") is not None else False, - "force_subject_message": obj.get("force_subject_message") if obj.get("force_subject_message") is not None else False, - "form_field_groups": [SubFormFieldGroup.from_dict(_item) for _item in obj["form_field_groups"]] if obj.get("form_field_groups") is not None else None, - "form_field_rules": [SubFormFieldRule.from_dict(_item) for _item in obj["form_field_rules"]] if obj.get("form_field_rules") is not None else None, - "form_fields_per_document": [SubFormFieldsPerDocumentBase.from_dict(_item) for _item in obj["form_fields_per_document"]] if obj.get("form_fields_per_document") is not None else None, - "merge_fields": [SubMergeField.from_dict(_item) for _item in obj["merge_fields"]] if obj.get("merge_fields") is not None else None, - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "show_preview": obj.get("show_preview") if obj.get("show_preview") is not None else False, - "show_progress_stepper": obj.get("show_progress_stepper") if obj.get("show_progress_stepper") is not None else True, - "signer_roles": [SubTemplateRole.from_dict(_item) for _item in obj["signer_roles"]] if obj.get("signer_roles") is not None else None, - "skip_me_now": obj.get("skip_me_now") if obj.get("skip_me_now") is not None else False, - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "title": obj.get("title"), - "use_preexisting_fields": obj.get("use_preexisting_fields") if obj.get("use_preexisting_fields") is not None else False - }) + _obj = cls.model_validate( + { + "client_id": obj.get("client_id"), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "allow_ccs": ( + obj.get("allow_ccs") if obj.get("allow_ccs") is not None else True + ), + "allow_reassign": ( + obj.get("allow_reassign") + if obj.get("allow_reassign") is not None + else False + ), + "attachments": ( + [SubAttachment.from_dict(_item) for _item in obj["attachments"]] + if obj.get("attachments") is not None + else None + ), + "cc_roles": obj.get("cc_roles"), + "editor_options": ( + SubEditorOptions.from_dict(obj["editor_options"]) + if obj.get("editor_options") is not None + else None + ), + "field_options": ( + SubFieldOptions.from_dict(obj["field_options"]) + if obj.get("field_options") is not None + else None + ), + "force_signer_roles": ( + obj.get("force_signer_roles") + if obj.get("force_signer_roles") is not None + else False + ), + "force_subject_message": ( + obj.get("force_subject_message") + if obj.get("force_subject_message") is not None + else False + ), + "form_field_groups": ( + [ + SubFormFieldGroup.from_dict(_item) + for _item in obj["form_field_groups"] + ] + if obj.get("form_field_groups") is not None + else None + ), + "form_field_rules": ( + [ + SubFormFieldRule.from_dict(_item) + for _item in obj["form_field_rules"] + ] + if obj.get("form_field_rules") is not None + else None + ), + "form_fields_per_document": ( + [ + SubFormFieldsPerDocumentBase.from_dict(_item) + for _item in obj["form_fields_per_document"] + ] + if obj.get("form_fields_per_document") is not None + else None + ), + "merge_fields": ( + [SubMergeField.from_dict(_item) for _item in obj["merge_fields"]] + if obj.get("merge_fields") is not None + else None + ), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "show_preview": ( + obj.get("show_preview") + if obj.get("show_preview") is not None + else False + ), + "show_progress_stepper": ( + obj.get("show_progress_stepper") + if obj.get("show_progress_stepper") is not None + else True + ), + "signer_roles": ( + [SubTemplateRole.from_dict(_item) for _item in obj["signer_roles"]] + if obj.get("signer_roles") is not None + else None + ), + "skip_me_now": ( + obj.get("skip_me_now") + if obj.get("skip_me_now") is not None + else False + ), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + "use_preexisting_fields": ( + obj.get("use_preexisting_fields") + if obj.get("use_preexisting_fields") is not None + else False + ), + } + ) return _obj @classmethod @@ -256,4 +427,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "merge_fields", "signer_roles", ] - diff --git a/sdks/python/dropbox_sign/models/template_create_embedded_draft_response.py b/sdks/python/dropbox_sign/models/template_create_embedded_draft_response.py index f3b951dc2..5e728e79d 100644 --- a/sdks/python/dropbox_sign/models/template_create_embedded_draft_response.py +++ b/sdks/python/dropbox_sign/models/template_create_embedded_draft_response.py @@ -20,7 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.template_create_embedded_draft_response_template import TemplateCreateEmbeddedDraftResponseTemplate +from dropbox_sign.models.template_create_embedded_draft_response_template import ( + TemplateCreateEmbeddedDraftResponseTemplate, +) from dropbox_sign.models.warning_response import WarningResponse from typing import Optional, Set, Tuple from typing_extensions import Self @@ -28,12 +30,16 @@ from pydantic import StrictBool from typing import Union + class TemplateCreateEmbeddedDraftResponse(BaseModel): """ TemplateCreateEmbeddedDraftResponse - """ # noqa: E501 + """ # noqa: E501 + template: TemplateCreateEmbeddedDraftResponseTemplate - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["template", "warnings"] model_config = ConfigDict( @@ -43,7 +49,6 @@ class TemplateCreateEmbeddedDraftResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +58,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +94,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of template if self.template: - _dict['template'] = self.template.to_dict() + _dict["template"] = self.template.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +113,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template": TemplateCreateEmbeddedDraftResponseTemplate.from_dict(obj["template"]) if obj.get("template") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "template": ( + TemplateCreateEmbeddedDraftResponseTemplate.from_dict( + obj["template"] + ) + if obj.get("template") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +153,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/template_create_embedded_draft_response_template.py b/sdks/python/dropbox_sign/models/template_create_embedded_draft_response_template.py index 8aea2c7bc..be23c205a 100644 --- a/sdks/python/dropbox_sign/models/template_create_embedded_draft_response_template.py +++ b/sdks/python/dropbox_sign/models/template_create_embedded_draft_response_template.py @@ -27,15 +27,30 @@ from pydantic import StrictBool from typing import Union + class TemplateCreateEmbeddedDraftResponseTemplate(BaseModel): """ Template object with parameters: `template_id`, `edit_url`, `expires_at`. - """ # noqa: E501 - template_id: Optional[StrictStr] = Field(default=None, description="The id of the Template.") - edit_url: Optional[StrictStr] = Field(default=None, description="Link to edit the template.") - expires_at: Optional[StrictInt] = Field(default=None, description="When the link expires.") - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") - __properties: ClassVar[List[str]] = ["template_id", "edit_url", "expires_at", "warnings"] + """ # noqa: E501 + + template_id: Optional[StrictStr] = Field( + default=None, description="The id of the Template." + ) + edit_url: Optional[StrictStr] = Field( + default=None, description="Link to edit the template." + ) + expires_at: Optional[StrictInt] = Field( + default=None, description="When the link expires." + ) + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) + __properties: ClassVar[List[str]] = [ + "template_id", + "edit_url", + "expires_at", + "warnings", + ] model_config = ConfigDict( populate_by_name=True, @@ -44,7 +59,6 @@ class TemplateCreateEmbeddedDraftResponseTemplate(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -54,7 +68,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -92,7 +108,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -104,12 +120,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template_id": obj.get("template_id"), - "edit_url": obj.get("edit_url"), - "expires_at": obj.get("expires_at"), - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "template_id": obj.get("template_id"), + "edit_url": obj.get("edit_url"), + "expires_at": obj.get("expires_at"), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -136,4 +158,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/template_create_request.py b/sdks/python/dropbox_sign/models/template_create_request.py index 06a9870da..fa6df563c 100644 --- a/sdks/python/dropbox_sign/models/template_create_request.py +++ b/sdks/python/dropbox_sign/models/template_create_request.py @@ -25,7 +25,9 @@ from dropbox_sign.models.sub_field_options import SubFieldOptions from dropbox_sign.models.sub_form_field_group import SubFormFieldGroup from dropbox_sign.models.sub_form_field_rule import SubFormFieldRule -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from dropbox_sign.models.sub_merge_field import SubMergeField from dropbox_sign.models.sub_template_role import SubTemplateRole from typing import Optional, Set, Tuple @@ -34,29 +36,96 @@ from pydantic import StrictBool from typing import Union + class TemplateCreateRequest(BaseModel): """ TemplateCreateRequest - """ # noqa: E501 - form_fields_per_document: List[SubFormFieldsPerDocumentBase] = Field(description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`") - signer_roles: List[SubTemplateRole] = Field(description="An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template.") - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field(default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - file_urls: Optional[List[StrictStr]] = Field(default=None, description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - allow_reassign: Optional[StrictBool] = Field(default=False, description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.") - attachments: Optional[List[SubAttachment]] = Field(default=None, description="A list describing the attachments") - cc_roles: Optional[List[StrictStr]] = Field(default=None, description="The CC roles that must be assigned when using the template to send a signature request") - client_id: Optional[StrictStr] = Field(default=None, description="Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app.") + """ # noqa: E501 + + form_fields_per_document: List[SubFormFieldsPerDocumentBase] = Field( + description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`" + ) + signer_roles: List[SubTemplateRole] = Field( + description="An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template." + ) + files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + allow_reassign: Optional[StrictBool] = Field( + default=False, + description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.", + ) + attachments: Optional[List[SubAttachment]] = Field( + default=None, description="A list describing the attachments" + ) + cc_roles: Optional[List[StrictStr]] = Field( + default=None, + description="The CC roles that must be assigned when using the template to send a signature request", + ) + client_id: Optional[StrictStr] = Field( + default=None, + description="Client id of the app you're using to create this draft. Used to apply the branding and callback url defined for the app.", + ) field_options: Optional[SubFieldOptions] = None - form_field_groups: Optional[List[SubFormFieldGroup]] = Field(default=None, description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.") - form_field_rules: Optional[List[SubFormFieldRule]] = Field(default=None, description="Conditional Logic rules for fields defined in `form_fields_per_document`.") - merge_fields: Optional[List[SubMergeField]] = Field(default=None, description="Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The default template email message.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.") - subject: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="The template title (alias).") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.") - title: Optional[StrictStr] = Field(default=None, description="The title you want to assign to the SignatureRequest.") - use_preexisting_fields: Optional[StrictBool] = Field(default=False, description="Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`).") - __properties: ClassVar[List[str]] = ["form_fields_per_document", "signer_roles", "files", "file_urls", "allow_reassign", "attachments", "cc_roles", "client_id", "field_options", "form_field_groups", "form_field_rules", "merge_fields", "message", "metadata", "subject", "test_mode", "title", "use_preexisting_fields"] + form_field_groups: Optional[List[SubFormFieldGroup]] = Field( + default=None, + description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.", + ) + form_field_rules: Optional[List[SubFormFieldRule]] = Field( + default=None, + description="Conditional Logic rules for fields defined in `form_fields_per_document`.", + ) + merge_fields: Optional[List[SubMergeField]] = Field( + default=None, + description="Add merge fields to the template. Merge fields are placed by the user creating the template and used to pre-fill data by passing values into signature requests with the `custom_fields` parameter. If the signature request using that template *does not* pass a value into a merge field, then an empty field remains in the document.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, description="The default template email message." + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field( + default=None, description="The template title (alias)." + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[StrictStr] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + use_preexisting_fields: Optional[StrictBool] = Field( + default=False, + description="Enable the detection of predefined PDF fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`).", + ) + __properties: ClassVar[List[str]] = [ + "form_fields_per_document", + "signer_roles", + "files", + "file_urls", + "allow_reassign", + "attachments", + "cc_roles", + "client_id", + "field_options", + "form_field_groups", + "form_field_rules", + "merge_fields", + "message", + "metadata", + "subject", + "test_mode", + "title", + "use_preexisting_fields", + ] model_config = ConfigDict( populate_by_name=True, @@ -65,7 +134,6 @@ class TemplateCreateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -75,7 +143,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -113,45 +183,45 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_form_fields_per_document in self.form_fields_per_document: if _item_form_fields_per_document: _items.append(_item_form_fields_per_document.to_dict()) - _dict['form_fields_per_document'] = _items + _dict["form_fields_per_document"] = _items # override the default output from pydantic by calling `to_dict()` of each item in signer_roles (list) _items = [] if self.signer_roles: for _item_signer_roles in self.signer_roles: if _item_signer_roles: _items.append(_item_signer_roles.to_dict()) - _dict['signer_roles'] = _items + _dict["signer_roles"] = _items # override the default output from pydantic by calling `to_dict()` of each item in attachments (list) _items = [] if self.attachments: for _item_attachments in self.attachments: if _item_attachments: _items.append(_item_attachments.to_dict()) - _dict['attachments'] = _items + _dict["attachments"] = _items # override the default output from pydantic by calling `to_dict()` of field_options if self.field_options: - _dict['field_options'] = self.field_options.to_dict() + _dict["field_options"] = self.field_options.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in form_field_groups (list) _items = [] if self.form_field_groups: for _item_form_field_groups in self.form_field_groups: if _item_form_field_groups: _items.append(_item_form_field_groups.to_dict()) - _dict['form_field_groups'] = _items + _dict["form_field_groups"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_field_rules (list) _items = [] if self.form_field_rules: for _item_form_field_rules in self.form_field_rules: if _item_form_field_rules: _items.append(_item_form_field_rules.to_dict()) - _dict['form_field_rules'] = _items + _dict["form_field_rules"] = _items # override the default output from pydantic by calling `to_dict()` of each item in merge_fields (list) _items = [] if self.merge_fields: for _item_merge_fields in self.merge_fields: if _item_merge_fields: _items.append(_item_merge_fields.to_dict()) - _dict['merge_fields'] = _items + _dict["merge_fields"] = _items return _dict @classmethod @@ -163,26 +233,75 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "form_fields_per_document": [SubFormFieldsPerDocumentBase.from_dict(_item) for _item in obj["form_fields_per_document"]] if obj.get("form_fields_per_document") is not None else None, - "signer_roles": [SubTemplateRole.from_dict(_item) for _item in obj["signer_roles"]] if obj.get("signer_roles") is not None else None, - "files": obj.get("files"), - "file_urls": obj.get("file_urls"), - "allow_reassign": obj.get("allow_reassign") if obj.get("allow_reassign") is not None else False, - "attachments": [SubAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, - "cc_roles": obj.get("cc_roles"), - "client_id": obj.get("client_id"), - "field_options": SubFieldOptions.from_dict(obj["field_options"]) if obj.get("field_options") is not None else None, - "form_field_groups": [SubFormFieldGroup.from_dict(_item) for _item in obj["form_field_groups"]] if obj.get("form_field_groups") is not None else None, - "form_field_rules": [SubFormFieldRule.from_dict(_item) for _item in obj["form_field_rules"]] if obj.get("form_field_rules") is not None else None, - "merge_fields": [SubMergeField.from_dict(_item) for _item in obj["merge_fields"]] if obj.get("merge_fields") is not None else None, - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "title": obj.get("title"), - "use_preexisting_fields": obj.get("use_preexisting_fields") if obj.get("use_preexisting_fields") is not None else False - }) + _obj = cls.model_validate( + { + "form_fields_per_document": ( + [ + SubFormFieldsPerDocumentBase.from_dict(_item) + for _item in obj["form_fields_per_document"] + ] + if obj.get("form_fields_per_document") is not None + else None + ), + "signer_roles": ( + [SubTemplateRole.from_dict(_item) for _item in obj["signer_roles"]] + if obj.get("signer_roles") is not None + else None + ), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "allow_reassign": ( + obj.get("allow_reassign") + if obj.get("allow_reassign") is not None + else False + ), + "attachments": ( + [SubAttachment.from_dict(_item) for _item in obj["attachments"]] + if obj.get("attachments") is not None + else None + ), + "cc_roles": obj.get("cc_roles"), + "client_id": obj.get("client_id"), + "field_options": ( + SubFieldOptions.from_dict(obj["field_options"]) + if obj.get("field_options") is not None + else None + ), + "form_field_groups": ( + [ + SubFormFieldGroup.from_dict(_item) + for _item in obj["form_field_groups"] + ] + if obj.get("form_field_groups") is not None + else None + ), + "form_field_rules": ( + [ + SubFormFieldRule.from_dict(_item) + for _item in obj["form_field_rules"] + ] + if obj.get("form_field_rules") is not None + else None + ), + "merge_fields": ( + [SubMergeField.from_dict(_item) for _item in obj["merge_fields"]] + if obj.get("merge_fields") is not None + else None + ), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + "use_preexisting_fields": ( + obj.get("use_preexisting_fields") + if obj.get("use_preexisting_fields") is not None + else False + ), + } + ) return _obj @classmethod @@ -231,4 +350,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "form_field_rules", "merge_fields", ] - diff --git a/sdks/python/dropbox_sign/models/template_create_response.py b/sdks/python/dropbox_sign/models/template_create_response.py index b6191ba2d..a42054f3c 100644 --- a/sdks/python/dropbox_sign/models/template_create_response.py +++ b/sdks/python/dropbox_sign/models/template_create_response.py @@ -20,7 +20,9 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.template_create_response_template import TemplateCreateResponseTemplate +from dropbox_sign.models.template_create_response_template import ( + TemplateCreateResponseTemplate, +) from dropbox_sign.models.warning_response import WarningResponse from typing import Optional, Set, Tuple from typing_extensions import Self @@ -28,12 +30,16 @@ from pydantic import StrictBool from typing import Union + class TemplateCreateResponse(BaseModel): """ TemplateCreateResponse - """ # noqa: E501 + """ # noqa: E501 + template: TemplateCreateResponseTemplate - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["template", "warnings"] model_config = ConfigDict( @@ -43,7 +49,6 @@ class TemplateCreateResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +58,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +94,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of template if self.template: - _dict['template'] = self.template.to_dict() + _dict["template"] = self.template.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +113,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template": TemplateCreateResponseTemplate.from_dict(obj["template"]) if obj.get("template") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "template": ( + TemplateCreateResponseTemplate.from_dict(obj["template"]) + if obj.get("template") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +151,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/template_create_response_template.py b/sdks/python/dropbox_sign/models/template_create_response_template.py index aa5ab6f3e..e4f253ef0 100644 --- a/sdks/python/dropbox_sign/models/template_create_response_template.py +++ b/sdks/python/dropbox_sign/models/template_create_response_template.py @@ -26,11 +26,15 @@ from pydantic import StrictBool from typing import Union + class TemplateCreateResponseTemplate(BaseModel): """ Template object with parameters: `template_id`. - """ # noqa: E501 - template_id: Optional[StrictStr] = Field(default=None, description="The id of the Template.") + """ # noqa: E501 + + template_id: Optional[StrictStr] = Field( + default=None, description="The id of the Template." + ) __properties: ClassVar[List[str]] = ["template_id"] model_config = ConfigDict( @@ -40,7 +44,6 @@ class TemplateCreateResponseTemplate(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +53,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template_id": obj.get("template_id") - }) + _obj = cls.model_validate({"template_id": obj.get("template_id")}) return _obj @classmethod @@ -116,6 +119,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_edit_response.py b/sdks/python/dropbox_sign/models/template_edit_response.py index 3e067aabd..05b99f4c3 100644 --- a/sdks/python/dropbox_sign/models/template_edit_response.py +++ b/sdks/python/dropbox_sign/models/template_edit_response.py @@ -26,10 +26,12 @@ from pydantic import StrictBool from typing import Union + class TemplateEditResponse(BaseModel): """ TemplateEditResponse - """ # noqa: E501 + """ # noqa: E501 + template_id: StrictStr = Field(description="The id of the Template.") __properties: ClassVar[List[str]] = ["template_id"] @@ -40,7 +42,6 @@ class TemplateEditResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +51,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template_id": obj.get("template_id") - }) + _obj = cls.model_validate({"template_id": obj.get("template_id")}) return _obj @classmethod @@ -116,6 +117,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_get_response.py b/sdks/python/dropbox_sign/models/template_get_response.py index 90d28f277..a32292b4f 100644 --- a/sdks/python/dropbox_sign/models/template_get_response.py +++ b/sdks/python/dropbox_sign/models/template_get_response.py @@ -28,12 +28,16 @@ from pydantic import StrictBool from typing import Union + class TemplateGetResponse(BaseModel): """ TemplateGetResponse - """ # noqa: E501 + """ # noqa: E501 + template: TemplateResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["template", "warnings"] model_config = ConfigDict( @@ -43,7 +47,6 @@ class TemplateGetResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +92,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of template if self.template: - _dict['template'] = self.template.to_dict() + _dict["template"] = self.template.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +111,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template": TemplateResponse.from_dict(obj["template"]) if obj.get("template") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "template": ( + TemplateResponse.from_dict(obj["template"]) + if obj.get("template") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +149,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/template_list_response.py b/sdks/python/dropbox_sign/models/template_list_response.py index 07dc9fa50..5deebe214 100644 --- a/sdks/python/dropbox_sign/models/template_list_response.py +++ b/sdks/python/dropbox_sign/models/template_list_response.py @@ -29,13 +29,19 @@ from pydantic import StrictBool from typing import Union + class TemplateListResponse(BaseModel): """ TemplateListResponse - """ # noqa: E501 - templates: List[TemplateResponse] = Field(description="List of templates that the API caller has access to.") + """ # noqa: E501 + + templates: List[TemplateResponse] = Field( + description="List of templates that the API caller has access to." + ) list_info: ListInfoResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["templates", "list_info", "warnings"] model_config = ConfigDict( @@ -45,7 +51,6 @@ class TemplateListResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +60,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,17 +100,17 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_templates in self.templates: if _item_templates: _items.append(_item_templates.to_dict()) - _dict['templates'] = _items + _dict["templates"] = _items # override the default output from pydantic by calling `to_dict()` of list_info if self.list_info: - _dict['list_info'] = self.list_info.to_dict() + _dict["list_info"] = self.list_info.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -115,11 +122,25 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "templates": [TemplateResponse.from_dict(_item) for _item in obj["templates"]] if obj.get("templates") is not None else None, - "list_info": ListInfoResponse.from_dict(obj["list_info"]) if obj.get("list_info") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "templates": ( + [TemplateResponse.from_dict(_item) for _item in obj["templates"]] + if obj.get("templates") is not None + else None + ), + "list_info": ( + ListInfoResponse.from_dict(obj["list_info"]) + if obj.get("list_info") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -146,4 +167,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "templates", "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/template_remove_user_request.py b/sdks/python/dropbox_sign/models/template_remove_user_request.py index 335ef827d..565c47e32 100644 --- a/sdks/python/dropbox_sign/models/template_remove_user_request.py +++ b/sdks/python/dropbox_sign/models/template_remove_user_request.py @@ -26,12 +26,20 @@ from pydantic import StrictBool from typing import Union + class TemplateRemoveUserRequest(BaseModel): """ TemplateRemoveUserRequest - """ # noqa: E501 - account_id: Optional[StrictStr] = Field(default=None, description="The id or email address of the Account to remove access to the Template. The account id prevails if both are provided.") - email_address: Optional[StrictStr] = Field(default=None, description="The id or email address of the Account to remove access to the Template. The account id prevails if both are provided.") + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, + description="The id or email address of the Account to remove access to the Template. The account id prevails if both are provided.", + ) + email_address: Optional[StrictStr] = Field( + default=None, + description="The id or email address of the Account to remove access to the Template. The account id prevails if both are provided.", + ) __properties: ClassVar[List[str]] = ["account_id", "email_address"] model_config = ConfigDict( @@ -41,7 +49,6 @@ class TemplateRemoveUserRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +58,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +103,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account_id": obj.get("account_id"), - "email_address": obj.get("email_address") - }) + _obj = cls.model_validate( + { + "account_id": obj.get("account_id"), + "email_address": obj.get("email_address"), + } + ) return _obj @classmethod @@ -119,6 +130,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response.py b/sdks/python/dropbox_sign/models/template_response.py index 246f4d312..12d203c42 100644 --- a/sdks/python/dropbox_sign/models/template_response.py +++ b/sdks/python/dropbox_sign/models/template_response.py @@ -23,8 +23,12 @@ from dropbox_sign.models.template_response_account import TemplateResponseAccount from dropbox_sign.models.template_response_cc_role import TemplateResponseCCRole from dropbox_sign.models.template_response_document import TemplateResponseDocument -from dropbox_sign.models.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase +from dropbox_sign.models.template_response_document_custom_field_base import ( + TemplateResponseDocumentCustomFieldBase, +) +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) from dropbox_sign.models.template_response_signer_role import TemplateResponseSignerRole from typing import Optional, Set, Tuple from typing_extensions import Self @@ -32,26 +36,85 @@ from pydantic import StrictBool from typing import Union + class TemplateResponse(BaseModel): """ Contains information about the templates you and your team have created. - """ # noqa: E501 - template_id: Optional[StrictStr] = Field(default=None, description="The id of the Template.") - title: Optional[StrictStr] = Field(default=None, description="The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest.") - message: Optional[StrictStr] = Field(default=None, description="The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest.") - updated_at: Optional[StrictInt] = Field(default=None, description="Time the template was last updated.") - is_embedded: Optional[StrictBool] = Field(default=None, description="`true` if this template was created using an embedded flow, `false` if it was created on our website.") - is_creator: Optional[StrictBool] = Field(default=None, description="`true` if you are the owner of this template, `false` if it's been shared with you by a team member.") - can_edit: Optional[StrictBool] = Field(default=None, description="Indicates whether edit rights have been granted to you by the owner (always `true` if that's you).") - is_locked: Optional[StrictBool] = Field(default=None, description="Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="The metadata attached to the template.") - signer_roles: Optional[List[TemplateResponseSignerRole]] = Field(default=None, description="An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template.") - cc_roles: Optional[List[TemplateResponseCCRole]] = Field(default=None, description="An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template.") - documents: Optional[List[TemplateResponseDocument]] = Field(default=None, description="An array describing each document associated with this Template. Includes form field data for each document.") - custom_fields: Optional[List[TemplateResponseDocumentCustomFieldBase]] = Field(default=None, description="Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.") - named_form_fields: Optional[List[TemplateResponseDocumentFormFieldBase]] = Field(default=None, description="Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.") - accounts: Optional[List[TemplateResponseAccount]] = Field(default=None, description="An array of the Accounts that can use this Template.") - __properties: ClassVar[List[str]] = ["template_id", "title", "message", "updated_at", "is_embedded", "is_creator", "can_edit", "is_locked", "metadata", "signer_roles", "cc_roles", "documents", "custom_fields", "named_form_fields", "accounts"] + """ # noqa: E501 + + template_id: Optional[StrictStr] = Field( + default=None, description="The id of the Template." + ) + title: Optional[StrictStr] = Field( + default=None, + description="The title of the Template. This will also be the default subject of the message sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest.", + ) + message: Optional[StrictStr] = Field( + default=None, + description="The default message that will be sent to signers when using this Template to send a SignatureRequest. This can be overridden when sending the SignatureRequest.", + ) + updated_at: Optional[StrictInt] = Field( + default=None, description="Time the template was last updated." + ) + is_embedded: Optional[StrictBool] = Field( + default=None, + description="`true` if this template was created using an embedded flow, `false` if it was created on our website.", + ) + is_creator: Optional[StrictBool] = Field( + default=None, + description="`true` if you are the owner of this template, `false` if it's been shared with you by a team member.", + ) + can_edit: Optional[StrictBool] = Field( + default=None, + description="Indicates whether edit rights have been granted to you by the owner (always `true` if that's you).", + ) + is_locked: Optional[StrictBool] = Field( + default=None, + description="Indicates whether the template is locked. If `true`, then the template was created outside your quota and can only be used in `test_mode`. If `false`, then the template is within your quota and can be used to create signature requests.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, description="The metadata attached to the template." + ) + signer_roles: Optional[List[TemplateResponseSignerRole]] = Field( + default=None, + description="An array of the designated signer roles that must be specified when sending a SignatureRequest using this Template.", + ) + cc_roles: Optional[List[TemplateResponseCCRole]] = Field( + default=None, + description="An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template.", + ) + documents: Optional[List[TemplateResponseDocument]] = Field( + default=None, + description="An array describing each document associated with this Template. Includes form field data for each document.", + ) + custom_fields: Optional[List[TemplateResponseDocumentCustomFieldBase]] = Field( + default=None, + description="Deprecated. Use `custom_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.", + ) + named_form_fields: Optional[List[TemplateResponseDocumentFormFieldBase]] = Field( + default=None, + description="Deprecated. Use `form_fields` inside the [documents](https://developers.hellosign.com/api/reference/operation/templateGet/#!c=200&path=template/documents&t=response) array instead.", + ) + accounts: Optional[List[TemplateResponseAccount]] = Field( + default=None, description="An array of the Accounts that can use this Template." + ) + __properties: ClassVar[List[str]] = [ + "template_id", + "title", + "message", + "updated_at", + "is_embedded", + "is_creator", + "can_edit", + "is_locked", + "metadata", + "signer_roles", + "cc_roles", + "documents", + "custom_fields", + "named_form_fields", + "accounts", + ] model_config = ConfigDict( populate_by_name=True, @@ -60,7 +123,6 @@ class TemplateResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +132,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -108,42 +172,42 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_signer_roles in self.signer_roles: if _item_signer_roles: _items.append(_item_signer_roles.to_dict()) - _dict['signer_roles'] = _items + _dict["signer_roles"] = _items # override the default output from pydantic by calling `to_dict()` of each item in cc_roles (list) _items = [] if self.cc_roles: for _item_cc_roles in self.cc_roles: if _item_cc_roles: _items.append(_item_cc_roles.to_dict()) - _dict['cc_roles'] = _items + _dict["cc_roles"] = _items # override the default output from pydantic by calling `to_dict()` of each item in documents (list) _items = [] if self.documents: for _item_documents in self.documents: if _item_documents: _items.append(_item_documents.to_dict()) - _dict['documents'] = _items + _dict["documents"] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) _items = [] if self.custom_fields: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of each item in named_form_fields (list) _items = [] if self.named_form_fields: for _item_named_form_fields in self.named_form_fields: if _item_named_form_fields: _items.append(_item_named_form_fields.to_dict()) - _dict['named_form_fields'] = _items + _dict["named_form_fields"] = _items # override the default output from pydantic by calling `to_dict()` of each item in accounts (list) _items = [] if self.accounts: for _item_accounts in self.accounts: if _item_accounts: _items.append(_item_accounts.to_dict()) - _dict['accounts'] = _items + _dict["accounts"] = _items return _dict @classmethod @@ -155,23 +219,67 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template_id": obj.get("template_id"), - "title": obj.get("title"), - "message": obj.get("message"), - "updated_at": obj.get("updated_at"), - "is_embedded": obj.get("is_embedded"), - "is_creator": obj.get("is_creator"), - "can_edit": obj.get("can_edit"), - "is_locked": obj.get("is_locked"), - "metadata": obj.get("metadata"), - "signer_roles": [TemplateResponseSignerRole.from_dict(_item) for _item in obj["signer_roles"]] if obj.get("signer_roles") is not None else None, - "cc_roles": [TemplateResponseCCRole.from_dict(_item) for _item in obj["cc_roles"]] if obj.get("cc_roles") is not None else None, - "documents": [TemplateResponseDocument.from_dict(_item) for _item in obj["documents"]] if obj.get("documents") is not None else None, - "custom_fields": [TemplateResponseDocumentCustomFieldBase.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "named_form_fields": [TemplateResponseDocumentFormFieldBase.from_dict(_item) for _item in obj["named_form_fields"]] if obj.get("named_form_fields") is not None else None, - "accounts": [TemplateResponseAccount.from_dict(_item) for _item in obj["accounts"]] if obj.get("accounts") is not None else None - }) + _obj = cls.model_validate( + { + "template_id": obj.get("template_id"), + "title": obj.get("title"), + "message": obj.get("message"), + "updated_at": obj.get("updated_at"), + "is_embedded": obj.get("is_embedded"), + "is_creator": obj.get("is_creator"), + "can_edit": obj.get("can_edit"), + "is_locked": obj.get("is_locked"), + "metadata": obj.get("metadata"), + "signer_roles": ( + [ + TemplateResponseSignerRole.from_dict(_item) + for _item in obj["signer_roles"] + ] + if obj.get("signer_roles") is not None + else None + ), + "cc_roles": ( + [ + TemplateResponseCCRole.from_dict(_item) + for _item in obj["cc_roles"] + ] + if obj.get("cc_roles") is not None + else None + ), + "documents": ( + [ + TemplateResponseDocument.from_dict(_item) + for _item in obj["documents"] + ] + if obj.get("documents") is not None + else None + ), + "custom_fields": ( + [ + TemplateResponseDocumentCustomFieldBase.from_dict(_item) + for _item in obj["custom_fields"] + ] + if obj.get("custom_fields") is not None + else None + ), + "named_form_fields": ( + [ + TemplateResponseDocumentFormFieldBase.from_dict(_item) + for _item in obj["named_form_fields"] + ] + if obj.get("named_form_fields") is not None + else None + ), + "accounts": ( + [ + TemplateResponseAccount.from_dict(_item) + for _item in obj["accounts"] + ] + if obj.get("accounts") is not None + else None + ), + } + ) return _obj @classmethod @@ -214,4 +322,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "named_form_fields", "accounts", ] - diff --git a/sdks/python/dropbox_sign/models/template_response_account.py b/sdks/python/dropbox_sign/models/template_response_account.py index 9e8f4c1ff..71358ff84 100644 --- a/sdks/python/dropbox_sign/models/template_response_account.py +++ b/sdks/python/dropbox_sign/models/template_response_account.py @@ -20,24 +20,48 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.template_response_account_quota import TemplateResponseAccountQuota +from dropbox_sign.models.template_response_account_quota import ( + TemplateResponseAccountQuota, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseAccount(BaseModel): """ TemplateResponseAccount - """ # noqa: E501 - account_id: Optional[StrictStr] = Field(default=None, description="The id of the Account.") - email_address: Optional[StrictStr] = Field(default=None, description="The email address associated with the Account.") - is_locked: Optional[StrictBool] = Field(default=None, description="Returns `true` if the user has been locked out of their account by a team admin.") - is_paid_hs: Optional[StrictBool] = Field(default=None, description="Returns `true` if the user has a paid Dropbox Sign account.") - is_paid_hf: Optional[StrictBool] = Field(default=None, description="Returns `true` if the user has a paid HelloFax account.") + """ # noqa: E501 + + account_id: Optional[StrictStr] = Field( + default=None, description="The id of the Account." + ) + email_address: Optional[StrictStr] = Field( + default=None, description="The email address associated with the Account." + ) + is_locked: Optional[StrictBool] = Field( + default=None, + description="Returns `true` if the user has been locked out of their account by a team admin.", + ) + is_paid_hs: Optional[StrictBool] = Field( + default=None, + description="Returns `true` if the user has a paid Dropbox Sign account.", + ) + is_paid_hf: Optional[StrictBool] = Field( + default=None, + description="Returns `true` if the user has a paid HelloFax account.", + ) quotas: Optional[TemplateResponseAccountQuota] = None - __properties: ClassVar[List[str]] = ["account_id", "email_address", "is_locked", "is_paid_hs", "is_paid_hf", "quotas"] + __properties: ClassVar[List[str]] = [ + "account_id", + "email_address", + "is_locked", + "is_paid_hs", + "is_paid_hf", + "quotas", + ] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +70,6 @@ class TemplateResponseAccount(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -56,7 +79,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -90,7 +115,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of quotas if self.quotas: - _dict['quotas'] = self.quotas.to_dict() + _dict["quotas"] = self.quotas.to_dict() return _dict @classmethod @@ -102,14 +127,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "account_id": obj.get("account_id"), - "email_address": obj.get("email_address"), - "is_locked": obj.get("is_locked"), - "is_paid_hs": obj.get("is_paid_hs"), - "is_paid_hf": obj.get("is_paid_hf"), - "quotas": TemplateResponseAccountQuota.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None - }) + _obj = cls.model_validate( + { + "account_id": obj.get("account_id"), + "email_address": obj.get("email_address"), + "is_locked": obj.get("is_locked"), + "is_paid_hs": obj.get("is_paid_hs"), + "is_paid_hf": obj.get("is_paid_hf"), + "quotas": ( + TemplateResponseAccountQuota.from_dict(obj["quotas"]) + if obj.get("quotas") is not None + else None + ), + } + ) return _obj @classmethod @@ -135,6 +166,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_account_quota.py b/sdks/python/dropbox_sign/models/template_response_account_quota.py index 8ffa3c46e..6c03effe9 100644 --- a/sdks/python/dropbox_sign/models/template_response_account_quota.py +++ b/sdks/python/dropbox_sign/models/template_response_account_quota.py @@ -26,15 +26,30 @@ from pydantic import StrictBool from typing import Union + class TemplateResponseAccountQuota(BaseModel): """ An array of the designated CC roles that must be specified when sending a SignatureRequest using this Template. - """ # noqa: E501 - templates_left: Optional[StrictInt] = Field(default=None, description="API templates remaining.") - api_signature_requests_left: Optional[StrictInt] = Field(default=None, description="API signature requests remaining.") - documents_left: Optional[StrictInt] = Field(default=None, description="Signature requests remaining.") - sms_verifications_left: Optional[StrictInt] = Field(default=None, description="SMS verifications remaining.") - __properties: ClassVar[List[str]] = ["templates_left", "api_signature_requests_left", "documents_left", "sms_verifications_left"] + """ # noqa: E501 + + templates_left: Optional[StrictInt] = Field( + default=None, description="API templates remaining." + ) + api_signature_requests_left: Optional[StrictInt] = Field( + default=None, description="API signature requests remaining." + ) + documents_left: Optional[StrictInt] = Field( + default=None, description="Signature requests remaining." + ) + sms_verifications_left: Optional[StrictInt] = Field( + default=None, description="SMS verifications remaining." + ) + __properties: ClassVar[List[str]] = [ + "templates_left", + "api_signature_requests_left", + "documents_left", + "sms_verifications_left", + ] model_config = ConfigDict( populate_by_name=True, @@ -43,7 +58,6 @@ class TemplateResponseAccountQuota(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -96,12 +112,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "templates_left": obj.get("templates_left"), - "api_signature_requests_left": obj.get("api_signature_requests_left"), - "documents_left": obj.get("documents_left"), - "sms_verifications_left": obj.get("sms_verifications_left") - }) + _obj = cls.model_validate( + { + "templates_left": obj.get("templates_left"), + "api_signature_requests_left": obj.get("api_signature_requests_left"), + "documents_left": obj.get("documents_left"), + "sms_verifications_left": obj.get("sms_verifications_left"), + } + ) return _obj @classmethod @@ -125,6 +143,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_cc_role.py b/sdks/python/dropbox_sign/models/template_response_cc_role.py index 953966e9c..8c005227d 100644 --- a/sdks/python/dropbox_sign/models/template_response_cc_role.py +++ b/sdks/python/dropbox_sign/models/template_response_cc_role.py @@ -26,10 +26,12 @@ from pydantic import StrictBool from typing import Union + class TemplateResponseCCRole(BaseModel): """ TemplateResponseCCRole - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of the Role.") __properties: ClassVar[List[str]] = ["name"] @@ -40,7 +42,6 @@ class TemplateResponseCCRole(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -50,7 +51,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -93,9 +96,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name") - }) + _obj = cls.model_validate({"name": obj.get("name")}) return _obj @classmethod @@ -116,6 +117,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document.py b/sdks/python/dropbox_sign/models/template_response_document.py index d296ee21a..56e887bd0 100644 --- a/sdks/python/dropbox_sign/models/template_response_document.py +++ b/sdks/python/dropbox_sign/models/template_response_document.py @@ -20,27 +20,60 @@ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase -from dropbox_sign.models.template_response_document_field_group import TemplateResponseDocumentFieldGroup -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase -from dropbox_sign.models.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase +from dropbox_sign.models.template_response_document_custom_field_base import ( + TemplateResponseDocumentCustomFieldBase, +) +from dropbox_sign.models.template_response_document_field_group import ( + TemplateResponseDocumentFieldGroup, +) +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) +from dropbox_sign.models.template_response_document_static_field_base import ( + TemplateResponseDocumentStaticFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocument(BaseModel): """ TemplateResponseDocument - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="Name of the associated file.") - index: Optional[StrictInt] = Field(default=None, description="Document ordering, the lowest index is displayed first and the highest last (0-based indexing).") - field_groups: Optional[List[TemplateResponseDocumentFieldGroup]] = Field(default=None, description="An array of Form Field Group objects.") - form_fields: Optional[List[TemplateResponseDocumentFormFieldBase]] = Field(default=None, description="An array of Form Field objects containing the name and type of each named field.") - custom_fields: Optional[List[TemplateResponseDocumentCustomFieldBase]] = Field(default=None, description="An array of Form Field objects containing the name and type of each named field.") - static_fields: Optional[List[TemplateResponseDocumentStaticFieldBase]] = Field(default=None, description="An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.") - __properties: ClassVar[List[str]] = ["name", "index", "field_groups", "form_fields", "custom_fields", "static_fields"] + """ # noqa: E501 + + name: Optional[StrictStr] = Field( + default=None, description="Name of the associated file." + ) + index: Optional[StrictInt] = Field( + default=None, + description="Document ordering, the lowest index is displayed first and the highest last (0-based indexing).", + ) + field_groups: Optional[List[TemplateResponseDocumentFieldGroup]] = Field( + default=None, description="An array of Form Field Group objects." + ) + form_fields: Optional[List[TemplateResponseDocumentFormFieldBase]] = Field( + default=None, + description="An array of Form Field objects containing the name and type of each named field.", + ) + custom_fields: Optional[List[TemplateResponseDocumentCustomFieldBase]] = Field( + default=None, + description="An array of Form Field objects containing the name and type of each named field.", + ) + static_fields: Optional[List[TemplateResponseDocumentStaticFieldBase]] = Field( + default=None, + description="An array describing static overlay fields. **NOTE:** Only available for certain subscriptions.", + ) + __properties: ClassVar[List[str]] = [ + "name", + "index", + "field_groups", + "form_fields", + "custom_fields", + "static_fields", + ] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +82,6 @@ class TemplateResponseDocument(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -59,7 +91,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -97,28 +131,28 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_field_groups in self.field_groups: if _item_field_groups: _items.append(_item_field_groups.to_dict()) - _dict['field_groups'] = _items + _dict["field_groups"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_fields (list) _items = [] if self.form_fields: for _item_form_fields in self.form_fields: if _item_form_fields: _items.append(_item_form_fields.to_dict()) - _dict['form_fields'] = _items + _dict["form_fields"] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) _items = [] if self.custom_fields: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of each item in static_fields (list) _items = [] if self.static_fields: for _item_static_fields in self.static_fields: if _item_static_fields: _items.append(_item_static_fields.to_dict()) - _dict['static_fields'] = _items + _dict["static_fields"] = _items return _dict @classmethod @@ -130,14 +164,44 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "index": obj.get("index"), - "field_groups": [TemplateResponseDocumentFieldGroup.from_dict(_item) for _item in obj["field_groups"]] if obj.get("field_groups") is not None else None, - "form_fields": [TemplateResponseDocumentFormFieldBase.from_dict(_item) for _item in obj["form_fields"]] if obj.get("form_fields") is not None else None, - "custom_fields": [TemplateResponseDocumentCustomFieldBase.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "static_fields": [TemplateResponseDocumentStaticFieldBase.from_dict(_item) for _item in obj["static_fields"]] if obj.get("static_fields") is not None else None - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "index": obj.get("index"), + "field_groups": ( + [ + TemplateResponseDocumentFieldGroup.from_dict(_item) + for _item in obj["field_groups"] + ] + if obj.get("field_groups") is not None + else None + ), + "form_fields": ( + [ + TemplateResponseDocumentFormFieldBase.from_dict(_item) + for _item in obj["form_fields"] + ] + if obj.get("form_fields") is not None + else None + ), + "custom_fields": ( + [ + TemplateResponseDocumentCustomFieldBase.from_dict(_item) + for _item in obj["custom_fields"] + ] + if obj.get("custom_fields") is not None + else None + ), + "static_fields": ( + [ + TemplateResponseDocumentStaticFieldBase.from_dict(_item) + for _item in obj["static_fields"] + ] + if obj.get("static_fields") is not None + else None + ), + } + ) return _obj @classmethod @@ -169,4 +233,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "custom_fields", "static_fields", ] - diff --git a/sdks/python/dropbox_sign/models/template_response_document_custom_field_base.py b/sdks/python/dropbox_sign/models/template_response_document_custom_field_base.py index eddd05408..a7d2fa60c 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_custom_field_base.py +++ b/sdks/python/dropbox_sign/models/template_response_document_custom_field_base.py @@ -28,25 +28,63 @@ from typing import Union from typing import TYPE_CHECKING + if TYPE_CHECKING: - from dropbox_sign.models.template_response_document_custom_field_checkbox import TemplateResponseDocumentCustomFieldCheckbox - from dropbox_sign.models.template_response_document_custom_field_text import TemplateResponseDocumentCustomFieldText + from dropbox_sign.models.template_response_document_custom_field_checkbox import ( + TemplateResponseDocumentCustomFieldCheckbox, + ) + from dropbox_sign.models.template_response_document_custom_field_text import ( + TemplateResponseDocumentCustomFieldText, + ) + class TemplateResponseDocumentCustomFieldBase(BaseModel): """ An array of Form Field objects containing the name and type of each named field. - """ # noqa: E501 + """ # noqa: E501 + type: StrictStr - api_id: Optional[StrictStr] = Field(default=None, description="The unique ID for this field.") - name: Optional[StrictStr] = Field(default=None, description="The name of the Custom Field.") - signer: Union[StrictStr, StrictInt, None] = Field(description="The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender).") - x: Optional[StrictInt] = Field(default=None, description="The horizontal offset in pixels for this form field.") - y: Optional[StrictInt] = Field(default=None, description="The vertical offset in pixels for this form field.") - width: Optional[StrictInt] = Field(default=None, description="The width in pixels of this form field.") - height: Optional[StrictInt] = Field(default=None, description="The height in pixels of this form field.") - required: Optional[StrictBool] = Field(default=None, description="Boolean showing whether or not this field is required.") - group: Optional[StrictStr] = Field(default=None, description="The name of the group this field is in. If this field is not a group, this defaults to `null`.") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + api_id: Optional[StrictStr] = Field( + default=None, description="The unique ID for this field." + ) + name: Optional[StrictStr] = Field( + default=None, description="The name of the Custom Field." + ) + signer: Union[StrictStr, StrictInt, None] = Field( + description="The signer of the Custom Field. Can be `null` if field is a merge field (assigned to Sender)." + ) + x: Optional[StrictInt] = Field( + default=None, description="The horizontal offset in pixels for this form field." + ) + y: Optional[StrictInt] = Field( + default=None, description="The vertical offset in pixels for this form field." + ) + width: Optional[StrictInt] = Field( + default=None, description="The width in pixels of this form field." + ) + height: Optional[StrictInt] = Field( + default=None, description="The height in pixels of this form field." + ) + required: Optional[StrictBool] = Field( + default=None, + description="Boolean showing whether or not this field is required.", + ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null`.", + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -55,13 +93,13 @@ class TemplateResponseDocumentCustomFieldBase(BaseModel): arbitrary_types_allowed=True, ) - # JSON field name that stores the object type - __discriminator_property_name: ClassVar[str] = 'type' + __discriminator_property_name: ClassVar[str] = "type" # discriminator mappings __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'checkbox': 'TemplateResponseDocumentCustomFieldCheckbox','text': 'TemplateResponseDocumentCustomFieldText' + "checkbox": "TemplateResponseDocumentCustomFieldCheckbox", + "text": "TemplateResponseDocumentCustomFieldText", } @classmethod @@ -82,7 +120,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,7 +134,12 @@ def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[st return data @classmethod - def from_json(cls, json_str: str) -> Optional[Union[TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText]]: + def from_json(cls, json_str: str) -> Optional[ + Union[ + TemplateResponseDocumentCustomFieldCheckbox, + TemplateResponseDocumentCustomFieldText, + ] + ]: """Create an instance of TemplateResponseDocumentCustomFieldBase from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -117,19 +162,32 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[TemplateResponseDocumentCustomFieldCheckbox, TemplateResponseDocumentCustomFieldText]]: + def from_dict(cls, obj: Dict[str, Any]) -> Optional[ + Union[ + TemplateResponseDocumentCustomFieldCheckbox, + TemplateResponseDocumentCustomFieldText, + ] + ]: """Create an instance of TemplateResponseDocumentCustomFieldBase from a dict""" # look up the object type based on discriminator mapping object_type = cls.get_discriminator_value(obj) - if object_type == 'TemplateResponseDocumentCustomFieldCheckbox': - return import_module("dropbox_sign.models.template_response_document_custom_field_checkbox").TemplateResponseDocumentCustomFieldCheckbox.from_dict(obj) - if object_type == 'TemplateResponseDocumentCustomFieldText': - return import_module("dropbox_sign.models.template_response_document_custom_field_text").TemplateResponseDocumentCustomFieldText.from_dict(obj) - - raise ValueError("TemplateResponseDocumentCustomFieldBase failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) - + if object_type == "TemplateResponseDocumentCustomFieldCheckbox": + return import_module( + "dropbox_sign.models.template_response_document_custom_field_checkbox" + ).TemplateResponseDocumentCustomFieldCheckbox.from_dict(obj) + if object_type == "TemplateResponseDocumentCustomFieldText": + return import_module( + "dropbox_sign.models.template_response_document_custom_field_text" + ).TemplateResponseDocumentCustomFieldText.from_dict(obj) + + raise ValueError( + "TemplateResponseDocumentCustomFieldBase failed to lookup discriminator value from " + + json.dumps(obj) + + ". Discriminator property name: " + + cls.__discriminator_property_name + + ", mapping: " + + json.dumps(cls.__discriminator_value_class_map) + ) @classmethod def openapi_types(cls) -> Dict[str, str]: @@ -148,6 +206,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_custom_field_checkbox.py b/sdks/python/dropbox_sign/models/template_response_document_custom_field_checkbox.py index 6180833eb..4edf644c2 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_custom_field_checkbox.py +++ b/sdks/python/dropbox_sign/models/template_response_document_custom_field_checkbox.py @@ -20,19 +20,38 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase +from dropbox_sign.models.template_response_document_custom_field_base import ( + TemplateResponseDocumentCustomFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union -class TemplateResponseDocumentCustomFieldCheckbox(TemplateResponseDocumentCustomFieldBase): + +class TemplateResponseDocumentCustomFieldCheckbox( + TemplateResponseDocumentCustomFieldBase +): """ This class extends `TemplateResponseDocumentCustomFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +60,6 @@ class TemplateResponseDocumentCustomFieldCheckbox(TemplateResponseDocumentCustom arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +114,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'checkbox', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer"), - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "checkbox", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": obj.get("signer"), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +157,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_custom_field_text.py b/sdks/python/dropbox_sign/models/template_response_document_custom_field_text.py index 761cfa6a0..760dd57a4 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_custom_field_text.py +++ b/sdks/python/dropbox_sign/models/template_response_document_custom_field_text.py @@ -20,24 +20,59 @@ from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.template_response_document_custom_field_base import TemplateResponseDocumentCustomFieldBase -from dropbox_sign.models.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength +from dropbox_sign.models.template_response_document_custom_field_base import ( + TemplateResponseDocumentCustomFieldBase, +) +from dropbox_sign.models.template_response_field_avg_text_length import ( + TemplateResponseFieldAvgTextLength, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentCustomFieldText(TemplateResponseDocumentCustomFieldBase): """ This class extends `TemplateResponseDocumentCustomFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox`") + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this Custom Field. Only `text` and `checkbox` are currently supported. * Text uses `TemplateResponseDocumentCustomFieldText` * Checkbox uses `TemplateResponseDocumentCustomFieldCheckbox`" + ) avg_text_length: Optional[TemplateResponseFieldAvgTextLength] = None - is_multiline: Optional[StrictBool] = Field(default=None, description="Whether this form field is multiline text.", alias="isMultiline") - original_font_size: Optional[StrictInt] = Field(default=None, description="Original font size used in this form field's text.", alias="originalFontSize") - font_family: Optional[StrictStr] = Field(default=None, description="Font family used in this form field's text.", alias="fontFamily") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group", "avg_text_length", "isMultiline", "originalFontSize", "fontFamily"] + is_multiline: Optional[StrictBool] = Field( + default=None, + description="Whether this form field is multiline text.", + alias="isMultiline", + ) + original_font_size: Optional[StrictInt] = Field( + default=None, + description="Original font size used in this form field's text.", + alias="originalFontSize", + ) + font_family: Optional[StrictStr] = Field( + default=None, + description="Font family used in this form field's text.", + alias="fontFamily", + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + "avg_text_length", + "isMultiline", + "originalFontSize", + "fontFamily", + ] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +81,6 @@ class TemplateResponseDocumentCustomFieldText(TemplateResponseDocumentCustomFiel arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -56,7 +90,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -90,7 +126,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of avg_text_length if self.avg_text_length: - _dict['avg_text_length'] = self.avg_text_length.to_dict() + _dict["avg_text_length"] = self.avg_text_length.to_dict() return _dict @classmethod @@ -102,22 +138,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'text', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer"), - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group"), - "avg_text_length": TemplateResponseFieldAvgTextLength.from_dict(obj["avg_text_length"]) if obj.get("avg_text_length") is not None else None, - "isMultiline": obj.get("isMultiline"), - "originalFontSize": obj.get("originalFontSize"), - "fontFamily": obj.get("fontFamily") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "text", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": obj.get("signer"), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + "avg_text_length": ( + TemplateResponseFieldAvgTextLength.from_dict(obj["avg_text_length"]) + if obj.get("avg_text_length") is not None + else None + ), + "isMultiline": obj.get("isMultiline"), + "originalFontSize": obj.get("originalFontSize"), + "fontFamily": obj.get("fontFamily"), + } + ) return _obj @classmethod @@ -151,6 +193,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_field_group.py b/sdks/python/dropbox_sign/models/template_response_document_field_group.py index 4d560744e..201bd139e 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_field_group.py +++ b/sdks/python/dropbox_sign/models/template_response_document_field_group.py @@ -20,18 +20,24 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.template_response_document_field_group_rule import TemplateResponseDocumentFieldGroupRule +from dropbox_sign.models.template_response_document_field_group_rule import ( + TemplateResponseDocumentFieldGroupRule, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentFieldGroup(BaseModel): """ TemplateResponseDocumentFieldGroup - """ # noqa: E501 - name: Optional[StrictStr] = Field(default=None, description="The name of the form field group.") + """ # noqa: E501 + + name: Optional[StrictStr] = Field( + default=None, description="The name of the form field group." + ) rule: Optional[TemplateResponseDocumentFieldGroupRule] = None __properties: ClassVar[List[str]] = ["name", "rule"] @@ -42,7 +48,6 @@ class TemplateResponseDocumentFieldGroup(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +57,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -86,7 +93,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of rule if self.rule: - _dict['rule'] = self.rule.to_dict() + _dict["rule"] = self.rule.to_dict() return _dict @classmethod @@ -98,10 +105,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "rule": TemplateResponseDocumentFieldGroupRule.from_dict(obj["rule"]) if obj.get("rule") is not None else None - }) + _obj = cls.model_validate( + { + "name": obj.get("name"), + "rule": ( + TemplateResponseDocumentFieldGroupRule.from_dict(obj["rule"]) + if obj.get("rule") is not None + else None + ), + } + ) return _obj @classmethod @@ -123,6 +136,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_field_group_rule.py b/sdks/python/dropbox_sign/models/template_response_document_field_group_rule.py index b3e07181a..e5ade9d4e 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_field_group_rule.py +++ b/sdks/python/dropbox_sign/models/template_response_document_field_group_rule.py @@ -26,12 +26,19 @@ from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentFieldGroupRule(BaseModel): """ The rule used to validate checkboxes in the form field group. See [checkbox field grouping](/api/reference/constants/#checkbox-field-grouping). - """ # noqa: E501 - requirement: Optional[StrictStr] = Field(default=None, description="Examples: `require_0-1` `require_1` `require_1-ormore` - Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group.") - group_label: Optional[StrictStr] = Field(default=None, description="Name of the group", alias="groupLabel") + """ # noqa: E501 + + requirement: Optional[StrictStr] = Field( + default=None, + description="Examples: `require_0-1` `require_1` `require_1-ormore` - Check out the list of [acceptable `requirement` checkbox type values](/api/reference/constants/#checkbox-field-grouping). - Check out the list of [acceptable `requirement` radio type fields](/api/reference/constants/#radio-field-grouping). - Radio groups require **at least** two fields per group.", + ) + group_label: Optional[StrictStr] = Field( + default=None, description="Name of the group", alias="groupLabel" + ) __properties: ClassVar[List[str]] = ["requirement", "groupLabel"] model_config = ConfigDict( @@ -41,7 +48,6 @@ class TemplateResponseDocumentFieldGroupRule(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +57,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +102,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "requirement": obj.get("requirement"), - "groupLabel": obj.get("groupLabel") - }) + _obj = cls.model_validate( + {"requirement": obj.get("requirement"), "groupLabel": obj.get("groupLabel")} + ) return _obj @classmethod @@ -119,6 +126,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_base.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_base.py index dc851374c..a8052fd2a 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_base.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_base.py @@ -28,31 +28,81 @@ from typing import Union from typing import TYPE_CHECKING + if TYPE_CHECKING: - from dropbox_sign.models.template_response_document_form_field_checkbox import TemplateResponseDocumentFormFieldCheckbox - from dropbox_sign.models.template_response_document_form_field_date_signed import TemplateResponseDocumentFormFieldDateSigned - from dropbox_sign.models.template_response_document_form_field_dropdown import TemplateResponseDocumentFormFieldDropdown - from dropbox_sign.models.template_response_document_form_field_hyperlink import TemplateResponseDocumentFormFieldHyperlink - from dropbox_sign.models.template_response_document_form_field_initials import TemplateResponseDocumentFormFieldInitials - from dropbox_sign.models.template_response_document_form_field_radio import TemplateResponseDocumentFormFieldRadio - from dropbox_sign.models.template_response_document_form_field_signature import TemplateResponseDocumentFormFieldSignature - from dropbox_sign.models.template_response_document_form_field_text import TemplateResponseDocumentFormFieldText + from dropbox_sign.models.template_response_document_form_field_checkbox import ( + TemplateResponseDocumentFormFieldCheckbox, + ) + from dropbox_sign.models.template_response_document_form_field_date_signed import ( + TemplateResponseDocumentFormFieldDateSigned, + ) + from dropbox_sign.models.template_response_document_form_field_dropdown import ( + TemplateResponseDocumentFormFieldDropdown, + ) + from dropbox_sign.models.template_response_document_form_field_hyperlink import ( + TemplateResponseDocumentFormFieldHyperlink, + ) + from dropbox_sign.models.template_response_document_form_field_initials import ( + TemplateResponseDocumentFormFieldInitials, + ) + from dropbox_sign.models.template_response_document_form_field_radio import ( + TemplateResponseDocumentFormFieldRadio, + ) + from dropbox_sign.models.template_response_document_form_field_signature import ( + TemplateResponseDocumentFormFieldSignature, + ) + from dropbox_sign.models.template_response_document_form_field_text import ( + TemplateResponseDocumentFormFieldText, + ) + class TemplateResponseDocumentFormFieldBase(BaseModel): """ An array of Form Field objects containing the name and type of each named field. - """ # noqa: E501 + """ # noqa: E501 + type: StrictStr - api_id: Optional[StrictStr] = Field(default=None, description="A unique id for the form field.") - name: Optional[StrictStr] = Field(default=None, description="The name of the form field.") - signer: Union[StrictStr, StrictInt] = Field(description="The signer of the Form Field.") - x: Optional[StrictInt] = Field(default=None, description="The horizontal offset in pixels for this form field.") - y: Optional[StrictInt] = Field(default=None, description="The vertical offset in pixels for this form field.") - width: Optional[StrictInt] = Field(default=None, description="The width in pixels of this form field.") - height: Optional[StrictInt] = Field(default=None, description="The height in pixels of this form field.") - required: Optional[StrictBool] = Field(default=None, description="Boolean showing whether or not this field is required.") - group: Optional[StrictStr] = Field(default=None, description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + api_id: Optional[StrictStr] = Field( + default=None, description="A unique id for the form field." + ) + name: Optional[StrictStr] = Field( + default=None, description="The name of the form field." + ) + signer: Union[StrictStr, StrictInt] = Field( + description="The signer of the Form Field." + ) + x: Optional[StrictInt] = Field( + default=None, description="The horizontal offset in pixels for this form field." + ) + y: Optional[StrictInt] = Field( + default=None, description="The vertical offset in pixels for this form field." + ) + width: Optional[StrictInt] = Field( + default=None, description="The width in pixels of this form field." + ) + height: Optional[StrictInt] = Field( + default=None, description="The height in pixels of this form field." + ) + required: Optional[StrictBool] = Field( + default=None, + description="Boolean showing whether or not this field is required.", + ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null` except for Radio fields.", + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -61,13 +111,19 @@ class TemplateResponseDocumentFormFieldBase(BaseModel): arbitrary_types_allowed=True, ) - # JSON field name that stores the object type - __discriminator_property_name: ClassVar[str] = 'type' + __discriminator_property_name: ClassVar[str] = "type" # discriminator mappings __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'checkbox': 'TemplateResponseDocumentFormFieldCheckbox','date_signed': 'TemplateResponseDocumentFormFieldDateSigned','dropdown': 'TemplateResponseDocumentFormFieldDropdown','hyperlink': 'TemplateResponseDocumentFormFieldHyperlink','initials': 'TemplateResponseDocumentFormFieldInitials','radio': 'TemplateResponseDocumentFormFieldRadio','signature': 'TemplateResponseDocumentFormFieldSignature','text': 'TemplateResponseDocumentFormFieldText' + "checkbox": "TemplateResponseDocumentFormFieldCheckbox", + "date_signed": "TemplateResponseDocumentFormFieldDateSigned", + "dropdown": "TemplateResponseDocumentFormFieldDropdown", + "hyperlink": "TemplateResponseDocumentFormFieldHyperlink", + "initials": "TemplateResponseDocumentFormFieldInitials", + "radio": "TemplateResponseDocumentFormFieldRadio", + "signature": "TemplateResponseDocumentFormFieldSignature", + "text": "TemplateResponseDocumentFormFieldText", } @classmethod @@ -88,7 +144,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -100,7 +158,18 @@ def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[st return data @classmethod - def from_json(cls, json_str: str) -> Optional[Union[TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText]]: + def from_json(cls, json_str: str) -> Optional[ + Union[ + TemplateResponseDocumentFormFieldCheckbox, + TemplateResponseDocumentFormFieldDateSigned, + TemplateResponseDocumentFormFieldDropdown, + TemplateResponseDocumentFormFieldHyperlink, + TemplateResponseDocumentFormFieldInitials, + TemplateResponseDocumentFormFieldRadio, + TemplateResponseDocumentFormFieldSignature, + TemplateResponseDocumentFormFieldText, + ] + ]: """Create an instance of TemplateResponseDocumentFormFieldBase from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -123,31 +192,62 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[TemplateResponseDocumentFormFieldCheckbox, TemplateResponseDocumentFormFieldDateSigned, TemplateResponseDocumentFormFieldDropdown, TemplateResponseDocumentFormFieldHyperlink, TemplateResponseDocumentFormFieldInitials, TemplateResponseDocumentFormFieldRadio, TemplateResponseDocumentFormFieldSignature, TemplateResponseDocumentFormFieldText]]: + def from_dict(cls, obj: Dict[str, Any]) -> Optional[ + Union[ + TemplateResponseDocumentFormFieldCheckbox, + TemplateResponseDocumentFormFieldDateSigned, + TemplateResponseDocumentFormFieldDropdown, + TemplateResponseDocumentFormFieldHyperlink, + TemplateResponseDocumentFormFieldInitials, + TemplateResponseDocumentFormFieldRadio, + TemplateResponseDocumentFormFieldSignature, + TemplateResponseDocumentFormFieldText, + ] + ]: """Create an instance of TemplateResponseDocumentFormFieldBase from a dict""" # look up the object type based on discriminator mapping object_type = cls.get_discriminator_value(obj) - if object_type == 'TemplateResponseDocumentFormFieldCheckbox': - return import_module("dropbox_sign.models.template_response_document_form_field_checkbox").TemplateResponseDocumentFormFieldCheckbox.from_dict(obj) - if object_type == 'TemplateResponseDocumentFormFieldDateSigned': - return import_module("dropbox_sign.models.template_response_document_form_field_date_signed").TemplateResponseDocumentFormFieldDateSigned.from_dict(obj) - if object_type == 'TemplateResponseDocumentFormFieldDropdown': - return import_module("dropbox_sign.models.template_response_document_form_field_dropdown").TemplateResponseDocumentFormFieldDropdown.from_dict(obj) - if object_type == 'TemplateResponseDocumentFormFieldHyperlink': - return import_module("dropbox_sign.models.template_response_document_form_field_hyperlink").TemplateResponseDocumentFormFieldHyperlink.from_dict(obj) - if object_type == 'TemplateResponseDocumentFormFieldInitials': - return import_module("dropbox_sign.models.template_response_document_form_field_initials").TemplateResponseDocumentFormFieldInitials.from_dict(obj) - if object_type == 'TemplateResponseDocumentFormFieldRadio': - return import_module("dropbox_sign.models.template_response_document_form_field_radio").TemplateResponseDocumentFormFieldRadio.from_dict(obj) - if object_type == 'TemplateResponseDocumentFormFieldSignature': - return import_module("dropbox_sign.models.template_response_document_form_field_signature").TemplateResponseDocumentFormFieldSignature.from_dict(obj) - if object_type == 'TemplateResponseDocumentFormFieldText': - return import_module("dropbox_sign.models.template_response_document_form_field_text").TemplateResponseDocumentFormFieldText.from_dict(obj) - - raise ValueError("TemplateResponseDocumentFormFieldBase failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + if object_type == "TemplateResponseDocumentFormFieldCheckbox": + return import_module( + "dropbox_sign.models.template_response_document_form_field_checkbox" + ).TemplateResponseDocumentFormFieldCheckbox.from_dict(obj) + if object_type == "TemplateResponseDocumentFormFieldDateSigned": + return import_module( + "dropbox_sign.models.template_response_document_form_field_date_signed" + ).TemplateResponseDocumentFormFieldDateSigned.from_dict(obj) + if object_type == "TemplateResponseDocumentFormFieldDropdown": + return import_module( + "dropbox_sign.models.template_response_document_form_field_dropdown" + ).TemplateResponseDocumentFormFieldDropdown.from_dict(obj) + if object_type == "TemplateResponseDocumentFormFieldHyperlink": + return import_module( + "dropbox_sign.models.template_response_document_form_field_hyperlink" + ).TemplateResponseDocumentFormFieldHyperlink.from_dict(obj) + if object_type == "TemplateResponseDocumentFormFieldInitials": + return import_module( + "dropbox_sign.models.template_response_document_form_field_initials" + ).TemplateResponseDocumentFormFieldInitials.from_dict(obj) + if object_type == "TemplateResponseDocumentFormFieldRadio": + return import_module( + "dropbox_sign.models.template_response_document_form_field_radio" + ).TemplateResponseDocumentFormFieldRadio.from_dict(obj) + if object_type == "TemplateResponseDocumentFormFieldSignature": + return import_module( + "dropbox_sign.models.template_response_document_form_field_signature" + ).TemplateResponseDocumentFormFieldSignature.from_dict(obj) + if object_type == "TemplateResponseDocumentFormFieldText": + return import_module( + "dropbox_sign.models.template_response_document_form_field_text" + ).TemplateResponseDocumentFormFieldText.from_dict(obj) + raise ValueError( + "TemplateResponseDocumentFormFieldBase failed to lookup discriminator value from " + + json.dumps(obj) + + ". Discriminator property name: " + + cls.__discriminator_property_name + + ", mapping: " + + json.dumps(cls.__discriminator_value_class_map) + ) @classmethod def openapi_types(cls) -> Dict[str, str]: @@ -166,6 +266,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_checkbox.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_checkbox.py index 9cd961d5f..9804d5077 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_checkbox.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_checkbox.py @@ -20,19 +20,36 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentFormFieldCheckbox(TemplateResponseDocumentFormFieldBase): """ This class extends `TemplateResponseDocumentFormFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +58,6 @@ class TemplateResponseDocumentFormFieldCheckbox(TemplateResponseDocumentFormFiel arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +112,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'checkbox', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer"), - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "checkbox", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": obj.get("signer"), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +155,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_date_signed.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_date_signed.py index 130dd8d26..14a9a2a08 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_date_signed.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_date_signed.py @@ -20,19 +20,38 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union -class TemplateResponseDocumentFormFieldDateSigned(TemplateResponseDocumentFormFieldBase): + +class TemplateResponseDocumentFormFieldDateSigned( + TemplateResponseDocumentFormFieldBase +): """ This class extends `TemplateResponseDocumentFormFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +60,6 @@ class TemplateResponseDocumentFormFieldDateSigned(TemplateResponseDocumentFormFi arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +114,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'date_signed', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer"), - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": ( + obj.get("type") if obj.get("type") is not None else "date_signed" + ), + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": obj.get("signer"), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +159,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_dropdown.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_dropdown.py index c135186f7..89351e112 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_dropdown.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_dropdown.py @@ -20,19 +20,36 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentFormFieldDropdown(TemplateResponseDocumentFormFieldBase): """ This class extends `TemplateResponseDocumentFormFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +58,6 @@ class TemplateResponseDocumentFormFieldDropdown(TemplateResponseDocumentFormFiel arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +112,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'dropdown', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer"), - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "dropdown", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": obj.get("signer"), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +155,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_hyperlink.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_hyperlink.py index fb8eb9d4b..2c7529891 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_hyperlink.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_hyperlink.py @@ -20,24 +20,59 @@ from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase -from dropbox_sign.models.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) +from dropbox_sign.models.template_response_field_avg_text_length import ( + TemplateResponseFieldAvgTextLength, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentFormFieldHyperlink(TemplateResponseDocumentFormFieldBase): """ This class extends `TemplateResponseDocumentFormFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`") + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" + ) avg_text_length: Optional[TemplateResponseFieldAvgTextLength] = None - is_multiline: Optional[StrictBool] = Field(default=None, description="Whether this form field is multiline text.", alias="isMultiline") - original_font_size: Optional[StrictInt] = Field(default=None, description="Original font size used in this form field's text.", alias="originalFontSize") - font_family: Optional[StrictStr] = Field(default=None, description="Font family used in this form field's text.", alias="fontFamily") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group", "avg_text_length", "isMultiline", "originalFontSize", "fontFamily"] + is_multiline: Optional[StrictBool] = Field( + default=None, + description="Whether this form field is multiline text.", + alias="isMultiline", + ) + original_font_size: Optional[StrictInt] = Field( + default=None, + description="Original font size used in this form field's text.", + alias="originalFontSize", + ) + font_family: Optional[StrictStr] = Field( + default=None, + description="Font family used in this form field's text.", + alias="fontFamily", + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + "avg_text_length", + "isMultiline", + "originalFontSize", + "fontFamily", + ] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +81,6 @@ class TemplateResponseDocumentFormFieldHyperlink(TemplateResponseDocumentFormFie arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -56,7 +90,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -90,7 +126,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of avg_text_length if self.avg_text_length: - _dict['avg_text_length'] = self.avg_text_length.to_dict() + _dict["avg_text_length"] = self.avg_text_length.to_dict() return _dict @classmethod @@ -102,22 +138,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'hyperlink', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer"), - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group"), - "avg_text_length": TemplateResponseFieldAvgTextLength.from_dict(obj["avg_text_length"]) if obj.get("avg_text_length") is not None else None, - "isMultiline": obj.get("isMultiline"), - "originalFontSize": obj.get("originalFontSize"), - "fontFamily": obj.get("fontFamily") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "hyperlink", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": obj.get("signer"), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + "avg_text_length": ( + TemplateResponseFieldAvgTextLength.from_dict(obj["avg_text_length"]) + if obj.get("avg_text_length") is not None + else None + ), + "isMultiline": obj.get("isMultiline"), + "originalFontSize": obj.get("originalFontSize"), + "fontFamily": obj.get("fontFamily"), + } + ) return _obj @classmethod @@ -151,6 +193,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_initials.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_initials.py index 2656c8903..bded1e5f6 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_initials.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_initials.py @@ -20,19 +20,36 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentFormFieldInitials(TemplateResponseDocumentFormFieldBase): """ This class extends `TemplateResponseDocumentFormFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +58,6 @@ class TemplateResponseDocumentFormFieldInitials(TemplateResponseDocumentFormFiel arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +112,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'initials', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer"), - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "initials", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": obj.get("signer"), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +155,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_radio.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_radio.py index 5eb2cf39b..dd394e149 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_radio.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_radio.py @@ -20,19 +20,36 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentFormFieldRadio(TemplateResponseDocumentFormFieldBase): """ This class extends `TemplateResponseDocumentFormFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "group", "api_id", "name", "signer", "x", "y", "width", "height", "required"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "group", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +58,6 @@ class TemplateResponseDocumentFormFieldRadio(TemplateResponseDocumentFormFieldBa arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +112,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'radio', - "group": obj.get("group"), - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer"), - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "radio", + "group": obj.get("group"), + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": obj.get("signer"), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + } + ) return _obj @classmethod @@ -135,6 +155,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_signature.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_signature.py index 94741f855..fd82759b1 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_signature.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_signature.py @@ -20,19 +20,36 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentFormFieldSignature(TemplateResponseDocumentFormFieldBase): """ This class extends `TemplateResponseDocumentFormFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +58,6 @@ class TemplateResponseDocumentFormFieldSignature(TemplateResponseDocumentFormFie arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +112,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'signature', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer"), - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "signature", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": obj.get("signer"), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +155,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_form_field_text.py b/sdks/python/dropbox_sign/models/template_response_document_form_field_text.py index 617885ec8..752e9a25b 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_form_field_text.py +++ b/sdks/python/dropbox_sign/models/template_response_document_form_field_text.py @@ -18,36 +18,97 @@ import re # noqa: F401 import json -from pydantic import ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator +from pydantic import ( + ConfigDict, + Field, + StrictBool, + StrictInt, + StrictStr, + field_validator, +) from typing import Any, ClassVar, Dict, List, Optional -from dropbox_sign.models.template_response_document_form_field_base import TemplateResponseDocumentFormFieldBase -from dropbox_sign.models.template_response_field_avg_text_length import TemplateResponseFieldAvgTextLength +from dropbox_sign.models.template_response_document_form_field_base import ( + TemplateResponseDocumentFormFieldBase, +) +from dropbox_sign.models.template_response_field_avg_text_length import ( + TemplateResponseFieldAvgTextLength, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentFormFieldText(TemplateResponseDocumentFormFieldBase): """ This class extends `TemplateResponseDocumentFormFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`") - avg_text_length: Optional[TemplateResponseFieldAvgTextLength] = None - is_multiline: Optional[StrictBool] = Field(default=None, description="Whether this form field is multiline text.", alias="isMultiline") - original_font_size: Optional[StrictInt] = Field(default=None, description="Original font size used in this form field's text.", alias="originalFontSize") - font_family: Optional[StrictStr] = Field(default=None, description="Font family used in this form field's text.", alias="fontFamily") - validation_type: Optional[StrictStr] = Field(default=None, description="Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values.") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group", "avg_text_length", "isMultiline", "originalFontSize", "fontFamily", "validation_type"] + """ # noqa: E501 - @field_validator('validation_type') + type: StrictStr = Field( + description="The type of this form field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentFormFieldText` * Dropdown Field uses `TemplateResponseDocumentFormFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentFormFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentFormFieldCheckbox` * Radio Field uses `TemplateResponseDocumentFormFieldRadio` * Signature Field uses `TemplateResponseDocumentFormFieldSignature` * Date Signed Field uses `TemplateResponseDocumentFormFieldDateSigned` * Initials Field uses `TemplateResponseDocumentFormFieldInitials`" + ) + avg_text_length: Optional[TemplateResponseFieldAvgTextLength] = None + is_multiline: Optional[StrictBool] = Field( + default=None, + description="Whether this form field is multiline text.", + alias="isMultiline", + ) + original_font_size: Optional[StrictInt] = Field( + default=None, + description="Original font size used in this form field's text.", + alias="originalFontSize", + ) + font_family: Optional[StrictStr] = Field( + default=None, + description="Font family used in this form field's text.", + alias="fontFamily", + ) + validation_type: Optional[StrictStr] = Field( + default=None, + description="Each text field may contain a `validation_type` parameter. Check out the list of [validation types](https://faq.hellosign.com/hc/en-us/articles/217115577) to learn more about the possible values.", + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + "avg_text_length", + "isMultiline", + "originalFontSize", + "fontFamily", + "validation_type", + ] + + @field_validator("validation_type") def validation_type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['numbers_only', 'letters_only', 'phone_number', 'bank_routing_number', 'bank_account_number', 'email_address', 'zip_code', 'social_security_number', 'employer_identification_number', 'custom_regex']): - raise ValueError("must be one of enum values ('numbers_only', 'letters_only', 'phone_number', 'bank_routing_number', 'bank_account_number', 'email_address', 'zip_code', 'social_security_number', 'employer_identification_number', 'custom_regex')") + if value not in set( + [ + "numbers_only", + "letters_only", + "phone_number", + "bank_routing_number", + "bank_account_number", + "email_address", + "zip_code", + "social_security_number", + "employer_identification_number", + "custom_regex", + ] + ): + raise ValueError( + "must be one of enum values ('numbers_only', 'letters_only', 'phone_number', 'bank_routing_number', 'bank_account_number', 'email_address', 'zip_code', 'social_security_number', 'employer_identification_number', 'custom_regex')" + ) return value model_config = ConfigDict( @@ -57,7 +118,6 @@ def validation_type_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +127,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -101,7 +163,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of avg_text_length if self.avg_text_length: - _dict['avg_text_length'] = self.avg_text_length.to_dict() + _dict["avg_text_length"] = self.avg_text_length.to_dict() return _dict @classmethod @@ -113,23 +175,29 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'text', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer"), - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group"), - "avg_text_length": TemplateResponseFieldAvgTextLength.from_dict(obj["avg_text_length"]) if obj.get("avg_text_length") is not None else None, - "isMultiline": obj.get("isMultiline"), - "originalFontSize": obj.get("originalFontSize"), - "fontFamily": obj.get("fontFamily"), - "validation_type": obj.get("validation_type") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "text", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": obj.get("signer"), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + "avg_text_length": ( + TemplateResponseFieldAvgTextLength.from_dict(obj["avg_text_length"]) + if obj.get("avg_text_length") is not None + else None + ), + "isMultiline": obj.get("isMultiline"), + "originalFontSize": obj.get("originalFontSize"), + "fontFamily": obj.get("fontFamily"), + "validation_type": obj.get("validation_type"), + } + ) return _obj @classmethod @@ -164,6 +232,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_base.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_base.py index c0a530881..4c16302d2 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_base.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_base.py @@ -28,31 +28,82 @@ from typing import Union from typing import TYPE_CHECKING + if TYPE_CHECKING: - from dropbox_sign.models.template_response_document_static_field_checkbox import TemplateResponseDocumentStaticFieldCheckbox - from dropbox_sign.models.template_response_document_static_field_date_signed import TemplateResponseDocumentStaticFieldDateSigned - from dropbox_sign.models.template_response_document_static_field_dropdown import TemplateResponseDocumentStaticFieldDropdown - from dropbox_sign.models.template_response_document_static_field_hyperlink import TemplateResponseDocumentStaticFieldHyperlink - from dropbox_sign.models.template_response_document_static_field_initials import TemplateResponseDocumentStaticFieldInitials - from dropbox_sign.models.template_response_document_static_field_radio import TemplateResponseDocumentStaticFieldRadio - from dropbox_sign.models.template_response_document_static_field_signature import TemplateResponseDocumentStaticFieldSignature - from dropbox_sign.models.template_response_document_static_field_text import TemplateResponseDocumentStaticFieldText + from dropbox_sign.models.template_response_document_static_field_checkbox import ( + TemplateResponseDocumentStaticFieldCheckbox, + ) + from dropbox_sign.models.template_response_document_static_field_date_signed import ( + TemplateResponseDocumentStaticFieldDateSigned, + ) + from dropbox_sign.models.template_response_document_static_field_dropdown import ( + TemplateResponseDocumentStaticFieldDropdown, + ) + from dropbox_sign.models.template_response_document_static_field_hyperlink import ( + TemplateResponseDocumentStaticFieldHyperlink, + ) + from dropbox_sign.models.template_response_document_static_field_initials import ( + TemplateResponseDocumentStaticFieldInitials, + ) + from dropbox_sign.models.template_response_document_static_field_radio import ( + TemplateResponseDocumentStaticFieldRadio, + ) + from dropbox_sign.models.template_response_document_static_field_signature import ( + TemplateResponseDocumentStaticFieldSignature, + ) + from dropbox_sign.models.template_response_document_static_field_text import ( + TemplateResponseDocumentStaticFieldText, + ) + class TemplateResponseDocumentStaticFieldBase(BaseModel): """ An array describing static overlay fields. **NOTE:** Only available for certain subscriptions. - """ # noqa: E501 + """ # noqa: E501 + type: StrictStr - api_id: Optional[StrictStr] = Field(default=None, description="A unique id for the static field.") - name: Optional[StrictStr] = Field(default=None, description="The name of the static field.") - signer: Optional[StrictStr] = Field(default='me_now', description="The signer of the Static Field.") - x: Optional[StrictInt] = Field(default=None, description="The horizontal offset in pixels for this static field.") - y: Optional[StrictInt] = Field(default=None, description="The vertical offset in pixels for this static field.") - width: Optional[StrictInt] = Field(default=None, description="The width in pixels of this static field.") - height: Optional[StrictInt] = Field(default=None, description="The height in pixels of this static field.") - required: Optional[StrictBool] = Field(default=None, description="Boolean showing whether or not this field is required.") - group: Optional[StrictStr] = Field(default=None, description="The name of the group this field is in. If this field is not a group, this defaults to `null`.") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + api_id: Optional[StrictStr] = Field( + default=None, description="A unique id for the static field." + ) + name: Optional[StrictStr] = Field( + default=None, description="The name of the static field." + ) + signer: Optional[StrictStr] = Field( + default="me_now", description="The signer of the Static Field." + ) + x: Optional[StrictInt] = Field( + default=None, + description="The horizontal offset in pixels for this static field.", + ) + y: Optional[StrictInt] = Field( + default=None, description="The vertical offset in pixels for this static field." + ) + width: Optional[StrictInt] = Field( + default=None, description="The width in pixels of this static field." + ) + height: Optional[StrictInt] = Field( + default=None, description="The height in pixels of this static field." + ) + required: Optional[StrictBool] = Field( + default=None, + description="Boolean showing whether or not this field is required.", + ) + group: Optional[StrictStr] = Field( + default=None, + description="The name of the group this field is in. If this field is not a group, this defaults to `null`.", + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -61,13 +112,19 @@ class TemplateResponseDocumentStaticFieldBase(BaseModel): arbitrary_types_allowed=True, ) - # JSON field name that stores the object type - __discriminator_property_name: ClassVar[str] = 'type' + __discriminator_property_name: ClassVar[str] = "type" # discriminator mappings __discriminator_value_class_map: ClassVar[Dict[str, str]] = { - 'checkbox': 'TemplateResponseDocumentStaticFieldCheckbox','date_signed': 'TemplateResponseDocumentStaticFieldDateSigned','dropdown': 'TemplateResponseDocumentStaticFieldDropdown','hyperlink': 'TemplateResponseDocumentStaticFieldHyperlink','initials': 'TemplateResponseDocumentStaticFieldInitials','radio': 'TemplateResponseDocumentStaticFieldRadio','signature': 'TemplateResponseDocumentStaticFieldSignature','text': 'TemplateResponseDocumentStaticFieldText' + "checkbox": "TemplateResponseDocumentStaticFieldCheckbox", + "date_signed": "TemplateResponseDocumentStaticFieldDateSigned", + "dropdown": "TemplateResponseDocumentStaticFieldDropdown", + "hyperlink": "TemplateResponseDocumentStaticFieldHyperlink", + "initials": "TemplateResponseDocumentStaticFieldInitials", + "radio": "TemplateResponseDocumentStaticFieldRadio", + "signature": "TemplateResponseDocumentStaticFieldSignature", + "text": "TemplateResponseDocumentStaticFieldText", } @classmethod @@ -88,7 +145,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -100,7 +159,18 @@ def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[st return data @classmethod - def from_json(cls, json_str: str) -> Optional[Union[TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText]]: + def from_json(cls, json_str: str) -> Optional[ + Union[ + TemplateResponseDocumentStaticFieldCheckbox, + TemplateResponseDocumentStaticFieldDateSigned, + TemplateResponseDocumentStaticFieldDropdown, + TemplateResponseDocumentStaticFieldHyperlink, + TemplateResponseDocumentStaticFieldInitials, + TemplateResponseDocumentStaticFieldRadio, + TemplateResponseDocumentStaticFieldSignature, + TemplateResponseDocumentStaticFieldText, + ] + ]: """Create an instance of TemplateResponseDocumentStaticFieldBase from a JSON string""" return cls.from_dict(json.loads(json_str)) @@ -123,31 +193,62 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: return _dict @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Optional[Union[TemplateResponseDocumentStaticFieldCheckbox, TemplateResponseDocumentStaticFieldDateSigned, TemplateResponseDocumentStaticFieldDropdown, TemplateResponseDocumentStaticFieldHyperlink, TemplateResponseDocumentStaticFieldInitials, TemplateResponseDocumentStaticFieldRadio, TemplateResponseDocumentStaticFieldSignature, TemplateResponseDocumentStaticFieldText]]: + def from_dict(cls, obj: Dict[str, Any]) -> Optional[ + Union[ + TemplateResponseDocumentStaticFieldCheckbox, + TemplateResponseDocumentStaticFieldDateSigned, + TemplateResponseDocumentStaticFieldDropdown, + TemplateResponseDocumentStaticFieldHyperlink, + TemplateResponseDocumentStaticFieldInitials, + TemplateResponseDocumentStaticFieldRadio, + TemplateResponseDocumentStaticFieldSignature, + TemplateResponseDocumentStaticFieldText, + ] + ]: """Create an instance of TemplateResponseDocumentStaticFieldBase from a dict""" # look up the object type based on discriminator mapping object_type = cls.get_discriminator_value(obj) - if object_type == 'TemplateResponseDocumentStaticFieldCheckbox': - return import_module("dropbox_sign.models.template_response_document_static_field_checkbox").TemplateResponseDocumentStaticFieldCheckbox.from_dict(obj) - if object_type == 'TemplateResponseDocumentStaticFieldDateSigned': - return import_module("dropbox_sign.models.template_response_document_static_field_date_signed").TemplateResponseDocumentStaticFieldDateSigned.from_dict(obj) - if object_type == 'TemplateResponseDocumentStaticFieldDropdown': - return import_module("dropbox_sign.models.template_response_document_static_field_dropdown").TemplateResponseDocumentStaticFieldDropdown.from_dict(obj) - if object_type == 'TemplateResponseDocumentStaticFieldHyperlink': - return import_module("dropbox_sign.models.template_response_document_static_field_hyperlink").TemplateResponseDocumentStaticFieldHyperlink.from_dict(obj) - if object_type == 'TemplateResponseDocumentStaticFieldInitials': - return import_module("dropbox_sign.models.template_response_document_static_field_initials").TemplateResponseDocumentStaticFieldInitials.from_dict(obj) - if object_type == 'TemplateResponseDocumentStaticFieldRadio': - return import_module("dropbox_sign.models.template_response_document_static_field_radio").TemplateResponseDocumentStaticFieldRadio.from_dict(obj) - if object_type == 'TemplateResponseDocumentStaticFieldSignature': - return import_module("dropbox_sign.models.template_response_document_static_field_signature").TemplateResponseDocumentStaticFieldSignature.from_dict(obj) - if object_type == 'TemplateResponseDocumentStaticFieldText': - return import_module("dropbox_sign.models.template_response_document_static_field_text").TemplateResponseDocumentStaticFieldText.from_dict(obj) - - raise ValueError("TemplateResponseDocumentStaticFieldBase failed to lookup discriminator value from " + - json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name + - ", mapping: " + json.dumps(cls.__discriminator_value_class_map)) + if object_type == "TemplateResponseDocumentStaticFieldCheckbox": + return import_module( + "dropbox_sign.models.template_response_document_static_field_checkbox" + ).TemplateResponseDocumentStaticFieldCheckbox.from_dict(obj) + if object_type == "TemplateResponseDocumentStaticFieldDateSigned": + return import_module( + "dropbox_sign.models.template_response_document_static_field_date_signed" + ).TemplateResponseDocumentStaticFieldDateSigned.from_dict(obj) + if object_type == "TemplateResponseDocumentStaticFieldDropdown": + return import_module( + "dropbox_sign.models.template_response_document_static_field_dropdown" + ).TemplateResponseDocumentStaticFieldDropdown.from_dict(obj) + if object_type == "TemplateResponseDocumentStaticFieldHyperlink": + return import_module( + "dropbox_sign.models.template_response_document_static_field_hyperlink" + ).TemplateResponseDocumentStaticFieldHyperlink.from_dict(obj) + if object_type == "TemplateResponseDocumentStaticFieldInitials": + return import_module( + "dropbox_sign.models.template_response_document_static_field_initials" + ).TemplateResponseDocumentStaticFieldInitials.from_dict(obj) + if object_type == "TemplateResponseDocumentStaticFieldRadio": + return import_module( + "dropbox_sign.models.template_response_document_static_field_radio" + ).TemplateResponseDocumentStaticFieldRadio.from_dict(obj) + if object_type == "TemplateResponseDocumentStaticFieldSignature": + return import_module( + "dropbox_sign.models.template_response_document_static_field_signature" + ).TemplateResponseDocumentStaticFieldSignature.from_dict(obj) + if object_type == "TemplateResponseDocumentStaticFieldText": + return import_module( + "dropbox_sign.models.template_response_document_static_field_text" + ).TemplateResponseDocumentStaticFieldText.from_dict(obj) + raise ValueError( + "TemplateResponseDocumentStaticFieldBase failed to lookup discriminator value from " + + json.dumps(obj) + + ". Discriminator property name: " + + cls.__discriminator_property_name + + ", mapping: " + + json.dumps(cls.__discriminator_value_class_map) + ) @classmethod def openapi_types(cls) -> Dict[str, str]: @@ -166,6 +267,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_checkbox.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_checkbox.py index 855f4a22f..ea1c2b787 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_checkbox.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_checkbox.py @@ -20,19 +20,38 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase +from dropbox_sign.models.template_response_document_static_field_base import ( + TemplateResponseDocumentStaticFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union -class TemplateResponseDocumentStaticFieldCheckbox(TemplateResponseDocumentStaticFieldBase): + +class TemplateResponseDocumentStaticFieldCheckbox( + TemplateResponseDocumentStaticFieldBase +): """ This class extends `TemplateResponseDocumentStaticFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +60,6 @@ class TemplateResponseDocumentStaticFieldCheckbox(TemplateResponseDocumentStatic arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +114,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'checkbox', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer") if obj.get("signer") is not None else 'me_now', - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "checkbox", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": ( + obj.get("signer") if obj.get("signer") is not None else "me_now" + ), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +159,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_date_signed.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_date_signed.py index 8006e779d..3a9bf86e0 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_date_signed.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_date_signed.py @@ -20,19 +20,38 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase +from dropbox_sign.models.template_response_document_static_field_base import ( + TemplateResponseDocumentStaticFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union -class TemplateResponseDocumentStaticFieldDateSigned(TemplateResponseDocumentStaticFieldBase): + +class TemplateResponseDocumentStaticFieldDateSigned( + TemplateResponseDocumentStaticFieldBase +): """ This class extends `TemplateResponseDocumentStaticFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +60,6 @@ class TemplateResponseDocumentStaticFieldDateSigned(TemplateResponseDocumentStat arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +114,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'date_signed', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer") if obj.get("signer") is not None else 'me_now', - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": ( + obj.get("type") if obj.get("type") is not None else "date_signed" + ), + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": ( + obj.get("signer") if obj.get("signer") is not None else "me_now" + ), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +161,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_dropdown.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_dropdown.py index efb9e4846..8444e77d8 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_dropdown.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_dropdown.py @@ -20,19 +20,38 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase +from dropbox_sign.models.template_response_document_static_field_base import ( + TemplateResponseDocumentStaticFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union -class TemplateResponseDocumentStaticFieldDropdown(TemplateResponseDocumentStaticFieldBase): + +class TemplateResponseDocumentStaticFieldDropdown( + TemplateResponseDocumentStaticFieldBase +): """ This class extends `TemplateResponseDocumentStaticFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +60,6 @@ class TemplateResponseDocumentStaticFieldDropdown(TemplateResponseDocumentStatic arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +114,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'dropdown', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer") if obj.get("signer") is not None else 'me_now', - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "dropdown", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": ( + obj.get("signer") if obj.get("signer") is not None else "me_now" + ), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +159,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_hyperlink.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_hyperlink.py index d84e5571c..43106f1b1 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_hyperlink.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_hyperlink.py @@ -20,19 +20,38 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase +from dropbox_sign.models.template_response_document_static_field_base import ( + TemplateResponseDocumentStaticFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union -class TemplateResponseDocumentStaticFieldHyperlink(TemplateResponseDocumentStaticFieldBase): + +class TemplateResponseDocumentStaticFieldHyperlink( + TemplateResponseDocumentStaticFieldBase +): """ This class extends `TemplateResponseDocumentStaticFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +60,6 @@ class TemplateResponseDocumentStaticFieldHyperlink(TemplateResponseDocumentStati arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +114,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'hyperlink', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer") if obj.get("signer") is not None else 'me_now', - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "hyperlink", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": ( + obj.get("signer") if obj.get("signer") is not None else "me_now" + ), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +159,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_initials.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_initials.py index e06d73931..884425354 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_initials.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_initials.py @@ -20,19 +20,38 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase +from dropbox_sign.models.template_response_document_static_field_base import ( + TemplateResponseDocumentStaticFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union -class TemplateResponseDocumentStaticFieldInitials(TemplateResponseDocumentStaticFieldBase): + +class TemplateResponseDocumentStaticFieldInitials( + TemplateResponseDocumentStaticFieldBase +): """ This class extends `TemplateResponseDocumentStaticFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +60,6 @@ class TemplateResponseDocumentStaticFieldInitials(TemplateResponseDocumentStatic arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +114,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'initials', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer") if obj.get("signer") is not None else 'me_now', - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "initials", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": ( + obj.get("signer") if obj.get("signer") is not None else "me_now" + ), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +159,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_radio.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_radio.py index 6a509ef24..e0701f1cc 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_radio.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_radio.py @@ -20,19 +20,36 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase +from dropbox_sign.models.template_response_document_static_field_base import ( + TemplateResponseDocumentStaticFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentStaticFieldRadio(TemplateResponseDocumentStaticFieldBase): """ This class extends `TemplateResponseDocumentStaticFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +58,6 @@ class TemplateResponseDocumentStaticFieldRadio(TemplateResponseDocumentStaticFie arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +112,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'radio', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer") if obj.get("signer") is not None else 'me_now', - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "radio", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": ( + obj.get("signer") if obj.get("signer") is not None else "me_now" + ), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +157,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_signature.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_signature.py index 08aaaaffc..dbd12110f 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_signature.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_signature.py @@ -20,19 +20,38 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase +from dropbox_sign.models.template_response_document_static_field_base import ( + TemplateResponseDocumentStaticFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union -class TemplateResponseDocumentStaticFieldSignature(TemplateResponseDocumentStaticFieldBase): + +class TemplateResponseDocumentStaticFieldSignature( + TemplateResponseDocumentStaticFieldBase +): """ This class extends `TemplateResponseDocumentStaticFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +60,6 @@ class TemplateResponseDocumentStaticFieldSignature(TemplateResponseDocumentStati arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +69,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +114,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'signature', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer") if obj.get("signer") is not None else 'me_now', - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "signature", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": ( + obj.get("signer") if obj.get("signer") is not None else "me_now" + ), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +159,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_document_static_field_text.py b/sdks/python/dropbox_sign/models/template_response_document_static_field_text.py index 380a7d54b..7fe3d5925 100644 --- a/sdks/python/dropbox_sign/models/template_response_document_static_field_text.py +++ b/sdks/python/dropbox_sign/models/template_response_document_static_field_text.py @@ -20,19 +20,36 @@ from pydantic import ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_response_document_static_field_base import TemplateResponseDocumentStaticFieldBase +from dropbox_sign.models.template_response_document_static_field_base import ( + TemplateResponseDocumentStaticFieldBase, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateResponseDocumentStaticFieldText(TemplateResponseDocumentStaticFieldBase): """ This class extends `TemplateResponseDocumentStaticFieldBase` - """ # noqa: E501 - type: StrictStr = Field(description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`") - __properties: ClassVar[List[str]] = ["type", "api_id", "name", "signer", "x", "y", "width", "height", "required", "group"] + """ # noqa: E501 + + type: StrictStr = Field( + description="The type of this static field. See [field types](/api/reference/constants/#field-types). * Text Field uses `TemplateResponseDocumentStaticFieldText` * Dropdown Field uses `TemplateResponseDocumentStaticFieldDropdown` * Hyperlink Field uses `TemplateResponseDocumentStaticFieldHyperlink` * Checkbox Field uses `TemplateResponseDocumentStaticFieldCheckbox` * Radio Field uses `TemplateResponseDocumentStaticFieldRadio` * Signature Field uses `TemplateResponseDocumentStaticFieldSignature` * Date Signed Field uses `TemplateResponseDocumentStaticFieldDateSigned` * Initials Field uses `TemplateResponseDocumentStaticFieldInitials`" + ) + __properties: ClassVar[List[str]] = [ + "type", + "api_id", + "name", + "signer", + "x", + "y", + "width", + "height", + "required", + "group", + ] model_config = ConfigDict( populate_by_name=True, @@ -41,7 +58,6 @@ class TemplateResponseDocumentStaticFieldText(TemplateResponseDocumentStaticFiel arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +67,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,18 +112,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type") if obj.get("type") is not None else 'text', - "api_id": obj.get("api_id"), - "name": obj.get("name"), - "signer": obj.get("signer") if obj.get("signer") is not None else 'me_now', - "x": obj.get("x"), - "y": obj.get("y"), - "width": obj.get("width"), - "height": obj.get("height"), - "required": obj.get("required"), - "group": obj.get("group") - }) + _obj = cls.model_validate( + { + "type": obj.get("type") if obj.get("type") is not None else "text", + "api_id": obj.get("api_id"), + "name": obj.get("name"), + "signer": ( + obj.get("signer") if obj.get("signer") is not None else "me_now" + ), + "x": obj.get("x"), + "y": obj.get("y"), + "width": obj.get("width"), + "height": obj.get("height"), + "required": obj.get("required"), + "group": obj.get("group"), + } + ) return _obj @classmethod @@ -135,6 +157,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_field_avg_text_length.py b/sdks/python/dropbox_sign/models/template_response_field_avg_text_length.py index c53c9b253..b3b5d4aff 100644 --- a/sdks/python/dropbox_sign/models/template_response_field_avg_text_length.py +++ b/sdks/python/dropbox_sign/models/template_response_field_avg_text_length.py @@ -26,12 +26,16 @@ from pydantic import StrictBool from typing import Union + class TemplateResponseFieldAvgTextLength(BaseModel): """ Average text length in this field. - """ # noqa: E501 + """ # noqa: E501 + num_lines: Optional[StrictInt] = Field(default=None, description="Number of lines.") - num_chars_per_line: Optional[StrictInt] = Field(default=None, description="Number of characters per line.") + num_chars_per_line: Optional[StrictInt] = Field( + default=None, description="Number of characters per line." + ) __properties: ClassVar[List[str]] = ["num_lines", "num_chars_per_line"] model_config = ConfigDict( @@ -41,7 +45,6 @@ class TemplateResponseFieldAvgTextLength(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +54,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +99,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "num_lines": obj.get("num_lines"), - "num_chars_per_line": obj.get("num_chars_per_line") - }) + _obj = cls.model_validate( + { + "num_lines": obj.get("num_lines"), + "num_chars_per_line": obj.get("num_chars_per_line"), + } + ) return _obj @classmethod @@ -119,6 +126,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_response_signer_role.py b/sdks/python/dropbox_sign/models/template_response_signer_role.py index 45b77bbf6..aab8250c4 100644 --- a/sdks/python/dropbox_sign/models/template_response_signer_role.py +++ b/sdks/python/dropbox_sign/models/template_response_signer_role.py @@ -26,12 +26,17 @@ from pydantic import StrictBool from typing import Union + class TemplateResponseSignerRole(BaseModel): """ TemplateResponseSignerRole - """ # noqa: E501 + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of the Role.") - order: Optional[StrictInt] = Field(default=None, description="If signer order is assigned this is the 0-based index for this role.") + order: Optional[StrictInt] = Field( + default=None, + description="If signer order is assigned this is the 0-based index for this role.", + ) __properties: ClassVar[List[str]] = ["name", "order"] model_config = ConfigDict( @@ -41,7 +46,6 @@ class TemplateResponseSignerRole(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +55,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +100,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "name": obj.get("name"), - "order": obj.get("order") - }) + _obj = cls.model_validate({"name": obj.get("name"), "order": obj.get("order")}) return _obj @classmethod @@ -119,6 +122,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_update_files_request.py b/sdks/python/dropbox_sign/models/template_update_files_request.py index 476e09b96..e8d3f22cd 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_request.py +++ b/sdks/python/dropbox_sign/models/template_update_files_request.py @@ -27,17 +27,42 @@ from pydantic import StrictBool from typing import Union + class TemplateUpdateFilesRequest(BaseModel): """ TemplateUpdateFilesRequest - """ # noqa: E501 - client_id: Optional[StrictStr] = Field(default=None, description="Client id of the app you're using to update this template.") - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field(default=None, description="Use `files[]` to indicate the uploaded file(s) to use for the template. This endpoint requires either **files** or **file_urls[]**, but not both.") - file_urls: Optional[List[StrictStr]] = Field(default=None, description="Use `file_urls[]` to have Dropbox Sign download the file(s) to use for the template. This endpoint requires either **files** or **file_urls[]**, but not both.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The new default template email message.") - subject: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field(default=None, description="The new default template email subject.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.") - __properties: ClassVar[List[str]] = ["client_id", "files", "file_urls", "message", "subject", "test_mode"] + """ # noqa: E501 + + client_id: Optional[StrictStr] = Field( + default=None, + description="Client id of the app you're using to update this template.", + ) + files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to use for the template. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to use for the template. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, description="The new default template email message." + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=100)]] = Field( + default=None, description="The new default template email subject." + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.", + ) + __properties: ClassVar[List[str]] = [ + "client_id", + "files", + "file_urls", + "message", + "subject", + "test_mode", + ] model_config = ConfigDict( populate_by_name=True, @@ -46,7 +71,6 @@ class TemplateUpdateFilesRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -56,7 +80,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -99,14 +125,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "client_id": obj.get("client_id"), - "files": obj.get("files"), - "file_urls": obj.get("file_urls"), - "message": obj.get("message"), - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False - }) + _obj = cls.model_validate( + { + "client_id": obj.get("client_id"), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "message": obj.get("message"), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + } + ) return _obj @classmethod @@ -136,4 +166,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "files", "file_urls", ] - diff --git a/sdks/python/dropbox_sign/models/template_update_files_response.py b/sdks/python/dropbox_sign/models/template_update_files_response.py index 2c2806afa..d2c07763a 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_response.py +++ b/sdks/python/dropbox_sign/models/template_update_files_response.py @@ -20,17 +20,21 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from dropbox_sign.models.template_update_files_response_template import TemplateUpdateFilesResponseTemplate +from dropbox_sign.models.template_update_files_response_template import ( + TemplateUpdateFilesResponseTemplate, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class TemplateUpdateFilesResponse(BaseModel): """ TemplateUpdateFilesResponse - """ # noqa: E501 + """ # noqa: E501 + template: TemplateUpdateFilesResponseTemplate __properties: ClassVar[List[str]] = ["template"] @@ -41,7 +45,6 @@ class TemplateUpdateFilesResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +54,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -85,7 +90,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of template if self.template: - _dict['template'] = self.template.to_dict() + _dict["template"] = self.template.to_dict() return _dict @classmethod @@ -97,9 +102,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template": TemplateUpdateFilesResponseTemplate.from_dict(obj["template"]) if obj.get("template") is not None else None - }) + _obj = cls.model_validate( + { + "template": ( + TemplateUpdateFilesResponseTemplate.from_dict(obj["template"]) + if obj.get("template") is not None + else None + ) + } + ) return _obj @classmethod @@ -120,6 +131,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/template_update_files_response_template.py b/sdks/python/dropbox_sign/models/template_update_files_response_template.py index 0add592b7..a8fb50fa3 100644 --- a/sdks/python/dropbox_sign/models/template_update_files_response_template.py +++ b/sdks/python/dropbox_sign/models/template_update_files_response_template.py @@ -27,12 +27,18 @@ from pydantic import StrictBool from typing import Union + class TemplateUpdateFilesResponseTemplate(BaseModel): """ Contains template id - """ # noqa: E501 - template_id: Optional[StrictStr] = Field(default=None, description="The id of the Template.") - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + """ # noqa: E501 + + template_id: Optional[StrictStr] = Field( + default=None, description="The id of the Template." + ) + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["template_id", "warnings"] model_config = ConfigDict( @@ -42,7 +48,6 @@ class TemplateUpdateFilesResponseTemplate(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -52,7 +57,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -90,7 +97,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -102,10 +109,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "template_id": obj.get("template_id"), - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "template_id": obj.get("template_id"), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -130,4 +143,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_request.py b/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_request.py index 187b4c10e..33b165023 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_request.py @@ -18,7 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictBytes, + StrictInt, + StrictStr, + field_validator, +) from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from dropbox_sign.models.sub_attachment import SubAttachment @@ -27,7 +36,9 @@ from dropbox_sign.models.sub_field_options import SubFieldOptions from dropbox_sign.models.sub_form_field_group import SubFormFieldGroup from dropbox_sign.models.sub_form_field_rule import SubFormFieldRule -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from dropbox_sign.models.sub_signing_options import SubSigningOptions from dropbox_sign.models.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner from typing import Optional, Set, Tuple @@ -36,56 +47,190 @@ from pydantic import StrictBool from typing import Union + class UnclaimedDraftCreateEmbeddedRequest(BaseModel): - """ - - """ # noqa: E501 - client_id: StrictStr = Field(description="Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app.") - requester_email_address: StrictStr = Field(description="The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`.") - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field(default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - file_urls: Optional[List[StrictStr]] = Field(default=None, description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - allow_ccs: Optional[StrictBool] = Field(default=True, description="This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft.") - allow_decline: Optional[StrictBool] = Field(default=False, description="Allows signers to decline to sign a document if `true`. Defaults to `false`.") - allow_reassign: Optional[StrictBool] = Field(default=False, description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.") - attachments: Optional[List[SubAttachment]] = Field(default=None, description="A list describing the attachments") - cc_email_addresses: Optional[List[StrictStr]] = Field(default=None, description="The email addresses that should be CCed.") - custom_fields: Optional[List[SubCustomField]] = Field(default=None, description="When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.") + """ """ # noqa: E501 + + client_id: StrictStr = Field( + description="Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app." + ) + requester_email_address: StrictStr = Field( + description="The email address of the user that should be designated as the requester of this draft, if the draft type is `request_signature`." + ) + files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + allow_ccs: Optional[StrictBool] = Field( + default=True, + description="This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft.", + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + allow_reassign: Optional[StrictBool] = Field( + default=False, + description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.", + ) + attachments: Optional[List[SubAttachment]] = Field( + default=None, description="A list describing the attachments" + ) + cc_email_addresses: Optional[List[StrictStr]] = Field( + default=None, description="The email addresses that should be CCed." + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description='When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.', + ) editor_options: Optional[SubEditorOptions] = None field_options: Optional[SubFieldOptions] = None - force_signer_page: Optional[StrictBool] = Field(default=False, description="Provide users the ability to review/edit the signers.") - force_subject_message: Optional[StrictBool] = Field(default=False, description="Provide users the ability to review/edit the subject and message.") - form_field_groups: Optional[List[SubFormFieldGroup]] = Field(default=None, description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.") - form_field_rules: Optional[List[SubFormFieldRule]] = Field(default=None, description="Conditional Logic rules for fields defined in `form_fields_per_document`.") - form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field(default=None, description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`") - hide_text_tags: Optional[StrictBool] = Field(default=False, description="Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details.") - hold_request: Optional[StrictBool] = Field(default=False, description="The request from this draft will not automatically send to signers post-claim if set to `true`. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`.") - is_for_embedded_signing: Optional[StrictBool] = Field(default=False, description="The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The custom message in the email that will be sent to the signers.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.") - requesting_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully request a signature.") - show_preview: Optional[StrictBool] = Field(default=None, description="This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience.") - show_progress_stepper: Optional[StrictBool] = Field(default=True, description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.") - signers: Optional[List[SubUnclaimedDraftSigner]] = Field(default=None, description="Add Signers to your Unclaimed Draft Signature Request.") + force_signer_page: Optional[StrictBool] = Field( + default=False, + description="Provide users the ability to review/edit the signers.", + ) + force_subject_message: Optional[StrictBool] = Field( + default=False, + description="Provide users the ability to review/edit the subject and message.", + ) + form_field_groups: Optional[List[SubFormFieldGroup]] = Field( + default=None, + description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.", + ) + form_field_rules: Optional[List[SubFormFieldRule]] = Field( + default=None, + description="Conditional Logic rules for fields defined in `form_fields_per_document`.", + ) + form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field( + default=None, + description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`", + ) + hide_text_tags: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details.", + ) + hold_request: Optional[StrictBool] = Field( + default=False, + description="The request from this draft will not automatically send to signers post-claim if set to `true`. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`.", + ) + is_for_embedded_signing: Optional[StrictBool] = Field( + default=False, + description="The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) + requesting_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully request a signature.", + ) + show_preview: Optional[StrictBool] = Field( + default=None, + description="This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience.", + ) + show_progress_stepper: Optional[StrictBool] = Field( + default=True, + description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.", + ) + signers: Optional[List[SubUnclaimedDraftSigner]] = Field( + default=None, + description="Add Signers to your Unclaimed Draft Signature Request.", + ) signing_options: Optional[SubSigningOptions] = None - signing_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully sign.") - skip_me_now: Optional[StrictBool] = Field(default=False, description="Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.") - subject: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="The subject in the email that will be sent to the signers.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.") - type: Optional[StrictStr] = Field(default='request_signature', description="The type of the draft. By default this is `request_signature`, but you can set it to `send_document` if you want to self sign a document and download it.") - use_preexisting_fields: Optional[StrictBool] = Field(default=False, description="Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both.") - use_text_tags: Optional[StrictBool] = Field(default=False, description="Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both.") - populate_auto_fill_fields: Optional[StrictBool] = Field(default=False, description="Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.") - expires_at: Optional[StrictInt] = Field(default=None, description="When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **NOTE:** This does not correspond to the **expires_at** returned in the response.") - __properties: ClassVar[List[str]] = ["client_id", "requester_email_address", "files", "file_urls", "allow_ccs", "allow_decline", "allow_reassign", "attachments", "cc_email_addresses", "custom_fields", "editor_options", "field_options", "force_signer_page", "force_subject_message", "form_field_groups", "form_field_rules", "form_fields_per_document", "hide_text_tags", "hold_request", "is_for_embedded_signing", "message", "metadata", "requesting_redirect_url", "show_preview", "show_progress_stepper", "signers", "signing_options", "signing_redirect_url", "skip_me_now", "subject", "test_mode", "type", "use_preexisting_fields", "use_text_tags", "populate_auto_fill_fields", "expires_at"] + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully sign.", + ) + skip_me_now: Optional[StrictBool] = Field( + default=False, + description='Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.', + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.", + ) + type: Optional[StrictStr] = Field( + default="request_signature", + description="The type of the draft. By default this is `request_signature`, but you can set it to `send_document` if you want to self sign a document and download it.", + ) + use_preexisting_fields: Optional[StrictBool] = Field( + default=False, + description="Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both.", + ) + use_text_tags: Optional[StrictBool] = Field( + default=False, + description="Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both.", + ) + populate_auto_fill_fields: Optional[StrictBool] = Field( + default=False, + description="Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.", + ) + expires_at: Optional[StrictInt] = Field( + default=None, + description="When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **NOTE:** This does not correspond to the **expires_at** returned in the response.", + ) + __properties: ClassVar[List[str]] = [ + "client_id", + "requester_email_address", + "files", + "file_urls", + "allow_ccs", + "allow_decline", + "allow_reassign", + "attachments", + "cc_email_addresses", + "custom_fields", + "editor_options", + "field_options", + "force_signer_page", + "force_subject_message", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + "hide_text_tags", + "hold_request", + "is_for_embedded_signing", + "message", + "metadata", + "requesting_redirect_url", + "show_preview", + "show_progress_stepper", + "signers", + "signing_options", + "signing_redirect_url", + "skip_me_now", + "subject", + "test_mode", + "type", + "use_preexisting_fields", + "use_text_tags", + "populate_auto_fill_fields", + "expires_at", + ] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" if value is None: return value - if value not in set(['send_document', 'request_signature']): - raise ValueError("must be one of enum values ('send_document', 'request_signature')") + if value not in set(["send_document", "request_signature"]): + raise ValueError( + "must be one of enum values ('send_document', 'request_signature')" + ) return value model_config = ConfigDict( @@ -95,7 +240,6 @@ def type_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -105,7 +249,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -143,51 +289,51 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_attachments in self.attachments: if _item_attachments: _items.append(_item_attachments.to_dict()) - _dict['attachments'] = _items + _dict["attachments"] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) _items = [] if self.custom_fields: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of editor_options if self.editor_options: - _dict['editor_options'] = self.editor_options.to_dict() + _dict["editor_options"] = self.editor_options.to_dict() # override the default output from pydantic by calling `to_dict()` of field_options if self.field_options: - _dict['field_options'] = self.field_options.to_dict() + _dict["field_options"] = self.field_options.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in form_field_groups (list) _items = [] if self.form_field_groups: for _item_form_field_groups in self.form_field_groups: if _item_form_field_groups: _items.append(_item_form_field_groups.to_dict()) - _dict['form_field_groups'] = _items + _dict["form_field_groups"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_field_rules (list) _items = [] if self.form_field_rules: for _item_form_field_rules in self.form_field_rules: if _item_form_field_rules: _items.append(_item_form_field_rules.to_dict()) - _dict['form_field_rules'] = _items + _dict["form_field_rules"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_fields_per_document (list) _items = [] if self.form_fields_per_document: for _item_form_fields_per_document in self.form_fields_per_document: if _item_form_fields_per_document: _items.append(_item_form_fields_per_document.to_dict()) - _dict['form_fields_per_document'] = _items + _dict["form_fields_per_document"] = _items # override the default output from pydantic by calling `to_dict()` of each item in signers (list) _items = [] if self.signers: for _item_signers in self.signers: if _item_signers: _items.append(_item_signers.to_dict()) - _dict['signers'] = _items + _dict["signers"] = _items # override the default output from pydantic by calling `to_dict()` of signing_options if self.signing_options: - _dict['signing_options'] = self.signing_options.to_dict() + _dict["signing_options"] = self.signing_options.to_dict() return _dict @classmethod @@ -199,44 +345,150 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "client_id": obj.get("client_id"), - "requester_email_address": obj.get("requester_email_address"), - "files": obj.get("files"), - "file_urls": obj.get("file_urls"), - "allow_ccs": obj.get("allow_ccs") if obj.get("allow_ccs") is not None else True, - "allow_decline": obj.get("allow_decline") if obj.get("allow_decline") is not None else False, - "allow_reassign": obj.get("allow_reassign") if obj.get("allow_reassign") is not None else False, - "attachments": [SubAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, - "cc_email_addresses": obj.get("cc_email_addresses"), - "custom_fields": [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "editor_options": SubEditorOptions.from_dict(obj["editor_options"]) if obj.get("editor_options") is not None else None, - "field_options": SubFieldOptions.from_dict(obj["field_options"]) if obj.get("field_options") is not None else None, - "force_signer_page": obj.get("force_signer_page") if obj.get("force_signer_page") is not None else False, - "force_subject_message": obj.get("force_subject_message") if obj.get("force_subject_message") is not None else False, - "form_field_groups": [SubFormFieldGroup.from_dict(_item) for _item in obj["form_field_groups"]] if obj.get("form_field_groups") is not None else None, - "form_field_rules": [SubFormFieldRule.from_dict(_item) for _item in obj["form_field_rules"]] if obj.get("form_field_rules") is not None else None, - "form_fields_per_document": [SubFormFieldsPerDocumentBase.from_dict(_item) for _item in obj["form_fields_per_document"]] if obj.get("form_fields_per_document") is not None else None, - "hide_text_tags": obj.get("hide_text_tags") if obj.get("hide_text_tags") is not None else False, - "hold_request": obj.get("hold_request") if obj.get("hold_request") is not None else False, - "is_for_embedded_signing": obj.get("is_for_embedded_signing") if obj.get("is_for_embedded_signing") is not None else False, - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "requesting_redirect_url": obj.get("requesting_redirect_url"), - "show_preview": obj.get("show_preview"), - "show_progress_stepper": obj.get("show_progress_stepper") if obj.get("show_progress_stepper") is not None else True, - "signers": [SubUnclaimedDraftSigner.from_dict(_item) for _item in obj["signers"]] if obj.get("signers") is not None else None, - "signing_options": SubSigningOptions.from_dict(obj["signing_options"]) if obj.get("signing_options") is not None else None, - "signing_redirect_url": obj.get("signing_redirect_url"), - "skip_me_now": obj.get("skip_me_now") if obj.get("skip_me_now") is not None else False, - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "type": obj.get("type") if obj.get("type") is not None else 'request_signature', - "use_preexisting_fields": obj.get("use_preexisting_fields") if obj.get("use_preexisting_fields") is not None else False, - "use_text_tags": obj.get("use_text_tags") if obj.get("use_text_tags") is not None else False, - "populate_auto_fill_fields": obj.get("populate_auto_fill_fields") if obj.get("populate_auto_fill_fields") is not None else False, - "expires_at": obj.get("expires_at") - }) + _obj = cls.model_validate( + { + "client_id": obj.get("client_id"), + "requester_email_address": obj.get("requester_email_address"), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "allow_ccs": ( + obj.get("allow_ccs") if obj.get("allow_ccs") is not None else True + ), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "allow_reassign": ( + obj.get("allow_reassign") + if obj.get("allow_reassign") is not None + else False + ), + "attachments": ( + [SubAttachment.from_dict(_item) for _item in obj["attachments"]] + if obj.get("attachments") is not None + else None + ), + "cc_email_addresses": obj.get("cc_email_addresses"), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "editor_options": ( + SubEditorOptions.from_dict(obj["editor_options"]) + if obj.get("editor_options") is not None + else None + ), + "field_options": ( + SubFieldOptions.from_dict(obj["field_options"]) + if obj.get("field_options") is not None + else None + ), + "force_signer_page": ( + obj.get("force_signer_page") + if obj.get("force_signer_page") is not None + else False + ), + "force_subject_message": ( + obj.get("force_subject_message") + if obj.get("force_subject_message") is not None + else False + ), + "form_field_groups": ( + [ + SubFormFieldGroup.from_dict(_item) + for _item in obj["form_field_groups"] + ] + if obj.get("form_field_groups") is not None + else None + ), + "form_field_rules": ( + [ + SubFormFieldRule.from_dict(_item) + for _item in obj["form_field_rules"] + ] + if obj.get("form_field_rules") is not None + else None + ), + "form_fields_per_document": ( + [ + SubFormFieldsPerDocumentBase.from_dict(_item) + for _item in obj["form_fields_per_document"] + ] + if obj.get("form_fields_per_document") is not None + else None + ), + "hide_text_tags": ( + obj.get("hide_text_tags") + if obj.get("hide_text_tags") is not None + else False + ), + "hold_request": ( + obj.get("hold_request") + if obj.get("hold_request") is not None + else False + ), + "is_for_embedded_signing": ( + obj.get("is_for_embedded_signing") + if obj.get("is_for_embedded_signing") is not None + else False + ), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "requesting_redirect_url": obj.get("requesting_redirect_url"), + "show_preview": obj.get("show_preview"), + "show_progress_stepper": ( + obj.get("show_progress_stepper") + if obj.get("show_progress_stepper") is not None + else True + ), + "signers": ( + [ + SubUnclaimedDraftSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "signing_options": ( + SubSigningOptions.from_dict(obj["signing_options"]) + if obj.get("signing_options") is not None + else None + ), + "signing_redirect_url": obj.get("signing_redirect_url"), + "skip_me_now": ( + obj.get("skip_me_now") + if obj.get("skip_me_now") is not None + else False + ), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "type": ( + obj.get("type") + if obj.get("type") is not None + else "request_signature" + ), + "use_preexisting_fields": ( + obj.get("use_preexisting_fields") + if obj.get("use_preexisting_fields") is not None + else False + ), + "use_text_tags": ( + obj.get("use_text_tags") + if obj.get("use_text_tags") is not None + else False + ), + "populate_auto_fill_fields": ( + obj.get("populate_auto_fill_fields") + if obj.get("populate_auto_fill_fields") is not None + else False + ), + "expires_at": obj.get("expires_at"), + } + ) return _obj @classmethod @@ -303,4 +555,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "form_fields_per_document", "signers", ] - diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_with_template_request.py b/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_with_template_request.py index 1b9dd8bf0..a09307d19 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_with_template_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_embedded_with_template_request.py @@ -26,48 +26,161 @@ from dropbox_sign.models.sub_editor_options import SubEditorOptions from dropbox_sign.models.sub_field_options import SubFieldOptions from dropbox_sign.models.sub_signing_options import SubSigningOptions -from dropbox_sign.models.sub_unclaimed_draft_template_signer import SubUnclaimedDraftTemplateSigner +from dropbox_sign.models.sub_unclaimed_draft_template_signer import ( + SubUnclaimedDraftTemplateSigner, +) from typing import Optional, Set, Tuple from typing_extensions import Self import io from pydantic import StrictBool from typing import Union + class UnclaimedDraftCreateEmbeddedWithTemplateRequest(BaseModel): """ UnclaimedDraftCreateEmbeddedWithTemplateRequest - """ # noqa: E501 - client_id: StrictStr = Field(description="Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app.") - requester_email_address: StrictStr = Field(description="The email address of the user that should be designated as the requester of this draft.") - template_ids: List[StrictStr] = Field(description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used.") - allow_decline: Optional[StrictBool] = Field(default=False, description="Allows signers to decline to sign a document if `true`. Defaults to `false`.") - allow_reassign: Optional[StrictBool] = Field(default=False, description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.") - ccs: Optional[List[SubCC]] = Field(default=None, description="Add CC email recipients. Required when a CC role exists for the Template.") - custom_fields: Optional[List[SubCustomField]] = Field(default=None, description="An array defining values and options for custom fields. Required when a custom field exists in the Template.") + """ # noqa: E501 + + client_id: StrictStr = Field( + description="Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app." + ) + requester_email_address: StrictStr = Field( + description="The email address of the user that should be designated as the requester of this draft." + ) + template_ids: List[StrictStr] = Field( + description="Use `template_ids` to create a SignatureRequest from one or more templates, in the order in which the templates will be used." + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + allow_reassign: Optional[StrictBool] = Field( + default=False, + description="Allows signers to reassign their signature requests to other signers if set to `true`. Defaults to `false`. **NOTE:** Only available for Premium plan and higher.", + ) + ccs: Optional[List[SubCC]] = Field( + default=None, + description="Add CC email recipients. Required when a CC role exists for the Template.", + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description="An array defining values and options for custom fields. Required when a custom field exists in the Template.", + ) editor_options: Optional[SubEditorOptions] = None field_options: Optional[SubFieldOptions] = None - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field(default=None, description="Use `files[]` to append additional files to the signature request being created from the template. Dropbox Sign will parse the files for [text tags](https://app.hellosign.com/api/textTagsWalkthrough) and append it to the signature request. Text tags for signers not on the template(s) will be ignored. **files** or **file_urls[]** is required, but not both.") - file_urls: Optional[List[StrictStr]] = Field(default=None, description="Use file_urls[] to append additional files to the signature request being created from the template. Dropbox Sign will download the file, then parse it for [text tags](https://app.hellosign.com/api/textTagsWalkthrough), and append to the signature request. Text tags for signers not on the template(s) will be ignored. **files** or **file_urls[]** is required, but not both.") - force_signer_roles: Optional[StrictBool] = Field(default=False, description="Provide users the ability to review/edit the template signer roles.") - force_subject_message: Optional[StrictBool] = Field(default=False, description="Provide users the ability to review/edit the template subject and message.") - hold_request: Optional[StrictBool] = Field(default=False, description="The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`.") - is_for_embedded_signing: Optional[StrictBool] = Field(default=False, description="The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The custom message in the email that will be sent to the signers.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.") - preview_only: Optional[StrictBool] = Field(default=False, description="This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). - `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience. **NOTE:** This parameter overwrites `show_preview=1` (if set).") - requesting_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully request a signature.") - show_preview: Optional[StrictBool] = Field(default=False, description="This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience.") - show_progress_stepper: Optional[StrictBool] = Field(default=True, description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.") - signers: Optional[List[SubUnclaimedDraftTemplateSigner]] = Field(default=None, description="Add Signers to your Templated-based Signature Request.") + files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + default=None, + description="Use `files[]` to append additional files to the signature request being created from the template. Dropbox Sign will parse the files for [text tags](https://app.hellosign.com/api/textTagsWalkthrough) and append it to the signature request. Text tags for signers not on the template(s) will be ignored. **files** or **file_urls[]** is required, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use file_urls[] to append additional files to the signature request being created from the template. Dropbox Sign will download the file, then parse it for [text tags](https://app.hellosign.com/api/textTagsWalkthrough), and append to the signature request. Text tags for signers not on the template(s) will be ignored. **files** or **file_urls[]** is required, but not both.", + ) + force_signer_roles: Optional[StrictBool] = Field( + default=False, + description="Provide users the ability to review/edit the template signer roles.", + ) + force_subject_message: Optional[StrictBool] = Field( + default=False, + description="Provide users the ability to review/edit the template subject and message.", + ) + hold_request: Optional[StrictBool] = Field( + default=False, + description="The request from this draft will not automatically send to signers post-claim if set to 1. Requester must [release](/api/reference/operation/signatureRequestReleaseHold/) the request from hold when ready to send. Defaults to `false`.", + ) + is_for_embedded_signing: Optional[StrictBool] = Field( + default=False, + description="The request created from this draft will also be signable in embedded mode if set to `true`. Defaults to `false`.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) + preview_only: Optional[StrictBool] = Field( + default=False, + description="This allows the requester to enable the preview experience (i.e. does not allow the requester's end user to add any additional fields via the editor). - `preview_only=true`: Allows requesters to enable the preview only experience. - `preview_only=false`: Allows requesters to disable the preview only experience. **NOTE:** This parameter overwrites `show_preview=1` (if set).", + ) + requesting_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully request a signature.", + ) + show_preview: Optional[StrictBool] = Field( + default=False, + description="This allows the requester to enable the editor/preview experience. - `show_preview=true`: Allows requesters to enable the editor/preview experience. - `show_preview=false`: Allows requesters to disable the editor/preview experience.", + ) + show_progress_stepper: Optional[StrictBool] = Field( + default=True, + description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.", + ) + signers: Optional[List[SubUnclaimedDraftTemplateSigner]] = Field( + default=None, + description="Add Signers to your Templated-based Signature Request.", + ) signing_options: Optional[SubSigningOptions] = None - signing_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully sign.") - skip_me_now: Optional[StrictBool] = Field(default=False, description="Disables the \"Me (Now)\" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.") - subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The subject in the email that will be sent to the signers.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.") - title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="The title you want to assign to the SignatureRequest.") - populate_auto_fill_fields: Optional[StrictBool] = Field(default=False, description="Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.") - allow_ccs: Optional[StrictBool] = Field(default=False, description="This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft.") - __properties: ClassVar[List[str]] = ["client_id", "requester_email_address", "template_ids", "allow_decline", "allow_reassign", "ccs", "custom_fields", "editor_options", "field_options", "files", "file_urls", "force_signer_roles", "force_subject_message", "hold_request", "is_for_embedded_signing", "message", "metadata", "preview_only", "requesting_redirect_url", "show_preview", "show_progress_stepper", "signers", "signing_options", "signing_redirect_url", "skip_me_now", "subject", "test_mode", "title", "populate_auto_fill_fields", "allow_ccs"] + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully sign.", + ) + skip_me_now: Optional[StrictBool] = Field( + default=False, + description='Disables the "Me (Now)" option for the person preparing the document. Does not work with type `send_document`. Defaults to `false`.', + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.", + ) + title: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, + description="The title you want to assign to the SignatureRequest.", + ) + populate_auto_fill_fields: Optional[StrictBool] = Field( + default=False, + description="Controls whether [auto fill fields](https://faq.hellosign.com/hc/en-us/articles/360051467511-Auto-Fill-Fields) can automatically populate a signer's information during signing. **NOTE:** Keep your signer's information safe by ensuring that the _signer on your signature request is the intended party_ before using this feature.", + ) + allow_ccs: Optional[StrictBool] = Field( + default=False, + description="This allows the requester to specify whether the user is allowed to provide email addresses to CC when claiming the draft.", + ) + __properties: ClassVar[List[str]] = [ + "client_id", + "requester_email_address", + "template_ids", + "allow_decline", + "allow_reassign", + "ccs", + "custom_fields", + "editor_options", + "field_options", + "files", + "file_urls", + "force_signer_roles", + "force_subject_message", + "hold_request", + "is_for_embedded_signing", + "message", + "metadata", + "preview_only", + "requesting_redirect_url", + "show_preview", + "show_progress_stepper", + "signers", + "signing_options", + "signing_redirect_url", + "skip_me_now", + "subject", + "test_mode", + "title", + "populate_auto_fill_fields", + "allow_ccs", + ] model_config = ConfigDict( populate_by_name=True, @@ -76,7 +189,6 @@ class UnclaimedDraftCreateEmbeddedWithTemplateRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -86,7 +198,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -124,30 +238,30 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_ccs in self.ccs: if _item_ccs: _items.append(_item_ccs.to_dict()) - _dict['ccs'] = _items + _dict["ccs"] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) _items = [] if self.custom_fields: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of editor_options if self.editor_options: - _dict['editor_options'] = self.editor_options.to_dict() + _dict["editor_options"] = self.editor_options.to_dict() # override the default output from pydantic by calling `to_dict()` of field_options if self.field_options: - _dict['field_options'] = self.field_options.to_dict() + _dict["field_options"] = self.field_options.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in signers (list) _items = [] if self.signers: for _item_signers in self.signers: if _item_signers: _items.append(_item_signers.to_dict()) - _dict['signers'] = _items + _dict["signers"] = _items # override the default output from pydantic by calling `to_dict()` of signing_options if self.signing_options: - _dict['signing_options'] = self.signing_options.to_dict() + _dict["signing_options"] = self.signing_options.to_dict() return _dict @classmethod @@ -159,38 +273,115 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "client_id": obj.get("client_id"), - "requester_email_address": obj.get("requester_email_address"), - "template_ids": obj.get("template_ids"), - "allow_decline": obj.get("allow_decline") if obj.get("allow_decline") is not None else False, - "allow_reassign": obj.get("allow_reassign") if obj.get("allow_reassign") is not None else False, - "ccs": [SubCC.from_dict(_item) for _item in obj["ccs"]] if obj.get("ccs") is not None else None, - "custom_fields": [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "editor_options": SubEditorOptions.from_dict(obj["editor_options"]) if obj.get("editor_options") is not None else None, - "field_options": SubFieldOptions.from_dict(obj["field_options"]) if obj.get("field_options") is not None else None, - "files": obj.get("files"), - "file_urls": obj.get("file_urls"), - "force_signer_roles": obj.get("force_signer_roles") if obj.get("force_signer_roles") is not None else False, - "force_subject_message": obj.get("force_subject_message") if obj.get("force_subject_message") is not None else False, - "hold_request": obj.get("hold_request") if obj.get("hold_request") is not None else False, - "is_for_embedded_signing": obj.get("is_for_embedded_signing") if obj.get("is_for_embedded_signing") is not None else False, - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "preview_only": obj.get("preview_only") if obj.get("preview_only") is not None else False, - "requesting_redirect_url": obj.get("requesting_redirect_url"), - "show_preview": obj.get("show_preview") if obj.get("show_preview") is not None else False, - "show_progress_stepper": obj.get("show_progress_stepper") if obj.get("show_progress_stepper") is not None else True, - "signers": [SubUnclaimedDraftTemplateSigner.from_dict(_item) for _item in obj["signers"]] if obj.get("signers") is not None else None, - "signing_options": SubSigningOptions.from_dict(obj["signing_options"]) if obj.get("signing_options") is not None else None, - "signing_redirect_url": obj.get("signing_redirect_url"), - "skip_me_now": obj.get("skip_me_now") if obj.get("skip_me_now") is not None else False, - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "title": obj.get("title"), - "populate_auto_fill_fields": obj.get("populate_auto_fill_fields") if obj.get("populate_auto_fill_fields") is not None else False, - "allow_ccs": obj.get("allow_ccs") if obj.get("allow_ccs") is not None else False - }) + _obj = cls.model_validate( + { + "client_id": obj.get("client_id"), + "requester_email_address": obj.get("requester_email_address"), + "template_ids": obj.get("template_ids"), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "allow_reassign": ( + obj.get("allow_reassign") + if obj.get("allow_reassign") is not None + else False + ), + "ccs": ( + [SubCC.from_dict(_item) for _item in obj["ccs"]] + if obj.get("ccs") is not None + else None + ), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "editor_options": ( + SubEditorOptions.from_dict(obj["editor_options"]) + if obj.get("editor_options") is not None + else None + ), + "field_options": ( + SubFieldOptions.from_dict(obj["field_options"]) + if obj.get("field_options") is not None + else None + ), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "force_signer_roles": ( + obj.get("force_signer_roles") + if obj.get("force_signer_roles") is not None + else False + ), + "force_subject_message": ( + obj.get("force_subject_message") + if obj.get("force_subject_message") is not None + else False + ), + "hold_request": ( + obj.get("hold_request") + if obj.get("hold_request") is not None + else False + ), + "is_for_embedded_signing": ( + obj.get("is_for_embedded_signing") + if obj.get("is_for_embedded_signing") is not None + else False + ), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "preview_only": ( + obj.get("preview_only") + if obj.get("preview_only") is not None + else False + ), + "requesting_redirect_url": obj.get("requesting_redirect_url"), + "show_preview": ( + obj.get("show_preview") + if obj.get("show_preview") is not None + else False + ), + "show_progress_stepper": ( + obj.get("show_progress_stepper") + if obj.get("show_progress_stepper") is not None + else True + ), + "signers": ( + [ + SubUnclaimedDraftTemplateSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "signing_options": ( + SubSigningOptions.from_dict(obj["signing_options"]) + if obj.get("signing_options") is not None + else None + ), + "signing_redirect_url": obj.get("signing_redirect_url"), + "skip_me_now": ( + obj.get("skip_me_now") + if obj.get("skip_me_now") is not None + else False + ), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "title": obj.get("title"), + "populate_auto_fill_fields": ( + obj.get("populate_auto_fill_fields") + if obj.get("populate_auto_fill_fields") is not None + else False + ), + "allow_ccs": ( + obj.get("allow_ccs") if obj.get("allow_ccs") is not None else False + ), + } + ) return _obj @classmethod @@ -248,4 +439,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "file_urls", "signers", ] - diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py b/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py index c685111e5..2833e239b 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_request.py @@ -18,7 +18,16 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator +from pydantic import ( + BaseModel, + ConfigDict, + Field, + StrictBool, + StrictBytes, + StrictInt, + StrictStr, + field_validator, +) from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from dropbox_sign.models.sub_attachment import SubAttachment @@ -26,7 +35,9 @@ from dropbox_sign.models.sub_field_options import SubFieldOptions from dropbox_sign.models.sub_form_field_group import SubFormFieldGroup from dropbox_sign.models.sub_form_field_rule import SubFormFieldRule -from dropbox_sign.models.sub_form_fields_per_document_base import SubFormFieldsPerDocumentBase +from dropbox_sign.models.sub_form_fields_per_document_base import ( + SubFormFieldsPerDocumentBase, +) from dropbox_sign.models.sub_signing_options import SubSigningOptions from dropbox_sign.models.sub_unclaimed_draft_signer import SubUnclaimedDraftSigner from typing import Optional, Set, Tuple @@ -35,41 +46,131 @@ from pydantic import StrictBool from typing import Union + class UnclaimedDraftCreateRequest(BaseModel): - """ - - """ # noqa: E501 - type: StrictStr = Field(description="The type of unclaimed draft to create. Use `send_document` to create a claimable file, and `request_signature` for a claimable signature request. If the type is `request_signature` then signers name and email_address are not optional.") - files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field(default=None, description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - file_urls: Optional[List[StrictStr]] = Field(default=None, description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.") - allow_decline: Optional[StrictBool] = Field(default=False, description="Allows signers to decline to sign a document if `true`. Defaults to `false`.") - attachments: Optional[List[SubAttachment]] = Field(default=None, description="A list describing the attachments") - cc_email_addresses: Optional[List[StrictStr]] = Field(default=None, description="The email addresses that should be CCed.") - client_id: Optional[StrictStr] = Field(default=None, description="Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app.") - custom_fields: Optional[List[SubCustomField]] = Field(default=None, description="When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with \"send-once\" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.") + """ """ # noqa: E501 + + type: StrictStr = Field( + description="The type of unclaimed draft to create. Use `send_document` to create a claimable file, and `request_signature` for a claimable signature request. If the type is `request_signature` then signers name and email_address are not optional." + ) + files: Optional[List[Union[StrictBytes, StrictStr, io.IOBase]]] = Field( + default=None, + description="Use `files[]` to indicate the uploaded file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + file_urls: Optional[List[StrictStr]] = Field( + default=None, + description="Use `file_urls[]` to have Dropbox Sign download the file(s) to send for signature. This endpoint requires either **files** or **file_urls[]**, but not both.", + ) + allow_decline: Optional[StrictBool] = Field( + default=False, + description="Allows signers to decline to sign a document if `true`. Defaults to `false`.", + ) + attachments: Optional[List[SubAttachment]] = Field( + default=None, description="A list describing the attachments" + ) + cc_email_addresses: Optional[List[StrictStr]] = Field( + default=None, description="The email addresses that should be CCed." + ) + client_id: Optional[StrictStr] = Field( + default=None, + description="Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app.", + ) + custom_fields: Optional[List[SubCustomField]] = Field( + default=None, + description='When used together with merge fields, `custom_fields` allows users to add pre-filled data to their signature requests. Pre-filled data can be used with "send-once" signature requests by adding merge fields with `form_fields_per_document` or [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) while passing values back with `custom_fields` together in one API call. For using pre-filled on repeatable signature requests, merge fields are added to templates in the Dropbox Sign UI or by calling [/template/create_embedded_draft](/api/reference/operation/templateCreateEmbeddedDraft) and then passing `custom_fields` on subsequent signature requests referencing that template.', + ) field_options: Optional[SubFieldOptions] = None - form_field_groups: Optional[List[SubFormFieldGroup]] = Field(default=None, description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.") - form_field_rules: Optional[List[SubFormFieldRule]] = Field(default=None, description="Conditional Logic rules for fields defined in `form_fields_per_document`.") - form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field(default=None, description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`") - hide_text_tags: Optional[StrictBool] = Field(default=False, description="Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details.") - message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field(default=None, description="The custom message in the email that will be sent to the signers.") - metadata: Optional[Dict[str, Any]] = Field(default=None, description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.") - show_progress_stepper: Optional[StrictBool] = Field(default=True, description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.") - signers: Optional[List[SubUnclaimedDraftSigner]] = Field(default=None, description="Add Signers to your Unclaimed Draft Signature Request.") + form_field_groups: Optional[List[SubFormFieldGroup]] = Field( + default=None, + description="Group information for fields defined in `form_fields_per_document`. String-indexed JSON array with `group_label` and `requirement` keys. `form_fields_per_document` must contain fields referencing a group defined in `form_field_groups`.", + ) + form_field_rules: Optional[List[SubFormFieldRule]] = Field( + default=None, + description="Conditional Logic rules for fields defined in `form_fields_per_document`.", + ) + form_fields_per_document: Optional[List[SubFormFieldsPerDocumentBase]] = Field( + default=None, + description="The fields that should appear on the document, expressed as an array of objects. (For more details you can read about it here: [Using Form Fields per Document](/docs/openapi/form-fields-per-document).) **NOTE:** Fields like **text**, **dropdown**, **checkbox**, **radio**, and **hyperlink** have additional required and optional parameters. Check out the list of [additional parameters](/api/reference/constants/#form-fields-per-document) for these field types. * Text Field use `SubFormFieldsPerDocumentText` * Dropdown Field use `SubFormFieldsPerDocumentDropdown` * Hyperlink Field use `SubFormFieldsPerDocumentHyperlink` * Checkbox Field use `SubFormFieldsPerDocumentCheckbox` * Radio Field use `SubFormFieldsPerDocumentRadio` * Signature Field use `SubFormFieldsPerDocumentSignature` * Date Signed Field use `SubFormFieldsPerDocumentDateSigned` * Initials Field use `SubFormFieldsPerDocumentInitials` * Text Merge Field use `SubFormFieldsPerDocumentTextMerge` * Checkbox Merge Field use `SubFormFieldsPerDocumentCheckboxMerge`", + ) + hide_text_tags: Optional[StrictBool] = Field( + default=False, + description="Send with a value of `true` if you wish to enable automatic Text Tag removal. Defaults to `false`. When using Text Tags it is preferred that you set this to `false` and hide your tags with white text or something similar because the automatic removal system can cause unwanted clipping. See the [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) walkthrough for more details.", + ) + message: Optional[Annotated[str, Field(strict=True, max_length=5000)]] = Field( + default=None, + description="The custom message in the email that will be sent to the signers.", + ) + metadata: Optional[Dict[str, Any]] = Field( + default=None, + description="Key-value data that should be attached to the signature request. This metadata is included in all API responses and events involving the signature request. For example, use the metadata field to store a signer's order number for look up when receiving events for the signature request. Each request can include up to 10 metadata keys (or 50 nested metadata keys), with key names up to 40 characters long and values up to 1000 characters long.", + ) + show_progress_stepper: Optional[StrictBool] = Field( + default=True, + description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.", + ) + signers: Optional[List[SubUnclaimedDraftSigner]] = Field( + default=None, + description="Add Signers to your Unclaimed Draft Signature Request.", + ) signing_options: Optional[SubSigningOptions] = None - signing_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully sign.") - subject: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="The subject in the email that will be sent to the signers.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.") - use_preexisting_fields: Optional[StrictBool] = Field(default=False, description="Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both.") - use_text_tags: Optional[StrictBool] = Field(default=False, description="Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both.") - expires_at: Optional[StrictInt] = Field(default=None, description="When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **NOTE:** This does not correspond to the **expires_at** returned in the response.") - __properties: ClassVar[List[str]] = ["type", "files", "file_urls", "allow_decline", "attachments", "cc_email_addresses", "client_id", "custom_fields", "field_options", "form_field_groups", "form_field_rules", "form_fields_per_document", "hide_text_tags", "message", "metadata", "show_progress_stepper", "signers", "signing_options", "signing_redirect_url", "subject", "test_mode", "use_preexisting_fields", "use_text_tags", "expires_at"] + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully sign.", + ) + subject: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field( + default=None, + description="The subject in the email that will be sent to the signers.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.", + ) + use_preexisting_fields: Optional[StrictBool] = Field( + default=False, + description="Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both.", + ) + use_text_tags: Optional[StrictBool] = Field( + default=False, + description="Set `use_text_tags` to `true` to enable [Text Tags](https://app.hellosign.com/api/textTagsWalkthrough#TextTagIntro) parsing in your document (defaults to disabled, or `false`). Alternatively, if your PDF contains pre-defined fields, enable the detection of these fields by setting the `use_preexisting_fields` to `true` (defaults to disabled, or `false`). Currently we only support use of either `use_text_tags` or `use_preexisting_fields` parameter, not both.", + ) + expires_at: Optional[StrictInt] = Field( + default=None, + description="When the signature request will expire. Unsigned signatures will be moved to the expired status, and no longer signable. See [Signature Request Expiration Date](https://developers.hellosign.com/docs/signature-request/expiration/) for details. **NOTE:** This does not correspond to the **expires_at** returned in the response.", + ) + __properties: ClassVar[List[str]] = [ + "type", + "files", + "file_urls", + "allow_decline", + "attachments", + "cc_email_addresses", + "client_id", + "custom_fields", + "field_options", + "form_field_groups", + "form_field_rules", + "form_fields_per_document", + "hide_text_tags", + "message", + "metadata", + "show_progress_stepper", + "signers", + "signing_options", + "signing_redirect_url", + "subject", + "test_mode", + "use_preexisting_fields", + "use_text_tags", + "expires_at", + ] - @field_validator('type') + @field_validator("type") def type_validate_enum(cls, value): """Validates the enum""" - if value not in set(['send_document', 'request_signature']): - raise ValueError("must be one of enum values ('send_document', 'request_signature')") + if value not in set(["send_document", "request_signature"]): + raise ValueError( + "must be one of enum values ('send_document', 'request_signature')" + ) return value model_config = ConfigDict( @@ -79,7 +180,6 @@ def type_validate_enum(cls, value): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -89,7 +189,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -127,48 +229,48 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: for _item_attachments in self.attachments: if _item_attachments: _items.append(_item_attachments.to_dict()) - _dict['attachments'] = _items + _dict["attachments"] = _items # override the default output from pydantic by calling `to_dict()` of each item in custom_fields (list) _items = [] if self.custom_fields: for _item_custom_fields in self.custom_fields: if _item_custom_fields: _items.append(_item_custom_fields.to_dict()) - _dict['custom_fields'] = _items + _dict["custom_fields"] = _items # override the default output from pydantic by calling `to_dict()` of field_options if self.field_options: - _dict['field_options'] = self.field_options.to_dict() + _dict["field_options"] = self.field_options.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in form_field_groups (list) _items = [] if self.form_field_groups: for _item_form_field_groups in self.form_field_groups: if _item_form_field_groups: _items.append(_item_form_field_groups.to_dict()) - _dict['form_field_groups'] = _items + _dict["form_field_groups"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_field_rules (list) _items = [] if self.form_field_rules: for _item_form_field_rules in self.form_field_rules: if _item_form_field_rules: _items.append(_item_form_field_rules.to_dict()) - _dict['form_field_rules'] = _items + _dict["form_field_rules"] = _items # override the default output from pydantic by calling `to_dict()` of each item in form_fields_per_document (list) _items = [] if self.form_fields_per_document: for _item_form_fields_per_document in self.form_fields_per_document: if _item_form_fields_per_document: _items.append(_item_form_fields_per_document.to_dict()) - _dict['form_fields_per_document'] = _items + _dict["form_fields_per_document"] = _items # override the default output from pydantic by calling `to_dict()` of each item in signers (list) _items = [] if self.signers: for _item_signers in self.signers: if _item_signers: _items.append(_item_signers.to_dict()) - _dict['signers'] = _items + _dict["signers"] = _items # override the default output from pydantic by calling `to_dict()` of signing_options if self.signing_options: - _dict['signing_options'] = self.signing_options.to_dict() + _dict["signing_options"] = self.signing_options.to_dict() return _dict @classmethod @@ -180,32 +282,100 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "type": obj.get("type"), - "files": obj.get("files"), - "file_urls": obj.get("file_urls"), - "allow_decline": obj.get("allow_decline") if obj.get("allow_decline") is not None else False, - "attachments": [SubAttachment.from_dict(_item) for _item in obj["attachments"]] if obj.get("attachments") is not None else None, - "cc_email_addresses": obj.get("cc_email_addresses"), - "client_id": obj.get("client_id"), - "custom_fields": [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] if obj.get("custom_fields") is not None else None, - "field_options": SubFieldOptions.from_dict(obj["field_options"]) if obj.get("field_options") is not None else None, - "form_field_groups": [SubFormFieldGroup.from_dict(_item) for _item in obj["form_field_groups"]] if obj.get("form_field_groups") is not None else None, - "form_field_rules": [SubFormFieldRule.from_dict(_item) for _item in obj["form_field_rules"]] if obj.get("form_field_rules") is not None else None, - "form_fields_per_document": [SubFormFieldsPerDocumentBase.from_dict(_item) for _item in obj["form_fields_per_document"]] if obj.get("form_fields_per_document") is not None else None, - "hide_text_tags": obj.get("hide_text_tags") if obj.get("hide_text_tags") is not None else False, - "message": obj.get("message"), - "metadata": obj.get("metadata"), - "show_progress_stepper": obj.get("show_progress_stepper") if obj.get("show_progress_stepper") is not None else True, - "signers": [SubUnclaimedDraftSigner.from_dict(_item) for _item in obj["signers"]] if obj.get("signers") is not None else None, - "signing_options": SubSigningOptions.from_dict(obj["signing_options"]) if obj.get("signing_options") is not None else None, - "signing_redirect_url": obj.get("signing_redirect_url"), - "subject": obj.get("subject"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False, - "use_preexisting_fields": obj.get("use_preexisting_fields") if obj.get("use_preexisting_fields") is not None else False, - "use_text_tags": obj.get("use_text_tags") if obj.get("use_text_tags") is not None else False, - "expires_at": obj.get("expires_at") - }) + _obj = cls.model_validate( + { + "type": obj.get("type"), + "files": obj.get("files"), + "file_urls": obj.get("file_urls"), + "allow_decline": ( + obj.get("allow_decline") + if obj.get("allow_decline") is not None + else False + ), + "attachments": ( + [SubAttachment.from_dict(_item) for _item in obj["attachments"]] + if obj.get("attachments") is not None + else None + ), + "cc_email_addresses": obj.get("cc_email_addresses"), + "client_id": obj.get("client_id"), + "custom_fields": ( + [SubCustomField.from_dict(_item) for _item in obj["custom_fields"]] + if obj.get("custom_fields") is not None + else None + ), + "field_options": ( + SubFieldOptions.from_dict(obj["field_options"]) + if obj.get("field_options") is not None + else None + ), + "form_field_groups": ( + [ + SubFormFieldGroup.from_dict(_item) + for _item in obj["form_field_groups"] + ] + if obj.get("form_field_groups") is not None + else None + ), + "form_field_rules": ( + [ + SubFormFieldRule.from_dict(_item) + for _item in obj["form_field_rules"] + ] + if obj.get("form_field_rules") is not None + else None + ), + "form_fields_per_document": ( + [ + SubFormFieldsPerDocumentBase.from_dict(_item) + for _item in obj["form_fields_per_document"] + ] + if obj.get("form_fields_per_document") is not None + else None + ), + "hide_text_tags": ( + obj.get("hide_text_tags") + if obj.get("hide_text_tags") is not None + else False + ), + "message": obj.get("message"), + "metadata": obj.get("metadata"), + "show_progress_stepper": ( + obj.get("show_progress_stepper") + if obj.get("show_progress_stepper") is not None + else True + ), + "signers": ( + [ + SubUnclaimedDraftSigner.from_dict(_item) + for _item in obj["signers"] + ] + if obj.get("signers") is not None + else None + ), + "signing_options": ( + SubSigningOptions.from_dict(obj["signing_options"]) + if obj.get("signing_options") is not None + else None + ), + "signing_redirect_url": obj.get("signing_redirect_url"), + "subject": obj.get("subject"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + "use_preexisting_fields": ( + obj.get("use_preexisting_fields") + if obj.get("use_preexisting_fields") is not None + else False + ), + "use_text_tags": ( + obj.get("use_text_tags") + if obj.get("use_text_tags") is not None + else False + ), + "expires_at": obj.get("expires_at"), + } + ) return _obj @classmethod @@ -260,4 +430,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: "form_fields_per_document", "signers", ] - diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py b/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py index 0ec98ba71..11ae0d902 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_create_response.py @@ -28,12 +28,16 @@ from pydantic import StrictBool from typing import Union + class UnclaimedDraftCreateResponse(BaseModel): """ UnclaimedDraftCreateResponse - """ # noqa: E501 + """ # noqa: E501 + unclaimed_draft: UnclaimedDraftResponse - warnings: Optional[List[WarningResponse]] = Field(default=None, description="A list of warnings.") + warnings: Optional[List[WarningResponse]] = Field( + default=None, description="A list of warnings." + ) __properties: ClassVar[List[str]] = ["unclaimed_draft", "warnings"] model_config = ConfigDict( @@ -43,7 +47,6 @@ class UnclaimedDraftCreateResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -53,7 +56,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -87,14 +92,14 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of unclaimed_draft if self.unclaimed_draft: - _dict['unclaimed_draft'] = self.unclaimed_draft.to_dict() + _dict["unclaimed_draft"] = self.unclaimed_draft.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) _items = [] if self.warnings: for _item_warnings in self.warnings: if _item_warnings: _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items + _dict["warnings"] = _items return _dict @classmethod @@ -106,10 +111,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "unclaimed_draft": UnclaimedDraftResponse.from_dict(obj["unclaimed_draft"]) if obj.get("unclaimed_draft") is not None else None, - "warnings": [WarningResponse.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) + _obj = cls.model_validate( + { + "unclaimed_draft": ( + UnclaimedDraftResponse.from_dict(obj["unclaimed_draft"]) + if obj.get("unclaimed_draft") is not None + else None + ), + "warnings": ( + [WarningResponse.from_dict(_item) for _item in obj["warnings"]] + if obj.get("warnings") is not None + else None + ), + } + ) return _obj @classmethod @@ -134,4 +149,3 @@ def openapi_type_is_array(cls, property_name: str) -> bool: return property_name in [ "warnings", ] - diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_edit_and_resend_request.py b/sdks/python/dropbox_sign/models/unclaimed_draft_edit_and_resend_request.py index 615828fbe..4b84d1031 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_edit_and_resend_request.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_edit_and_resend_request.py @@ -27,19 +27,50 @@ from pydantic import StrictBool from typing import Union + class UnclaimedDraftEditAndResendRequest(BaseModel): """ UnclaimedDraftEditAndResendRequest - """ # noqa: E501 - client_id: StrictStr = Field(description="Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app.") + """ # noqa: E501 + + client_id: StrictStr = Field( + description="Client id of the app used to create the draft. Used to apply the branding and callback url defined for the app." + ) editor_options: Optional[SubEditorOptions] = None - is_for_embedded_signing: Optional[StrictBool] = Field(default=None, description="The request created from this draft will also be signable in embedded mode if set to `true`.") - requester_email_address: Optional[StrictStr] = Field(default=None, description="The email address of the user that should be designated as the requester of this draft. If not set, original requester's email address will be used.") - requesting_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully request a signature.") - show_progress_stepper: Optional[StrictBool] = Field(default=True, description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.") - signing_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully sign.") - test_mode: Optional[StrictBool] = Field(default=False, description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.") - __properties: ClassVar[List[str]] = ["client_id", "editor_options", "is_for_embedded_signing", "requester_email_address", "requesting_redirect_url", "show_progress_stepper", "signing_redirect_url", "test_mode"] + is_for_embedded_signing: Optional[StrictBool] = Field( + default=None, + description="The request created from this draft will also be signable in embedded mode if set to `true`.", + ) + requester_email_address: Optional[StrictStr] = Field( + default=None, + description="The email address of the user that should be designated as the requester of this draft. If not set, original requester's email address will be used.", + ) + requesting_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully request a signature.", + ) + show_progress_stepper: Optional[StrictBool] = Field( + default=True, + description="When only one step remains in the signature request process and this parameter is set to `false` then the progress stepper will be hidden.", + ) + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully sign.", + ) + test_mode: Optional[StrictBool] = Field( + default=False, + description="Whether this is a test, the signature request created from this draft will not be legally binding if set to `true`. Defaults to `false`.", + ) + __properties: ClassVar[List[str]] = [ + "client_id", + "editor_options", + "is_for_embedded_signing", + "requester_email_address", + "requesting_redirect_url", + "show_progress_stepper", + "signing_redirect_url", + "test_mode", + ] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +79,6 @@ class UnclaimedDraftEditAndResendRequest(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -58,7 +88,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -92,7 +124,7 @@ def to_dict(self, excluded_fields: Set[str] = None) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of editor_options if self.editor_options: - _dict['editor_options'] = self.editor_options.to_dict() + _dict["editor_options"] = self.editor_options.to_dict() return _dict @classmethod @@ -104,16 +136,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "client_id": obj.get("client_id"), - "editor_options": SubEditorOptions.from_dict(obj["editor_options"]) if obj.get("editor_options") is not None else None, - "is_for_embedded_signing": obj.get("is_for_embedded_signing"), - "requester_email_address": obj.get("requester_email_address"), - "requesting_redirect_url": obj.get("requesting_redirect_url"), - "show_progress_stepper": obj.get("show_progress_stepper") if obj.get("show_progress_stepper") is not None else True, - "signing_redirect_url": obj.get("signing_redirect_url"), - "test_mode": obj.get("test_mode") if obj.get("test_mode") is not None else False - }) + _obj = cls.model_validate( + { + "client_id": obj.get("client_id"), + "editor_options": ( + SubEditorOptions.from_dict(obj["editor_options"]) + if obj.get("editor_options") is not None + else None + ), + "is_for_embedded_signing": obj.get("is_for_embedded_signing"), + "requester_email_address": obj.get("requester_email_address"), + "requesting_redirect_url": obj.get("requesting_redirect_url"), + "show_progress_stepper": ( + obj.get("show_progress_stepper") + if obj.get("show_progress_stepper") is not None + else True + ), + "signing_redirect_url": obj.get("signing_redirect_url"), + "test_mode": ( + obj.get("test_mode") if obj.get("test_mode") is not None else False + ), + } + ) return _obj @classmethod @@ -141,6 +185,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py index 7f4c72adc..1cd950950 100644 --- a/sdks/python/dropbox_sign/models/unclaimed_draft_response.py +++ b/sdks/python/dropbox_sign/models/unclaimed_draft_response.py @@ -26,17 +26,42 @@ from pydantic import StrictBool from typing import Union + class UnclaimedDraftResponse(BaseModel): """ A group of documents that a user can take ownership of via the claim URL. - """ # noqa: E501 - signature_request_id: Optional[StrictStr] = Field(default=None, description="The ID of the signature request that is represented by this UnclaimedDraft.") - claim_url: Optional[StrictStr] = Field(default=None, description="The URL to be used to claim this UnclaimedDraft.") - signing_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully sign.") - requesting_redirect_url: Optional[StrictStr] = Field(default=None, description="The URL you want signers redirected to after they successfully request a signature (Will only be returned in the response if it is applicable to the request.).") - expires_at: Optional[StrictInt] = Field(default=None, description="When the link expires.") - test_mode: Optional[StrictBool] = Field(default=None, description="Whether this is a test draft. Signature requests made from test drafts have no legal value.") - __properties: ClassVar[List[str]] = ["signature_request_id", "claim_url", "signing_redirect_url", "requesting_redirect_url", "expires_at", "test_mode"] + """ # noqa: E501 + + signature_request_id: Optional[StrictStr] = Field( + default=None, + description="The ID of the signature request that is represented by this UnclaimedDraft.", + ) + claim_url: Optional[StrictStr] = Field( + default=None, description="The URL to be used to claim this UnclaimedDraft." + ) + signing_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully sign.", + ) + requesting_redirect_url: Optional[StrictStr] = Field( + default=None, + description="The URL you want signers redirected to after they successfully request a signature (Will only be returned in the response if it is applicable to the request.).", + ) + expires_at: Optional[StrictInt] = Field( + default=None, description="When the link expires." + ) + test_mode: Optional[StrictBool] = Field( + default=None, + description="Whether this is a test draft. Signature requests made from test drafts have no legal value.", + ) + __properties: ClassVar[List[str]] = [ + "signature_request_id", + "claim_url", + "signing_redirect_url", + "requesting_redirect_url", + "expires_at", + "test_mode", + ] model_config = ConfigDict( populate_by_name=True, @@ -45,7 +70,6 @@ class UnclaimedDraftResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -55,7 +79,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -98,14 +124,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "signature_request_id": obj.get("signature_request_id"), - "claim_url": obj.get("claim_url"), - "signing_redirect_url": obj.get("signing_redirect_url"), - "requesting_redirect_url": obj.get("requesting_redirect_url"), - "expires_at": obj.get("expires_at"), - "test_mode": obj.get("test_mode") - }) + _obj = cls.model_validate( + { + "signature_request_id": obj.get("signature_request_id"), + "claim_url": obj.get("claim_url"), + "signing_redirect_url": obj.get("signing_redirect_url"), + "requesting_redirect_url": obj.get("requesting_redirect_url"), + "expires_at": obj.get("expires_at"), + "test_mode": obj.get("test_mode"), + } + ) return _obj @classmethod @@ -131,6 +159,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/models/warning_response.py b/sdks/python/dropbox_sign/models/warning_response.py index 3524ace59..f5aa1277d 100644 --- a/sdks/python/dropbox_sign/models/warning_response.py +++ b/sdks/python/dropbox_sign/models/warning_response.py @@ -26,10 +26,12 @@ from pydantic import StrictBool from typing import Union + class WarningResponse(BaseModel): """ A list of warnings. - """ # noqa: E501 + """ # noqa: E501 + warning_msg: StrictStr = Field(description="Warning message") warning_name: StrictStr = Field(description="Warning name") __properties: ClassVar[List[str]] = ["warning_msg", "warning_name"] @@ -41,7 +43,6 @@ class WarningResponse(BaseModel): arbitrary_types_allowed=True, ) - def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -51,7 +52,9 @@ def to_json(self) -> str: # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead return json.dumps(self.to_dict()) - def to_json_form_params(self, excluded_fields: Set[str] = None) -> List[Tuple[str, str]]: + def to_json_form_params( + self, excluded_fields: Set[str] = None + ) -> List[Tuple[str, str]]: data: List[Tuple[str, str]] = [] for key, value in self.to_dict(excluded_fields).items(): @@ -94,10 +97,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({ - "warning_msg": obj.get("warning_msg"), - "warning_name": obj.get("warning_name") - }) + _obj = cls.model_validate( + { + "warning_msg": obj.get("warning_msg"), + "warning_name": obj.get("warning_name"), + } + ) return _obj @classmethod @@ -119,6 +124,4 @@ def openapi_types(cls) -> Dict[str, str]: @classmethod def openapi_type_is_array(cls, property_name: str) -> bool: - return property_name in [ - ] - + return property_name in [] diff --git a/sdks/python/dropbox_sign/rest.py b/sdks/python/dropbox_sign/rest.py index 0c57b2c6b..b369c3fde 100644 --- a/sdks/python/dropbox_sign/rest.py +++ b/sdks/python/dropbox_sign/rest.py @@ -79,22 +79,19 @@ def __init__(self, configuration) -> None: "key_file": configuration.key_file, } if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) + pool_args["assert_hostname"] = configuration.assert_hostname if configuration.retries is not None: - pool_args['retries'] = configuration.retries + pool_args["retries"] = configuration.retries if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name - + pool_args["server_hostname"] = configuration.tls_server_name if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options + pool_args["socket_options"] = configuration.socket_options if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize + pool_args["maxsize"] = configuration.connection_pool_maxsize # https pool manager self.pool_manager: urllib3.PoolManager @@ -102,6 +99,7 @@ def __init__(self, configuration) -> None: if configuration.proxy: if is_socks_proxy_url(configuration.proxy): from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy pool_args["headers"] = configuration.proxy_headers self.pool_manager = SOCKSProxyManager(**pool_args) @@ -119,7 +117,7 @@ def request( headers=None, body=None, post_params=None, - _request_timeout=None + _request_timeout=None, ): """Perform requests. @@ -136,15 +134,7 @@ def request( (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 ApiValueError( @@ -158,25 +148,18 @@ def request( if _request_timeout: if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): + elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] + connect=_request_timeout[0], read=_request_timeout[1] ) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): + content_type = headers.get("Content-Type") + if not content_type or re.search("json", content_type, re.IGNORECASE): request_body = None if body is not None: request_body = json.dumps(body) @@ -186,9 +169,9 @@ def request( body=request_body, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) - elif content_type == 'application/x-www-form-urlencoded': + elif content_type == "application/x-www-form-urlencoded": r = self.pool_manager.request( method, url, @@ -196,15 +179,18 @@ def request( encode_multipart=False, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) - elif content_type == 'multipart/form-data': + elif content_type == "multipart/form-data": # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. - del headers['Content-Type'] + del headers["Content-Type"] # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + post_params = [ + (a, json.dumps(b)) if isinstance(b, dict) else (a, b) + for a, b in post_params + ] r = self.pool_manager.request( method, url, @@ -212,7 +198,7 @@ def request( encode_multipart=True, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) # Pass a `string` parameter directly in the body to support # other content types than JSON when `body` argument is @@ -224,9 +210,9 @@ def request( body=body, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) - elif headers['Content-Type'] == 'text/plain' and isinstance(body, bool): + elif headers["Content-Type"] == "text/plain" and isinstance(body, bool): request_body = "true" if body else "false" r = self.pool_manager.request( method, @@ -234,7 +220,8 @@ def request( body=request_body, preload_content=False, timeout=timeout, - headers=headers) + headers=headers, + ) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided @@ -249,7 +236,7 @@ def request( fields={}, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) except urllib3.exceptions.SSLError as e: msg = "\n".join([type(e).__name__, str(e)]) diff --git a/sdks/python/run-build b/sdks/python/run-build index 1e3702718..08a15aa11 100755 --- a/sdks/python/run-build +++ b/sdks/python/run-build @@ -15,6 +15,13 @@ docker run --rm \ -t "/local/templates" \ -o "/local/" +printf "Install Python dependencies ...\n" +bash "${DIR}/bin/python" pip install -r requirements.txt +bash "${DIR}/bin/python" pip install -r test-requirements.txt + +printf "Formatting code ...\n" +bash "${DIR}/bin/python" python -m black dropbox_sign examples tests + printf "\nInstalling composer dependencies ...\n" mkdir -p "${DIR}/vendor" bash "${DIR}/bin/php" composer install @@ -23,9 +30,6 @@ printf "\n" printf "Adding examples to Docs ...\n" bash "${DIR}/bin/php" ./bin/generate-examples.php -printf "Install Python dependencies ...\n" -bash "${DIR}/bin/python" pip install -r requirements.txt - # avoid docker messing with permissions if [[ -z "$GITHUB_ACTIONS" ]]; then chmod 644 "${DIR}/README.md" diff --git a/sdks/python/templates/test-requirements.mustache b/sdks/python/templates/test-requirements.mustache index 8e6d8cb13..cbff657b6 100644 --- a/sdks/python/templates/test-requirements.mustache +++ b/sdks/python/templates/test-requirements.mustache @@ -3,3 +3,4 @@ pytest-cov>=2.8.1 pytest-randomly>=3.12.0 mypy>=1.4.1 types-python-dateutil>=2.8.19 +black>=24.8.0 diff --git a/sdks/python/test-requirements.txt b/sdks/python/test-requirements.txt index 8e6d8cb13..cbff657b6 100644 --- a/sdks/python/test-requirements.txt +++ b/sdks/python/test-requirements.txt @@ -3,3 +3,4 @@ pytest-cov>=2.8.1 pytest-randomly>=3.12.0 mypy>=1.4.1 types-python-dateutil>=2.8.19 +black>=24.8.0 diff --git a/sdks/python/tests/test_account_api.py b/sdks/python/tests/test_account_api.py index c11171457..e3e60bfb3 100644 --- a/sdks/python/tests/test_account_api.py +++ b/sdks/python/tests/test_account_api.py @@ -15,16 +15,16 @@ def setUp(self): self.api = apis.AccountApi(self.api_client) def test_http_code_range(self): - request_class = 'AccountCreateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "AccountCreateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'ErrorResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "ErrorResponse" + response_data = get_fixture_data(response_class)["default"] code = random.randrange(400, 499) self.mock_pool.expect_request( - content_type='application/json', + content_type="application/json", data=request_data, response=response_data, status=code, @@ -39,16 +39,14 @@ def test_http_code_range(self): self.assertEqual(e.data, expected) def test_account_create(self): - request_class = 'AccountCreateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "AccountCreateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'AccountCreateResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "AccountCreateResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.AccountCreateResponse.init(response_data) obj = m.AccountCreateRequest.init(request_data) @@ -59,12 +57,11 @@ def test_account_create(self): self.assertEqual(result, expected) def test_account_get(self): - response_class = 'AccountGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "AccountGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.AccountGetResponse.init(response_data) @@ -74,16 +71,14 @@ def test_account_get(self): self.assertEqual(result, expected) def test_account_update(self): - request_class = 'AccountUpdateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "AccountUpdateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'AccountGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "AccountGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.AccountGetResponse.init(response_data) obj = m.AccountUpdateRequest.init(request_data) @@ -94,16 +89,14 @@ def test_account_update(self): self.assertEqual(result, expected) def test_account_verify(self): - request_class = 'AccountVerifyRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "AccountVerifyRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'AccountVerifyResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "AccountVerifyResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.AccountVerifyResponse.init(response_data) obj = m.AccountVerifyRequest.init(request_data) @@ -114,5 +107,5 @@ def test_account_verify(self): self.assertEqual(result, expected) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_api_app_api.py b/sdks/python/tests/test_api_app_api.py index 58b4ecee3..f20029a00 100644 --- a/sdks/python/tests/test_api_app_api.py +++ b/sdks/python/tests/test_api_app_api.py @@ -14,21 +14,21 @@ def setUp(self): self.api = apis.ApiAppApi(self.api_client) def test_api_app_create(self): - request_class = 'ApiAppCreateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "ApiAppCreateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'ApiAppGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "ApiAppGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, response=response_data, status=201, ) obj = m.ApiAppCreateRequest.init(request_data) - obj.custom_logo_file = open(f'{get_base_path()}/pdf-sample.pdf', 'rb') + obj.custom_logo_file = open(f"{get_base_path()}/pdf-sample.pdf", "rb") expected = m.ApiAppGetResponse.init(response_data) @@ -40,14 +40,13 @@ def test_api_app_create(self): obj.custom_logo_file.close() def test_api_app_get(self): - client_id = '0dd3b823a682527788c4e40cb7b6f7e9' + client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - response_class = 'ApiAppGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "ApiAppGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.ApiAppGetResponse.init(response_data) @@ -57,22 +56,22 @@ def test_api_app_get(self): self.assertEqual(result, expected) def test_api_app_update(self): - client_id = '0dd3b823a682527788c4e40cb7b6f7e9' + client_id = "0dd3b823a682527788c4e40cb7b6f7e9" - request_class = 'ApiAppUpdateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "ApiAppUpdateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'ApiAppGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "ApiAppGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, - response=response_data + response=response_data, ) obj = m.ApiAppUpdateRequest.init(request_data) - obj.custom_logo_file = open(f'{get_base_path()}/pdf-sample.pdf', 'rb') + obj.custom_logo_file = open(f"{get_base_path()}/pdf-sample.pdf", "rb") expected = m.ApiAppGetResponse.init(response_data) @@ -84,18 +83,17 @@ def test_api_app_update(self): obj.custom_logo_file.close() def test_api_app_delete(self): - self.skipTest('skipping test_api_app_delete') + self.skipTest("skipping test_api_app_delete") def test_api_app_list(self): page = 1 page_size = 20 - response_class = 'ApiAppListResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "ApiAppListResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.ApiAppListResponse.init(response_data) @@ -105,5 +103,5 @@ def test_api_app_list(self): self.assertEqual(result, expected) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_bulk_send_job_api.py b/sdks/python/tests/test_bulk_send_job_api.py index c2a277da5..990d9c3cc 100644 --- a/sdks/python/tests/test_bulk_send_job_api.py +++ b/sdks/python/tests/test_bulk_send_job_api.py @@ -14,14 +14,13 @@ def setUp(self): self.api = apis.BulkSendJobApi(self.api_client) def test_bulk_send_job_get(self): - bulk_send_job_id = '6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174' + bulk_send_job_id = "6e683bc0369ba3d5b6f43c2c22a8031dbf6bd174" - response_class = 'BulkSendJobGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "BulkSendJobGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.BulkSendJobGetResponse.init(response_data) @@ -34,12 +33,11 @@ def test_bulk_send_job_list(self): page = 1 page_size = 20 - response_class = 'BulkSendJobListResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "BulkSendJobListResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.BulkSendJobListResponse.init(response_data) @@ -49,5 +47,5 @@ def test_bulk_send_job_list(self): self.assertEqual(result, expected) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_embedded_api.py b/sdks/python/tests/test_embedded_api.py index b7a9c8e27..eb7dcb5fd 100644 --- a/sdks/python/tests/test_embedded_api.py +++ b/sdks/python/tests/test_embedded_api.py @@ -14,18 +14,16 @@ def setUp(self): self.api = apis.EmbeddedApi(self.api_client) def test_embedded_edit_url(self): - template_id = '5de8179668f2033afac48da1868d0093bf133266' + template_id = "5de8179668f2033afac48da1868d0093bf133266" - request_class = 'EmbeddedEditUrlRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "EmbeddedEditUrlRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'EmbeddedEditUrlResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "EmbeddedEditUrlResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.EmbeddedEditUrlResponse.init(response_data) obj = m.EmbeddedEditUrlRequest.init(request_data) @@ -36,14 +34,13 @@ def test_embedded_edit_url(self): self.assertEqual(result, expected) def test_embedded_sign_url(self): - signature_id = '50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b' + signature_id = "50e3542f738adfa7ddd4cbd4c00d2a8ab6e4194b" - response_class = 'EmbeddedSignUrlResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "EmbeddedSignUrlResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.EmbeddedSignUrlResponse.init(response_data) @@ -53,5 +50,5 @@ def test_embedded_sign_url(self): self.assertEqual(result, expected) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_event_callback_helper.py b/sdks/python/tests/test_event_callback_helper.py index 8ff764d65..16ba44bf7 100644 --- a/sdks/python/tests/test_event_callback_helper.py +++ b/sdks/python/tests/test_event_callback_helper.py @@ -8,10 +8,10 @@ class TestEventCallbackHelper(unittest.TestCase): def test_is_valid(self): - api_key = '324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782' + api_key = "324e3b0840f065eb51f3fd63231d0d33daa35d4ed10d27718839e81737065782" api_key_rev = api_key[::-1] - account_data = get_fixture_data('EventCallbackHelper_AccountCallbacks') + account_data = get_fixture_data("EventCallbackHelper_AccountCallbacks") for key, value in account_data.items(): obj = EventCallbackRequest.init(value) @@ -20,10 +20,10 @@ def test_is_valid(self): self.assertFalse(EventCallbackHelper.is_valid(api_key_rev, obj)) self.assertEqual( EventCallbackHelper.EVENT_TYPE_ACCOUNT_CALLBACK, - EventCallbackHelper.get_callback_type(obj) + EventCallbackHelper.get_callback_type(obj), ) - app_data = get_fixture_data('EventCallbackHelper_AppCallbacks') + app_data = get_fixture_data("EventCallbackHelper_AppCallbacks") for key, value in app_data.items(): obj = EventCallbackRequest.init(value) @@ -32,9 +32,9 @@ def test_is_valid(self): self.assertFalse(EventCallbackHelper.is_valid(api_key_rev, obj)) self.assertEqual( EventCallbackHelper.EVENT_TYPE_APP_CALLBACK, - EventCallbackHelper.get_callback_type(obj) + EventCallbackHelper.get_callback_type(obj), ) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_fixtures.py b/sdks/python/tests/test_fixtures.py index 626d38d3b..3bdfa11c8 100644 --- a/sdks/python/tests/test_fixtures.py +++ b/sdks/python/tests/test_fixtures.py @@ -11,42 +11,42 @@ def test_is_valid(self): api_client = ApiClient(configuration) fixtures = [ - 'AccountCreateRequest', - 'AccountUpdateRequest', - 'AccountVerifyRequest', - 'ApiAppCreateRequest', - 'ApiAppUpdateRequest', - 'EmbeddedEditUrlRequest', - 'OAuthTokenGenerateRequest', - 'OAuthTokenRefreshRequest', - 'ReportCreateRequest', - 'SignatureRequestBulkCreateEmbeddedWithTemplateRequest', - 'SignatureRequestBulkSendWithTemplateRequest', - 'SignatureRequestCreateEmbeddedRequest', - 'SignatureRequestCreateEmbeddedWithTemplateRequest', - 'SignatureRequestRemindRequest', - 'SignatureRequestSendRequest', - 'SignatureRequestSendWithTemplateRequest', - 'SignatureRequestUpdateRequest', - 'TeamAddMemberRequest', - 'TeamCreateRequest', - 'TeamRemoveMemberRequest', - 'TeamUpdateRequest', - 'TemplateAddUserRequest', - 'TemplateCreateEmbeddedDraftRequest', - 'TemplateRemoveUserRequest', - 'TemplateUpdateFilesRequest', - 'UnclaimedDraftCreateEmbeddedRequest', - 'UnclaimedDraftCreateEmbeddedWithTemplateRequest', - 'UnclaimedDraftCreateRequest', - 'UnclaimedDraftEditAndResendRequest', + "AccountCreateRequest", + "AccountUpdateRequest", + "AccountVerifyRequest", + "ApiAppCreateRequest", + "ApiAppUpdateRequest", + "EmbeddedEditUrlRequest", + "OAuthTokenGenerateRequest", + "OAuthTokenRefreshRequest", + "ReportCreateRequest", + "SignatureRequestBulkCreateEmbeddedWithTemplateRequest", + "SignatureRequestBulkSendWithTemplateRequest", + "SignatureRequestCreateEmbeddedRequest", + "SignatureRequestCreateEmbeddedWithTemplateRequest", + "SignatureRequestRemindRequest", + "SignatureRequestSendRequest", + "SignatureRequestSendWithTemplateRequest", + "SignatureRequestUpdateRequest", + "TeamAddMemberRequest", + "TeamCreateRequest", + "TeamRemoveMemberRequest", + "TeamUpdateRequest", + "TemplateAddUserRequest", + "TemplateCreateEmbeddedDraftRequest", + "TemplateRemoveUserRequest", + "TemplateUpdateFilesRequest", + "UnclaimedDraftCreateEmbeddedRequest", + "UnclaimedDraftCreateEmbeddedWithTemplateRequest", + "UnclaimedDraftCreateRequest", + "UnclaimedDraftEditAndResendRequest", ] for fixture in fixtures: fixture_data = get_fixture_data(fixture) for key, fixt_data in fixture_data.items(): - class_type = eval(f'models.{fixture}') + class_type = eval(f"models.{fixture}") yanked_files = {} data = {} @@ -68,5 +68,5 @@ def test_is_valid(self): self.assertEqual(obj.__class__.__name__, class_type.__name__) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_model_signature_request_send_request.py b/sdks/python/tests/test_model_signature_request_send_request.py index 54d36435c..abb18748c 100644 --- a/sdks/python/tests/test_model_signature_request_send_request.py +++ b/sdks/python/tests/test_model_signature_request_send_request.py @@ -71,7 +71,9 @@ def test_is_valid(self): "cc1@example.com", "cc2@example.com", ], - file_url=["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"], + file_url=[ + "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" + ], metadata={ "custom_id": 1234, "custom_text": "NDA #9", @@ -86,9 +88,9 @@ def test_is_valid(self): self.assertEqual( data.form_fields_per_document[0].__class__.__name__, - models.SubFormFieldsPerDocumentTextMerge.__name__ + models.SubFormFieldsPerDocumentTextMerge.__name__, ) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_oauth_api.py b/sdks/python/tests/test_oauth_api.py index b8b92591b..36a5c0a24 100644 --- a/sdks/python/tests/test_oauth_api.py +++ b/sdks/python/tests/test_oauth_api.py @@ -14,16 +14,14 @@ def setUp(self): self.api = apis.OAuthApi(self.api_client) def test_token_generate(self): - request_class = 'OAuthTokenGenerateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "OAuthTokenGenerateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'OAuthTokenResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "OAuthTokenResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.OAuthTokenResponse.init(response_data) obj = m.OAuthTokenGenerateRequest.init(request_data) @@ -34,16 +32,14 @@ def test_token_generate(self): self.assertEqual(result, expected) def test_token_refresh(self): - request_class = 'OAuthTokenRefreshRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "OAuthTokenRefreshRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'OAuthTokenResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "OAuthTokenResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.OAuthTokenResponse.init(response_data) obj = m.OAuthTokenRefreshRequest.init(request_data) @@ -54,5 +50,5 @@ def test_token_refresh(self): self.assertEqual(result, expected) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_report_api.py b/sdks/python/tests/test_report_api.py index 71a9cb9a2..d6fe08e75 100644 --- a/sdks/python/tests/test_report_api.py +++ b/sdks/python/tests/test_report_api.py @@ -14,16 +14,14 @@ def setUp(self): self.api = apis.ReportApi(self.api_client) def test_embedded_edit_url(self): - request_class = 'ReportCreateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "ReportCreateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'ReportCreateResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "ReportCreateResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.ReportCreateResponse.init(response_data) obj = m.ReportCreateRequest.init(request_data) @@ -34,5 +32,5 @@ def test_embedded_edit_url(self): self.assertEqual(result, expected) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_signature_request_api.py b/sdks/python/tests/test_signature_request_api.py index d09ca2549..53f7fc362 100644 --- a/sdks/python/tests/test_signature_request_api.py +++ b/sdks/python/tests/test_signature_request_api.py @@ -20,11 +20,7 @@ def test_init_allows_binary_file(self): "subject": "The NDA we talked about", "message": "Please sign this NDA and then we can discuss more.", "signers": [ - { - "email_address": "jill@example.com", - "name": "Jill", - "order": 1 - } + {"email_address": "jill@example.com", "name": "Jill", "order": 1} ], "form_fields_per_document": [ { @@ -41,7 +37,7 @@ def test_init_allows_binary_file(self): "page": 1, } ], - "files": [open(get_base_path() + "/../test_fixtures/pdf-sample.pdf", "rb")] + "files": [open(get_base_path() + "/../test_fixtures/pdf-sample.pdf", "rb")], } obj = m.SignatureRequestSendRequest.init(data) @@ -51,21 +47,54 @@ def test_init_allows_binary_file(self): self.assertEqual(data["subject"], obj.subject) self.assertEqual(data["message"], obj.message) - self.assertEqual(data["signers"][0]["email_address"], obj.signers[0].email_address) + self.assertEqual( + data["signers"][0]["email_address"], obj.signers[0].email_address + ) self.assertEqual(data["signers"][0]["name"], obj.signers[0].name) self.assertEqual(data["signers"][0]["order"], obj.signers[0].order) - self.assertEqual(data["form_fields_per_document"][0]["type"], obj.form_fields_per_document[0].type) - self.assertEqual(data["form_fields_per_document"][0]["document_index"], obj.form_fields_per_document[0].document_index) - self.assertEqual(data["form_fields_per_document"][0]["api_id"], obj.form_fields_per_document[0].api_id) - self.assertEqual(data["form_fields_per_document"][0]["name"], obj.form_fields_per_document[0].name) - self.assertEqual(data["form_fields_per_document"][0]["x"], obj.form_fields_per_document[0].x) - self.assertEqual(data["form_fields_per_document"][0]["y"], obj.form_fields_per_document[0].y) - self.assertEqual(data["form_fields_per_document"][0]["width"], obj.form_fields_per_document[0].width) - self.assertEqual(data["form_fields_per_document"][0]["height"], obj.form_fields_per_document[0].height) - self.assertEqual(data["form_fields_per_document"][0]["required"], obj.form_fields_per_document[0].required) - self.assertEqual(data["form_fields_per_document"][0]["signer"], obj.form_fields_per_document[0].signer) - self.assertEqual(data["form_fields_per_document"][0]["page"], obj.form_fields_per_document[0].page) + self.assertEqual( + data["form_fields_per_document"][0]["type"], + obj.form_fields_per_document[0].type, + ) + self.assertEqual( + data["form_fields_per_document"][0]["document_index"], + obj.form_fields_per_document[0].document_index, + ) + self.assertEqual( + data["form_fields_per_document"][0]["api_id"], + obj.form_fields_per_document[0].api_id, + ) + self.assertEqual( + data["form_fields_per_document"][0]["name"], + obj.form_fields_per_document[0].name, + ) + self.assertEqual( + data["form_fields_per_document"][0]["x"], obj.form_fields_per_document[0].x + ) + self.assertEqual( + data["form_fields_per_document"][0]["y"], obj.form_fields_per_document[0].y + ) + self.assertEqual( + data["form_fields_per_document"][0]["width"], + obj.form_fields_per_document[0].width, + ) + self.assertEqual( + data["form_fields_per_document"][0]["height"], + obj.form_fields_per_document[0].height, + ) + self.assertEqual( + data["form_fields_per_document"][0]["required"], + obj.form_fields_per_document[0].required, + ) + self.assertEqual( + data["form_fields_per_document"][0]["signer"], + obj.form_fields_per_document[0].signer, + ) + self.assertEqual( + data["form_fields_per_document"][0]["page"], + obj.form_fields_per_document[0].page, + ) self.assertEqual(data["files"][0], obj.files[0]) @@ -74,7 +103,7 @@ def test_init_allows_binary_file(self): def test_init_allows_jsony_chars_in_strings(self): title = "테스트 - testing japanese characters in subject" subject = "[テスト]" - message = "{\"テスト - testing message\"}" + message = '{"テスト - testing message"}' request_data = { "test_mode": True, @@ -82,22 +111,18 @@ def test_init_allows_jsony_chars_in_strings(self): "subject": subject, "message": message, "signers": [ - { - "email_address": "jill@example.com", - "name": "Jill", - "order": 1 - } + {"email_address": "jill@example.com", "name": "Jill", "order": 1} ], - "files": [open(get_base_path() + "/../test_fixtures/pdf-sample.pdf", "rb")] + "files": [open(get_base_path() + "/../test_fixtures/pdf-sample.pdf", "rb")], } - response_class = 'SignatureRequestGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "SignatureRequestGetResponse" + response_data = get_fixture_data(response_class)["default"] obj = m.SignatureRequestSendRequest.init(request_data) self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, response=response_data, ) @@ -117,20 +142,20 @@ def test_init_allows_jsony_chars_in_strings(self): obj.files[0].close() def test_signature_request_bulk_create_embedded_with_template(self): - request_class = 'SignatureRequestBulkCreateEmbeddedWithTemplateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "SignatureRequestBulkCreateEmbeddedWithTemplateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'BulkSendJobSendResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "BulkSendJobSendResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, - response=response_data + response=response_data, ) expected = m.BulkSendJobSendResponse.init(response_data) obj = m.SignatureRequestBulkCreateEmbeddedWithTemplateRequest.init(request_data) - obj.signer_file = open(f'{get_base_path()}/bulk-send-sample.csv', 'rb') + obj.signer_file = open(f"{get_base_path()}/bulk-send-sample.csv", "rb") result = self.api.signature_request_bulk_create_embedded_with_template(obj) @@ -140,20 +165,20 @@ def test_signature_request_bulk_create_embedded_with_template(self): obj.signer_file.close() def test_signature_request_bulk_send_with_template(self): - request_class = 'SignatureRequestBulkSendWithTemplateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "SignatureRequestBulkSendWithTemplateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'BulkSendJobSendResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "BulkSendJobSendResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, - response=response_data + response=response_data, ) expected = m.BulkSendJobSendResponse.init(response_data) obj = m.SignatureRequestBulkSendWithTemplateRequest.init(request_data) - obj.signer_file = open(f'{get_base_path()}/bulk-send-sample.csv', 'rb') + obj.signer_file = open(f"{get_base_path()}/bulk-send-sample.csv", "rb") result = self.api.signature_request_bulk_send_with_template(obj) @@ -163,20 +188,20 @@ def test_signature_request_bulk_send_with_template(self): obj.signer_file.close() def test_signature_request_create_embedded(self): - request_class = 'SignatureRequestCreateEmbeddedRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "SignatureRequestCreateEmbeddedRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'SignatureRequestGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "SignatureRequestGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, - response=response_data + response=response_data, ) expected = m.SignatureRequestGetResponse.init(response_data) obj = m.SignatureRequestCreateEmbeddedRequest.init(request_data) - obj.files = [open(f'{get_base_path()}/pdf-sample.pdf', 'rb')] + obj.files = [open(f"{get_base_path()}/pdf-sample.pdf", "rb")] result = self.api.signature_request_create_embedded(obj) @@ -186,20 +211,20 @@ def test_signature_request_create_embedded(self): obj.files[0].close() def test_signature_request_create_embedded_with_template(self): - request_class = 'SignatureRequestCreateEmbeddedWithTemplateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "SignatureRequestCreateEmbeddedWithTemplateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'SignatureRequestGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "SignatureRequestGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, - response=response_data + response=response_data, ) expected = m.SignatureRequestGetResponse.init(response_data) obj = m.SignatureRequestCreateEmbeddedWithTemplateRequest.init(request_data) - obj.files = [open(f'{get_base_path()}/pdf-sample.pdf', 'rb')] + obj.files = [open(f"{get_base_path()}/pdf-sample.pdf", "rb")] result = self.api.signature_request_create_embedded_with_template(obj) @@ -209,17 +234,16 @@ def test_signature_request_create_embedded_with_template(self): obj.files[0].close() def test_signature_request_files(self): - self.skipTest('skipping test_signature_request_files') + self.skipTest("skipping test_signature_request_files") def test_signature_request_get(self): - signature_request_id = 'fa5c8a0b0f492d768749333ad6fcc214c111e967' + signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - response_class = 'SignatureRequestGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "SignatureRequestGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.SignatureRequestGetResponse.init(response_data) @@ -229,14 +253,13 @@ def test_signature_request_get(self): self.assertEqual(result, expected) def test_signature_request_list(self): - account_id = 'all' + account_id = "all" - response_class = 'SignatureRequestListResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "SignatureRequestListResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.SignatureRequestListResponse.init(response_data) @@ -249,7 +272,7 @@ def test_signature_request_list_null_query_value_removed(self): account_id = None self.mock_pool.expect_request( - content_type='application/json', + content_type="application/json", response=None, ) @@ -262,7 +285,7 @@ def test_signature_request_list_null_query_value_removed(self): query = None self.mock_pool.expect_request( - content_type='application/json', + content_type="application/json", response=None, ) @@ -271,11 +294,11 @@ def test_signature_request_list_null_query_value_removed(self): request_fields = self.mock_pool.get_query_params() self.assertTrue(not request_fields) - account_id = 'ABC123' + account_id = "ABC123" query = None self.mock_pool.expect_request( - content_type='application/json', + content_type="application/json", response=None, ) @@ -283,15 +306,15 @@ def test_signature_request_list_null_query_value_removed(self): request_fields = self.mock_pool.get_query_params() expected_fields = { - 'account_id': [account_id], + "account_id": [account_id], } self.assertEqual(expected_fields, request_fields) - account_id = 'ABC123' - query = 'My amazing query' + account_id = "ABC123" + query = "My amazing query" self.mock_pool.expect_request( - content_type='application/json', + content_type="application/json", response=None, ) @@ -299,20 +322,19 @@ def test_signature_request_list_null_query_value_removed(self): request_fields = self.mock_pool.get_query_params() expected_fields = { - 'account_id': [account_id], - 'query': [query], + "account_id": [account_id], + "query": [query], } self.assertEqual(expected_fields, request_fields) def test_signature_request_release_hold(self): - signature_request_id = 'fa5c8a0b0f492d768749333ad6fcc214c111e967' + signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - response_class = 'SignatureRequestGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "SignatureRequestGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.SignatureRequestGetResponse.init(response_data) @@ -322,18 +344,16 @@ def test_signature_request_release_hold(self): self.assertEqual(result, expected) def test_signature_request_remind(self): - signature_request_id = 'fa5c8a0b0f492d768749333ad6fcc214c111e967' + signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - request_class = 'SignatureRequestRemindRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "SignatureRequestRemindRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'SignatureRequestGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "SignatureRequestGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.SignatureRequestGetResponse.init(response_data) obj = m.SignatureRequestRemindRequest.init(request_data) @@ -344,23 +364,23 @@ def test_signature_request_remind(self): self.assertEqual(result, expected) def test_signature_request_remove(self): - self.skipTest('skipping test_signature_request_remove') + self.skipTest("skipping test_signature_request_remove") def test_signature_request_send_request(self): - request_class = 'SignatureRequestSendRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "SignatureRequestSendRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'SignatureRequestGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "SignatureRequestGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, - response=response_data + response=response_data, ) expected = m.SignatureRequestGetResponse.init(response_data) obj = m.SignatureRequestSendRequest.init(request_data) - obj.files = [open(f'{get_base_path()}/pdf-sample.pdf', 'rb')] + obj.files = [open(f"{get_base_path()}/pdf-sample.pdf", "rb")] result = self.api.signature_request_send(obj) @@ -370,16 +390,14 @@ def test_signature_request_send_request(self): obj.files[0].close() def test_no_file_forces_application_json(self): - request_class = 'SignatureRequestSendRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "SignatureRequestSendRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'SignatureRequestGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "SignatureRequestGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.SignatureRequestGetResponse.init(response_data) obj = m.SignatureRequestSendRequest.init(request_data) @@ -390,16 +408,14 @@ def test_no_file_forces_application_json(self): self.assertEqual(result, expected) def test_signature_request_send_with_template(self): - request_class = 'SignatureRequestSendWithTemplateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "SignatureRequestSendWithTemplateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'SignatureRequestGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "SignatureRequestGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.SignatureRequestGetResponse.init(response_data) obj = m.SignatureRequestSendWithTemplateRequest.init(request_data) @@ -410,18 +426,16 @@ def test_signature_request_send_with_template(self): self.assertEqual(result, expected) def test_signature_request_update(self): - signature_request_id = 'fa5c8a0b0f492d768749333ad6fcc214c111e967' + signature_request_id = "fa5c8a0b0f492d768749333ad6fcc214c111e967" - request_class = 'SignatureRequestUpdateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "SignatureRequestUpdateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'SignatureRequestGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "SignatureRequestGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.SignatureRequestGetResponse.init(response_data) obj = m.SignatureRequestUpdateRequest.init(request_data) @@ -432,5 +446,5 @@ def test_signature_request_update(self): self.assertEqual(result, expected) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_sub_form_fields_per_document_base.py b/sdks/python/tests/test_sub_form_fields_per_document_base.py index 9ae3a1bdc..0c467246c 100644 --- a/sdks/python/tests/test_sub_form_fields_per_document_base.py +++ b/sdks/python/tests/test_sub_form_fields_per_document_base.py @@ -7,32 +7,28 @@ class TestSubFormFieldsPerDocumentBase(unittest.TestCase): def test_is_valid(self): - fixture_data = get_fixture_data('SubFormFieldsPerDocument') + fixture_data = get_fixture_data("SubFormFieldsPerDocument") for ftype, data in fixture_data.items(): - payload = { - 'signers': [], - 'form_fields_per_document': [data] - } + payload = {"signers": [], "form_fields_per_document": [data]} obj = SignatureRequestSendRequest.init(payload) form_fields_per_document = obj.form_fields_per_document[0] - class_type = eval(f'models.{ftype}') + class_type = eval(f"models.{ftype}") - self.assertEqual(form_fields_per_document.__class__.__name__, class_type.__name__) + self.assertEqual( + form_fields_per_document.__class__.__name__, class_type.__name__ + ) self.assertEqual(form_fields_per_document.to_dict(), data) def test_signer_allows_int(self): - fixture_data = get_fixture_data('SubFormFieldsPerDocument') + fixture_data = get_fixture_data("SubFormFieldsPerDocument") for ftype, data in fixture_data.items(): - data['signer'] = 1234 + data["signer"] = 1234 - payload = { - 'signers': [], - 'form_fields_per_document': [data] - } + payload = {"signers": [], "form_fields_per_document": [data]} expected_signer = 1234 @@ -41,22 +37,19 @@ def test_signer_allows_int(self): self.assertEqual(form_fields_per_document.signer, expected_signer) def test_signer_allows_string(self): - fixture_data = get_fixture_data('SubFormFieldsPerDocument') + fixture_data = get_fixture_data("SubFormFieldsPerDocument") for ftype, data in fixture_data.items(): - data['signer'] = 'sender' + data["signer"] = "sender" - payload = { - 'signers': [], - 'form_fields_per_document': [data] - } + payload = {"signers": [], "form_fields_per_document": [data]} - expected_signer = 'sender' + expected_signer = "sender" obj = SignatureRequestSendRequest.init(payload) form_fields_per_document = obj.form_fields_per_document[0] self.assertEqual(form_fields_per_document.signer, expected_signer) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_team_api.py b/sdks/python/tests/test_team_api.py index f0a8a8cbc..aa7e90ee6 100644 --- a/sdks/python/tests/test_team_api.py +++ b/sdks/python/tests/test_team_api.py @@ -14,16 +14,14 @@ def setUp(self): self.api = apis.TeamApi(self.api_client) def test_team_add_member(self): - request_class = 'TeamAddMemberRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "TeamAddMemberRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'TeamGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "TeamGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.TeamGetResponse.init(response_data) obj = m.TeamAddMemberRequest.init(request_data) @@ -34,16 +32,14 @@ def test_team_add_member(self): self.assertEqual(result, expected) def test_team_create(self): - request_class = 'TeamCreateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "TeamCreateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'TeamGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "TeamGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.TeamGetResponse.init(response_data) obj = m.TeamCreateRequest.init(request_data) @@ -54,15 +50,14 @@ def test_team_create(self): self.assertEqual(result, expected) def test_team_delete(self): - self.skipTest('skipping test_team_create') + self.skipTest("skipping test_team_create") def test_team_get(self): - response_class = 'TeamGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "TeamGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.TeamGetResponse.init(response_data) @@ -72,16 +67,14 @@ def test_team_get(self): self.assertEqual(result, expected) def test_team_update(self): - request_class = 'TeamUpdateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "TeamUpdateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'TeamGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "TeamGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.TeamGetResponse.init(response_data) obj = m.TeamUpdateRequest.init(request_data) @@ -92,14 +85,14 @@ def test_team_update(self): self.assertEqual(result, expected) def test_team_remove_member(self): - request_class = 'TeamRemoveMemberRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "TeamRemoveMemberRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'TeamGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "TeamGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', + content_type="application/json", data=request_data, response=response_data, status=201, @@ -113,5 +106,5 @@ def test_team_remove_member(self): self.assertEqual(result, expected) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_template_api.py b/sdks/python/tests/test_template_api.py index aedf48dde..f4376a705 100644 --- a/sdks/python/tests/test_template_api.py +++ b/sdks/python/tests/test_template_api.py @@ -14,18 +14,16 @@ def setUp(self): self.api = apis.TemplateApi(self.api_client) def test_template_add_user(self): - template_id = 'f57db65d3f933b5316d398057a36176831451a35' + template_id = "f57db65d3f933b5316d398057a36176831451a35" - request_class = 'TemplateAddUserRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "TemplateAddUserRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'TemplateGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "TemplateGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.TemplateGetResponse.init(response_data) obj = m.TemplateAddUserRequest.init(request_data) @@ -36,20 +34,20 @@ def test_template_add_user(self): self.assertEqual(result, expected) def test_template_create_embedded_draft(self): - request_class = 'TemplateCreateEmbeddedDraftRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "TemplateCreateEmbeddedDraftRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'TemplateCreateEmbeddedDraftResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "TemplateCreateEmbeddedDraftResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, - response=response_data + response=response_data, ) expected = m.TemplateCreateEmbeddedDraftResponse.init(response_data) obj = m.TemplateCreateEmbeddedDraftRequest.init(request_data) - obj.files = [open(f'{get_base_path()}/pdf-sample.pdf', 'rb')] + obj.files = [open(f"{get_base_path()}/pdf-sample.pdf", "rb")] result = self.api.template_create_embedded_draft(obj) @@ -59,20 +57,19 @@ def test_template_create_embedded_draft(self): obj.files[0].close() def test_template_delete(self): - self.skipTest('skipping test_template_delete') + self.skipTest("skipping test_template_delete") def test_template_files(self): - self.skipTest('skipping test_template_files') + self.skipTest("skipping test_template_files") def test_template_get(self): - template_id = 'f57db65d3f933b5316d398057a36176831451a35' + template_id = "f57db65d3f933b5316d398057a36176831451a35" - response_class = 'TemplateGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "TemplateGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.TemplateGetResponse.init(response_data) @@ -82,14 +79,13 @@ def test_template_get(self): self.assertEqual(result, expected) def test_template_list(self): - account_id = 'all' + account_id = "all" - response_class = 'TemplateListResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "TemplateListResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - response=response_data + content_type="application/json", response=response_data ) expected = m.TemplateListResponse.init(response_data) @@ -99,18 +95,16 @@ def test_template_list(self): self.assertEqual(result, expected) def test_template_remove_user(self): - template_id = '21f920ec2b7f4b6bb64d3ed79f26303843046536' + template_id = "21f920ec2b7f4b6bb64d3ed79f26303843046536" - request_class = 'TemplateRemoveUserRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "TemplateRemoveUserRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'TemplateGetResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "TemplateGetResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.TemplateGetResponse.init(response_data) obj = m.TemplateRemoveUserRequest.init(request_data) @@ -121,22 +115,22 @@ def test_template_remove_user(self): self.assertEqual(result, expected) def test_template_update_files(self): - template_id = '21f920ec2b7f4b6bb64d3ed79f26303843046536' + template_id = "21f920ec2b7f4b6bb64d3ed79f26303843046536" - request_class = 'TemplateUpdateFilesRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "TemplateUpdateFilesRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'TemplateUpdateFilesResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "TemplateUpdateFilesResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, - response=response_data + response=response_data, ) expected = m.TemplateUpdateFilesResponse.init(response_data) obj = m.TemplateUpdateFilesRequest.init(request_data) - obj.files = [open(f'{get_base_path()}/pdf-sample.pdf', 'rb')] + obj.files = [open(f"{get_base_path()}/pdf-sample.pdf", "rb")] result = self.api.template_update_files(template_id, obj) @@ -146,5 +140,5 @@ def test_template_update_files(self): obj.files[0].close() -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_unclaimed_draft_api.py b/sdks/python/tests/test_unclaimed_draft_api.py index 30227395f..90b9822a6 100644 --- a/sdks/python/tests/test_unclaimed_draft_api.py +++ b/sdks/python/tests/test_unclaimed_draft_api.py @@ -14,20 +14,20 @@ def setUp(self): self.api = apis.UnclaimedDraftApi(self.api_client) def test_unclaimed_draft_create(self): - request_class = 'UnclaimedDraftCreateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "UnclaimedDraftCreateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'UnclaimedDraftCreateResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "UnclaimedDraftCreateResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, - response=response_data + response=response_data, ) expected = m.UnclaimedDraftCreateResponse.init(response_data) obj = m.UnclaimedDraftCreateRequest.init(request_data) - obj.files = [open(f'{get_base_path()}/pdf-sample.pdf', 'rb')] + obj.files = [open(f"{get_base_path()}/pdf-sample.pdf", "rb")] result = self.api.unclaimed_draft_create(obj) @@ -37,20 +37,20 @@ def test_unclaimed_draft_create(self): obj.files[0].close() def test_unclaimed_draft_create_embedded(self): - request_class = 'UnclaimedDraftCreateEmbeddedRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "UnclaimedDraftCreateEmbeddedRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'UnclaimedDraftCreateResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "UnclaimedDraftCreateResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, - response=response_data + response=response_data, ) expected = m.UnclaimedDraftCreateResponse.init(response_data) obj = m.UnclaimedDraftCreateEmbeddedRequest.init(request_data) - obj.files = [open(f'{get_base_path()}/pdf-sample.pdf', 'rb')] + obj.files = [open(f"{get_base_path()}/pdf-sample.pdf", "rb")] result = self.api.unclaimed_draft_create_embedded(obj) @@ -60,20 +60,20 @@ def test_unclaimed_draft_create_embedded(self): obj.files[0].close() def test_unclaimed_draft_create_embedded_with_template(self): - request_class = 'UnclaimedDraftCreateEmbeddedWithTemplateRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "UnclaimedDraftCreateEmbeddedWithTemplateRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'UnclaimedDraftCreateResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "UnclaimedDraftCreateResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='multipart/form-data', + content_type="multipart/form-data", data=request_data, - response=response_data + response=response_data, ) expected = m.UnclaimedDraftCreateResponse.init(response_data) obj = m.UnclaimedDraftCreateEmbeddedWithTemplateRequest.init(request_data) - obj.files = [open(f'{get_base_path()}/pdf-sample.pdf', 'rb')] + obj.files = [open(f"{get_base_path()}/pdf-sample.pdf", "rb")] result = self.api.unclaimed_draft_create_embedded_with_template(obj) @@ -83,18 +83,16 @@ def test_unclaimed_draft_create_embedded_with_template(self): obj.files[0].close() def test_unclaimed_draft_edit_and_resend(self): - signature_request_id = '2f9781e1a83jdja934d808c153c2e1d3df6f8f2f' + signature_request_id = "2f9781e1a83jdja934d808c153c2e1d3df6f8f2f" - request_class = 'UnclaimedDraftEditAndResendRequest' - request_data = get_fixture_data(request_class)['default'] + request_class = "UnclaimedDraftEditAndResendRequest" + request_data = get_fixture_data(request_class)["default"] - response_class = 'UnclaimedDraftCreateResponse' - response_data = get_fixture_data(response_class)['default'] + response_class = "UnclaimedDraftCreateResponse" + response_data = get_fixture_data(response_class)["default"] self.mock_pool.expect_request( - content_type='application/json', - data=request_data, - response=response_data + content_type="application/json", data=request_data, response=response_data ) expected = m.UnclaimedDraftCreateResponse.init(response_data) obj = m.UnclaimedDraftEditAndResendRequest.init(request_data) @@ -105,5 +103,5 @@ def test_unclaimed_draft_edit_and_resend(self): self.assertEqual(result, expected) -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/sdks/python/tests/test_utils.py b/sdks/python/tests/test_utils.py index 952c7e40d..6fe5c394e 100644 --- a/sdks/python/tests/test_utils.py +++ b/sdks/python/tests/test_utils.py @@ -6,13 +6,13 @@ def get_base_path(): - return os.path.dirname(os.path.abspath(__file__)) + f'/../test_fixtures' + return os.path.dirname(os.path.abspath(__file__)) + f"/../test_fixtures" def get_fixture_data(filename): - path = get_base_path() + f'/{filename}.json' + path = get_base_path() + f"/{filename}.json" - file = open(path, 'r') + file = open(path, "r") fixture_data = json.load(file) file.close() @@ -29,30 +29,30 @@ def __init__(self, tc): def expect_request(self, content_type, data=None, response=None, status=200): self._expected_request = { - 'content_type': content_type, - 'data': data, + "content_type": content_type, + "data": data, } self._expected_response = { - 'data': response, - 'status': status, + "data": response, + "status": status, } def request(self, *args, **kwargs): - if self._expected_request['content_type'] == 'multipart/form-data': - self._tc.assertTrue('encode_multipart' in kwargs.keys()) - self._tc.assertTrue(kwargs['encode_multipart']) + if self._expected_request["content_type"] == "multipart/form-data": + self._tc.assertTrue("encode_multipart" in kwargs.keys()) + self._tc.assertTrue(kwargs["encode_multipart"]) else: - self._tc.assertFalse('encode_multipart' in kwargs.keys()) + self._tc.assertFalse("encode_multipart" in kwargs.keys()) - if 'fields' in kwargs: - self._request_fields = kwargs['fields'] + if "fields" in kwargs: + self._request_fields = kwargs["fields"] self._query_params = parse_qs(urlparse(args[1]).query) return urllib3.HTTPResponse( - status=self._expected_response['status'], + status=self._expected_response["status"], preload_content=True, - body=json.dumps(self._expected_response['data']).encode() + body=json.dumps(self._expected_response["data"]).encode(), ) def get_fields(self):